Applies a scale to colors in the scene graph and on vertices. More...
Public Member Functions | |
VBase4 const | getScale () |
Returns the scale to be applied to colors. | |
bool | hasAlphaScale () |
Returns true if the ColorScaleAttrib has a non-identity scale in the alpha component (ignoring RGB), or false otherwise. | |
bool | hasRgbScale () |
Returns true if the ColorScaleAttrib has a non-identity scale in the RGB components (ignoring alpha), or false otherwise. | |
bool | hasScale () |
Returns true if the ColorScaleAttrib has a non-identity scale, false otherwise (in which case it might be an off attrib or an identity attrib). | |
bool | isIdentity () |
Returns true if the ColorScaleAttrib is an identity attrib, false if it is either an off attrib or it has a scale. | |
bool | isOff () |
Returns true if the ColorScaleAttrib will ignore any color scales inherited from above, false otherwise. | |
RenderAttrib const | setScale (VBase4 const scale) |
Returns a new ColorScaleAttrib, just like this one, but with the scale changed to the indicated value. | |
Static Public Member Functions | |
static int | getClassSlot () |
static TypeHandle | getClassType () |
static RenderAttrib const | make (VBase4 const scale) |
Constructs a new ColorScaleAttrib object that indicates geometry should be scaled by the indicated factor. | |
static RenderAttrib const | makeDefault () |
Returns a RenderAttrib that corresponds to whatever the standard default properties for render attributes of this type ought to be. | |
static RenderAttrib const | makeIdentity () |
Constructs an identity scale attrib. | |
static RenderAttrib const | makeOff () |
Constructs a new ColorScaleAttrib object that ignores any ColorScaleAttrib inherited from above. |
Applies a scale to colors in the scene graph and on vertices.
static int getClassSlot | ( | ) | [static] |
static TypeHandle getClassType | ( | ) | [static] |
Reimplemented from RenderAttrib.
bool hasAlphaScale | ( | ) |
Returns true if the ColorScaleAttrib has a non-identity scale in the alpha component (ignoring RGB), or false otherwise.
bool hasRgbScale | ( | ) |
Returns true if the ColorScaleAttrib has a non-identity scale in the RGB components (ignoring alpha), or false otherwise.
bool hasScale | ( | ) |
Returns true if the ColorScaleAttrib has a non-identity scale, false otherwise (in which case it might be an off attrib or an identity attrib).
bool isIdentity | ( | ) |
Returns true if the ColorScaleAttrib is an identity attrib, false if it is either an off attrib or it has a scale.
bool isOff | ( | ) |
Returns true if the ColorScaleAttrib will ignore any color scales inherited from above, false otherwise.
This is not the same thing as !has_scale(); a ColorScaleAttrib may have the "off" flag set and also have another scale specified.
static RenderAttrib const make | ( | VBase4 const | scale | ) | [static] |
Constructs a new ColorScaleAttrib object that indicates geometry should be scaled by the indicated factor.
static RenderAttrib const makeDefault | ( | ) | [static] |
Returns a RenderAttrib that corresponds to whatever the standard default properties for render attributes of this type ought to be.
static RenderAttrib const makeIdentity | ( | ) | [static] |
Constructs an identity scale attrib.
static RenderAttrib const makeOff | ( | ) | [static] |
Constructs a new ColorScaleAttrib object that ignores any ColorScaleAttrib inherited from above.
You may also specify an additional color scale to apply to geometry below (using set_scale()).
RenderAttrib const setScale | ( | VBase4 const | scale | ) |
Returns a new ColorScaleAttrib, just like this one, but with the scale changed to the indicated value.