This reference page is linked to from the following overview topics: Material and Texture Map Plug-ins, Thread Safety, Plug-in Base Classes, Parameter Types, Retrieving the Material from a Node, Mental Ray Classes, Translation of Texture Map and Materials, Supported Types.
#include <imtl.h>
Public Member Functions |
|
CoreExport | Mtl () |
SClass_ID | SuperClassID () |
Retrieves a constant representing the type
of the plugin. |
|
virtual void | GetClassName (MSTR &s) |
Retrieves the name of the plugin class.
|
|
CoreExport MtlBase * | GetActiveTexmap () |
CoreExport void | SetActiveTexmap (MtlBase *txm) |
CoreExport void | RefDeleted () |
Called after a references to this is
deleted. |
|
CoreExport void | RefAdded (RefMakerHandle rm) |
Called after a reference is made to a
target. |
|
virtual Color | GetAmbient (int mtlNum=0, BOOL backFace=FALSE)=0 |
virtual Color | GetDiffuse (int mtlNum=0, BOOL backFace=FALSE)=0 |
virtual Color | GetSpecular (int mtlNum=0, BOOL backFace=FALSE)=0 |
virtual float | GetShininess (int mtlNum=0, BOOL backFace=FALSE)=0 |
virtual float | GetShinStr (int mtlNum=0, BOOL backFace=FALSE)=0 |
virtual float | GetXParency (int mtlNum=0, BOOL backFace=FALSE)=0 |
virtual BOOL | GetSelfIllumColorOn (int mtlNum=0, BOOL backFace=FALSE) |
virtual float | GetSelfIllum (int mtlNum=0, BOOL backFace=FALSE) |
virtual Color | GetSelfIllumColor (int mtlNum=0, BOOL backFace=FALSE) |
virtual Sampler * | GetPixelSampler (int mtlNum=0, BOOL backFace=FALSE) |
virtual float | WireSize (int mtlNum=0, BOOL backFace=FALSE) |
virtual void | SetAmbient (Color c, TimeValue t)=0 |
virtual void | SetDiffuse (Color c, TimeValue t)=0 |
virtual void | SetSpecular (Color c, TimeValue t)=0 |
virtual void | SetShininess (float v, TimeValue t)=0 |
virtual BOOL | SupportsShaders () |
virtual BOOL | SupportsRenderElements () |
virtual void | Shade (ShadeContext &sc)=0 |
virtual int | NumSubMtls () |
virtual Mtl * | GetSubMtl (int i) |
virtual void | SetSubMtl (int i, Mtl *m) |
virtual int | VPDisplaySubMtl () |
virtual CoreExport MSTR | GetSubMtlSlotName (int i) |
CoreExport MSTR | GetSubMtlTVName (int i) |
CoreExport void | CopySubMtl (HWND hwnd, int ifrom, int ito) |
virtual CoreExport float | GetDynamicsProperty (TimeValue t, int mtlNum, int propID) |
virtual CoreExport void | SetDynamicsProperty (TimeValue t, int mtlNum, int propID, float value) |
virtual float | EvalDisplacement (ShadeContext &sc) |
virtual Interval | DisplacementValidity (TimeValue t) |
CoreExport bool | SvCanInitiateLink (IGraphObjectManager *gom, IGraphNode *gNode) |
virtual BOOL | DontKeepOldMtl () |
virtual void | SetRenderData (RenderData *rdata) |
virtual RenderData * | GetRenderData () |
virtual bool | IsOutputConst (ShadeContext &sc, int stdID) |
virtual bool | EvalColorStdChannel (ShadeContext &sc, int stdID, Color &outClr) |
virtual CoreExport bool | EvalMonoStdChannel (ShadeContext &sc, int stdID, float &outVal) |
CoreExport Mtl | ( | ) |
SClass_ID SuperClassID | ( | ) | [inline, virtual] |
Retrieves a constant representing the type of the plugin.
Reimplemented from ReferenceTarget.
{ return MATERIAL_CLASS_ID; }
virtual void GetClassName | ( | MSTR & | s | ) | [inline, virtual] |
Retrieves the name of the plugin class.
This name is usually used internally for debugging purposes. For Material plug-ins this method is used to put up the material "type" name in the Material Editor.
s | Reference to a string filled in with the name of the plugin class |
Reimplemented from ReferenceTarget.
Reimplemented in MSPluginMtl, and MSMtlXtnd.
{ s= MSTR(_M("Mtl")); }
CoreExport MtlBase* GetActiveTexmap | ( | ) |
Reimplemented in MSPluginMtl, and MSMtlXtnd.
CoreExport void SetActiveTexmap | ( | MtlBase * | txm | ) |
Reimplemented in MSPluginMtl, and MSMtlXtnd.
CoreExport void RefDeleted | ( | ) | [virtual] |
Called after a references to this is deleted.
This is called after deleting a reference to a reference target, in the case that the target was not deleted. When the last strong reference to a ReferenceTarget is removed, the ReferenceTarget is deleted, the destructor is called, and the memory cleared.
Reimplemented from ReferenceTarget.
Reimplemented in MSPluginMtl.
CoreExport void RefAdded | ( | RefMakerHandle | rm | ) | [virtual] |
Called after a reference is made to a target.
This is called after a reference is made to this. If the target (this) needs to know that a reference to made to it, the target (this) can override this function.
rm | - The ReferenceMaker creating the reference. |
Reimplemented from ReferenceTarget.
Reimplemented in MSPluginMtl.
virtual Color GetAmbient | ( | int | mtlNum = 0 , |
BOOL | backFace =
FALSE |
||
) | [pure virtual] |
mtlNum | This is the material index for mult-materials. |
backFace | If the surface normal of the face is pointing away from the viewer this will be TRUE; otherwise FALSE. |
Implemented in MSPluginMtl, and MSMtlXtnd.
virtual Color GetDiffuse | ( | int | mtlNum = 0 , |
BOOL | backFace =
FALSE |
||
) | [pure virtual] |
mtlNum | This is the material index for mult-materials. |
backFace | If the surface normal of the face is pointing away from the viewer this will be TRUE; otherwise FALSE. |
Implemented in MSPluginMtl, and MSMtlXtnd.
virtual Color GetSpecular | ( | int | mtlNum = 0 , |
BOOL | backFace =
FALSE |
||
) | [pure virtual] |
mtlNum | This is the material index for mult-materials. |
backFace | If the surface normal of the face is pointing away from the viewer this will be TRUE; otherwise FALSE. |
Implemented in MSPluginMtl, and MSMtlXtnd.
virtual float GetShininess | ( | int | mtlNum = 0 , |
BOOL | backFace =
FALSE |
||
) | [pure virtual] |
mtlNum | This is the material index for mult-materials. |
backFace | If the surface normal of the face is pointing away from the viewer this will be TRUE; otherwise FALSE. |
Implemented in MSPluginMtl, and MSMtlXtnd.
virtual float GetShinStr | ( | int | mtlNum = 0 , |
BOOL | backFace =
FALSE |
||
) | [pure virtual] |
mtlNum | This is the material index for mult-materials. |
backFace | If the surface normal of the face is pointing away from the viewer this will be TRUE; otherwise FALSE. |
Implemented in MSPluginMtl, and MSMtlXtnd.
virtual float GetXParency | ( | int | mtlNum = 0 , |
BOOL | backFace =
FALSE |
||
) | [pure virtual] |
mtlNum | This is the material index for mult-materials. |
backFace | If the surface normal of the face is pointing away from the viewer this will be TRUE; otherwise FALSE. |
Implemented in MSPluginMtl, and MSMtlXtnd.
virtual BOOL GetSelfIllumColorOn | ( | int | mtlNum = 0 , |
BOOL | backFace =
FALSE |
||
) | [inline, virtual] |
mtlNum | This is the material index for mult-materials. |
backFace | If the surface normal of the face is pointing away from the viewer this will be TRUE; otherwise FALSE. |
Reimplemented in StdMat2, MSPluginMtl, and MSMtlXtnd.
{ return TRUE; }
virtual float GetSelfIllum | ( | int | mtlNum = 0 , |
BOOL | backFace =
FALSE |
||
) | [inline, virtual] |
mtlNum | This is the material index for mult-materials. |
backFace | If the surface normal of the face is pointing away from the viewer this will be TRUE; otherwise FALSE. |
Reimplemented in MSPluginMtl, and MSMtlXtnd.
{ return 0.0f; }
virtual Color GetSelfIllumColor | ( | int | mtlNum = 0 , |
BOOL | backFace =
FALSE |
||
) | [inline, virtual] |
mtlNum | This is the material index for mult-materials. |
backFace | If the surface normal of the face is pointing away from the viewer this will be TRUE; otherwise FALSE. |
Reimplemented in StdMat2, MSPluginMtl, and MSMtlXtnd.
{ Color c( .0f,.0f,.0f); return c; }
virtual Sampler* GetPixelSampler | ( | int | mtlNum = 0 , |
BOOL | backFace =
FALSE |
||
) | [inline, virtual] |
mtlNum | This is the material index for mult-materials. |
backFace | If the surface normal of the face is pointing away from the viewer this will be TRUE; otherwise FALSE. |
Reimplemented in StdMat2, and MSMtlXtnd.
{ return NULL; }
virtual float WireSize | ( | int | mtlNum = 0 , |
BOOL | backFace =
FALSE |
||
) | [inline, virtual] |
mtlNum | This is the material index for mult-materials. |
backFace | If the surface normal of the face is pointing away from the viewer this will be TRUE; otherwise FALSE. |
Reimplemented in MSPluginMtl, and MSMtlXtnd.
{ return 1.0f; }
virtual void SetAmbient | ( | Color | c, |
TimeValue | t | ||
) | [pure virtual] |
c | The color to store. |
t | The time to set this color. |
Implemented in StdMat, MSPluginMtl, and MSMtlXtnd.
virtual void SetDiffuse | ( | Color | c, |
TimeValue | t | ||
) | [pure virtual] |
c | The color to store. |
t | The time to set this color. |
Implemented in StdMat, MSPluginMtl, and MSMtlXtnd.
virtual void SetSpecular | ( | Color | c, |
TimeValue | t | ||
) | [pure virtual] |
c | The color to store. |
t | The time to set this color. |
Implemented in StdMat, MSPluginMtl, and MSMtlXtnd.
virtual void SetShininess | ( | float | v, |
TimeValue | t | ||
) | [pure virtual] |
v | The shininess value to store. |
t | The time to set this color. |
Implemented in StdMat, MSPluginMtl, and MSMtlXtnd.
virtual BOOL SupportsShaders | ( | ) | [inline, virtual] |
virtual BOOL SupportsRenderElements | ( | ) | [inline, virtual] |
virtual void Shade | ( | ShadeContext & | sc | ) | [pure virtual] |
sc | Describes properties of the pixel to be shaded. The result of this method is returned in the ShadeOutput data member of sc. |
Implemented in MSPluginMtl, and MSMtlXtnd.
virtual int NumSubMtls | ( | ) | [inline, virtual] |
Reimplemented in MSPluginMtl, and MSMtlXtnd.
{ return 0; }
virtual Mtl* GetSubMtl | ( | int | i | ) | [inline, virtual] |
i | The index of the material to return. |
Reimplemented in MSPluginMtl, and MSMtlXtnd.
{ return NULL; }
virtual void SetSubMtl | ( | int | i, |
Mtl * | m | ||
) | [inline, virtual] |
i | The index of the material to store. |
m | The material pointer to store. |
Reimplemented in MSPluginMtl, and MSMtlXtnd.
{ }
virtual int VPDisplaySubMtl | ( | ) | [inline, virtual] |
{ return -1; } // which sub-mtl to display in the viewport: -1 indicates not implemented.
virtual CoreExport MSTR GetSubMtlSlotName | ( | int | i | ) | [virtual] |
i | The index of the sub-materials whose slot name should be returned. |
Reimplemented in MSPluginMtl, and MSMtlXtnd.
CoreExport MSTR GetSubMtlTVName | ( | int | i | ) |
i | The index of the sub-materials whose track view name should be returned. |
Reimplemented in MSPluginMtl, and MSMtlXtnd.
CoreExport void CopySubMtl | ( | HWND | hwnd, |
int | ifrom, | ||
int | ito | ||
) |
virtual CoreExport float GetDynamicsProperty | ( | TimeValue | t, |
int | mtlNum, | ||
int | propID | ||
) | [virtual] |
t | The time to return the dynamics property. |
mtlNum | The index of the sub-material or zero if this is a base material. |
propID | Specifies the type of property. One of the following
values: DYN_BOUNCE The bounce coefficient. Values in the range 0.0 to 1.0. DYN_STATIC_FRICTION The static friction property. Values in the range 0.0 to 1.0. DYN_SLIDING_FRICTION The sliding friction property. Values in the range 0.0 to 1.0. |
Reimplemented in MSPluginMtl, and MSMtlXtnd.
virtual CoreExport void SetDynamicsProperty | ( | TimeValue | t, |
int | mtlNum, | ||
int | propID, | ||
float | value | ||
) | [virtual] |
t | The time at which to set the value. |
mtlNum | The sub-material number for a multi-material. |
propID | Specifies the type of property. One of the following
values: DYN_BOUNCE The bounce coefficient. Values in the range 0.0 to 1.0. DYN_STATIC_FRICTION The static friction property. Values in the range 0.0 to 1.0. DYN_SLIDING_FRICTION The sliding friction property. Values in the range 0.0 to 1.0. |
value | The value to set. |
Reimplemented in MSPluginMtl, and MSMtlXtnd.
virtual float EvalDisplacement | ( | ShadeContext & | sc | ) | [inline, virtual] |
sc | This contains the details of the point being displaced. |
Reimplemented in MSPluginMtl, and MSMtlXtnd.
{ return 0.0f; }
virtual Interval DisplacementValidity | ( | TimeValue | t | ) | [inline, virtual] |
t | The Interval returned reflects the validity around this time. |
Reimplemented in MSPluginMtl, and MSMtlXtnd.
{ return FOREVER; }
CoreExport bool SvCanInitiateLink | ( | IGraphObjectManager * | gom, |
IGraphNode * | gNode | ||
) | [virtual] |
gom | Points to the schematic view window manager. |
gNode | Points to this node in the schematic view. |
Reimplemented from Animatable.
virtual BOOL DontKeepOldMtl | ( | ) | [inline, virtual] |
Reimplemented in MSMtlXtnd.
{ return FALSE; }
virtual void SetRenderData | ( | RenderData * | rdata | ) | [inline, virtual] |
rdata | The auxiliary data you wish to attach. |
{ renderData = rdata; }
virtual RenderData* GetRenderData | ( | ) | [inline, virtual] |
{ return renderData; }
virtual bool IsOutputConst | ( | ShadeContext & | sc, |
int | stdID | ||
) | [inline, virtual] |
sc | This describes the context of the question. |
stdID | The ID of the channel in question. See Texture Map Indices. |
Reimplemented in MSPluginMtl, and MSMtlXtnd.
{ return false; }
virtual bool EvalColorStdChannel | ( | ShadeContext & | sc, |
int | stdID, | ||
Color & | outClr | ||
) | [inline, virtual] |
sc | This describes the context in which the material should be evaluated. |
stdID | The ID of the channel to perform evaluation on. See Texture Map Indices. |
outClr | The result of the evaluation. |
Reimplemented in MSPluginMtl, and MSMtlXtnd.
{ return false; }
virtual CoreExport bool EvalMonoStdChannel | ( | ShadeContext & | sc, |
int | stdID, | ||
float & | outVal | ||
) | [virtual] |
Reimplemented in MSPluginMtl, and MSMtlXtnd.