3ds Max C++ API Reference
Texmap Class Referenceabstract

#include <Texmap.h>

+ Inheritance diagram for Texmap:

Public Member Functions

CoreExport Texmap ()
 
SClass_ID SuperClassID ()
 Retrieves a constant representing the type of the plugin. More...
 
virtual void GetClassName (MSTR &s, bool localized=true) const override
 Retrieves the name of the plugin class. More...
 
virtual CoreExport BITMAPINFO * GetVPDisplayDIB (TimeValue t, TexHandleMaker &thmaker, Interval &valid, BOOL mono=FALSE, int forceW=0, int forceH=0)
 
CoreExport void RecursInitSlotType (int sType)
 
CoreExport void RefAdded (RefMakerHandle rm)
 Called after a reference is made to a target. More...
 
CoreExport SvGraphNodeReference SvTraverseAnimGraph (IGraphObjectManager *gom, Animatable *owner, int id, DWORD flags)
 
virtual int IsHighDynamicRange () const
 
Evaluation Methods


virtual AColor EvalColor (ShadeContext &sc)=0
 
virtual float EvalMono (ShadeContext &sc)
 
virtual Point3 EvalNormalPerturb (ShadeContext &sc)=0
 
virtual BOOL HandleOwnViewPerturb ()
 
Get UV Transform/Texture Tiling


virtual void GetUVTransform (Matrix3 &uvtrans)
 
virtual int GetTextureTiling ()
 
virtual int GetUVWSource ()
 
virtual int GetMapChannel ()
 
Slot Type


virtual void InitSlotType (int sType)
 
virtual int MapSlotType (int i)
 
UVGen and XYZGen Access
virtual UVGenGetTheUVGen ()
 
virtual XYZGenGetTheXYZGen ()
 
Output Level
virtual void SetOutputLevel (TimeValue t, float v)
 
virtual CoreExport bool IsOutputMeaningful (ShadeContext &sc)
 
virtual bool IsLocalOutputMeaningful (ShadeContext &sc)
 
Loading Bitmap Files
virtual int LoadMapFiles (TimeValue t)
 
virtual CoreExport void RenderBitmap (TimeValue t, Bitmap *bm, float scale3D=1.0f, BOOL filter=FALSE)
 
- Public Member Functions inherited from MtlBase
CoreExport MtlBase ()
 
CoreExport ~MtlBase ()
 
virtual CoreExport Class_ID ClassID ()
 Retrieves a constant that uniquely identifies the plugin class. More...
 
int GetMeditObjType ()
 
void SetMeditObjType (int t)
 
int GetMeditTiling ()
 
void SetMeditTiling (int t)
 
CoreExport BOOL AnyMulti ()
 
BOOL TextureDisplayEnabled ()
 
CoreExport MtlBaseoperator= (const MtlBase &m)
 
CoreExport bool SvHandleDoubleClick (IGraphObjectManager *gom, IGraphNode *gNode)
 
CoreExport MSTR SvGetName (IGraphObjectManager *gom, IGraphNode *gNode, bool isBeingEdited)
 
CoreExport bool SvCanSetName (IGraphObjectManager *gom, IGraphNode *gNode)
 
CoreExport bool SvSetName (IGraphObjectManager *gom, IGraphNode *gNode, const MSTR &name)
 
CoreExport COLORREF SvHighlightColor (IGraphObjectManager *gom, IGraphNode *gNode)
 
CoreExport bool SvIsSelected (IGraphObjectManager *gom, IGraphNode *gNode)
 Returns true if the object is selected in its schematic view. More...
 
CoreExport MultiSelectCallbackSvGetMultiSelectCallback (IGraphObjectManager *gom, IGraphNode *gNode)
 
CoreExport bool SvCanSelect (IGraphObjectManager *gom, IGraphNode *gNode)
 
CoreExport MtlBaseGetActiveMB ()
 Get the active MtlBase. More...
 
CoreExport void SetActiveMB (MtlBase *activeMB)
 Set the active MtlBase. More...
 
virtual CoreExport voidGetInterface (ULONG id)
 Inherited from Animatable. More...
 
virtual BaseInterfaceGetInterface (Interface_ID id)
 Inherited from Animatable. More...
 
virtual ReferenceTargetGetRefTarget ()
 
virtual CoreExport int SetProperty (ULONG id, void *data)
 
virtual CoreExport voidGetProperty (ULONG id)
 
virtual CoreExport void BaseClone (ReferenceTarget *from, ReferenceTarget *to, RemapDir &remap)
 This method copies base class data from an object to its clone. More...
 
virtual BOOL GetTransparencyHint (TimeValue t, Interval &valid)
 Transparency hint indicates whether the material is potentially transparent for both rendering and viewport display, so that the renderers or viewport can decide whether to optimize it or not. More...
 
MSTRGetName ()
 
CoreExport void SetName (MSTR s)
 
virtual MSTR GetFullName () MAX_SEALED
 
virtual CoreExport MSTR GetFullName (bool localized)
 
CoreExport void SetMtlFlag (int mask, BOOL val=TRUE)
 
CoreExport void ClearMtlFlag (int mask)
 
CoreExport int TestMtlFlag (int mask)
 
virtual int BuildMaps (TimeValue t, RenderMapsContext &rmc)
 
virtual CoreExport ULONG Requirements (int subMtlNum)
 
virtual ULONG LocalRequirements (int subMtlNum)
 
virtual CoreExport void MappingsRequired (int subMtlNum, BitArray &mapreq, BitArray &bumpreq)
 
virtual void LocalMappingsRequired (int subMtlNum, BitArray &mapreq, BitArray &bumpreq)
 
virtual BOOL IsMultiMtl ()
 
CoreExport void DeactivateMapsInTree ()
 
virtual void Update (TimeValue t, Interval &valid)=0
 
void Update (TimeValue t)
 
virtual void Reset ()=0
 
virtual Interval Validity (TimeValue t)=0
 
virtual ParamDlgCreateParamDlg (HWND hwMtlEdit, IMtlParams *imp)=0
 
CoreExport IOResult Save (ISave *isave)
 
CoreExport IOResult Load (ILoad *iload)
 
ULONG GetGBufID ()
 
void SetGBufID (ULONG id)
 
CoreExport void EnumAuxFiles (AssetEnumCallback &nameEnum, DWORD flags)
 
virtual CoreExport PStampGetPStamp (int sz)
 
virtual CoreExport PStampCreatePStamp (int sz, BOOL Render=FALSE)
 
virtual CoreExport void DiscardPStamp (int sz)
 
virtual BOOL SupportTexDisplay ()
 
virtual DWORD_PTR GetActiveTexHandle (TimeValue t, TexHandleMaker &thmaker)
 
CoreExport void IncrActive ()
 
CoreExport void DecrActive ()
 
int Active ()
 
virtual void ActivateTexDisplay (BOOL onoff)
 
virtual BOOL SupportsMultiMapsInViewport ()
 
virtual void SetupGfxMultiMaps (TimeValue t, Material *mtl, MtlMakerCallback &cb)
 
- Public Member Functions inherited from ReferenceTarget
virtual BOOL IsRefTarget ()
 Checks if this is a ReferenceTarget. More...
 
