src/model/PlanarSurfaceGroup.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 MODEL_PLANARSURFACEGROUP_HPP | ||
| 7 | #define MODEL_PLANARSURFACEGROUP_HPP | ||
| 8 | |||
| 9 | #include "ModelAPI.hpp" | ||
| 10 | #include "OpaqueMaterial.hpp" | ||
| 11 | |||
| 12 | namespace openstudio { | ||
| 13 | |||
| 14 | class Transformation; | ||
| 15 | class Point3d; | ||
| 16 | class BoundingBox; | ||
| 17 | |||
| 18 | namespace model { | ||
| 19 | |||
| 20 | namespace detail { | ||
| 21 | class PlanarSurfaceGroup_Impl; | ||
| 22 | } | ||
| 23 | |||
| 24 | /** PlanarSurfaceGroup is an abstract class representing a group that holds many PlanarSurfaces. | ||
| 25 | */ | ||
| 26 | class MODEL_API PlanarSurfaceGroup : public ParentObject | ||
| 27 | { | ||
| 28 | public: | ||
| 29 | 3754183 | virtual ~PlanarSurfaceGroup() override = default; | |
| 30 | // Default the copy and move operators because the virtual dtor is explicit | ||
| 31 | 12513 | PlanarSurfaceGroup(const PlanarSurfaceGroup& other) = default; | |
| 32 | 2501169 | PlanarSurfaceGroup(PlanarSurfaceGroup&& other) = default; | |
| 33 | 751 | PlanarSurfaceGroup& operator=(const PlanarSurfaceGroup&) = default; | |
| 34 | 13552 | PlanarSurfaceGroup& operator=(PlanarSurfaceGroup&&) = default; | |
| 35 | |||
| 36 | /** @name Getters */ | ||
| 37 | //@{ | ||
| 38 | |||
| 39 | double directionofRelativeNorth() const; | ||
| 40 | |||
| 41 | bool isDirectionofRelativeNorthDefaulted() const; | ||
| 42 | |||
| 43 | double xOrigin() const; | ||
| 44 | |||
| 45 | bool isXOriginDefaulted() const; | ||
| 46 | |||
| 47 | double yOrigin() const; | ||
| 48 | |||
| 49 | bool isYOriginDefaulted() const; | ||
| 50 | |||
| 51 | double zOrigin() const; | ||
| 52 | |||
| 53 | bool isZOriginDefaulted() const; | ||
| 54 | |||
| 55 | //@} | ||
| 56 | /** @name Setters */ | ||
| 57 | //@{ | ||
| 58 | |||
| 59 | bool setDirectionofRelativeNorth(double directionofRelativeNorth); | ||
| 60 | |||
| 61 | void resetDirectionofRelativeNorth(); | ||
| 62 | |||
| 63 | bool setXOrigin(double xOrigin); | ||
| 64 | |||
| 65 | void resetXOrigin(); | ||
| 66 | |||
| 67 | bool setYOrigin(double yOrigin); | ||
| 68 | |||
| 69 | void resetYOrigin(); | ||
| 70 | |||
| 71 | bool setZOrigin(double zOrigin); | ||
| 72 | |||
| 73 | void resetZOrigin(); | ||
| 74 | |||
| 75 | //@} | ||
| 76 | |||
| 77 | /** Returns the transformation from local coordinates to parent coordinates. */ | ||
| 78 | openstudio::Transformation transformation() const; | ||
| 79 | |||
| 80 | /** Returns the transformation from local coordinates to building coordinates. */ | ||
| 81 | openstudio::Transformation buildingTransformation() const; | ||
| 82 | |||
| 83 | /** Returns the transformation from local coordinates to site coordinates. */ | ||
| 84 | openstudio::Transformation siteTransformation() const; | ||
| 85 | |||
| 86 | /** Sets the transformation from local coordinates to parent coordinates, | ||
| 87 | * this method can be used to move the group. */ | ||
| 88 | bool setTransformation(const openstudio::Transformation& transformation); | ||
| 89 | |||
| 90 | /** Changes the transformation from local coordinates to parent coordinates, | ||
| 91 | * this method alter geometry of children relative to the | ||
| 92 | * group so that it stays in the same place with the new transformation. */ | ||
| 93 | bool changeTransformation(const openstudio::Transformation& transformation); | ||
| 94 | |||
| 95 | /** Get the BoundingBox in local coordinates. */ | ||
| 96 | openstudio::BoundingBox boundingBox() const; | ||
| 97 | |||
| 98 | /** Get the BoundingBox in parent coordinates. */ | ||
| 99 | openstudio::BoundingBox boundingBoxParentCoordinates() const; | ||
| 100 | |||
| 101 | /** Get the BoundingBox in building coordinates. */ | ||
| 102 | openstudio::BoundingBox boundingBoxBuildingCoordinates() const; | ||
| 103 | |||
| 104 | /** Get the BoundingBox in site coordinates. */ | ||
| 105 | openstudio::BoundingBox boundingBoxSiteCoordinates() const; | ||
| 106 | |||
| 107 | protected: | ||
| 108 | /** @name Constructors and Destructors */ | ||
| 109 | //@{ | ||
| 110 | |||
| 111 | explicit PlanarSurfaceGroup(IddObjectType iddObjectType, const Model& model); | ||
| 112 | |||
| 113 | //@} | ||
| 114 | |||
| 115 | /// @cond | ||
| 116 | using ImplType = detail::PlanarSurfaceGroup_Impl; | ||
| 117 | |||
| 118 | friend class Model; | ||
| 119 | friend class openstudio::IdfObject; | ||
| 120 | friend class detail::PlanarSurfaceGroup_Impl; | ||
| 121 | |||
| 122 | explicit PlanarSurfaceGroup(std::shared_ptr<detail::PlanarSurfaceGroup_Impl> impl); | ||
| 123 | |||
| 124 | /// @endcond | ||
| 125 | private: | ||
| 126 | REGISTER_LOGGER("openstudio.model.PlanarSurfaceGroup"); | ||
| 127 | }; | ||
| 128 | |||
| 129 | /** \relates PlanarSurfaceGroup */ | ||
| 130 | using OptionalPlanarSurfaceGroup = boost::optional<PlanarSurfaceGroup>; | ||
| 131 | |||
| 132 | /** \relates PlanarSurfaceGroup */ | ||
| 133 | using PlanarSurfaceGroupVector = std::vector<PlanarSurfaceGroup>; | ||
| 134 | |||
| 135 | } // namespace model | ||
| 136 | } // namespace openstudio | ||
| 137 | |||
| 138 | #endif // MODEL_PLANARSURFACEGROUP_HPP | ||
| 139 |