MaxwellMayaMaterial class
Description
This is the abstract base class for materials. It allows you to handle materials in a uniform way and identify the concrete type of the underlying object through the GetMaterialType
method.
Subclasses:Â MaxwellMayaEmbeddedMaterial
, MaxwellMayaReferencedMaterial
.
Methods
void | SetName(const MString& name) |
MString | GetName() const |
MaterialType | GetMaterialType() const |
MaxwellMayaMaterial* | Copy() const |
void | Destroy() |
void SetName(const MString& name)
Sets the name of the material in the Maxwell scene.
MString GetName() const
Returns the name of the material.
MaterialType GetMaterialType() const
Returns the concrete type of the underlying Maxwell material. Can be one of:
MaterialType_Embedded
: an embedded material. The parameters of this material are stored in the exported scene directly. The object can be cast toÂMaxwellMayaEmbeddedMaterial
.MaterialType_Referenced
: this material is referenced from an external MXM file. The object can be cast toMaxwellMayaReferencedMaterial
.
MaxwellMayaMaterial*Â Copy() const
Creates and returns a copy of the material.
void Destroy()
Removes the material from the Maxwell scene and destroys it. As explained here, this method does not destroy the API handle, so in C++ you must still call DeleteThis() when you are done with it (or let a smart pointer do it).