| 627 | } |
| 628 | |
| 629 | openstudio::Vector3d ForwardTranslator::getSensorVector(const openstudio::model::DaylightingControl& control) { |
| 630 | Transformation buildingTransformation; |
| 631 | OptionalBuilding building = control.model().getOptionalUniqueModelObject<Building>(); |
| 632 | if (building) { |
| 633 | buildingTransformation = building->transformation(); |
| 634 | } |
| 635 | |
| 636 | Transformation spaceTransformation; |
| 637 | OptionalSpace space = control.space(); |
| 638 | if (space) { |
| 639 | spaceTransformation = space->transformation(); |
| 640 | } |
| 641 | |
| 642 | // convert to absolute coordinates |
| 643 | Point3d endPoint = buildingTransformation * spaceTransformation * control.transformation() * Point3d(0, 0, 1); |
| 644 | Point3d startPoint = buildingTransformation * spaceTransformation * control.transformation() * Point3d(0, 0, 0); |
| 645 | |
| 646 | return (endPoint - startPoint); |
| 647 | } |
| 648 | |
| 649 | openstudio::Vector3dVector ForwardTranslator::getViewVectors(const openstudio::model::DaylightingControl& control) { |
| 650 | Transformation buildingTransformation; |
nothing calls this directly
no test coverage detected