Jameo Core Library
Loading...
Searching...
No Matches
Public Member Functions | List of all members
jm::Extents Class Reference

A class to calculate the bounding box of points. More...

Public Member Functions

 Extents ()
 Constructor.
 
void add (const Vertex2 &pt)
 Expand the box to also enclose the point pt.
 
void add (const Vertex3 &pt)
 Expand the box to also enclose the point pt.
 
void add (const Extents &ext)
 Expand the box to also enclode the box ext. If the other box is invalid (no point was added), then it will be ignored.
 
const Vertex3 & minPoint () const
 
const Vertex3 & maxPoint () const
 
Vertex3 delta () const
 
bool isValid () const
 Returns true, if the Extent has collected at minimum 1 point.
 

Detailed Description

A class to calculate the bounding box of points.

Constructor & Destructor Documentation

◆ Extents()

jm::Extents::Extents ( )

Constructor.

Member Function Documentation

◆ add() [1/3]

void jm::Extents::add ( const Extents &  ext)

Expand the box to also enclode the box ext. If the other box is invalid (no point was added), then it will be ignored.

◆ add() [2/3]

void jm::Extents::add ( const Vertex2 &  pt)

Expand the box to also enclose the point pt.

◆ add() [3/3]

void jm::Extents::add ( const Vertex3 &  pt)

Expand the box to also enclose the point pt.

◆ delta()

Vertex3 jm::Extents::delta ( ) const

◆ isValid()

bool jm::Extents::isValid ( ) const

Returns true, if the Extent has collected at minimum 1 point.

◆ maxPoint()

const Vertex3 & jm::Extents::maxPoint ( ) const

◆ minPoint()

const Vertex3 & jm::Extents::minPoint ( ) const