CoreExport RefResult TestForLoop (const Interval &refInterval, RefMakerHandle hmaker)
 Tests for a cyclical reference. More...
 
CoreExport BOOL HasDependents ()
 Checks if a ReferenceTarget has references. More...
 
CoreExport BOOL HasRealDependents ()
 Checks if this has Real (Strong) Dependents. More...
 
void BeginDependencyTest ()
 Starts Dependency Test. More...
 
BOOL EndDependencyTest ()
 Ends Dependency Test. More...
 
virtual void RefAddedUndoRedo (RefMakerHandle rm)
 Called after a reference is made to a target because of undo or redo. More...
 
virtual void RefDeleted ()
 Called after a references to this is deleted. More...
 
virtual void RefDeletedUndoRedo ()
 Called after a references to this is deleted because of undo or redo. More...
 
CoreExport RefResult DeleteAllRefsToMe ()
 Deletes all references to this ReferenceTarget. More...
 
CoreExport RefResult TransferReferences (RefTargetHandle oldTarget, BOOL delOld=FALSE)
 Transfers all the references from oldTarget to this. More...
 
CoreExport int DoEnumDependents (DependentEnumProc *dep)
 Begins an enumeration that searches back in the dependency network. More...
 
virtual CoreExport RefTargetHandle Clone (RemapDir &remap)
 This method is used by 3ds Max to clone an object. More...
 
virtual CoreExport RefResult NotifyDependents (const Interval &changeInt, PartID partID, RefMessage message, SClass_ID sclass=NOTIFY_ALL, BOOL propagate=TRUE, RefTargetHandle hTarg=NULL, NotifyDependentsOption notifyDependentsOption=REFNOTIFY_ALLOW_OPTIMIZATIONS)
 Notify all dependent RefMakers concerned with the message. More...
 
void FlagDependents (TimeValue t, PartID which=PART_PUT_IN_FG)
 This sends the REFMSG_FLAGDEPENDENTS message up the pipeline. More...
 
virtual void NotifyForeground (TimeValue t)
 This method is called to flag dependents into the FG. More...
 
virtual void NotifyTarget (int message, ReferenceMaker *hMaker)
 Sends messages to ReferenceTargets. More...
 
CoreExport ReferenceTarget ()
 Constructor. More...
 
virtual CoreExport RefResult AutoDelete ()
 Deletes the object when it has no more real dependents. More...
 
CoreExport RefResult MaybeAutoDelete ()
 Deletes the object when it has no more real dependents. More...
 
- Public Member Functions inherited from ReferenceMaker
CoreExport RefResult ReplaceReference (int which, RefTargetHandle newtarg, BOOL delOld=TRUE)
 Used when cloning reference makers. More...
 
CoreExport RefResult DeleteAllRefsFromMe ()
 Deletes all references from this ReferenceMaker. More...
 
CoreExport RefResult DeleteAllRefs ()
 Deletes all references both to and from this item. More...
 
CoreExport RefResult DeleteReference (int i)
 Deletes the specified reference. More...
 
virtual BOOL CanTransferReference (int i)
 Tells whether this reference can be transfered. More...
 
CoreExport ReferenceSaveManagerGetReferenceSaveManager ()
 Access the ReferenceSaveManager of this ReferenceMaker. More...
 
virtual int RemapRefOnLoad (int iref)
 Used to load old files with references. More...
 
virtual CoreExport void RescaleWorldUnits (float f)
 Rescale size of all world units in reference hierarchy. More...
 
virtual CoreExport void SaveEnum (SaveEnumProc &sep, BOOL isNodeCall=0)
 The default save enumeration. More...
 
virtual CoreExport bool SpecifySaveReferences (ReferenceSaveManager &referenceSaveManager)
 Used to specify reference slot remapping during scene file save. More...
 
CoreExport int DoEnumDependents (DependentEnumProc *dep)
 Begins an enumeration that searches back in the dependency network. More...
 
CoreExport bool EnumRefHierarchy (RefEnumProc &proc, bool includeCustAttribs=true, bool includeIndirectRefs=true, bool includeNonPersistentRefs=true, bool preventDuplicatesViaFlag=true)
 This method provides a general purpose reference enumerator. More...
 
CoreExport int FindRef (RefTargetHandle rtarg)
 Get the index of the ReferenceTarget. More...
 
virtual BOOL IsRefMaker ()
 Tells whether it is a ReferenceMaker. More...
 
virtual BOOL IsRealDependency (ReferenceTarget *rtarg)
 Returns whether this is a "real" (strong) dependency or not. More...
 
virtual BOOL ShouldPersistWeakRef (RefTargetHandle rtarg)
 Specifies whether a weak reference is to be persisted on a partial load or save. More...
 
CoreExport ReferenceMaker ()
 Constructor. More...
 
CoreExport void DeleteMe ()
 Deletes an instance of this class. More...
 
virtual CoreExport int NumRefs ()
 Returns the total number of references this ReferenceMaker can hold. More...
 
virtual CoreExport RefTargetHandle GetReference (int i)
 Returns the 'i-th' reference. More...
 
- Public Member Functions inherited from Animatable
virtual void FreeCaches ()
 
virtual int NumChildren ()
 
virtual AnimatableChildAnim (int i)
 
virtual CoreExport MSTR NodeName ()
 
virtual void EditTrack ()
 
virtual CoreExport BOOL SubAnimSetKeyBufferPresent (int subNum)
 returns true if the sub-anim has a "Set Key" buffer present More...
 
virtual BOOL SetKeyBufferPresent ()
 returns true if there is a "Set Key" buffer present More...
 
virtual CoreExport void SubAnimCommitSetKeyBuffer (TimeValue t, int subNum)
 Commit any "Set Key" buffers on the given sub-anim. More...
 
virtual void CommitSetKeyBuffer (TimeValue t)
 Commit any "Set Key" buffers. More...
 
virtual CoreExport void SubAnimRevertSetKeyBuffer (int subNum)
 Revert any "Set Key" buffers on the given sub-anim. More...
 
virtual void RevertSetKeyBuffer ()
 Revert any "Set Key" buffers. More...
 
virtual LRESULT CALLBACK TrackViewWinProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
 This function is obsolete. More...
 
virtual bool IsParamBlockDesc2Used (ParamBlockDesc2 *desc)
 Returns true if the passed description is being used. More...
 
virtual bool GetMacroRecorderName (bool used_as_rhs_value, MSTR &objectSpecifiedName)
 This method is called to access the object specified name to use for the Maxscript macrorecorder. More...
 
CoreExport Animatable ()
 Constructor. More...
 
virtual CoreExport void DeleteThis ()
 Deletes an instance of this class. More...
 
virtual void GetClassName (MSTR &s) MAX_SEALED
 
MSTR ClassName (bool localized=true) const
 Returns the name of the plugin class. More...
 
virtual void BeginEditParams (IObjParam *ip, ULONG flags, Animatable *prev=NULL)
 
virtual void EndEditParams (IObjParam *ip, ULONG flags, Animatable *next=NULL)
 
virtual CoreExport void ReleaseInterface (ULONG id, void *i)
 
CoreExport void AppendProperty (AnimProperty *prop)
 A function to directly add arbitrary properties to this object developers should ensure that the properties ID does not conflict with any Max-specific IDs. More...
 
