OpenGLPrakt --> cColor
class for RGB(A) color
This class is used to represent an "OpenGL compatible" color. It is a class of its own (its not derived from anything). It has an operator GLfloat *(), so it can be used directly within calls to glColor3f/glColor4f
uRgbaColor | [protected] | union to represent an OpenGL RGB(A) |
public cColor ( ) ;
default constructor
public cColor ( GLfloat r , GLfloat g , GLfloat b , GLfloat a = 1 . 0 ) ;
constructor w/ initialization (alpha is optional)
r | red component |
g | green component |
b | blue component |
a | alpha component (optional, default = 1.0 = opaque) |
public ~ cColor ( ) ;
destructor
protected uRgbaColor mColor
public operator const GLfloat * ( ) const ;
operator for casting to (GLfloat *)
public operator GLfloat * ( ) ;
public void SetColor ( GLfloat r , GLfloat g , GLfloat b , GLfloat a = 1 . 0 ) ;
assign new color
r | red component |
g | green component |
b | blue component |
a | alpha component (optional, default = 1.0 = opaque) |
public void GetColor ( GLfloat & r , GLfloat & g , GLfloat & b ) ;
retrieve actual color
r | reference to variable which will hold red value |
g | ... green value |
b | ... blue value |
public void GetColor ( GLfloat & r , GLfloat & g , GLfloat & b , GLfloat & a ) ;
retrieve actual color
r | reference to variable which will hold red value |
g | ... green value |
b | ... blue value |
a | ... alpha value |
public GLfloat GetR ( ) const ;
return red value
public GLfloat GetG ( ) const ;
return green value
public GLfloat GetB ( ) const ;
return blue value
public GLfloat GetA ( ) const ;
return alpha value
This documentation was generated automatically by the ccdoc tool (version 0.7a).
Click here to submit a bug report or feature request.
Click here to return to the top of the page.