C4 Engine
C4 Engine API Documentation

class Attribute

Defined in:  C4Attributes.h
The Attribute class is the base class for all material attributes.

class Attribute : public ListElement<Attribute>, public Packable

Member Functions
Attribute::GetAttributeType Returns the type of an attribute.
Attribute::GetAttributeFlags Returns the attribute flags.
Attribute::SetAttributeFlags Sets the attribute flags.

Attribute(AttributeType type, uint32 flags = 0);

The Attribute class is the base class for all material attributes. A list of material attributes is supplied to the Drawable class by either attaching a material with the Drawable::SetMaterialObjectPointer function or by setting an auxiliary attribute list using the Drawable::SetMaterialAttributeList function. These material attributes describe to the Graphics Manager how a drawable object should be shaded.

A Geometry node can have a MaterialObject object attached to it that holds a list of material attributes. In this case, the list of material attributes is automatically applied to the Renderable base class of the Geometry node when it is preprocessed.
Base Classes
ListElement<Attribute> Attributes are stored in a list by the MaterialObject class. The Renderable class also uses lists of attributes.
Packable Attributes can be packed for storage in resources.
See Also