3ds Max C++ API Reference
Shader Class Referenceabstract

Used by developers to create Shader plug-ins. More...

#include <shaders.h>

+ Inheritance diagram for Shader:

Public Member Functions

virtual void CopyStdParams (Shader *pFrom)=0
 Copies the standard shader parameters from pFrom to this object. More...
 
virtual void SetLockDS (BOOL lock)=0
 Sets the state of the Diffuse/Specular lock to on or off. More...
 
virtual BOOL GetLockDS ()=0
 Returns the Diffuse/Specular lock'. More...
 
virtual void SetLockAD (BOOL lock)=0
 Sets the state of the Ambient/Diffuse lock to on or off. More...
 
virtual BOOL GetLockAD ()=0
 Returns the Ambient/Diffuse lock. More...
 
virtual void SetLockADTex (BOOL lock)=0
 Sets the state of the Ambient/Diffuse Texture lock to on or off. More...
 
virtual BOOL GetLockADTex ()=0
 Returns the Ambient/Diffuse Texture lock. More...
 
virtual void SetSelfIllum (float v, TimeValue t)=0
 Sets the Self Illumination parameter to the specified value at the time passed as TimeValue. More...
 
virtual void SetSelfIllumClrOn (BOOL on)=0
 Sets the Self Illumination Color On/Off state. More...
 
virtual void SetSelfIllumClr (Color c, TimeValue t)=0
 Sets the Self Illumination Color at the specified time. More...
 
virtual void SetAmbientClr (Color c, TimeValue t)=0
 Sets the Ambient Color at the specified time. More...
 
virtual void SetDiffuseClr (Color c, TimeValue t)=0
 Sets the Diffuse Color at the specified time. More...
 
virtual void SetSpecularClr (Color c, TimeValue t)=0
 Sets the Specular Color at the specified time. More...
 
virtual void SetGlossiness (float v, TimeValue t)=0
 Sets the Glossiness parameter to the specified value at the time passed. More...
 
virtual void SetSpecularLevel (float v, TimeValue t)=0
 Sets the Specular Level parameter to the specified value at the time passed. More...
 
virtual void SetSoftenLevel (float v, TimeValue t)=0
 Sets the Soften Specular Highlights Level to the specified value at the time passed. More...
 
virtual BOOL IsSelfIllumClrOn (int mtlNum, BOOL backFace)=0
 Returns the The Self Illumination Color setting. More...
 
virtual Color GetAmbientClr (int mtlNum, BOOL backFace)=0
 Returns the Ambient Color. More...
 
virtual Color GetDiffuseClr (int mtlNum, BOOL backFace)=0
 Returns the Diffuse Color. More...
 
virtual Color GetSpecularClr (int mtlNum, BOOL backFace)=0
 Returns the Specular Color. More...
 
virtual Color GetSelfIllumClr (int mtlNum, BOOL backFace)=0
 Returns the Self Illumination Color. More...
 
virtual float GetSelfIllum (int mtlNum, BOOL backFace)=0
 Returns the Self Illumination Amount. More...
 
virtual float GetGlossiness (int mtlNum, BOOL backFace)=0
 Returns the Glossiness Level. More...
 
virtual float GetSpecularLevel (int mtlNum, BOOL backFace)=0
 Returns the Specular Level. More...
 
virtual float GetSoftenLevel (int mtlNum, BOOL backFace)=0
 Returns the Soften Level as a float. More...
 
virtual BOOL IsSelfIllumClrOn ()=0
 Returns the Self Illumination Color setting. More...
 
virtual Color GetAmbientClr (TimeValue t)=0
 Returns the Ambient Color at the specified time. More...
 
virtual Color GetDiffuseClr (TimeValue t)=0
 Returns the Diffuse Color at the specified time. More...
 
virtual Color GetSpecularClr (TimeValue t)=0
 Returns the Specular Color at the specified time. More...
 
virtual float GetGlossiness (TimeValue t)=0
 Returns the Glossiness value at the specified time. More...
 
virtual float GetSpecularLevel (TimeValue t)=0
 Returns the Specular Level at the specified time. More...
 
virtual float GetSoftenLevel (TimeValue t)=0
 Returns the Soften Specular Highlights setting at the specified time. More...
 
