AngelCAD  1.3-02
Public Member Functions | List of all members
boundingbox Class Reference

bounding box aligned with system axes More...

#include <angelcad.h>

Public Member Functions

 boundingbox ()
 create an empty/uninitialised bounding box More...
 
bool is_empty () const
 True when no points have been enclosed. More...
 
double diagonal () const
 Distance between p1 and p2. More...
 
double dx () const
 bounding box extent More...
 
double dy () const
 bounding box extent More...
 
double dz () const
 bounding box extent More...
 
pos3dcenter () const
 center position More...
 
pos3dp1 () const
 low position More...
 
pos3dp2 () const
 high position More...
 
void enclose (pos3d@ p)
 enclose a new position, this may extend the boundingbox More...
 

Detailed Description

bounding box aligned with system axes

A bounding box representes the range of an object in x,y and z

Constructor & Destructor Documentation

◆ boundingbox()

boundingbox::boundingbox ( )

create an empty/uninitialised bounding box

Member Function Documentation

◆ center()

pos3d@ boundingbox::center ( ) const

center position

Returns
pos3d@, bounding box geometric center

◆ diagonal()

double boundingbox::diagonal ( ) const

Distance between p1 and p2.

Returns
double

◆ dx()

double boundingbox::dx ( ) const

bounding box extent

Returns
double, bounding box extent in x-direction

◆ dy()

double boundingbox::dy ( ) const

bounding box extent

Returns
double, bounding box extent in y-direction

◆ dz()

double boundingbox::dz ( ) const

bounding box extent

Returns
double, bounding box extent in z-direction

◆ enclose()

void boundingbox::enclose ( pos3d p)

enclose a new position, this may extend the boundingbox

Parameters
ppos3d@, position to enclose

◆ is_empty()

bool boundingbox::is_empty ( ) const

True when no points have been enclosed.

Returns
bool

◆ p1()

pos3d@ boundingbox::p1 ( ) const

low position

Returns
pos3d@, position containing minimum x,y,z

◆ p2()

pos3d@ boundingbox::p2 ( ) const

high position

Returns
pos3d@, position containing maximum x,y,z

The documentation for this class was generated from the following file: