OpenStudio:utilities
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Member Functions | Protected Member Functions | List of all members
openstudio::Polyhedron Class Reference

#include <Polyhedron.hpp>

Public Member Functions

double calcDivergenceTheoremVolume () const
 
std::vector< Surface3dEdgeedgesNotTwo (bool includeCreatedEdges=false) const
 All unique edges that aren't used exactly twice. More...
 
std::vector< Surface3dfindSurfacesWithIncorrectOrientation () const
 Finds all edges that two surface define in the same order (if all surfaces are correctly oriented, they should match in reverse order) For each matching edge, we pick a single surface between the two surfaces that define it but retainign the surface that has the largest proportion of conflicted edges / total number of edges. More...
 
bool hasAddedColinearPoints () const
 
bool hasAnySurfaceWithIncorrectOrientation () const
 In an ENCLOSED Polyhedron, all edges should be used twice. More...
 
bool isCompletelyInsideOut () const
 
bool isEnclosedVolume () const
 Test if the volume described by the polyhedron if full enclosed (would not leak). More...
 
size_t numVertices () const
 
 Polyhedron (std::vector< Surface3d > surfaces)
 This will call updateZonePolygonsForMissingColinearPoints if needed (if original Polyhedron isn't enclosed) to add any missing colinear point (=splitting up edges in case surface intersection hasn't been performed already) More...
 
double polyhedronVolume () const
 
std::vector< Surface3dsurface3ds () const
 
std::vector< Surface3dEdgeuniqueEdges () const
 Ignores orientation of edges to return the unique edges. More...
 
std::vector< Point3duniqueVertices () const
 

Protected Member Functions

double calcPolyhedronVolume () const
 
bool hasEdgesNot2 () const
 
void performEdgeMatching ()
 
void resetEdgeMatching ()
 
void updateZonePolygonsForMissingColinearPoints ()
 

Constructor & Destructor Documentation

openstudio::Polyhedron::Polyhedron ( std::vector< Surface3d surfaces)

This will call updateZonePolygonsForMissingColinearPoints if needed (if original Polyhedron isn't enclosed) to add any missing colinear point (=splitting up edges in case surface intersection hasn't been performed already)

Member Function Documentation

double openstudio::Polyhedron::calcDivergenceTheoremVolume ( ) const
double openstudio::Polyhedron::calcPolyhedronVolume ( ) const
protected
std::vector<Surface3dEdge> openstudio::Polyhedron::edgesNotTwo ( bool  includeCreatedEdges = false) const

All unique edges that aren't used exactly twice.

std::vector<Surface3d> openstudio::Polyhedron::findSurfacesWithIncorrectOrientation ( ) const

Finds all edges that two surface define in the same order (if all surfaces are correctly oriented, they should match in reverse order) For each matching edge, we pick a single surface between the two surfaces that define it but retainign the surface that has the largest proportion of conflicted edges / total number of edges.

bool openstudio::Polyhedron::hasAddedColinearPoints ( ) const
bool openstudio::Polyhedron::hasAnySurfaceWithIncorrectOrientation ( ) const

In an ENCLOSED Polyhedron, all edges should be used twice.

And if all surfaces are correctly oriented, each edge should match an edge that is in reversed order

bool openstudio::Polyhedron::hasEdgesNot2 ( ) const
protected
bool openstudio::Polyhedron::isCompletelyInsideOut ( ) const
bool openstudio::Polyhedron::isEnclosedVolume ( ) const

Test if the volume described by the polyhedron if full enclosed (would not leak).

This is done by checking that every edge is used exactly TWICE.

size_t openstudio::Polyhedron::numVertices ( ) const
void openstudio::Polyhedron::performEdgeMatching ( )
protected
double openstudio::Polyhedron::polyhedronVolume ( ) const
void openstudio::Polyhedron::resetEdgeMatching ( )
protected
std::vector<Surface3d> openstudio::Polyhedron::surface3ds ( ) const
std::vector<Surface3dEdge> openstudio::Polyhedron::uniqueEdges ( ) const

Ignores orientation of edges to return the unique edges.

std::vector<Point3d> openstudio::Polyhedron::uniqueVertices ( ) const
void openstudio::Polyhedron::updateZonePolygonsForMissingColinearPoints ( )
protected