This reference page is linked to from the following overview topics: Material and Texture Map Plug-ins, Porting Simple Material and Texture Map Plug-ins to Nitrous, Thread Safety, Plug-in Base Classes, Parameter Types, Procedural Textures Maps, Bump Mapping, Mental Ray Classes, Translation of Object Plug-ins, Supported Types.
#include <imtl.h>

Public Member Functions |
|
| CoreExport | Texmap () |
| SClass_ID | SuperClassID () |
| Retrieves a constant representing the type
of the plugin. |
|
| virtual void | GetClassName (MSTR &s) |
| Retrieves the name of the plugin class.
|
|
| virtual AColor | EvalColor (ShadeContext &sc)=0 |
| virtual float | EvalMono (ShadeContext &sc) |
| virtual Point3 | EvalNormalPerturb (ShadeContext &sc)=0 |
| virtual BOOL | HandleOwnViewPerturb () |
| virtual CoreExport BITMAPINFO * | GetVPDisplayDIB (TimeValue t, TexHandleMaker &thmaker, Interval &valid, BOOL mono=FALSE, int forceW=0, int forceH=0) |
| virtual void | GetUVTransform (Matrix3 &uvtrans) |
| virtual int | GetTextureTiling () |
| virtual void | InitSlotType (int sType) |
| virtual int | MapSlotType (int i) |
| virtual int | GetUVWSource () |
| virtual int | GetMapChannel () |
| virtual UVGen * | GetTheUVGen () |
| virtual XYZGen * | GetTheXYZGen () |
| CoreExport void | RecursInitSlotType (int sType) |
| virtual void | SetOutputLevel (TimeValue t, float v) |
| virtual int | LoadMapFiles (TimeValue t) |
| virtual CoreExport void | RenderBitmap (TimeValue t, Bitmap *bm, float scale3D=1.0f, BOOL filter=FALSE) |
| CoreExport void | RefAdded (RefMakerHandle rm) |
| Called after a reference is made to a
target. |
|
| CoreExport SvGraphNodeReference | SvTraverseAnimGraph (IGraphObjectManager *gom, Animatable *owner, int id, DWORD flags) |
| virtual CoreExport bool | IsOutputMeaningful (ShadeContext &sc) |
| virtual bool | IsLocalOutputMeaningful (ShadeContext &sc) |
| virtual int | IsHighDynamicRange () const |
Public Attributes |
|
| int | cacheID |
| CoreExport Texmap | ( | ) |
| SClass_ID SuperClassID | ( | ) | [inline, virtual] |
Retrieves a constant representing the type of the plugin.
Reimplemented from ReferenceTarget.
{ return TEXMAP_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 MSPluginTexmap, and MSTexmapXtnd.
{ s= MSTR(_M("Texture")); }
| virtual AColor EvalColor | ( | ShadeContext & | sc | ) | [pure virtual] |
Implemented in MSPluginTexmap, and MSTexmapXtnd.
| virtual float EvalMono | ( | ShadeContext & | sc | ) | [inline, virtual] |
Reimplemented in MSPluginTexmap, and MSTexmapXtnd.
{
return Intens(EvalColor(sc));
}
| virtual Point3 EvalNormalPerturb | ( | ShadeContext & | sc | ) | [pure virtual] |
Implemented in MSPluginTexmap, and MSTexmapXtnd.
| virtual BOOL HandleOwnViewPerturb | ( | ) | [inline, virtual] |
Reimplemented in MSPluginTexmap, and MSTexmapXtnd.
{ return FALSE; }
| virtual CoreExport BITMAPINFO* GetVPDisplayDIB | ( | TimeValue | t, |
| TexHandleMaker & | thmaker, | ||
| Interval & | valid, | ||
| BOOL | mono = FALSE, |
||
| int | forceW = 0, |
||
| int | forceH = 0 |
||
| ) | [virtual] |
Reimplemented in MSTexmapXtnd.
| virtual void GetUVTransform | ( | Matrix3 & | uvtrans | ) | [inline, virtual] |
Reimplemented in MSPluginTexmap, and MSTexmapXtnd.
{ uvtrans.IdentityMatrix(); }
| virtual int GetTextureTiling | ( | ) | [inline, virtual] |
Reimplemented in MSPluginTexmap, and MSTexmapXtnd.
| virtual void InitSlotType | ( | int | sType | ) | [inline, virtual] |
Reimplemented in MSPluginTexmap, and MSTexmapXtnd.
{ defaultSlotType = sType; }
| virtual int MapSlotType | ( | int | i | ) | [inline, virtual] |
Reimplemented from MtlBase.
{ return defaultSlotType; }
| virtual int GetUVWSource | ( | ) | [inline, virtual] |
Reimplemented in MSPluginTexmap, and MSTexmapXtnd.
{ return UVWSRC_EXPLICIT; }
| virtual int GetMapChannel | ( | ) | [inline, virtual] |
Reimplemented in MSPluginTexmap, and MSTexmapXtnd.
{ return 1; } // only relevant if above returns UVWSRC_EXPLICIT
| virtual UVGen* GetTheUVGen | ( | ) | [inline, virtual] |
Reimplemented in MSPluginTexmap, and MSTexmapXtnd.
{ return NULL; } // maps with a UVGen should implement this
| virtual XYZGen* GetTheXYZGen | ( | ) | [inline, virtual] |
Reimplemented in MSPluginTexmap, and MSTexmapXtnd.
{ return NULL; } // maps with a XYZGen should implement this
| CoreExport void RecursInitSlotType | ( | int | sType | ) |
| virtual void SetOutputLevel | ( | TimeValue | t, |
| float | v | ||
| ) | [inline, virtual] |
Reimplemented in MSPluginTexmap, and MSTexmapXtnd.
{}
| virtual int LoadMapFiles | ( | TimeValue | t | ) | [inline, virtual] |
class MtlEnum
{
virtual void proc(MtlBase *m) = 0;
};
void EnumMtlTree(MtlBase *mb, MtlEnum &tenum)
{
tenum.proc(mb);
for (int i=0; i<mb->NumSubTexmaps(); i++) {
Texmap *st = mb->GetSubTexmap(i);
if (st)
EnumMtlTree(st,tenum);
}
if (IsMtl(mb)) {
Mtl *m = (Mtl *)mb;
for (i=0; i<m->NumSubMtls(); i++) {
Mtl *sm = m->GetSubMtl(i);
if (sm)
EnumMtlTree(sm,tenum);
}
}
}
class RefEnumProc
{
virtual void proc(ReferenceMaker *rm)=0;
};
void EnumRefs(ReferenceMaker *rm, RefEnumProc &proc)
{
proc.proc(rm);
for (int i=0; i<rm->NumRefs(); i++) {
ReferenceMaker *srm = rm->GetReference(i);
if (srm) EnumRefs(srm,proc);
}
}
class MyEnum: public RefEnumProc
{
void proc(ReferenceMaker *rm) {
// do something ...
}
}
void afunction(Mtl* m)
{
MyEnum enumer;
EnumRefs(m,&enumer);
}
Reimplemented in MSPluginTexmap, and MSTexmapXtnd.
{ return 1; }
| virtual CoreExport void RenderBitmap | ( | TimeValue | t, |
| Bitmap * | bm, | ||
| float | scale3D = 1.0f, |
||
| BOOL | filter =
FALSE |
||
| ) | [virtual] |
Reimplemented in MSPluginTexmap, and MSTexmapXtnd.
| 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 MSPluginTexmap.
| CoreExport SvGraphNodeReference SvTraverseAnimGraph | ( | IGraphObjectManager * | gom, |
| Animatable * | owner, | ||
| int | id, | ||
| DWORD | flags | ||
| ) | [virtual] |
| gom | Points to the schematic view window manager. |
| owner | The owning animatable. |
| id | This is usually the sub-anim number (but can actually be any value the developer chooses). |
| flags | See List of Schematic %View AddAnimatable Flags. |
Reimplemented from MtlBase.
| virtual CoreExport bool IsOutputMeaningful | ( | ShadeContext & | sc | ) | [virtual] |
Reimplemented in MSPluginTexmap, and MSTexmapXtnd.
| virtual bool IsLocalOutputMeaningful | ( | ShadeContext & | sc | ) | [inline, virtual] |
Reimplemented in MSPluginTexmap, and MSTexmapXtnd.
{ return false; }
| virtual int IsHighDynamicRange | ( | ) | const [inline, virtual] |
{ return false; }