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

Method getSensorVector

src/radiance/ForwardTranslator.cpp:629–647  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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;

Callers

nothing calls this directly

Calls 5

Point3dClass · 0.50
Vector3dClass · 0.50
modelMethod · 0.45
transformationMethod · 0.45
spaceMethod · 0.45

Tested by

no test coverage detected