OpenStudio:utilities
Loading...
Searching...
No Matches
openstudio::BoundingBox Class Reference

#include <BoundingBox.hpp>

Public Member Functions

void add (const BoundingBox &other)
 add another BoundingBox
 
void addPoint (const Point3d &point)
 add a point to the BoundingBox
 
void addPoints (const std::vector< Point3d > &points)
 add points to the BoundingBox
 
 BoundingBox ()=default
 default constructor creates empty BoundingBox, will not intersect with anything
 
std::vector< Point3dcorners () const
 
bool intersects (const BoundingBox &other, double tol=0.01) const
 test for intersection. Default tolerance is 1cm
 
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

◆ BoundingBox()

openstudio::BoundingBox::BoundingBox ( )
default

default constructor creates empty BoundingBox, will not intersect with anything

Member Function Documentation

◆ add()

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

add another BoundingBox

◆ addPoint()

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

add a point to the BoundingBox

◆ addPoints()

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

add points to the BoundingBox

◆ corners()

std::vector< Point3d > openstudio::BoundingBox::corners ( ) const

◆ intersects()

bool openstudio::BoundingBox::intersects ( const BoundingBox & other,
double tol = 0.01 ) const

test for intersection. Default tolerance is 1cm

◆ isEmpty()

bool openstudio::BoundingBox::isEmpty ( ) const

◆ maxX()

boost::optional< double > openstudio::BoundingBox::maxX ( ) const

◆ maxY()

boost::optional< double > openstudio::BoundingBox::maxY ( ) const

◆ maxZ()

boost::optional< double > openstudio::BoundingBox::maxZ ( ) const

◆ minX()

boost::optional< double > openstudio::BoundingBox::minX ( ) const

◆ minY()

boost::optional< double > openstudio::BoundingBox::minY ( ) const

◆ minZ()

boost::optional< double > openstudio::BoundingBox::minZ ( ) const