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

The Color3ub class inherits from Color3, specilizing the template parameters to unsigned char for element type. More...

#include <color.h>

Inheritance diagram for cil::Color3ub:
cil::Color3< unsigned char > cil::Color< unsigned char > cil::Tuple< unsigned char > cil::Variant

Public Member Functions

 Color3ub ()
 Constructs a Color3ub object, and initializes it to (255, 255, 255).
 
 Color3ub (unsigned char r, unsigned char g, unsigned char b)
 Constructs a Color3ub object, and set its elements to parameters (r, g, b).
 
 Color3ub (const Color3ub &other)
 
 Color3ub (const Color3f &other)
 Constructs a Color3f of (r, g, b) by copying the values of another Color3ub object and multiplying these values by 255.0f (converting from float range 0.0-1.0 to unsigned char (ub) range 0-255 ).
 
 Color3ub (const Color4ub &other)
 
 Color3ub (const Color4f &other)
 
- Public Member Functions inherited from cil::Color3< unsigned char >
 Color3 ()
 Contructs a Color3 object with 3 elements.
 
void set (unsigned char r, unsigned char g, unsigned char b)
 Sets the (r,g,b) values of current Color3 object.
 
- Public Member Functions inherited from cil::Color< unsigned char >
 Color (int size)
 Constructs a Color object with a specified number of elements.
 
const unsigned char & operator[] (int index) const
 Provides read-only access to the element at a specific index(position) within the Color object.
 
unsigned char & operator[] (int index)
 Provides read-write access to the element at a specific index(position) within the Color object.
 
const unsigned char & operator[] (char key) const
 Provides read-only access to a element within the Color object using a character key.
 
unsigned char & 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< unsigned char >
 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.
 
unsigned char * data ()
 Gets the data array of the Tuple.
 
const unsigned char * 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 unsigned char *data)
 Sets the data array of the Variant.
 
Tuple< unsigned char > & 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< unsigned char >
unsigned char * 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 Color3ub class inherits from Color3, specilizing the template parameters to unsigned char for element type.

Constructor & Destructor Documentation

◆ Color3ub() [1/6]

cil::Color3ub::Color3ub ( )

Constructs a Color3ub object, and initializes it to (255, 255, 255).

◆ Color3ub() [2/6]

cil::Color3ub::Color3ub ( unsigned char r,
unsigned char g,
unsigned char b )

Constructs a Color3ub object, and set its elements to parameters (r, g, b).

◆ Color3ub() [3/6]

cil::Color3ub::Color3ub ( const Color3ub & other)

◆ Color3ub() [4/6]

cil::Color3ub::Color3ub ( const Color3f & other)

Constructs a Color3f of (r, g, b) by copying the values of another Color3ub object and multiplying these values by 255.0f (converting from float range 0.0-1.0 to unsigned char (ub) range 0-255 ).

◆ Color3ub() [5/6]

cil::Color3ub::Color3ub ( const Color4ub & other)

◆ Color3ub() [6/6]

cil::Color3ub::Color3ub ( const Color4f & other)