Class representing xref materials.
This interface groups functionality specific to xref materials. In order to access functionality common to all xref scene entities, use the IXRefItem interface. An xref material acts as a wrapper around the xrefed material (also referred to as the "source material"). For example, all shading methods on the XRef Material are automatically forwarded to the source material, requests for interfaces are also forwarded to the source material. Client or plugin code working with materials should not be required to write xref material specific code, unless the desired functionality is xref specific.
#include <iXrefMaterial.h>
Public Types |
|
enum | { kfpGetSourceMaterial } |
Public Member Functions |
|
virtual Mtl * | GetSourceMaterial (bool resolveNestedXRef=false) const =0 |
Retrieves the source material, the actual
material behind the XRef. |
|
virtual FPInterfaceDesc * | GetIXRefMaterialDesc ()=0 |
Returns the function publishing descriptor
for the XRef Material.
|
|
virtual Interface_ID | GetID () |
virtual FPInterfaceDesc * | GetDesc () |
BEGIN_FUNCTION_MAP | FN_1 (kfpGetSourceMaterial, TYPE_MTL, GetSourceMaterial, TYPE_bool) |
Static Public Member Functions |
|
static bool | Is_IXRefMaterial (Animatable &animatable) |
Determines whether it is safe to cast an
Animatable to an
IXRefMaterial. |
|
static IXRefMaterial * | GetInterface (InterfaceServer &is) |
Retrieves the IXRefMaterial interface
from a scene entity. |
anonymous enum |
{ kfpGetSourceMaterial, };
virtual Mtl* GetSourceMaterial | ( | bool | resolveNestedXRef =
false |
) | const [pure virtual] |
Retrieves the source material, the actual material behind the XRef.
[in] | resolveNestedXRef | - When set to true, the method will recursively resolve any nested XRef materials, guaranteeing that the material being returned is NOT an XRef material. When set to false, the source is returned directly without attempting to resolve nesting. |
bool Is_IXRefMaterial | ( | Animatable & | animatable | ) | [inline, static] |
Determines whether it is safe to cast an Animatable to an IXRefMaterial.
[in] | animatable | - The animatable to test. |
{ return ((animatable.SuperClassID() == MATERIAL_CLASS_ID) && (animatable.ClassID() == XREFMATERIAL_CLASS_ID)); }
IXRefMaterial * GetInterface | ( | InterfaceServer & | is | ) | [inline, static] |
Retrieves the IXRefMaterial interface from a scene entity.
[in] | is | - Reference to scene entity |
{ return static_cast<IXRefMaterial*>(is.GetInterface(IID_XREF_MATERIAL)); };
virtual FPInterfaceDesc* GetIXRefMaterialDesc | ( | ) | [pure virtual] |
Interface_ID GetID | ( | ) | [inline, virtual] |
Reimplemented from FPMixinInterface.
{
return IID_XREF_MATERIAL;
}
FPInterfaceDesc * GetDesc | ( | ) | [inline, virtual] |
Implements FPInterface.
{ return GetIXRefMaterialDesc(); }
BEGIN_FUNCTION_MAP FN_1 | ( | kfpGetSourceMaterial | , |
TYPE_MTL | , | ||
GetSourceMaterial | , | ||
TYPE_bool | |||
) |