CoreExport AnimPropertyFindProperty (DWORD id)
 Find any property. More...
 
CoreExport void AddAppDataChunk (const Class_ID &cid, SClass_ID sid, DWORD sbid, DWORD len, void *data)
 Adds application/plugin specific (custom) data to an Animatable. More...
 
CoreExport AppDataChunkGetAppDataChunk (const Class_ID &cid, SClass_ID sid, DWORD sbid)
 Retrieves the application/plugin specific (custom) data stored with an Animatable. More...
 
CoreExport BOOL RemoveAppDataChunk (const Class_ID &cid, SClass_ID sid, DWORD sbid)
 Deletes the application/plugin specific (custom) data stored with an Animatable. More...
 
CoreExport void ClearAllAppData ()
 Deletes all application/plugin specific (custom) data stored with an Animatable. More...
 
virtual int NumSubs ()
 
virtual AnimatableSubAnim (int i)
 
virtual MSTR SubAnimName (int i) MAX_SEALED
 
virtual CoreExport MSTR SubAnimName (int i, bool localized)
 
virtual BOOL CanDeleteSubAnim (int i)
 
virtual void DeleteSubAnim (int i)
 
virtual DWORD GetSubAnimCurveColor (int subNum)
 
virtual int SubNumToRefNum (int subNum)
 
virtual BOOL CanCopyAnim ()
 
CoreExport int HasSubElements (int type=0)
 
virtual int GetSubFCurveExtents (int subNum, ParamDimensionBase *dim, float &min, float &max, DWORD flags)
 The values max and min should be initialized before calling this function. More...
 
virtual ParamDimensionGetParamDimension (int i)
 
virtual BOOL SelectSubAnim (int subNum)
 
virtual BOOL BypassTreeView ()
 
virtual BOOL BypassTrackBar ()
 
virtual BOOL BypassPropertyLevel ()
 
virtual BOOL InvisibleProperty ()
 
virtual int NumKeys ()
 
virtual TimeValue GetKeyTime (int index)
 
virtual int GetKeyIndex (TimeValue t)
 
virtual BOOL GetNextKeyTime (TimeValue t, DWORD flags, TimeValue &nt)
 
virtual void CopyKeysFromTime (TimeValue src, TimeValue dst, DWORD flags)
 
virtual void DeleteKeyAtTime (TimeValue t)
 
virtual BOOL IsKeyAtTime (TimeValue t, DWORD flags)
 
virtual int GetKeyTimes (Tab< TimeValue > &times, Interval range, DWORD flags)
 
virtual int GetKeySelState (BitArray &sel, Interval range, DWORD flags)
 
CoreExport void OpenTreeEntry (int type, DWORD tv)
 
CoreExport void CloseTreeEntry (int type, DWORD tv)
 
CoreExport int IsTreeEntryOpen (int type, DWORD tv)
 
CoreExport BOOL GetSelInTrackView (DWORD tv)
 
CoreExport void SetSelInTrackView (DWORD tv, BOOL sel)
 
CoreExport BOOL InTrackViewSelSet (int which)
 
CoreExport void SetTrackViewSelSet (int which, BOOL inOut)
 
virtual BOOL AssignController (Animatable *control, int subAnim)
 
virtual BOOL CanAssignController (int subAnim)
 Return true if we can reassign the subanim specified. More...
 
virtual BOOL CanMakeUnique ()
 
CoreExport int EnumAnimTree (AnimEnum *animEnum, Animatable *client, int subNum)
 
virtual int RenderBegin (TimeValue t, ULONG flags=0)
 
virtual int RenderEnd (TimeValue t)
 
virtual CoreExport Interval GetTimeRange (DWORD flags)
 
virtual void EditTimeRange (Interval range, DWORD flags)
 
virtual void DeleteTime (Interval iv, DWORD flags)
 
virtual void ReverseTime (Interval iv, DWORD flags)
 
virtual void ScaleTime (Interval iv, float s)
 
virtual void InsertTime (TimeValue ins, TimeValue amount)
 
virtual BOOL SupportTimeOperations ()
 
virtual CoreExport void MapKeys (TimeMap *map, DWORD flags)
 
virtual void DeleteKeys (DWORD flags)
 
virtual void DeleteKeyByIndex (int index)
 
virtual void SelectKeys (TrackHitTab &sel, DWORD flags)
 
virtual void SelectSubKeys (int subNum, TrackHitTab &sel, DWORD flags)
 
virtual void SelectSubCurve (int subNum, BOOL sel)
 
virtual void SelectKeyByIndex (int i, BOOL sel)
 
virtual BOOL IsKeySelected (int i)
 
virtual void FlagKey (TrackHitRecord hit)
 
virtual int GetFlagKeyIndex ()
 
virtual int NumSelKeys ()
 
virtual void CloneSelectedKeys (BOOL offset=FALSE)
 
virtual void AddNewKey (TimeValue t, DWORD flags)
 
virtual void MoveKeys (ParamDimensionBase *dim, float delta, DWORD flags)
 
virtual void ScaleKeyValues (ParamDimensionBase *dim, float origin, float scale, DWORD flags)
 
virtual void SelectCurve (BOOL sel)
 
virtual BOOL IsCurveSelected ()
 Returns TRUE if the function curve is selected; otherwise returns FALSE. More...
 
virtual BOOL IsSubCurveSelected (int subNum)
 Returns the selected state of the sub-curve whose index is passed. More...
 
virtual int GetSelKeyCoords (TimeValue &t, float &val, DWORD flags)
 
virtual void SetSelKeyCoords (TimeValue t, float val, DWORD flags)
 
virtual int SetSelKeyCoordsExpr (ParamDimension *dim, const MCHAR *timeExpr, const MCHAR *valExpr, DWORD flags)
 
virtual void AdjustTangents (TrackHitRecord hit, ParamDimensionBase *dim, Rect &rcGraph, float tzoom, int tscroll, float vzoom, int vscroll, int dx, int dy, DWORD flags)
 
virtual void AdjustTangents (TrackHitRecord hit, ParamDimensionBase *dim, float angle, float length, DWORD flags)
 
virtual CoreExport BOOL IsAnimated ()
 
virtual BOOL CanCopyTrack (Interval iv, DWORD flags)
 
virtual BOOL CanPasteTrack (TrackClipObject *cobj, Interval iv, DWORD flags)
 
virtual TrackClipObjectCopyTrack (Interval iv, DWORD flags)
 
virtual void PasteTrack (TrackClipObject *cobj, Interval iv, DWORD flags)
 
virtual BOOL CanCopySubTrack (int subNum, Interval iv, DWORD flags)
 
virtual BOOL CanPasteSubTrack (int subNum, TrackClipObject *cobj, Interval iv, DWORD flags)
 
virtual TrackClipObjectCopySubTrack (int subNum, Interval iv, DWORD flags)
 
virtual void PasteSubTrack (int subNum, TrackClipObject *cobj, Interval iv, DWORD flags)
 
virtual int GetTrackVSpace (int lineHeight)
 
virtual int HitTestTrack (TrackHitTab &hits, Rect &rcHit, Rect &rcTrack, float zoom, int scroll, DWORD flags)
 
