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::MinMax Class Referencefinal

The MinMax class inherits from Tuple, specilizing the template parameters to float for element type. More...

#include <minmax.h>

Inheritance diagram for cil::MinMax:
cil::Tuple< float > cil::Variant

Public Member Functions

 MinMax ()
 
 MinMax (float min, float max)
 Constructs a MinMax object which holds two value (min, max), and initializes the min value as the lowest numeric limit and the max value as the maximum numeric limit.
 
 MinMax (const MinMax &other)
 
const float & operator[] (int index) const
 Provides read-only access to the element at a specific index(position) within the MinMax object.
 
float & operator[] (int index)
 Provides read-write access to the element at a specific index(position) within the MinMax object.
 
MinMaxoperator+= (const MinMax &other)
 Expands the current MinMax to emcompass the minimum and maximum value of the other MinMax.
 
MinMaxoperator+= (float value)
 Expands the current MinMax to emcompass the given value.
 
void set (float min, float max)
 Sets the min and max value of this MinMax object.
 
float min () const
 Gets the min value.
 
void setMin (float min)
 Sets the min value.
 
float max () const
 Gets the max value.
 
void setMax (float max)
 Sets the max value.
 
bool isValid () const
 Check if the MinMax is valid, which means that the minimum value should be less than or equal to the maximum value.
 
float center () const
 Gets the mean value of the minimum and maximum values.
 
float length () const
 Gets the extent of this MinMax.
 
bool inRange (float value) const
 Check if a value is in the range of the MinMax.
 
void unset ()
 
- 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 MinMax class inherits from Tuple, specilizing the template parameters to float for element type.

Constructor & Destructor Documentation

◆ MinMax() [1/3]

cil::MinMax::MinMax ( )

◆ MinMax() [2/3]

cil::MinMax::MinMax ( float min,
float max )

Constructs a MinMax object which holds two value (min, max), and initializes the min value as the lowest numeric limit and the max value as the maximum numeric limit.

◆ MinMax() [3/3]

cil::MinMax::MinMax ( const MinMax & other)

Member Function Documentation

◆ center()

float cil::MinMax::center ( ) const

Gets the mean value of the minimum and maximum values.

◆ inRange()

bool cil::MinMax::inRange ( float value) const

Check if a value is in the range of the MinMax.

◆ isValid()

bool cil::MinMax::isValid ( ) const

Check if the MinMax is valid, which means that the minimum value should be less than or equal to the maximum value.

◆ length()

float cil::MinMax::length ( ) const

Gets the extent of this MinMax.

◆ max()

float cil::MinMax::max ( ) const

Gets the max value.

◆ min()

float cil::MinMax::min ( ) const

Gets the min value.

◆ operator+=() [1/2]

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

Expands the current MinMax to emcompass the minimum and maximum value of the other MinMax.

◆ operator+=() [2/2]

MinMax & cil::MinMax::operator+= ( float value)

Expands the current MinMax to emcompass the given value.

◆ operator[]() [1/2]

float & cil::MinMax::operator[] ( int index)

Provides read-write access to the element at a specific index(position) within the MinMax object.

◆ operator[]() [2/2]

const float & cil::MinMax::operator[] ( int index) const

Provides read-only access to the element at a specific index(position) within the MinMax object.

◆ set()

void cil::MinMax::set ( float min,
float max )

Sets the min and max value of this MinMax object.

◆ setMax()

void cil::MinMax::setMax ( float max)

Sets the max value.

◆ setMin()

void cil::MinMax::setMin ( float min)

Sets the min value.

◆ unset()

void cil::MinMax::unset ( )