virtual float GetSelfIllum (TimeValue t)=0
 Returns the Self Illumination Amount at the specified time. More...
 
virtual Color GetSelfIllumClr (TimeValue t)=0
 Returns the Self Illumination Color at the specified time. More...
 
virtual float EvalHiliteCurve (float x)
 Evaluates the hightlight curve that appears in the Shader user interface. More...
 
virtual float EvalHiliteCurve2 (float x, float y, int level=0)
 This is the highlight curve function for the two highlight curves which intersect and appear in the UI, for instance in the Anistropic shader. More...
 
CoreExport void ShadeReflection (ShadeContext &sc, IllumParams &ip, Color &mapClr)
 Implements the Max std way of handling reflection to provide the default implementation. More...
 
CoreExport void ShadeTransmission (ShadeContext &sc, IllumParams &ip, Color &mapClr, float amount)
 Implements the Max std way of handling transmission to provide the default implementation. More...
 
void PreShade (ShadeContext &sc, IReshadeFragment *pFrag)
 
void PostShade (ShadeContext &sc, IReshadeFragment *pFrag, int &nextTexIndex, IllumParams *ip)
 
BaseInterfaceGetInterface (Interface_ID id)
 Inherited from Animatable. More...
 
voidGetInterface (ULONG id)
 Inherited from Animatable. More...
 
- Public Member Functions inherited from BaseShader
RefResult NotifyRefChanged (const Interval &changeInt, RefTargetHandle hTarget, PartID &partID, RefMessage message, BOOL propagate)
 Receives and responds to messages. More...
 
SClass_ID SuperClassID ()
 Retrieves a constant representing the type of the plugin. More...
 
BOOL BypassPropertyLevel ()
 Wants to promote the shader properties to the material level. More...
 
virtual ULONG GetRequirements (int subMtlNum)=0
 Returns the requirements of the Shader for the specified sub-material. More...
 
virtual long nUserIllumOut ()
 Indicates the number of UserIllum output channels used by the shader. More...
 
virtual const MCHAR ** UserIllumNameArray ()
 Returns a static array of channel names for matching by render elements. More...
 
virtual ShaderParamDlgCreateParamDialog (HWND hOldRollup, HWND hwMtlEdit, IMtlParams *imp, StdMat2 *theMtl, int rollupOpen, int n=0)=0
 Put up a dialog that lets the user edit the plug-ins parameters. More...
 
virtual ShaderParamDlgGetParamDlg (int n=0)=0
 Returns a pointer to the ShaderParamDlg object which manages the user interface. More...
 
virtual void SetParamDlg (ShaderParamDlg *newDlg, int n=0)=0
 Sets the ShaderParamDlg object which manages the user interface to the one passed. More...
 
virtual int NParamDlgs ()
 Returns the number of rollups this shader is requesting. More...
 
virtual ULONG SupportStdParams ()=0
 Std parameter support. More...
 
virtual void ConvertParamBlk (ParamBlockDescID *descOld, int oldCount, IParamBlock *oldPB)
 Required for R2.5 shaders to convert the previous Standard material parameter blocks to the current version. More...
 
IOResult Save (ISave *isave)
 Saves and loads the plug-in's name. More...
 
IOResult Load (ILoad *iload)
 Loads the plug-in's name. More...
 
virtual void GetIllumParams (ShadeContext &sc, IllumParams &ip)=0
 Updates the "channels"(as well as other) data member of the "IllumParams" object passed to it with the "local" variables of the material for possible mapping prior to being given to the Shader's Illum() method. More...
 
virtual void Illum (ShadeContext &sc, IllumParams &ip)=0
 This is the illumination function for the Shader. More...
 
virtual void AffectReflection (ShadeContext &sc, IllumParams &ip, Color &rcol)
 This method was superseded by ShadeReflection() and is obsolete in release 4.0 and later. More...
 
virtual void CombineComponents (ShadeContext &sc, IllumParams &ip)
 Finalizes the compositing of the various illumination components. More...
 
virtual long nTexChannelsSupported ()=0
 Returns the number of texture map map channels supported by this Shader. More...
 
virtual MSTR GetTexChannelName (long nTextureChan) MAX_SEALED
 
virtual MSTR GetTexChannelName (long nTextureChan, bool localized)=0
 Returns the name of the specified texture map channel. More...
 
