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

Indicates which, if any, material should be applied to geometry. More...

Inheritance diagram for MaterialAttrib:
RenderAttrib TypedWritableReferenceCount TypedWritable ReferenceCount TypedObject

List of all members.

Public Member Functions

Material getMaterial ()
 If the MaterialAttrib is not an 'off' MaterialAttrib, returns the material that is associated.
bool isOff ()
 Returns true if the MaterialAttrib is an 'off' MaterialAttrib, indicating that it should disable the use of materials.

Static Public Member Functions

static int getClassSlot ()
static TypeHandle getClassType ()
static RenderAttrib const make (Material material)
 Constructs a new MaterialAttrib object suitable for rendering the indicated material onto geometry.
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 makeOff ()
 Constructs a new MaterialAttrib object suitable for rendering unmateriald geometry.

Detailed Description

Indicates which, if any, material should be applied to geometry.

The material is used primarily to control lighting effects, and isn't necessary (or useful) in the absence of lighting.


Member Function Documentation

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

Reimplemented from RenderAttrib.

If the MaterialAttrib is not an 'off' MaterialAttrib, returns the material that is associated.

Otherwise, return NULL.

bool isOff ( )

Returns true if the MaterialAttrib is an 'off' MaterialAttrib, indicating that it should disable the use of materials.

static RenderAttrib const make ( Material  material) [static]

Constructs a new MaterialAttrib object suitable for rendering the indicated material onto geometry.

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 makeOff ( ) [static]

Constructs a new MaterialAttrib object suitable for rendering unmateriald geometry.

 All Classes Namespaces Functions Variables Enumerations Enumerator Properties