virtual int PaintTrack (ParamDimensionBase *dim, HDC hdc, Rect &rcTrack, Rect &rcPaint, float zoom, int scroll, DWORD flags)
 
virtual int PaintSubTrack (int subNum, ParamDimensionBase *dim, HDC hdc, Rect &rcTrack, Rect &rcPaint, float zoom, int scroll, DWORD flags)
 
virtual int PaintFCurves (ParamDimensionBase *dim, HDC hdc, Rect &rcGraph, Rect &rcPaint, float tzoom, int tscroll, float vzoom, int vscroll, DWORD flags)
 
virtual int HitTestFCurves (ParamDimensionBase *dim, TrackHitTab &hits, Rect &rcHit, Rect &rcGraph, float tzoom, int tscroll, float vzoom, int vscroll, DWORD flags)
 
virtual int PaintSubFCurves (int subNum, ParamDimensionBase *dim, HDC hdc, Rect &rcGraph, Rect &rcPaint, float tzoom, int tscroll, float vzoom, int vscroll, DWORD flags)
 
virtual int HitTestSubFCurves (int subNum, ParamDimensionBase *dim, TrackHitTab &hits, Rect &rcHit, Rect &rcGraph, float tzoom, int tscroll, float vzoom, int vscroll, DWORD flags)
 
virtual void EditTrackParams (TimeValue t, ParamDimensionBase *dim, const MCHAR *pname, HWND hParent, IObjParam *ip, DWORD flags)
 
virtual int TrackParamsType ()
 
virtual int GetFCurveExtents (ParamDimensionBase *dim, float &min, float &max, DWORD flags)
 This method is called to calculate the largest and smallest values of the anim. More...
 
CoreExport void AddNoteTrack (NoteTrack *note)
 
CoreExport void DeleteNoteTrack (NoteTrack *note, BOOL delNote=TRUE)
 
CoreExport BOOL HasNoteTracks ()
 
CoreExport int NumNoteTracks ()
 
CoreExport NoteTrackGetNoteTrack (int i)
 
virtual void FreeAllBitmaps ()
 
virtual void GetSystemNodes (INodeTab &nodes, SysNodeContext Context)
 
virtual BOOL IsSubClassOf (Class_ID classID)
 returns true if the animatable has sub-classed off the given class More...
 
virtual CoreExport void MouseCycleCompleted (TimeValue t)
 
virtual CoreExport void MouseCycleStarted (TimeValue t)
 
virtual int NumParamBlocks ()
 
virtual IParamBlock2GetParamBlock (int i)
 
virtual IParamBlock2GetParamBlockByID (short id)
 
CoreExport bool SvSaveData (ISave *isave, USHORT id)
 
CoreExport bool SvLoadData (ILoad *iLoad)
 
CoreExport DWORD SvGetRefIndex ()
 
CoreExport void SvSetRefIndex (DWORD i)
 
CoreExport bool SvDeleteRefIndex ()
 
CoreExport SvGraphNodeReference SvStdTraverseAnimGraph (IGraphObjectManager *gom, Animatable *owner, int id, DWORD flags)
 
virtual CoreExport bool SvCanInitiateLink (IGraphObjectManager *gom, IGraphNode *gNode)
 
virtual CoreExport bool SvCanConcludeLink (IGraphObjectManager *gom, IGraphNode *gNode, IGraphNode *gNodeChild)
 
virtual CoreExport bool SvCanRemoveThis (IGraphObjectManager *gom, IGraphNode *gNode)
 
virtual CoreExport bool SvRemoveThis (IGraphObjectManager *gom, IGraphNode *gNode)
 Called when the user deletes this object in the schematic view... More...
 
virtual CoreExport bool SvIsHighlighted (IGraphObjectManager *gom, IGraphNode *gNode)
 
virtual CoreExport COLORREF SvGetSwatchColor (IGraphObjectManager *gom, IGraphNode *gNode)
 
virtual CoreExport bool SvIsInactive (IGraphObjectManager *gom, IGraphNode *gNode)
 
virtual CoreExport bool SvLinkChild (IGraphObjectManager *gom, IGraphNode *gNodeThis, IGraphNode *gNodeChild)
 
virtual CoreExport bool SvEditProperties (IGraphObjectManager *gom, IGraphNode *gNode)
 
virtual CoreExport MSTR SvGetTip (IGraphObjectManager *gom, IGraphNode *gNode)
 
virtual CoreExport MSTR SvGetRefTip (IGraphObjectManager *gom, IGraphNode *gNode, IGraphNode *gNodeMaker)
 
virtual CoreExport bool SvCanDetach (IGraphObjectManager *gom, IGraphNode *gNode)
 
virtual CoreExport bool SvDetach (IGraphObjectManager *gom, IGraphNode *gNode)
 
virtual CoreExport MSTR SvGetRelTip (IGraphObjectManager *gom, IGraphNode *gNodeTarget, int id, IGraphNode *gNodeMaker)
 Returns a string to be displayed in the tip window in the schematic view for a relationship from "gNodeMaker" to "gNodeTarget"... More...
 
virtual CoreExport bool SvCanDetachRel (IGraphObjectManager *gom, IGraphNode *gNodeTarget, int id, IGraphNode *gNodeMaker)
 Returns true if this object can respond to the SvDetachRel(...) method... More...
 
virtual CoreExport bool SvDetachRel (IGraphObjectManager *gom, IGraphNode *gNodeTarget, int id, IGraphNode *gNodeMaker)
 Detach this relationship. More...
 
virtual CoreExport bool SvHandleRelDoubleClick (IGraphObjectManager *gom, IGraphNode *gNodeTarget, int id, IGraphNode *gNodeMaker)
 Called when this relationship is double-clicked in the schematic view... More...
 
CoreExport ICustAttribContainerGetCustAttribContainer ()
 This method returns a pointer to the custom attributes container interface class. More...
 
CoreExport void AllocCustAttribContainer ()
 This method allocates space for a custom attributes container. More...
 
CoreExport void DeleteCustAttribContainer ()
 This method deletes space used by a custom attributes container. More...
 
void SetAFlag (DWORD mask)
 
void ClearAFlag (DWORD mask)
 Clears one or more bits in the Animatable flags. More...
 
bool TestAFlag (DWORD mask) const
 Tests one or more bits in the Animatable flags. More...
 
void SetAFlagEx (DWORD mask)
 Sets one or more bits in the Animatable extended flags. More...
 
void ClearAFlagEx (DWORD mask)
 Clears one or more bits in the Animatable extended flags. More...
 
bool TestAFlagEx (DWORD mask) const
 Tests one or more bits in the Animatable extended flags. More...
 
CoreExport bool TestFlagBit (int index)
 Tests the specified flag bit. More...
 
CoreExport void SetFlagBit (int index, bool newValue=true)
 Sets the specified flag bit. More...
 
CoreExport void ClearFlagBit (int index)
 Clears the specified flag bit. More...
 
- Public Member Functions inherited from InterfaceServer
virtual UtilExport ~InterfaceServer ()
 Destructor. More...
 
template<class InterfaceType >
InterfaceType * GetTypedInterface ()
 
- Public Member Functions inherited from ISubMap
virtual ~ISubMap ()
 
virtual int NumSubTexmaps ()
 
virtual TexmapGetSubTexmap (int i)
 
