VR-Engage  2.2
Loading...
Searching...
No Matches
makVre::DtColor Class Reference

Detailed Description

This class provides functionality for working with colors in RGBA format. It includes methods for creating common colors and converting between different color representations.

#include <color.h>

Public Types

enum  Fill { FILL_SOLID , FILL_TRANSPARENT , FILL_WIREFRAME , FILL_NONE }
 

Public Member Functions

 DtColor ()
 
 DtColor (float rr, float gg, float bb, float aa)
 
 ~DtColor ()
 
unsigned int toUInt () const
 
bool operator== (const DtColor &other) const
 

Static Public Member Functions

static DtColor white ()
 
static DtColor black ()
 
static DtColor blue ()
 
static DtColor green ()
 
static DtColor red ()
 
static DtColor orange ()
 
static DtColor yellow ()
 

Public Attributes

float r
 
float g
 
float b
 
float a
 

Member Enumeration Documentation

◆ Fill

Fill mode enumeration for rendering.

Enumerator
FILL_SOLID 

Solid fill mode.

FILL_TRANSPARENT 

Transparent fill mode.

FILL_WIREFRAME 

Wireframe fill mode.

FILL_NONE 

No fill mode.

Constructor & Destructor Documentation

◆ DtColor() [1/2]

makVre::DtColor::DtColor ( )
inline

Default constructor.

Creates a white opaque color (RGBA: 1,1,1,1)

References a, b, g, and r.

Referenced by black(), blue(), green(), operator==(), orange(), red(), white(), and yellow().

◆ DtColor() [2/2]

makVre::DtColor::DtColor ( float rr,
float gg,
float bb,
float aa )
inline

Constructor with RGBA components.

Parameters
rrRed component (0.0 to 1.0)
ggGreen component (0.0 to 1.0)
bbBlue component (0.0 to 1.0)
aaAlpha component (0.0 to 1.0, where 1.0 is fully opaque)

References a, b, g, and r.

◆ ~DtColor()

makVre::DtColor::~DtColor ( )
inline

Destructor.

Member Function Documentation

◆ toUInt()

unsigned int makVre::DtColor::toUInt ( ) const

Converts the color to an unsigned integer representation.

The color is packed as 0xRRGGBBAA with 8 bits per channel

Returns
The color as a 32-bit unsigned integer

◆ white()

static DtColor makVre::DtColor::white ( )
inlinestatic

Creates a white color (RGBA: 1,1,1,1)

Returns
A white color

References DtColor().

◆ black()

static DtColor makVre::DtColor::black ( )
inlinestatic

Creates a black color (RGBA: 0,0,0,1)

Returns
A black color

References DtColor().

◆ blue()

static DtColor makVre::DtColor::blue ( )
inlinestatic

Creates a blue color (RGBA: 0,0,1,1)

Returns
A blue color

References DtColor().

◆ green()

static DtColor makVre::DtColor::green ( )
inlinestatic

Creates a green color (RGBA: 0,1,0,1)

Returns
A green color

References DtColor().

◆ red()

static DtColor makVre::DtColor::red ( )
inlinestatic

Creates a red color (RGBA: 1,0,0,1)

Returns
A red color

References DtColor().

◆ orange()

static DtColor makVre::DtColor::orange ( )
inlinestatic

Creates an orange color (RGBA: 1,0.5,0,1)

Returns
An orange color

References DtColor().

◆ yellow()

static DtColor makVre::DtColor::yellow ( )
inlinestatic

Creates a yellow color (RGBA: 1,1,0,1)

Returns
A yellow color

References DtColor().

◆ operator==()

bool makVre::DtColor::operator== ( const DtColor & other) const

Equality comparison operator.

Parameters
otherThe color to compare with
Returns
true if the colors are identical, false otherwise

References DtColor().

Member Data Documentation

◆ r

float makVre::DtColor::r

Red component (0.0 to 1.0)

Referenced by DtColor(), and DtColor().

◆ g

float makVre::DtColor::g

Green component (0.0 to 1.0)

Referenced by DtColor(), and DtColor().

◆ b

float makVre::DtColor::b

Blue component (0.0 to 1.0)

Referenced by DtColor(), and DtColor().

◆ a

float makVre::DtColor::a

Alpha component (0.0 to 1.0, where 1.0 is fully opaque)

Referenced by DtColor(), and DtColor().


The documentation for this class was generated from the following file: