src/gltf/GltfBoundingBox.hpp
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | /*********************************************************************************************************************** | ||
| 2 | * OpenStudio(R), Copyright (c) Alliance for Energy Innovation, LLC. | ||
| 3 | * See also https://openstudio.net/license | ||
| 4 | ***********************************************************************************************************************/ | ||
| 5 | |||
| 6 | #ifndef GLTF_GLTFBOUNDINGBOX_HPP | ||
| 7 | #define GLTF_GLTFBOUNDINGBOX_HPP | ||
| 8 | |||
| 9 | #include "GltfAPI.hpp" | ||
| 10 | |||
| 11 | #include "../utilities/core/Logger.hpp" | ||
| 12 | |||
| 13 | #include <vector> | ||
| 14 | |||
| 15 | namespace tinygltf { | ||
| 16 | class Value; | ||
| 17 | } | ||
| 18 | |||
| 19 | namespace openstudio { | ||
| 20 | namespace model { | ||
| 21 | class PlanarSurfaceGroup; | ||
| 22 | } // namespace model | ||
| 23 | |||
| 24 | namespace gltf { | ||
| 25 | |||
| 26 | class GltfMetaData; | ||
| 27 | |||
| 28 | /** GltfBoundingBox is an Interface between the PlanarSurfaceGroups of a Model and a glTF Scene's extras to set the boundingbox **/ | ||
| 29 | class GLTF_API GltfBoundingBox | ||
| 30 | { | ||
| 31 | public: | ||
| 32 | GltfBoundingBox(); | ||
| 33 | GltfBoundingBox(const std::vector<model::PlanarSurfaceGroup>& planarSurfaceGroups); | ||
| 34 | |||
| 35 | double lookAtR() const; | ||
| 36 | void setLookAtR(double lookAtR); | ||
| 37 | |||
| 38 | double lookAtX() const; | ||
| 39 | void setLookAtX(double lookAtX); | ||
| 40 | |||
| 41 | double lookAtY() const; | ||
| 42 | void setLookAtY(double lookAtY); | ||
| 43 | |||
| 44 | double lookAtZ() const; | ||
| 45 | void setLookAtZ(double lookAtZ); | ||
| 46 | |||
| 47 | double maxX() const; | ||
| 48 | void setMaxX(double maxX); | ||
| 49 | |||
| 50 | double maxY() const; | ||
| 51 | void setMaxY(double maxY); | ||
| 52 | |||
| 53 | double maxZ() const; | ||
| 54 | void setMaxZ(double maxZ); | ||
| 55 | |||
| 56 | double minX() const; | ||
| 57 | void setMinX(double minX); | ||
| 58 | |||
| 59 | double minY() const; | ||
| 60 | void setMinY(double minY); | ||
| 61 | |||
| 62 | double minZ() const; | ||
| 63 | void setMinZ(double minZ); | ||
| 64 | |||
| 65 | protected: | ||
| 66 | std::map<std::string, tinygltf::Value> toExtras() const; | ||
| 67 | GltfBoundingBox(const tinygltf::Value& boundingBoxObj); | ||
| 68 | friend class GltfMetaData; | ||
| 69 | |||
| 70 | private: | ||
| 71 | − | REGISTER_LOGGER("openstudio.gltf.GltfBoundingBox"); | |
| 72 | |||
| 73 | double m_lookAtR = 0.0; | ||
| 74 | double m_lookAtX = 0.0; | ||
| 75 | double m_lookAtY = 0.0; | ||
| 76 | double m_lookAtZ = 0.0; | ||
| 77 | double m_maxX = 0.0; | ||
| 78 | double m_maxY = 0.0; | ||
| 79 | double m_maxZ = 0.0; | ||
| 80 | double m_minX = 0.0; | ||
| 81 | double m_minY = 0.0; | ||
| 82 | double m_minZ = 0.0; | ||
| 83 | }; | ||
| 84 | } // namespace gltf | ||
| 85 | } // namespace openstudio | ||
| 86 | |||
| 87 | #endif //GLTF_GLTFBOUNDINGBOX_HPP | ||
| 88 |