Cumulia Illustrator Rendering Engine v2.1.0
A Rendering engine for industrial CAD/CAE model and optimized for greatest performance
 
Loading...
Searching...
No Matches
cil::Box3< T, S > Class Template Reference

The Box3 is a templated class inheriting from the Box class, which represents a cubic zone. More...

#include <box.h>

Inheritance diagram for cil::Box3< T, S >:
cil::Box< T > cil::Tuple< T > cil::Variant

Public Member Functions

 Box3 ()
 Contructs a Box3 object, a specialization of Box for storing 6 elements.
 
void set (T xmin, T xmax, T ymin, T ymax, T zmin, T zmax)
 Sets the six elements of the Box3 object with the six input arguments.
 
void set (const S &min, const S &max)
 Sets the minimum and maximum values of the box.
 
min () const
 Gets the minimum values, namely xmin, ymin and zmin, for the Box3 object.
 
void setMin (const S &min)
 Sets the minimum values, namely xmin, ymin and zmin, for the Box3 object.
 
max () const
 Gets the maximum values, namely xmax, ymax and zmax, of the Box3 object.
 
void setMax (const S &max)
 Sets the maximum values, namely xmax, ymax and zmax, for the Box3 object.
 
center () const
 Gets the center of the Box3 object, which means the center of the cubic zone.
 
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< T >
 Box (int size)
 Constructs a box object.
 
const T & operator[] (int index) const
 Provides a read-only access to the element at a specific index(position) within the Box object.
 
T & 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< T >
 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.
 
T * data ()
 Gets the data array of the Tuple.
 
const T * 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 T *data)
 Sets the data array of the Variant.
 
Tuple< T > & 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< T >
T * 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

template<typename T, typename S>
class cil::Box3< T, S >

The Box3 is a templated class inheriting from the Box class, which represents a cubic zone.

Constructor & Destructor Documentation

◆ Box3()

template<typename T , typename S >
cil::Box3< T, S >::Box3 ( )
inline

Contructs a Box3 object, a specialization of Box for storing 6 elements.

Member Function Documentation

◆ center()

template<typename T , typename S >
S cil::Box3< T, S >::center ( ) const
inline

Gets the center of the Box3 object, which means the center of the cubic zone.

◆ extent()

template<typename T , typename S >
S cil::Box3< T, S >::extent ( ) const
inline

Gets the extent of the Box3 object, which means the length, width and height of the cubic zone.

◆ max()

template<typename T , typename S >
S cil::Box3< T, S >::max ( ) const
inline

Gets the maximum values, namely xmax, ymax and zmax, of the Box3 object.

◆ min()

template<typename T , typename S >
S cil::Box3< T, S >::min ( ) const
inline

Gets the minimum values, namely xmin, ymin and zmin, for the Box3 object.

◆ set() [1/2]

template<typename T , typename S >
void cil::Box3< T, S >::set ( const S & min,
const S & max )
inline

Sets the minimum and maximum values of the box.

It takes two arguments of type S (coordinates of the minimum and maximum vertice) and calls functions setMin and setMax.

See also
setMin(), setMax()

◆ set() [2/2]

template<typename T , typename S >
void cil::Box3< T, S >::set ( T xmin,
T xmax,
T ymin,
T ymax,
T zmin,
T zmax )
inline

Sets the six elements of the Box3 object with the six input arguments.

◆ setMax()

template<typename T , typename S >
void cil::Box3< T, S >::setMax ( const S & max)
inline

Sets the maximum values, namely xmax, ymax and zmax, for the Box3 object.

◆ setMin()

template<typename T , typename S >
void cil::Box3< T, S >::setMin ( const S & min)
inline

Sets the minimum values, namely xmin, ymin and zmin, for the Box3 object.