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::Color4< T > Class Template Reference

The class Color4 is a templated class inheriting from the Color class. A Color4 object holds 4 elements. More...

#include <color.h>

Inheritance diagram for cil::Color4< T >:
cil::Color< T > cil::Tuple< T > cil::Variant

Public Member Functions

 Color4 ()
 Contructs a Color4 object with 4 elements.
 
void set (T r, T g, T b, T a)
 Sets the (r, g, b, a) values of current Color4 object.
 
- Public Member Functions inherited from cil::Color< T >
 Color (int size)
 Constructs a Color object with a specified number of elements.
 
const T & operator[] (int index) const
 Provides read-only access to the element at a specific index(position) within the Color object.
 
T & operator[] (int index)
 Provides read-write access to the element at a specific index(position) within the Color object.
 
const T & operator[] (char key) const
 Provides read-only access to a element within the Color object using a character key.
 
T & operator[] (char key)
 Provides read-write access to a element within the Color object using a character key.
 
- 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>
class cil::Color4< T >

The class Color4 is a templated class inheriting from the Color class. A Color4 object holds 4 elements.

Constructor & Destructor Documentation

◆ Color4()

template<typename T >
cil::Color4< T >::Color4 ( )
inline

Contructs a Color4 object with 4 elements.

Member Function Documentation

◆ set()

template<typename T >
void cil::Color4< T >::set ( T r,
T g,
T b,
T a )
inline

Sets the (r, g, b, a) values of current Color4 object.