virtual void SetSubTexmap (int i, Texmap *m)
 
virtual int SubTexmapOn (int i)
 
virtual MSTR GetSubTexmapSlotName (int i) MAX_SEALED
 
virtual CoreExport MSTR GetSubTexmapSlotName (int i, bool localized)
 
CoreExport MSTR GetSubTexmapTVName (int i, bool localized=true)
 
virtual BOOL SetDlgThing (ParamDlg *dlg)
 
CoreExport void CopySubTexmap (HWND hwnd, int ifrom, int ito)
 

Public Attributes

int cacheID
 
- Public Attributes inherited from MtlBase
Quat meditRotate
 
ULONG gbufID
 

Additional Inherited Members

- Static Public Member Functions inherited from Animatable
static CoreExport BOOL IsDeleted (Animatable *anim)
 Debug method to determine whether an object has been deleted. More...
 
static CoreExport AnimHandle GetHandleByAnim (Animatable *anim)
 Get the unique handle for an Animatable object. More...
 
static CoreExport AnimatableGetAnimByHandle (AnimHandle handle)
 Get an Animatable object from its unique handle. More...
 
static CoreExport AnimHandle GetNextHandle ()
 Get the unique handle for the next Animatable object to be created. More...
 
static CoreExport void EnumerateAllAnimatables (EnumAnimList &enumProcObject)
 Enumerator to enumerate across all animatables. More...
 
static CoreExport bool RegisterAppDataLoadCallback (const Class_ID &cid, SClass_ID sid, APPDATALOADPROC proc)
 Registers a callback proc that is called when an AppDataChunk is read from a scene file. More...
 
static CoreExport bool UnRegisterAppDataLoadCallback (const Class_ID &cid, SClass_ID sid, APPDATALOADPROC proc)
 Unregisters a callback proc that is called when an AppDataChunk is read from a scene file. More...
 
static CoreExport bool RegisterAppDataLoadCallback (DWORD sbid, APPDATALOADPROC proc)
 Registers a callback proc that is called when an AppDataChunk is read from a scene file. More...
 
static CoreExport bool UnRegisterAppDataLoadCallback (DWORD sbid, APPDATALOADPROC proc)
 Unregisters a callback proc that is called when an AppDataChunk is read from a scene file. More...
 
static CoreExport int RequestFlagBit ()
 Requests an unique flag bit index. More...
 
static CoreExport void ReleaseFlagBit (int index)
 Releases the flag bit index. More...
 
static CoreExport void ClearFlagBitInAllAnimatables (int index)
 Clears the specified flag bit in all Animatables. More...
 
- Static Public Member Functions inherited from MaxHeapOperators
static UtilExport voidoperator new (size_t size)
 Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e)
 Standard new operator used to allocate objects if there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate objects that takes the type of memory, filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport void operator delete (void *ptr)
 Standard delete operator used to deallocate an object If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an object If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an object that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator. More...
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator. More...
 
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary. More...
 
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary. More...
 
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc. More...
 
- Static Public Attributes inherited from Animatable
static const AnimHandle kInvalidAnimHandle = 0
 
- Protected Member Functions inherited from ReferenceTarget
virtual CoreExport int DoEnumDependentsImpl (DependentEnumProc *dep)
 Method to perform an enumeration on a ReferenceTarget. More...
 
virtual CoreExport ~ReferenceTarget ()=0
 Destructor. More...
 
- Protected Member Functions inherited from ReferenceMaker
virtual RefResult NotifyRefChanged (const Interval &changeInt, RefTargetHandle hTarget, PartID &partID, RefMessage message, BOOL propagate)=0
 Receives and responds to messages. More...
 
virtual CoreExport ~ReferenceMaker ()=0
 Destructor. More...
 
