C4 Engine Terathon Software C4 Engine API Documentation

• Graphics Manager

API Links
Developer Links

class MaterialObject

Defined in:  C4MaterialObjects.h
The MaterialObject class encapsulates a set of material properties.
Definition

class MaterialObject : public Object

Member Functions
MaterialObject::GetMaterialSubstance Returns the material substance type.
MaterialObject::SetMaterialSubstance Sets the material substance type.
MaterialObject::GetMaterialFlags Returns the material flags.
MaterialObject::SetMaterialFlags Sets the material flags.
MaterialObject::Clone Clones a material object.
 
MaterialObject::GetAttributeList Returns a pointer to the material's attribute list.
MaterialObject::GetFirstAttribute Returns a pointer to the first material attribute.
MaterialObject::AddAttribute Adds an attribute to a material.
MaterialObject::PurgeAttributes Purges all of a material's attributes.
MaterialObject::GetTextureBlendMode Returns the texture blend mode.
MaterialObject::SetTextureBlendMode Sets the texture blend mode.
MaterialObject::GetTexcoordScale Returns the scale for a texcoord.
MaterialObject::SetTexcoordScale Sets the scale for a texcoord.
MaterialObject::GetTexcoordOffset Returns the offset for a texcoord.
MaterialObject::SetTexcoordOffset Sets the offset for a texcoord.
MaterialObject::GetTexcoordVelocity Returns the animation velocity for a texcoord.
MaterialObject::SetTexcoordVelocity Sets the animation velocity for a texcoord.
 
MaterialObject::GetFirstRegisteredSubstance Returns the first registered substance.
MaterialObject::FindRegisteredSubstance Returns a specific registered substance.
MaterialObject::RegisterSubstance Registers a substance with the engine.
Constructor

MaterialObject();

Description
The MaterialObject class holds all of the information pertaining to a paticular material used for shading. Individual material attributes are added to a material object using the MaterialObject::AddAttribute function.

One material object can be shared by many Geometry nodes in a world. A material object is assigned to a Geometry node by calling the Geometry::SetMaterialObject function. This increments the material object's reference count, so it is okay to release the material object afterwards. Since the MaterialObject class is a shared object, it is released by calling the Shared::Release function.
Base Classes
Object A MaterialObject is an object that can be shared by multiple geometry nodes.
See Also

Attribute

Geometry