MCPcopy Create free account
hub / github.com/NatLabRockies/OpenStudio / buildingTransformation

Method buildingTransformation

src/model/ShadingSurfaceGroup.cpp:106–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104 }
105
106 openstudio::Transformation ShadingSurfaceGroup_Impl::buildingTransformation() const {
107 Transformation transformation;
108
109 auto shadingSurfaceType = this->shadingSurfaceType();
110 if (istringEqual("Space", shadingSurfaceType)) {
111
112 boost::optional<Space> space = this->space();
113 if (space) {
114 transformation = space->transformation() * this->transformation();
115 } else {
116 transformation = this->transformation();
117 }
118
119 } else if (istringEqual("Building", shadingSurfaceType)) {
120
121 transformation = this->transformation();
122
123 } else if (istringEqual("Site", shadingSurfaceType)) {
124
125 boost::optional<Building> building = this->model().building();
126 if (building) {
127 transformation = building->transformation().inverse() * this->transformation();
128 } else {
129 transformation = this->transformation();
130 }
131 }
132
133 return transformation;
134 }
135
136 bool ShadingSurfaceGroup_Impl::changeTransformation(const openstudio::Transformation& transformation) {
137 Transformation oldTransformation = this->transformation();

Callers

nothing calls this directly

Calls 7

shadingSurfaceTypeMethod · 0.95
spaceMethod · 0.95
istringEqualFunction · 0.85
inverseMethod · 0.80
transformationMethod · 0.45
buildingMethod · 0.45
modelMethod · 0.45

Tested by

no test coverage detected