Panda3D
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties
Public Types | Public Member Functions | Static Public Member Functions
ColorAttrib Class Reference

Indicates what color should be applied to renderable geometry. More...

Inheritance diagram for ColorAttrib:
RenderAttrib TypedWritableReferenceCount TypedWritable ReferenceCount TypedObject

List of all members.

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.

Detailed Description

Indicates what color should be applied to renderable geometry.


Member Enumeration Documentation

enum Type
Enumerator:
TVertex 
TFlat 
TOff 

Member Function Documentation

static int getClassSlot ( ) [static]
static TypeHandle getClassType ( ) [static]

Reimplemented from RenderAttrib.

VBase4 const getColor ( )

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.

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.

 All Classes Namespaces Functions Variables Enumerations Enumerator Properties