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

Method getPolygon

src/radiance/ForwardTranslator.cpp:495–529  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

493 }
494
495 openstudio::Point3dVector ForwardTranslator::getPolygon(const openstudio::model::SubSurface& subSurface) {
496 Transformation buildingTransformation;
497 OptionalBuilding building = subSurface.model().getOptionalUniqueModelObject<Building>();
498 if (building) {
499 buildingTransformation = building->transformation();
500 }
501
502 Transformation spaceTransformation;
503 OptionalSurface surface = subSurface.surface();
504 if (surface) {
505 OptionalSpace space = surface->space();
506 if (space) {
507 spaceTransformation = space->transformation();
508 }
509 } else {
510 LOG(Warn, "Could not retrieve surface for sub surface '" << subSurface.name() << "'");
511 }
512
513 openstudio::Point3dVector vertices = subSurface.vertices();
514
515 // apply frame and divider reveal
516 boost::optional<openstudio::model::WindowPropertyFrameAndDivider> frameAndDivider = subSurface.windowPropertyFrameAndDivider();
517 if (frameAndDivider) {
518 if (!frameAndDivider->isOutsideRevealDepthDefaulted()) {
519 openstudio::Vector3d offset = -frameAndDivider->outsideRevealDepth() * subSurface.outwardNormal();
520
521 for (openstudio::Point3d& vertex : vertices) {
522 vertex = vertex + offset;
523 }
524 }
525 }
526
527 // convert vertices to absolute coordinates
528 return buildingTransformation * spaceTransformation * vertices;
529 }
530
531 openstudio::Point3dVector ForwardTranslator::getPolygon(const openstudio::model::ShadingSurface& shadingSurface) {
532 Transformation buildingTransformation;

Callers

nothing calls this directly

Calls 15

istringEqualFunction · 0.85
outsideRevealDepthMethod · 0.80
shadingSurfaceGroupMethod · 0.80
shadingSurfaceTypeMethod · 0.80
Point3dClass · 0.50
modelMethod · 0.45
transformationMethod · 0.45
surfaceMethod · 0.45
spaceMethod · 0.45

Tested by

no test coverage detected