virtual CoreExport void SetReference (int i, RefTargetHandle rtarg)
 Stores a ReferenceTarget as its 'i-th' reference`. More...
 
void BlockEval ()
 Validates a given reference link between this reference maker and its reference target. More...
 
void UnblockEval ()
 Validates a given reference link between this reference maker and its reference target. More...
 
int Evaluating ()
 Validates a given reference link between this reference maker and its reference target. More...
 
CoreExport RefResult StdNotifyRefChanged (const Interval &changeInt, RefTargetHandle hTarget, PartID partID, RefMessage message, BOOL propagate, NotifyDependentsOption notifyDependentsOption)
 Validates a given reference link between this reference maker and its reference target. More...
 
- Protected Member Functions inherited from Animatable
virtual CoreExport ~Animatable ()=0
 Destructor. More...
 
- Protected Member Functions inherited from Noncopyable
 Noncopyable ()
 
 ~Noncopyable ()
 
- Protected Attributes inherited from Animatable
DWORD aflag
 
AnimPropertyList aprops
 

Detailed Description

See also
Class MtlBase, Class ShadeContext, Class UVGen, Class XYZGen, Class TexHandleMaker, Class NameAccum, Class AColor, Class Matrix3, Noise and Misc Functions.

Description:
This is the base class for the creation of texture map plug-ins. It provides methods for things such as calculating the color of the map for a given location, and computing a perturbation to apply to a normal for bump mapping.

Note: Developers creating procedural textures should be aware that these textures may appear less than perfect when a 3ds Max user is using the "Quick Renderer" in the Materials Editor. This is not the fault of the plug-in texture, it is simply that the "Quick Renderer" uses an algorithm that is quicker but less accurate than the standard scanline renderer. Therefore, don't be concerned if your texture does not show up perfectly when using "Quick Renderer".
Plug-In Information:
Class Defined In IMTL.H

Super Class ID TEXMAP_CLASS_ID

Standard File Name Extension DLT

Extra Include Files Needed IMTL.H (and optionally TEXUTIL.H)
Additional Information Related to Bump Mapping:
The following function evaluates the normal perturbation vector in the Bitmap texture.
Point3 BMTex::EvalNormalPerturb(ShadeContext& sc) {
Point3 dPdu, dPdv;
Point2 dM;
if (!sc.doMaps) return Point3(0,0,0);
if (GetActiveBitmap()==NULL)
return Point3(0,0,0);
if (!mTieTimeToMatID)
{
uvGen->GetBumpDP(sc,dPdu,dPdv); // get bump basis vectors
if (alphaAsMono)
dM =(.01f)*uvGen->EvalDeriv(sc,&alphasamp,filterType!=FILTER_NADA);
else
dM =(.01f)*uvGen->EvalDeriv(sc,&mysamp,filterType!=FILTER_NADA);
}
else
{
int whichFrame = ComputeParticleFrame(sc);
if (alphaAsMono)
dM =(.01f)*uvGen->EvalDeriv(sc,alphasampList[whichFrame],filterType!=FILTER_NADA);
else
dM =(.01f)*uvGen->EvalDeriv(sc,mysampList[whichFrame],filterType!=FILTER_NADA);
}
#if 0
// Blinn's algorithm
Point3 N = sc.Normal();
Point3 uVec = CrossProd(N,dPdv);
Point3 vVec = CrossProd(N,dPdu);
return texout->Filter(-dM.x*uVec+dM.y*vVec);
#else
return texout->Filter(dM.x*dPdu+dM.y*dPdv);
#endif
}
#define NULL
Definition: autoptr.h:18
ULONG gbufID
Definition: MtlBase.h:169
Definition: point2.h:44
float y
Definition: point2.h:49
float x
Definition: point2.h:48
Definition: point3.h:56
Definition: ShadeContext.h:369
BOOL doMaps
Definition: ShadeContext.h:374
virtual void SetGBufferID(int gbid)
Definition: ShadeContext.h:836
virtual Point3 Normal()=0
DPoint3 CrossProd(const DPoint3 &a, const DPoint3 &b)
Returns the cross product of two DPoint3s.
#define FILTER_NADA
Definition: stdmat.h:1022
The function GetBumpDP() returns the "bump basis vectors". These are the gradient vectors of the UVW mapping
in the object coordinate space. The following function is used to compute the U and V bump basis vectors for a triangle given the texture coordinates at the three vertices of the triangle ( tv[ ] ) and the 3D coordinates at the vertices ( v[ ] ). It is simply a solution using linear algebra for the U and V axes in terms of the XYZ coordinates. It returns:

b[0] = DP/DU
b[1] = DP/DV
void ComputeBumpVectors(const Point3 tv[3], const Point3 v[3], Point3 bvec[3]) {
Point3 U1,U2;
Point3 P1,P2,R;
// three points define triangle in XYZ space
P1 = v[1]-v[0];
P2 = v[2]-v[0];
// compute normal vector to the triangle in XYZspace
Point3 Nxyz = Normalize(CrossProd(P1,P2));
// three texture verts define corresponding triangle in UVW space
U1 = tv[1]-tv[0];
U2 = tv[2]-tv[0];
// compute normal vector to the triangle in UVW space
Point3 N = Normalize(CrossProd(U1,U2));
// Compute a scale factor to use in calculating the portion of the
// bump vectors normal to the face -- use the average of the U
// and V scale factors. We are assuming a lot here.
float l1 = Length(U1);
float l2 = Length(U2);
if (l1==0.0f) l1 = .0000001f;
if (l2==0.0f) l2 = .0000001f;
float r1 = Length(P1)/l1;
float r2 = Length(P2)/l2;
float r = (r1+r2)/2.0f; // a relative metric for scaling the normal direction
// First find how a unit vector along the U-axis moves into XYZ space.
Point3 UAxis(1.0f,0.0f,0.0f);
// Will resolve the UAxis into three vectors: one normal to
// triangle, and two in triangle. The one normal to the
// triangle is N.x*N, because DotProd(UAxis,N) = N.x.
// The remainder is
R = UAxis-N.x*N;
// now compute the barycentric coords for R in terms of U1 (s) and U2 (t)
Point3 bc = BaryCoords(pOrigin, U1, U2, R);
// now compose the equivalent vector in XYZ space
bvec[0] = Normalize(bc[1]*P1 + bc[2]*P2 + r*N.x*Nxyz);
// Similarly for VAxis
R = Point3(0.0f,1.0f,0.0f) - N.y*N;
bc = BaryCoords(pOrigin, U1, U2, R);
bvec[1] = Normalize(bc[1]*P1 + bc[2]*P2 + r*N.y*Nxyz);
// Similarly for WAxis
R = Point3(0.0f,0.0f,1.0f) - N.z*N;
bc = BaryCoords(pOrigin, U1, U2, R);
bvec[2] = Normalize(bc[1]*P1 + bc[2]*P2 + r*N.z*Nxyz);
}
float y
Definition: point3.h:61
float x
Definition: point3.h:60
float z
Definition: point3.h:62
float Length(const Color &v)
Definition: color.h:465
DPoint2 Normalize(const DPoint2 &p)
Returns a unit vector.
Point3 BaryCoords(Point3 p0, Point3 p1, Point3 p2, Point3 p)
Calculates the barycentric coordinates of the point p in 3-dimensional space according to a reference...
void ComputeBumpVectors(const Point3 tv[3], const Point3 v[3], Point3 bvec[3])

The three Point3's returned in bvec are stored away, and then simply returned in the function SContext::GetBumpDP(). The function UVGen::EvalDeriv() evaluates the local derivative of the texture map in the U and V directions, taking into account symmetry and scaling. The resulting derivative, dM, is scaled down from the value returned by EvalDeriv to keep the bump perturbations in a more reasonable range. The perturbation vector is calculated as:

dM.x*dPdu+dM.y*dPdv

And, then passed through the texout->Filter function, which is just the following:

Point3 Texout::Filter(Point3 c) {
if (outAmt!=1.0f) c *= outAmt
if (flags&TEXOUT_INVERT) c = -c
return c
}
#define TEXOUT_INVERT
Definition: stdmat.h:890

Constructor & Destructor Documentation

◆ Texmap()

Remarks
Constructor. The number of active uses of this texture is set to 0.

Member Function Documentation

◆ SuperClassID()

SClass_ID SuperClassID ( )
inlinevirtual

Retrieves a constant representing the type of the plugin.

Returns
A super class id that uniquely identifies the type (category) of the plugin. Note that several plugin classes can be of the same type, thus return the same super class id. Plugins are uniquely identified by their class ids.
See also
SClass_ID

Reimplemented from ReferenceTarget.

154 { return TEXMAP_CLASS_ID; }
#define TEXMAP_CLASS_ID
Texture maps super-class ID.
Definition: plugapi.h:420

◆ GetClassName()

virtual void GetClassName ( MSTR s,
bool  localized = true 
) const
inlineoverridevirtual

Retrieves the name of the plugin class.

This name is used in 3ds Max's UI and in MAXScript. For Material plug-ins this method is used to put up the material "type" name in the Material Editor.

Parameters
sReference to a string filled in with the name of the plugin class.
localizedIf true, then the class name returned should be localized in the language 3ds Max is currently using. Otherwise it should be the class name in English. If a plugin does not provide localized string resources, it can disregard this parameter and always return the class name in English.

Reimplemented from ReferenceTarget.

Reimplemented in MSTexmapXtnd, and MSPluginTexmap.

155 { UNUSED_PARAM(localized); s = MSTR(_M("Texture")); }
#define UNUSED_PARAM(x)
Definition: BuildWarnings.h:18
#define _M(x)
Used to wrap string literals.
Definition: strbasic.h:67
WStr MSTR
Definition: strclass.h:1058

◆ EvalColor()

virtual AColor EvalColor ( ShadeContext sc)
pure virtual
Remarks
This method is called to evaluate the color of the texture map for the context. This is for channels that have a color such as diffuse, specular, ambient, etc. This method is called for every pixel of the texture.
Parameters:
ShadeContext& sc

Describes the properties of the pixel to evaluate.
Returns
An AColor object which stores the r, g, b, a values. Note: The alpha is pre multiplied, and the alpha value goes into AColor::a.

Implemented in MSTexmapXtnd, and MSPluginTexmap.

◆ EvalMono()

virtual float EvalMono ( ShadeContext sc)
inlinevirtual
Remarks
Evaluate the map for a "mono" channel. Mono channels are those that don't have a color, but rather a single value. This is for things like shininess, transparency, etc. This just permits a bit of optimization.
Parameters:
ShadeContext& sc

Describes the properties of the pixel to evaluate.
Returns
A floating point value for the mono channel.
Default Implementation:
{return Intens(EvalColor(sc));}

Reimplemented in MSTexmapXtnd, and MSPluginTexmap.

183  {
184  return Intens(EvalColor(sc));
185  }
static float Intens(const AColor &c)
Definition: acolor.h:477
virtual AColor EvalColor(ShadeContext &sc)=0

◆ EvalNormalPerturb()

virtual Point3 EvalNormalPerturb ( ShadeContext sc)
pure virtual
Remarks
This method is used for bump mapping to retrieve a perturbation to apply to a normal.
Parameters:
ShadeContext& sc

Describes the properties of the pixel to evaluate.
Returns
A deflection vector for perturbing the normal.

Implemented in MSTexmapXtnd, and MSPluginTexmap.

◆ HandleOwnViewPerturb()

virtual BOOL HandleOwnViewPerturb ( )
inlinevirtual
Remarks
This query is made of maps plugged into the Reflection or Refraction slots: Normally the view vector is replaced with a reflected or refracted one before calling the map: if the plugged in map doesn't need this, it should return TRUE.
Default Implementation:
{ return FALSE; }

Reimplemented in MSTexmapXtnd, and MSPluginTexmap.

207 { return FALSE; }

◆ GetVPDisplayDIB()

virtual CoreExport BITMAPINFO* GetVPDisplayDIB ( TimeValue  t,
TexHandleMaker thmaker,
Interval valid,
BOOL  mono = FALSE,
int  forceW = 0,
int  forceH = 0 
)
virtual
Remarks
This gets the viewport display bitmap in DIB format, useful when combining several maps for hardware-supported multiple texture display. If mono is TRUE, the map should do a mono evaluation and place the result in RGB. forceW and forceH, if non-zero, override dimensions specified by thmaker.
Parameters:
TimeValue t

The time to get the bitmap at.

TexHandleMaker& thmaker

This class provides methods for creating a texture handle from a 3ds Max bitmap and a Windows DIB. It also has a method to retrieve the required size of the texture map. See Class TexHandleMaker.

Interval &valid

The validity interval of the returned bitmap.

BOOL mono

Indicates whether a map should do mono evaluation.

int forceW

Overrides the bitmap width usually supplied by thmaker.

int forceH

Overrides the bitmap height usually supplied by thmaker.

Reimplemented in MSTexmapXtnd.

◆ GetUVTransform()

virtual void GetUVTransform ( Matrix3 uvtrans)
inlinevirtual
Remarks
This method is called to retrieve the UV transformation matrix for use in the viewports. If a developer is using an instance of UVGen, a method of that class may be called to retrieve the value:

(i.e. { uvGen->GetUVTransform(uvtrans); } ).
Parameters:
Matrix3 &uvtrans

The transformation matrix is returned here.
Default Implementation:
{}

Reimplemented in MSTexmapXtnd, and MSPluginTexmap.

247 { uvtrans.IdentityMatrix(); }
void IdentityMatrix()

◆ GetTextureTiling()

virtual int GetTextureTiling ( )
inlinevirtual
Remarks
This method is called to get the tiling state of the texture for use in the viewports. This is described by a set of symmetry flags that may be ORed together. If you are using an instance of UVGen to handle the UV user interface you may simply call a method of UVGen to handle this.

For example: { return uvGen->GetTextureTiling(); }
Returns
See Texture Symmetry Flags.
Default Implementation:
{ return U_WRAP|V_WRAP; }

Reimplemented in MSTexmapXtnd, and MSPluginTexmap.

256 { return U_WRAP|V_WRAP; }
#define V_WRAP
Indicates the texture map is tiled in the V direction.
Definition: Texmap.h:25
#define U_WRAP
Indicates the texture map is tiled in the U direction.
Definition: Texmap.h:24

◆ GetUVWSource()

virtual int GetUVWSource ( )
inlinevirtual
Remarks
Returns a value indicating where to get the texture vertices for the Texmap.
Returns
One of the following values:

UVWSRC_EXPLICIT

Use explicit mesh texture vertices from one of the mapping channels (see GetMapChannel() below to determine which one). This uses the UVW coordinates assigned to the object, either through the Generate Mapping Coordinates option in the object's creation parameters, or through mapping modifiers, such as UVW Map.

UVWSRC_EXPLICIT2

Use explicit mesh texture vertices from the Vertex Color Channel.

UVWSRC_OBJXYZ

Generate planar UVW mapping coordinates from the object local XYZ on-the-fly. This corresponds to the "Planar from Object XYZ" option.

UVWSRC_WORLDXYZ

This value is available in release 3.0 and later only.

Generate planar UVW mapping coordinates from the world XYZ on-the-fly. This corresponds to the "Planar From World XYZ" option. Note: this value used for the UVW is the world XYZ, taken directly, with out normalization to the objects bounding box. This differs from "Planar from Object XYZ", where the values are normalized to the object's bounding box.
Default Implementation:
{ return UVWSRC_EXPLICIT; }

Reimplemented in MSTexmapXtnd, and MSPluginTexmap.

281 { return UVWSRC_EXPLICIT; }
#define UVWSRC_EXPLICIT
Definition: Texmap.h:33

◆ GetMapChannel()

virtual int GetMapChannel ( )
inlinevirtual
Remarks
Returns the map channel being used by the texmap if GetUVWSource() returns UVWSRC_EXPLICIT. The return value should be at least 1. A value of 0 is not acceptable.
Default Implementation:
{ return 1; }

Reimplemented in MSTexmapXtnd, and MSPluginTexmap.

287 { return 1; } // only relevant if above returns UVWSRC_EXPLICIT

◆ InitSlotType()

virtual void InitSlotType ( int  sType)
inlinevirtual
Remarks
This method is called to initialize the slot type. This sets the proper button in the coordinate user interface rollup page. If you are using an instance of UVGen to handle the UV user interface you may simply call a method of UVGen to handle this. For example: { if (uvGen) uvGen->InitSlotType(sType); }
Parameters:
int sType

See Map Slot Types.
Default Implementation:
{}

Reimplemented in MSTexmapXtnd, and MSPluginTexmap.

302 { defaultSlotType = sType; }

◆ MapSlotType()

virtual int MapSlotType ( int  i)
inlinevirtual
Remarks
This method is called to initialize the slot type. This sets the proper button in the coordinate user interface rollup page. If you are using an instance of UVGen to handle the UV user interface you may simply call a method of UVGen to handle this. For example: { if (uvGen) uvGen->InitSlotType(sType); }
Parameters:
int sType

See Map Slot Types.
Default Implementation:
{}

Reimplemented from MtlBase.

303 { return defaultSlotType; }

◆ GetTheUVGen()

virtual UVGen* GetTheUVGen ( )
inlinevirtual
Remarks
Texture maps that use a UVGen should implement this method to return a pointer to it.
Default Implementation:
{ return NULL; }

Reimplemented in MSTexmapXtnd, and MSPluginTexmap.

312 { return NULL; } // maps with a UVGen should implement this

◆ GetTheXYZGen()

virtual XYZGen* GetTheXYZGen ( )
inlinevirtual
Remarks
Texture maps that use a XYZGen should implement this method to return a pointer to it.
Default Implementation:
{ return NULL; }

Reimplemented in MSTexmapXtnd, and MSPluginTexmap.

317 { return NULL; } // maps with a XYZGen should implement this

◆ RecursInitSlotType()

CoreExport void RecursInitSlotType ( int  sType)
Remarks
Implemented by the System.

This method is used internally to set the slot type for all subtexmaps in a tree.

◆ SetOutputLevel()

virtual void SetOutputLevel ( TimeValue  t,
float  v 
)
inlinevirtual
Remarks
Sets the output level at the specified time. It is used to set the output level of the embedded Texout object, principally by importing plug-ins. It is implemented in all Texmaps.
Parameters:
TimeValue t

The time to set the output level.

float v

The value to set.
Default Implementation:
{}

Reimplemented in MSTexmapXtnd, and MSPluginTexmap.

338 {}

◆ IsOutputMeaningful()

virtual CoreExport bool IsOutputMeaningful ( ShadeContext sc)
virtual
Remarks
Implemented by the system.

Returns true only if all submaps and itself have a meaningful output.

Returns false if at least one sub-texmap or itself does not have a meaningful output

The output of a texmap is meaningful in a given ShadeContext if it is the same as when the scene is rendered. If the map cannot determine whether the output value is the same as when rendered, it should not be meaningful. This method can be called before EvalColor() or EvalMono() on a texmap in order to decide whether to call these methods at all or if their return values should be used in further calculations.
Parameters:
ShadeContext& sc

This describes the context of the question.

Reimplemented in MSTexmapXtnd, and MSPluginTexmap.

◆ IsLocalOutputMeaningful()

virtual bool IsLocalOutputMeaningful ( ShadeContext sc)
inlinevirtual
Remarks
Returns TRUE if the output of this texmap is meaningful for the given context; it should not take into account subtexmaps. This method is called by IsOutputMeaningful().
Parameters:
ShadeContext& sc

This describes the context of the question.
Default Implementation:
{ return false; }

Reimplemented in MSTexmapXtnd, and MSPluginTexmap.

364 { return false; }

◆ LoadMapFiles()

virtual int LoadMapFiles ( TimeValue  t)
inlinevirtual
Remarks
This method is called prior to rendering to allow the plug-in to load any bitmap files it requires.

Note that LoadMapFiles() is called to load map files only, not to list the missing files. The missing files are listed using the EnumAuxFiles() method, which allows enumerating them without loading them.

Also Note: There is currently not an UnloadMapFiles() method. There are a couple of ways to do this however. One is to call Interface::FreeAllBitmaps(). That method traverses the scene reference hierarchy and calls Animatable::FreeAllBitmaps() on each item. Another approach is to evaluate the Material / TextureMap hierarchy on each material. Then call Animatable::FreeAllBitmaps() yourself in the MtlEnum::proc() shown below.

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);
}
}
}
virtual Texmap * GetSubTexmap(int i)
Definition: ISubMap.h:61
virtual int NumSubTexmaps()
Definition: ISubMap.h:51
Definition: MtlBase.h:159
Definition: Mtl.h:35
virtual Mtl * GetSubMtl(int i)
Definition: Mtl.h:199
virtual int NumSubMtls()
Definition: Mtl.h:194
Definition: Texmap.h:146
int IsMtl(Animatable *m)
Definition: imtl.h:262
Now just define a subclass of MtlEnum that does what you want, and call EnumMtlTree. In this particular case it is more efficient than enumerating the entire reference hierarchy. If you do want to enumerate the entire reference hierarchy, here's how:

{
virtual void proc(ReferenceMaker *rm)=0;
};
void EnumRefs(ReferenceMaker *rm, RefEnumProc &proc)
{
proc.proc(rm);
for (int i=0; i<rm->NumRefs(); i++) {
if (srm) EnumRefs(srm,proc);
}
}
A callback class for ReferenceMaker::EnumRefHierarchy.
Definition: ref.h:2436
virtual int proc(ReferenceMaker *rm)=0
This method is called once for each element in the reference hierarchy.
A scene entity that owns other scene entities and listens to messages from them.
Definition: ref.h:1155
virtual CoreExport RefTargetHandle GetReference(int i)
Returns the 'i-th' reference.
virtual CoreExport int NumRefs()
Returns the total number of references this ReferenceMaker can hold.
Just define a subclass of RefEnumProc that does what you want, and call EnumRefs on the part of the reference hierarchy you want to enumerate. For example:

class MyEnum: public RefEnumProc
{
void proc(ReferenceMaker *rm) {
// do something ...
}
}
void afunction(Mtl* m)
{
MyEnum enumer;
EnumRefs(m,&enumer);
}
Parameters:
TimeValue t

The time the maps are being loaded.
Returns
Always return nonzero from this method.
Default Implementation:
{ return 1; }

Reimplemented in MSTexmapXtnd, and MSPluginTexmap.

450 { return 1; }

◆ RenderBitmap()

virtual CoreExport void RenderBitmap ( TimeValue  t,
Bitmap bm,
float  scale3D = 1.0f,
BOOL  filter = FALSE 
)
virtual
Remarks
This method is used to render a 2D bitmap version of this texmap.
Parameters:
TimeValue t

The time at which to render the texmap to the bitmap.

Bitmap *bm

A pointer to a bitmap to render to. This bitmap must be created at the resolution you wish to render to.

float scale3D=1.0f

This is a scale factor applied to 3D Texmaps. This is the scale of the surface in 3d space that is mapped to UV. This controls how much of the texture appears in the bitmap representation.

BOOL filter = FALSE

If TRUE the bitmap is filtered. It is quite a bit slower to rescale bitmaps with filtering on.
Default Implementation:
The default implementation calls Interface::RenderTexmap().

Reimplemented in MSTexmapXtnd, and MSPluginTexmap.

◆ RefAdded()

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.

Parameters
rm- The ReferenceMaker creating the reference.

Reimplemented from ReferenceTarget.

Reimplemented in MSPluginTexmap.

◆ SvTraverseAnimGraph()

CoreExport SvGraphNodeReference SvTraverseAnimGraph ( IGraphObjectManager gom,
Animatable owner,
int  id,
DWORD  flags 
)
virtual
Remarks
This method is available in release 3.0 and later only.

This method traverses the graph of objects in the 3ds Max scene, adding desired objects to the schematic view. Developers can specialize this behaviour by overriding this method and adding whatever objects are interesting to the schematic view. Objects are added to the schematic view by calling IGraphObjectManager::AddAnimatable(...). Reference lines are added to the schematic view by calling IGraphObjectManager::AddReference(...). Implementers of this method should call it recursively to process other objects in the scene.

See Class IGraphObjectManager.
Parameters
gomPoints to the schematic view window manager.
ownerThe owning animatable.
idThis is usually the sub-anim number (but can actually be any value the developer chooses).
flagsSee Flags for AddAnimatable() and SvTravereseAnimGraph().
Returns
A SvGraphNodeReference object.

Reimplemented from MtlBase.

◆ IsHighDynamicRange()

virtual int IsHighDynamicRange ( ) const
inlinevirtual
Remarks
Returns nonzero if the texture is returning high dynamic range data; otherwise zero.
Default Implementation:
{ return false; }
483 { return false; }

Member Data Documentation

◆ cacheID

int cacheID