src/model/PlanarSurfaceGroup_Impl.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_IMPL_HPP | ||
| 7 | #define MODEL_PLANARSURFACEGROUP_IMPL_HPP | ||
| 8 | |||
| 9 | #include "ParentObject_Impl.hpp" | ||
| 10 | |||
| 11 | #include "../utilities/geometry/Transformation.hpp" | ||
| 12 | |||
| 13 | namespace openstudio { | ||
| 14 | |||
| 15 | class Point3d; | ||
| 16 | class BoundingBox; | ||
| 17 | |||
| 18 | namespace model { | ||
| 19 | namespace detail { | ||
| 20 | |||
| 21 | class MODEL_API PlanarSurfaceGroup_Impl : public ParentObject_Impl | ||
| 22 | { | ||
| 23 | |||
| 24 | public: | ||
| 25 | /** @name Constructors and Destructors */ | ||
| 26 | //@{ | ||
| 27 | |||
| 28 | // constructor | ||
| 29 | PlanarSurfaceGroup_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle); | ||
| 30 | |||
| 31 | // construct from workspace | ||
| 32 | PlanarSurfaceGroup_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle); | ||
| 33 | |||
| 34 | PlanarSurfaceGroup_Impl(const PlanarSurfaceGroup_Impl& other, Model_Impl* model, bool keepHandle); | ||
| 35 | |||
| 36 | // virtual destructor | ||
| 37 | 13398 | virtual ~PlanarSurfaceGroup_Impl() override = default; | |
| 38 | |||
| 39 | virtual double directionofRelativeNorth() const = 0; | ||
| 40 | |||
| 41 | virtual bool isDirectionofRelativeNorthDefaulted() const = 0; | ||
| 42 | |||
| 43 | virtual double xOrigin() const = 0; | ||
| 44 | |||
| 45 | virtual bool isXOriginDefaulted() const = 0; | ||
| 46 | |||
| 47 | virtual double yOrigin() const = 0; | ||
| 48 | |||
| 49 | virtual bool isYOriginDefaulted() const = 0; | ||
| 50 | |||
| 51 | virtual double zOrigin() const = 0; | ||
| 52 | |||
| 53 | virtual bool isZOriginDefaulted() const = 0; | ||
| 54 | |||
| 55 | virtual bool setDirectionofRelativeNorth(double directionofRelativeNorth, bool driverMethod = true) = 0; | ||
| 56 | |||
| 57 | virtual void resetDirectionofRelativeNorth() = 0; | ||
| 58 | |||
| 59 | virtual bool setXOrigin(double xOrigin, bool driverMethod = true) = 0; | ||
| 60 | |||
| 61 | virtual void resetXOrigin() = 0; | ||
| 62 | |||
| 63 | virtual bool setYOrigin(double yOrigin, bool driverMethod = true) = 0; | ||
| 64 | |||
| 65 | virtual void resetYOrigin() = 0; | ||
| 66 | |||
| 67 | virtual bool setZOrigin(double zOrigin, bool driverMethod = true) = 0; | ||
| 68 | |||
| 69 | virtual void resetZOrigin() = 0; | ||
| 70 | |||
| 71 | /** Returns the transformation from local coordinates to parent coordinates. */ | ||
| 72 | openstudio::Transformation transformation() const; | ||
| 73 | |||
| 74 | /** Returns the transformation from local coordinates to site coordinates. */ | ||
| 75 | openstudio::Transformation siteTransformation() const; | ||
| 76 | |||
| 77 | /** Returns the transformation from local coordinates to building coordinates. */ | ||
| 78 | virtual openstudio::Transformation buildingTransformation() const = 0; | ||
| 79 | |||
| 80 | /** Sets the transformation from local coordinates to parent coordinates, | ||
| 81 | * this method can be used to move the group. */ | ||
| 82 | bool setTransformation(const openstudio::Transformation& transformation); | ||
| 83 | |||
| 84 | /** Changes the transformation from local coordinates to parent coordinates, | ||
| 85 | * this method alter geometry of children relative to the | ||
| 86 | * group so that it stays in the same place with the new transformation. */ | ||
| 87 | virtual bool changeTransformation(const openstudio::Transformation& transformation) = 0; | ||
| 88 | |||
| 89 | /** Get the BoundingBox in local coordinates. */ | ||
| 90 | virtual openstudio::BoundingBox boundingBox() const = 0; | ||
| 91 | |||
| 92 | /** Get the BoundingBox in parent coordinates. */ | ||
| 93 | openstudio::BoundingBox boundingBoxParentCoordinates() const; | ||
| 94 | |||
| 95 | /** Get the BoundingBox in building coordinates. */ | ||
| 96 | openstudio::BoundingBox boundingBoxBuildingCoordinates() const; | ||
| 97 | |||
| 98 | /** Get the BoundingBox in site coordinates. */ | ||
| 99 | openstudio::BoundingBox boundingBoxSiteCoordinates() const; | ||
| 100 | |||
| 101 | //@} | ||
| 102 | //private slots: | ||
| 103 | private: | ||
| 104 | void clearCachedVariables(); | ||
| 105 | |||
| 106 | private: | ||
| 107 | REGISTER_LOGGER("openstudio.model.PlanarSurfaceGroup"); | ||
| 108 | |||
| 109 | mutable boost::optional<openstudio::Transformation> m_cachedTransformation; | ||
| 110 | }; | ||
| 111 | |||
| 112 | } // namespace detail | ||
| 113 | } // namespace model | ||
| 114 | } // namespace openstudio | ||
| 115 | |||
| 116 | #endif // MODEL_PLANARSURFACEGROUP_IMPL_HPP | ||
| 117 |