virtual MSTR GetTexChannelInternalName (long nTextureChan)
 Returns the internal name of the specified texture map. More...
 
virtual long ChannelType (long nTextureChan)=0
 Returns the channel type for the specified texture map channel. More...
 
virtual long StdIDToChannel (long stdID)=0
 Returns the index of this Shader's channels which corresponds to the specified Standard materials texture map ID. More...
 
virtual void Reset ()=0
 Called when the Shader is first activated in the dropdown list of Shader choices. More...
 
- Public Member Functions inherited from SpecialFX
virtual MSTR GetName () MAX_SEALED
 
virtual MSTR GetName (bool localized) const
 
virtual BOOL Active (TimeValue t)
 
virtual void Update (TimeValue t, Interval &valid)
 
virtual SFXParamDlgCreateParamDialog (IRendParams *ip)
 
virtual BOOL SetDlgThing (SFXParamDlg *dlg)
 
virtual int NumGizmos ()
 
virtual INodeGetGizmo (int i)
 
virtual void DeleteGizmo (int i)
 
virtual void AppendGizmo (INode *node)
 
virtual BOOL OKGizmo (INode *node)
 
virtual void EditGizmo (INode *node)
 
virtual void InsertGizmo (int i, INode *node)
 
CoreExport SvGraphNodeReference SvTraverseAnimGraph (IGraphObjectManager *gom, Animatable *owner, int id, DWORD flags)
 
- Public Member Functions inherited from ReferenceTarget
virtual CoreExport void GetClassName (MSTR &s, bool localized=true) const override
 Retrieves the name of the plugin class. More...
 
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 RefAdded (RefMakerHandle rm)
 Called after a reference is made to a target. 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 void BaseClone (ReferenceTarget *from, ReferenceTarget *to, RemapDir &remap)
 This method copies base class data from an object to its clone. 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 EnumAuxFiles (AssetEnumCallback &assetEnum, DWORD flags)
 Enumerate auxiliary files (e.g. bitmaps) 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 CoreExport Class_ID ClassID ()
 Retrieves a constant that uniquely identifies 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)
 
virtual CoreExport int SetProperty (ULONG id, void *data)
 
virtual CoreExport voidGetProperty (ULONG id)
 
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 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 MSTR SvGetName (IGraphObjectManager *gom, IGraphNode *gNode, bool isBeingEdited)
 
virtual CoreExport bool SvCanSetName (IGraphObjectManager *gom, IGraphNode *gNode)
 
virtual CoreExport bool SvSetName (IGraphObjectManager *gom, IGraphNode *gNode, const MSTR &name)
 
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 SvIsSelected (IGraphObjectManager *gom, IGraphNode *gNode)
 Returns true if the object is selected in its schematic view. More...
 
virtual CoreExport bool SvIsHighlighted (IGraphObjectManager *gom, IGraphNode *gNode)
 
