Cumulia Illustrator Rendering Engine v1.0.0
A Rendering engine for industrial CAD/CAE model and optimized for greatest performance
 
Loading...
Searching...
No Matches
cil::BoundingBox Class Referencefinal

The BoundingBox class inherits from Box3, specilizing the template parameters to float for element type and Vector3f for representing minimum and maximum extents of the box. More...

#include <box.h>

Inheritance diagram for cil::BoundingBox:
cil::Box3< float, Vector3f > cil::Box< float > cil::Tuple< float > cil::Variant

Public Member Functions

 BoundingBox ()
 Constructs a bounding box object, and initializes it.
 
 BoundingBox (const BoundingBox &other)
 
 BoundingBox (float xmin, float xmax, float ymin, float ymax, float zmin, float zmax)
 Constructs a bounding box object with the specified minimum and maximum extents.
 
 BoundingBox (const Vector3f &min, const Vector3f &max)
 
BoundingBoxoperator+= (const BoundingBox &other)
 
BoundingBoxoperator+= (Vector3f value)
 Expands the current bounding box to encompass the minimum and maximum points of the other bounding box.
 
bool isValid () const
 Check if the bounding box is valid, which means that the minimum extents should be less than or equal to their corresponding maximum extents.
 
bool inRange (Vector3f value) const
 Check if a vector3f (a 3D point) is within this boundingbox.
 
void addPoint (float x, float y, float z)
 
void addPoint (const Vector3f &point)
 
void addPoints (const Float32Array &points)
 
- Public Member Functions inherited from cil::Box3< float, Vector3f >
 Box3 ()
 Contructs a Box3 object, a specialization of Box for storing 6 elements.
 
void set (float xmin, float xmax, float ymin, float ymax, float zmin, float zmax)
 Sets the six elements of the Box3 object with the six input arguments.
 
void set (const Vector3f &min, const Vector3f &max)
 Sets the minimum and maximum values of the box.
 
Vector3f min () const
 Gets the minimum values, namely xmin, ymin and zmin, for the Box3 object.
 
void setMin (const Vector3f &min)
 Sets the minimum values, namely xmin, ymin and zmin, for the Box3 object.
 
Vector3f max () const
 Gets the maximum values, namely xmax, ymax and zmax, of the Box3 object.
 
void setMax (const Vector3f &max)
 Sets the maximum values, namely xmax, ymax and zmax, for the Box3 object.
 
Vector3f center () const
 Gets the center of the Box3 object, which means the center of the cubic zone.
 
Vector3f extent () const
 Gets the extent of the Box3 object, which means the length, width and height of the cubic zone.
 
- Public Member Functions inherited from cil::Box< float >
 Box (int size)
 Constructs a box object.
 
const float & operator[] (int index) const
 Provides a read-only access to the element at a specific index(position) within the Box object.
 
float & operator[] (int index)
 Provides a read-write access to the element at a specific index(position) within the Box object.
 
- Public Member Functions inherited from cil::Tuple< float >
 Tuple (int size)
 Constructs a Tuple object with a specified number of elements, and initialize all elements to 0.
 
virtual ~Tuple ()
 
int size () const
 Gets the number of elements of the Tuple.
 
float * data ()
 Gets the data array of the Tuple.
 
const float * data () const
 Gets the data array of the Tuple, and the data could not be modified upon which this function is called.
 
void setData (const float *data)
 Sets the data array of the Variant.
 
Tuple< float > & operator= (const Tuple &other)
 Copys the data of another Tuple to the one on which the operator is invoked.
 
bool operator== (const Tuple &other) const
 Compares the Tuple with another one, and returns true if they are equal, otherwise returns false.
 
bool operator!= (const Tuple &other) const
 Compares the Tuple with another one, and returns false if they are equal, otherwise returns true.
 
- Public Member Functions inherited from cil::Variant
 Variant ()
 
virtual ~Variant ()
 
const std::string & type () const
 

Additional Inherited Members

- Protected Attributes inherited from cil::Tuple< float >
float * m_data
 The data array of the Tuple.
 
int m_size
 The number of elements that the data array of the Tuple holds.
 
- Protected Attributes inherited from cil::Variant
std::string m_type
 

Detailed Description

The BoundingBox class inherits from Box3, specilizing the template parameters to float for element type and Vector3f for representing minimum and maximum extents of the box.

Constructor & Destructor Documentation

◆ BoundingBox() [1/4]

cil::BoundingBox::BoundingBox ( )

Constructs a bounding box object, and initializes it.

◆ BoundingBox() [2/4]

cil::BoundingBox::BoundingBox ( const BoundingBox & other)

◆ BoundingBox() [3/4]

cil::BoundingBox::BoundingBox ( float xmin,
float xmax,
float ymin,
float ymax,
float zmin,
float zmax )

Constructs a bounding box object with the specified minimum and maximum extents.

◆ BoundingBox() [4/4]

cil::BoundingBox::BoundingBox ( const Vector3f & min,
const Vector3f & max )

Member Function Documentation

◆ addPoint() [1/2]

void cil::BoundingBox::addPoint ( const Vector3f & point)

◆ addPoint() [2/2]

void cil::BoundingBox::addPoint ( float x,
float y,
float z )

◆ addPoints()

void cil::BoundingBox::addPoints ( const Float32Array & points)

◆ inRange()

bool cil::BoundingBox::inRange ( Vector3f value) const

Check if a vector3f (a 3D point) is within this boundingbox.

◆ isValid()

bool cil::BoundingBox::isValid ( ) const

Check if the bounding box is valid, which means that the minimum extents should be less than or equal to their corresponding maximum extents.

◆ operator+=() [1/2]

BoundingBox & cil::BoundingBox::operator+= ( const BoundingBox & other)

◆ operator+=() [2/2]

BoundingBox & cil::BoundingBox::operator+= ( Vector3f value)

Expands the current bounding box to encompass the minimum and maximum points of the other bounding box.