GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 60.0% 3 / 0 / 5
Functions: 60.0% 3 / 0 / 5
Branches: -% 0 / 0 / 0

src/model/IlluminanceMap.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_ILLUMINANCEMAP_HPP
7 #define MODEL_ILLUMINANCEMAP_HPP
8
9 #include "ModelAPI.hpp"
10 #include "SpaceItem.hpp"
11
12 namespace openstudio {
13
14 class Point3d;
15 class Transformation;
16
17 namespace model {
18
19 namespace detail {
20
21 class IlluminanceMap_Impl;
22
23 } // namespace detail
24
25 /** IlluminanceMap is a SpaceItem and is an interface to the OpenStudio IDD object named "OS:IlluminanceMap".
26 *
27 * IlluminanceMap is a child of the Space object and is used to report daylighting illuminance values
28 * over a grid. The grid of points to calculate daylight
29 * illuminance over is defined by the minimum and maximum corners of a rectangle aligned with the parent \link Space Space's \endlink
30 * coordinate system.
31 */
32 class MODEL_API IlluminanceMap : public SpaceItem
33 {
34 public:
35 /** @name Constructors and Destructors */
36 //@{
37
38 explicit IlluminanceMap(const Model& model);
39
40 1213 virtual ~IlluminanceMap() override = default;
41 // Default the copy and move operators because the virtual dtor is explicit
42 170 IlluminanceMap(const IlluminanceMap& other) = default;
43 427 IlluminanceMap(IlluminanceMap&& other) = default;
44 ✗ IlluminanceMap& operator=(const IlluminanceMap&) = default;
45 ✗ IlluminanceMap& operator=(IlluminanceMap&&) = default;
46
47 //@}
48 /** @name Static Methods */
49 //@{
50
51 static IddObjectType iddObjectType();
52
53 //@}
54 /** @name Getters */
55 //@{
56
57 double originXCoordinate() const;
58
59 double originYCoordinate() const;
60
61 double originZCoordinate() const;
62
63 double psiRotationAroundXAxis() const;
64
65 bool isPsiRotationAroundXAxisDefaulted() const;
66
67 double thetaRotationAroundYAxis() const;
68
69 bool isThetaRotationAroundYAxisDefaulted() const;
70
71 double phiRotationAroundZAxis() const;
72
73 bool isPhiRotationAroundZAxisDefaulted() const;
74
75 double xLength() const;
76
77 bool isXLengthDefaulted() const;
78
79 int numberofXGridPoints() const;
80
81 bool isNumberofXGridPointsDefaulted() const;
82
83 double yLength() const;
84
85 bool isYLengthDefaulted() const;
86
87 int numberofYGridPoints() const;
88
89 bool isNumberofYGridPointsDefaulted() const;
90
91 //@}
92 /** @name Setters */
93 //@{
94
95 bool setOriginXCoordinate(double originXCoordinate);
96
97 bool setOriginYCoordinate(double originYCoordinate);
98
99 bool setOriginZCoordinate(double originZCoordinate);
100
101 bool setPsiRotationAroundXAxis(double psiRotationAroundXAxis);
102
103 void resetPsiRotationAroundXAxis();
104
105 bool setThetaRotationAroundYAxis(double thetaRotationAroundYAxis);
106
107 void resetThetaRotationAroundYAxis();
108
109 bool setPhiRotationAroundZAxis(double phiRotationAroundZAxis);
110
111 void resetPhiRotationAroundZAxis();
112
113 bool setXLength(double xLength);
114
115 void resetXLength();
116
117 bool setNumberofXGridPoints(int numberofXGridPoints);
118
119 void resetNumberofXGridPoints();
120
121 bool setYLength(double yLength);
122
123 void resetYLength();
124
125 bool setNumberofYGridPoints(int numberofYGridPoints);
126
127 void resetNumberofYGridPoints();
128
129 //@}
130
131 /// Get the transformation from illuminance map coordinates to space coordinates
132 openstudio::Transformation transformation() const;
133
134 /// Set the transformation from illuminance map coordinates to space coordinates
135 bool setTransformation(const openstudio::Transformation& transformation);
136
137 /// Returns a vector of all the reference points in the calculation grid in illuminance map coordinates.
138 /// The points are returned in order such as [0, 0, 0], ..., [xLength, 0, 0], [0, yLength/numberofYGridPoints, 0], ..., [xLength, yLength, 0]
139 /// To get the points in space coordinates use transformation * referencePoints
140 std::vector<Point3d> referencePoints() const;
141
142 /// Returns a vector of the 4 corner reference points in the calculation grid in illuminance map coordinates.
143 /// The points returned are [0, yLength, 0], [0, 0, 0], [xLength, 0, 0], [xLength, yLength, 0]
144 /// To get the points in space coordinates use transformation * referencePoints
145 std::vector<Point3d> corners() const;
146
147 protected:
148 /// @cond
149 using ImplType = detail::IlluminanceMap_Impl;
150
151 friend class Model;
152 friend class openstudio::IdfObject;
153
154 explicit IlluminanceMap(std::shared_ptr<detail::IlluminanceMap_Impl> impl);
155
156 /// @endcond
157 private:
158 REGISTER_LOGGER("openstudio.model.IlluminanceMap");
159 };
160
161 /** \relates IlluminanceMap*/
162 using OptionalIlluminanceMap = boost::optional<IlluminanceMap>;
163
164 /** \relates IlluminanceMap*/
165 using IlluminanceMapVector = std::vector<IlluminanceMap>;
166
167 } // namespace model
168 } // namespace openstudio
169
170 #endif // MODEL_ILLUMINANCEMAP_HPP
171