Indicates what color should be applied to renderable geometry. More...
Public Types | |
enum | Type { TVertex = 0, TFlat = 1, TOff = 2 } |
Public Member Functions | |
VBase4 const | getColor () |
If the type is T_flat or T_off, this returns the color that will be applied to geometry. | |
Type | getColorType () |
Returns the type of color specified by this ColorAttrib. | |
Static Public Member Functions | |
static int | getClassSlot () |
static TypeHandle | getClassType () |
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 | makeFlat (VBase4 const color) |
Constructs a new ColorAttrib object that indicates geometry should be rendered in the indicated color. | |
static RenderAttrib const | makeOff () |
Constructs a new ColorAttrib object that indicates geometry should be rendered in white. | |
static RenderAttrib const | makeVertex () |
Constructs a new ColorAttrib object that indicates geometry should be rendered according to its own vertex color. |
Indicates what color should be applied to renderable geometry.
enum Type |
static int getClassSlot | ( | ) | [static] |
static TypeHandle getClassType | ( | ) | [static] |
Reimplemented from RenderAttrib.
If the type is T_flat or T_off, this returns the color that will be applied to geometry.
If the type is T_vertex, this is meaningless.
Type getColorType | ( | ) |
Returns the type of color specified by this ColorAttrib.
The options are:
T_vertex - use the vertex color specified in the geometry itself.
T_flat - use the color specified in this ColorAttrib for all geometry. You can get this color via get_color().
T_off - use the color white.
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 makeFlat | ( | VBase4 const | color | ) | [static] |
Constructs a new ColorAttrib object that indicates geometry should be rendered in the indicated color.
static RenderAttrib const makeOff | ( | ) | [static] |
Constructs a new ColorAttrib object that indicates geometry should be rendered in white.
static RenderAttrib const makeVertex | ( | ) | [static] |
Constructs a new ColorAttrib object that indicates geometry should be rendered according to its own vertex color.