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

#include <BoundingBox.hpp>

Public Member Functions

void add (const BoundingBox &other)
 add another BoundingBox More...
 
void addPoint (const Point3d &point)
 add a point to the BoundingBox More...
 
void addPoints (const std::vector< Point3d > &points)
 add points to the BoundingBox More...
 
 BoundingBox ()=default
 default constructor creates empty BoundingBox, will not intersect with anything More...
 
std::vector< Point3dcorners () const
 
bool intersects (const BoundingBox &other, double tol=0.01) const
 test for intersection. Default tolerance is 1cm More...
 
bool isEmpty () const
 
boost::optional< double > maxX () const
 
boost::optional< double > maxY () const
 
boost::optional< double > maxZ () const
 
boost::optional< double > minX () const
 
boost::optional< double > minY () const
 
boost::optional< double > minZ () const
 

Detailed Description

BoundingBox is an axis aligned cuboid that can check for intersections with another BoundingBox.

BoundingBox intersections require that both boxes are specified in the same coordinate system.

Constructor & Destructor Documentation

openstudio::BoundingBox::BoundingBox ( )
default

default constructor creates empty BoundingBox, will not intersect with anything

Member Function Documentation

void openstudio::BoundingBox::add ( const BoundingBox other)

add another BoundingBox

void openstudio::BoundingBox::addPoint ( const Point3d point)

add a point to the BoundingBox

void openstudio::BoundingBox::addPoints ( const std::vector< Point3d > &  points)

add points to the BoundingBox

std::vector<Point3d> openstudio::BoundingBox::corners ( ) const
bool openstudio::BoundingBox::intersects ( const BoundingBox other,
double  tol = 0.01 
) const

test for intersection. Default tolerance is 1cm

bool openstudio::BoundingBox::isEmpty ( ) const
boost::optional<double> openstudio::BoundingBox::maxX ( ) const
boost::optional<double> openstudio::BoundingBox::maxY ( ) const
boost::optional<double> openstudio::BoundingBox::maxZ ( ) const
boost::optional<double> openstudio::BoundingBox::minX ( ) const
boost::optional<double> openstudio::BoundingBox::minY ( ) const
boost::optional<double> openstudio::BoundingBox::minZ ( ) const