virtual CoreExport COLORREF SvHighlightColor (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 SvHandleDoubleClick (IGraphObjectManager *gom, IGraphNode *gNode)
 
virtual CoreExport MultiSelectCallbackSvGetMultiSelectCallback (IGraphObjectManager *gom, IGraphNode *gNode)
 
virtual CoreExport bool SvCanSelect (IGraphObjectManager *gom, IGraphNode *gNode)
 
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 IReshading
virtual ~IReshading ()
 
virtual ReshadeRequirements GetReshadeRequirements ()
 

Additional Inherited Members

- Public Types inherited from IReshading
enum  ReshadeRequirements { RR_None = 0 , RR_NeedPreshade , RR_NeedReshade }
 
- 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...
 
- Public Attributes inherited from SpecialFX
MSTR name
 
- 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 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

Used by developers to create Shader plug-ins.

The methods of this class must be implemented to provide data to the 3ds Max interactive renderer. This will let that renderer to properly reflect the look of the shader in the viewports. The methods associated with the actual Shader illumination code are from the base class BaseShader. There are various Get and Set methods defined in this class. Plug-in developers provide implementations for the 'Get' methods which are used by the interactive renderer. The implementations of the 'Set' methods are used when switching between shaders types in the Materials Editor. This is used to transfer the corresponding colors between the old Shader and the new one. Note that some shaders may not have the exact parameters as called for in the methods. In those case an approximate value may be returned from the 'Get' methods. For example, the Strauss Shader doesn't have an Ambient channel. In that case the Diffuse color is taken and divided by 2 and returned as the Ambient color. This gives the interactive renderer something to work with that might not be exact but is somewhat representative.

See also
BaseShader, MacroRecorder

Member Function Documentation

◆ CopyStdParams()

virtual void CopyStdParams ( Shader pFrom)
pure virtual

Copies the standard shader parameters from pFrom to this object.

Note that plug-ins typically disable the macro recorder during this operation as the Get and Set methods are called. See the sample code for examples.

Parameters
pFromThe pointer to the source parameters.

◆ SetLockDS()

virtual void SetLockDS ( BOOL  lock)
pure virtual

Sets the state of the Diffuse/Specular lock to on or off.

Parameters
locktrue for on, false for off.

◆ GetLockDS()

virtual BOOL GetLockDS ( )
pure virtual

Returns the Diffuse/Specular lock'.

Returns
true if the Diffuse/Specular lock is on, false otherwise.

◆ SetLockAD()

virtual void SetLockAD ( BOOL  lock)
pure virtual

Sets the state of the Ambient/Diffuse lock to on or off.

Parameters
locktrue for on, false for off.

◆ GetLockAD()

virtual BOOL GetLockAD ( )
pure virtual

Returns the Ambient/Diffuse lock.

Returns
true if the Ambient/Diffuse lock is on, false otherwise.

◆ SetLockADTex()

virtual void SetLockADTex ( BOOL  lock)
pure virtual

Sets the state of the Ambient/Diffuse Texture lock to on or off.

Parameters
locktrue for on; false for off.

◆ GetLockADTex()

virtual BOOL GetLockADTex ( )
pure virtual

Returns the Ambient/Diffuse Texture lock.

Returns
true if the Ambient/Diffuse Texture lock is on, false otherwise.

◆ SetSelfIllum()

virtual void SetSelfIllum ( float  v,
TimeValue  t 
)
pure virtual

Sets the Self Illumination parameter to the specified value at the time passed as TimeValue.

Parameters
vThe value to set.
tThe time to set the value.

◆ SetSelfIllumClrOn()

virtual void SetSelfIllumClrOn ( BOOL  on)
pure virtual

Sets the Self Illumination Color On/Off state.

Parameters
ontrue for on, false for off.

◆ SetSelfIllumClr()

virtual void SetSelfIllumClr ( Color  c,
TimeValue  t 
)
pure virtual

Sets the Self Illumination Color at the specified time.

Parameters
cThe color for the self illumination to set to.
tThe time to set the color.

◆ SetAmbientClr()

virtual void SetAmbientClr ( Color  c,
TimeValue  t 
)
pure virtual

Sets the Ambient Color at the specified time.

Parameters
cThe color for the ambient to set to.
tThe time to set the color.

◆ SetDiffuseClr()

virtual void SetDiffuseClr ( Color  c,
TimeValue  t 
)
pure virtual

Sets the Diffuse Color at the specified time.

Parameters
cThe color for the diffuse color to set to.
tThe time to set the color.

◆ SetSpecularClr()

virtual void SetSpecularClr ( Color  c,
TimeValue  t 
)
pure virtual

Sets the Specular Color at the specified time.

Parameters
cThe color to set to.
tThe time to set the color.

◆ SetGlossiness()

virtual void SetGlossiness ( float  v,
TimeValue  t 
)
pure virtual

Sets the Glossiness parameter to the specified value at the time passed.

Parameters
vThe value to set to.
tThe time to set the value.

◆ SetSpecularLevel()

virtual void SetSpecularLevel ( float  v,
TimeValue  t 
)
pure virtual

Sets the Specular Level parameter to the specified value at the time passed.

Parameters
vThe value to set.
tThe time to set the value.

◆ SetSoftenLevel()

virtual void SetSoftenLevel ( float  v,
TimeValue  t 
)
pure virtual

Sets the Soften Specular Highlights Level to the specified value at the time passed.

Parameters
vThe value to set.
tThe time to set the value.

◆ IsSelfIllumClrOn() [1/2]

virtual BOOL IsSelfIllumClrOn ( int  mtlNum,
BOOL  backFace 
)
pure virtual

Returns the The Self Illumination Color setting.

parameters to this method are not applicable and may safely be ignored.

Returns
true if the Self Illumination Color setting is on (checked), false otherwise.

◆ GetAmbientClr() [1/2]

virtual Color GetAmbientClr ( int  mtlNum,
BOOL  backFace 
)
pure virtual

Returns the Ambient Color.

The parameters to this method are not applicable and may safely be ignored.

◆ GetDiffuseClr() [1/2]

virtual Color GetDiffuseClr ( int  mtlNum,
BOOL  backFace 
)
pure virtual

Returns the Diffuse Color.

The parameters to this method are not applicable and may safely be ignored.

◆ GetSpecularClr() [1/2]

virtual Color GetSpecularClr ( int  mtlNum,
BOOL  backFace 
)
pure virtual

Returns the Specular Color.

The parameters to this method are not applicable and may safely be ignored.

◆ GetSelfIllumClr() [1/2]

virtual Color GetSelfIllumClr ( int  mtlNum,
BOOL  backFace 
)
pure virtual

Returns the Self Illumination Color.

The parameters to this method are not applicable and may safely be ignored.

◆ GetSelfIllum() [1/2]

virtual float GetSelfIllum ( int  mtlNum,
BOOL  backFace 
)
pure virtual

Returns the Self Illumination Amount.

The parameters to this method are not applicable and may safely be ignored.

◆ GetGlossiness() [1/2]

virtual float GetGlossiness ( int  mtlNum,
BOOL  backFace 
)
pure virtual

Returns the Glossiness Level.

The parameters to this method are not applicable and may safely be ignored.

◆ GetSpecularLevel() [1/2]

virtual float GetSpecularLevel ( int  mtlNum,
BOOL  backFace 
)
pure virtual

Returns the Specular Level.

The parameters to this method are not applicable and may safely be ignored.

◆ GetSoftenLevel() [1/2]

virtual float GetSoftenLevel ( int  mtlNum,
BOOL  backFace 
)
pure virtual

Returns the Soften Level as a float.

The parameters to this method are not applicable and may safely be ignored.

◆ IsSelfIllumClrOn() [2/2]

virtual BOOL IsSelfIllumClrOn ( )
pure virtual

Returns the Self Illumination Color setting.

Returns
true if the Self Illumination Color setting is on (checked), false if it is off

◆ GetAmbientClr() [2/2]

virtual Color GetAmbientClr ( TimeValue  t)
pure virtual

Returns the Ambient Color at the specified time.

Parameters
tThe time at which to return the color.

◆ GetDiffuseClr() [2/2]

virtual Color GetDiffuseClr ( TimeValue  t)
pure virtual

Returns the Diffuse Color at the specified time.

Parameters
tThe time at which to return the color.

◆ GetSpecularClr() [2/2]

virtual Color GetSpecularClr ( TimeValue  t)
pure virtual

Returns the Specular Color at the specified time.

Parameters
tThe time at which to return the color.

◆ GetGlossiness() [2/2]

virtual float GetGlossiness ( TimeValue  t)
pure virtual

Returns the Glossiness value at the specified time.

Parameters
tThe time at which to return the value.

◆ GetSpecularLevel() [2/2]

virtual float GetSpecularLevel ( TimeValue  t)
pure virtual

Returns the Specular Level at the specified time.

Parameters
tThe time at which to return the value.

◆ GetSoftenLevel() [2/2]

virtual float GetSoftenLevel ( TimeValue  t)
pure virtual

Returns the Soften Specular Highlights setting at the specified time.

Parameters
tThe time at which to return the value.

◆ GetSelfIllum() [2/2]

virtual float GetSelfIllum ( TimeValue  t)
pure virtual

Returns the Self Illumination Amount at the specified time.

Parameters
tThe time at which to return the value.

◆ GetSelfIllumClr() [2/2]

virtual Color GetSelfIllumClr ( TimeValue  t)
pure virtual

Returns the Self Illumination Color at the specified time.

Parameters
tThe time at which to return the color.

◆ EvalHiliteCurve()

virtual float EvalHiliteCurve ( float  x)
inlinevirtual

Evaluates the hightlight curve that appears in the Shader user interface.

This gets called from the DrawHilite() function which is available to developers in /MAXSDK/SAMPLES/MATERIALS/SHADER/SHADERUTIL.CPP

Parameters
xThe input value.
Returns
The output value on the curve. A value of 1.0 represents the top of the curve as it appears in the UI. Values greater than 1.0 are okay and simply appear off the top of the graph.
1070 { return 0.0f; }

◆ EvalHiliteCurve2()

virtual float EvalHiliteCurve2 ( float  x,
float  y,
int  level = 0 
)
inlinevirtual

This is the highlight curve function for the two highlight curves which intersect and appear in the UI, for instance in the Anistropic shader.

Parameters
xThe x input value.
yThe y input value.
levelThis is used by multi-layer shaders to indicate which layer to draw. The draw highlight curve routines use this when redrawing the graph.
Returns
The output value of the curve.
1080 { return 0.0f; }

◆ ShadeReflection()

CoreExport void ShadeReflection ( ShadeContext sc,
IllumParams ip,
Color mapClr 
)
virtual

Implements the Max std way of handling reflection to provide the default implementation.

Reimplemented from BaseShader.

◆ ShadeTransmission()

CoreExport void ShadeTransmission ( ShadeContext sc,
IllumParams ip,
Color mapClr,
float  amount 
)
virtual

Implements the Max std way of handling transmission to provide the default implementation.

Reimplemented from BaseShader.

◆ PreShade()

void PreShade ( ShadeContext sc,
IReshadeFragment pFrag 
)
inlinevirtual
Remarks
This method will pre-shade the object and cache any needed values in the fragment.

This method is called on the materials/shaders/textures as the reshading buffer is being built at the same point in the rendering process where the materials shade function would normally be called. Note that at this time the shade context is completely valid, as in a normal rendering. Any values the material wishes to cache can be attached to the reshading fragment passed in, and retrieved later at postShade time.
Parameters:
ShadeContext& sc

A reference to the shade context.

IReshadeFragment* pFrag

A pointer to the fragment.
Default Implementation:
{ }

Reimplemented from IReshading.

1088 {}

◆ PostShade()

void PostShade ( ShadeContext sc,
IReshadeFragment pFrag,
int nextTexIndex,
IllumParams ip 
)
inlinevirtual
Remarks
This method will retrieve cached values and compute shade & transparency for the fragment.

This method is called for the material of each fragment as the reshading buffer is being traversed. Materials retrieve whatever they may have stored to complete the minimal shade context and compute a shade for the fragment. PostShade() calls to shaders contain an additional parameter, the IllumParams, filled with the textured/blended but unshaded values for each texture. The shade context passed into PostShade() is the minimal shade context outlined above.
Parameters:
ShadeContext& sc

A reference to the shade context.

IReshadeFragment* pFrag

A pointer to the fragment.

int& nextTexIndex

A reference to the next texture index.

IllumParams* ip = NULL

A pointer to the IllumParams containing textured/blended but unshaded values for each texture.
Default Implementation:
{ }

Reimplemented from IReshading.

1089 { Illum( sc, *ip ); }
virtual void Illum(ShadeContext &sc, IllumParams &ip)=0
This is the illumination function for the Shader.

◆ GetInterface() [1/2]

BaseInterface* GetInterface ( Interface_ID  id)
inlinevirtual

Inherited from Animatable.

Returns a pointer to the Base Interface for the interface ID passed.

Parameters
id- The unique ID of the interface to get
Returns
A Pointer to the Interface

Reimplemented from ReferenceTarget.

1092 { return BaseShader::GetInterface(id); }
virtual CoreExport void * GetInterface(ULONG id)
Inherited from Animatable.

◆ GetInterface() [2/2]

void* GetInterface ( ULONG  id)
inlinevirtual

Inherited from Animatable.

Returns a pointer to the interface.

Parameters
id- The id of the interface.
Returns
A Pointer to the Interface

Reimplemented from ReferenceTarget.

1093  {
1094  if( id == IID_IReshading )
1095  return (IReshading*)( this );
1096  else
1097  return BaseShader::GetInterface(id);
1098  }
#define IID_IReshading
Definition: IReshading.h:22
Definition: IReshading.h:52