3ds Max C++ API Reference
Sampler Class Referenceabstract

#include <samplers.h>

+ Inheritance diagram for Sampler:

Public Member Functions

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...
 
IOResult Save (ISave *isave)
 
IOResult Load (ILoad *iload)
 
virtual void DoSamples (ShadeOutput *pOut, SamplingCallback *cb, ShadeContext *sc, MASK mask=NULL)=0
 
virtual int GetNSamples ()=0
 
virtual void SetQuality (float value)=0
 
virtual float GetQuality ()=0
 
virtual int SupportsQualityLevels ()=0
 
virtual void SetEnable (BOOL samplingOn)=0
 
virtual BOOL GetEnable ()=0
 
virtual const MCHARGetDefaultComment ()=0
 
virtual ULONG SupportsStdParams ()
 
virtual void SetTextureSuperSampleOn (BOOL on)
 
virtual BOOL GetTextureSuperSampleOn ()
 
virtual void SetAdaptiveOn (BOOL on)
 
virtual BOOL IsAdaptiveOn ()
 
virtual void SetAdaptiveThreshold (float value)
 
virtual float GetAdaptiveThreshold ()
 
virtual long GetNOptionalParams ()
 
virtual MCHARGetOptionalParamName (long nParam)
 
virtual float GetOptionalParamMax (long nParam)
 
virtual float GetOptionalParam (long nParam)
 
virtual void SetOptionalParam (long nParam, float val)
 
virtual void ExecuteParamDialog (HWND hWndParent, StdMat2 *mtl)
 
virtual BOOL SetDlgThing (EffectParamDlg *dlg)
 
- 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)
 
CoreExport IOResult Save (ISave *isave)
 
CoreExport IOResult Load (ILoad *iload)
 
virtual SFXParamDlgCreateParamDialog (IRendParams *ip)
 
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...
 
virtual CoreExport voidGetInterface (ULONG id)
 Inherited from Animatable. More...
 
virtual CoreExport BaseInterfaceGetInterface (Interface_ID id)
 Inherited from Animatable. 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 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 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 ()
 

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...
 
- 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

See also
Class SpecialFX, Class SamplingCallback, Class SFXParamDlg, Class ShadeContext, Class Point3, Class Point2, Class ILoad, Class ISave.

Description:
This is the base class for the creation of Sampler plug-ins which work with the Standard material. These appear in the Super Sampling rollout in the Sampler dropdown. They have an Enable checkbox and a Quality spinner for their user interface. An optional modal dialog may also be presented.

A Sampler is a plug-in that determines where inside a single pixel the shading and texture samples are computed. For some Samplers this pattern is the same for each pixel, for others a different pattern is chosen for each pixel. After determining the sample locations, the sampler calls back to the renderer to compute the shading values. It then averages the resulting shading values and returns its estimate of the final color.

Some Samplers are adaptive. This means that the Sampler decides on-the-fly how many samples to take to achieve its goal. There are many subtleties to adaptive Samplers and many ways to define the adaptive mechanism. The adaptive mechanism used by the R3 Samplers is very simple: take 4 samples, look for the maximum change in any of the color channels, if it's greater than the threshold, then sample the entire pixel according to the given quality. Threshold is an optional parameter that may, but need not be used by adaptive Samplers.

The transfer of control from 3ds Max to the Sampler plug-in is as follows: A Sampler is responsible for the sampling loop. It samples until it is done and computes the sum of its samples upon completion. Once the Sampler's DoSample() method is called 3ds Max no longer has control. This is how adaptive samplers are handled. The DoSample() routine will determine how often and where it samples, then it calls the provided SamplingCallback::SampleAtOffset() method to have 3ds Max compute the shading value.
Plug-In Information:
Class Defined In SAMPLER.H

Super Class ID SAMPLER_CLASS_ID

Standard File Name Extension DLH

Extra Include File Needed None

Member Function Documentation

◆ NotifyRefChanged()

RefResult NotifyRefChanged ( const Interval changeInt,
RefTargetHandle  hTarget,
PartID partID,
RefMessage  message,
BOOL  propagate 
)
inlinevirtual

Receives and responds to messages.

A plugin which makes references must implement a method to receive and respond to messages broadcast by its dependents. This is done by implementing NotifyRefChanged(). The plugin developer usually implements this method as a switch statement where each case is one of the messages the plugin needs to respond to. The Method StdNotifyRefChanged calls this, which can change the partID to new value. If it doesn't depend on the particular message& partID, it should return REF_DONTCARE.

  • For developer that need to update a dialog box with data about an object you reference note the following related to this method: This method may be called many times. For instance, say you have a dialog box that displays data about an object you reference. This method will get called many time during the drag operations on that object. If you updated the display every time you'd wind up with a lot of 'flicker' in the dialog box. Rather than updating the dialog box each time, you should just invalidate the window in response to the NotifyRefChanged() call. Then, as the user drags the mouse your window will still receive paint messages. If the scene is complex the user may have to pause (but not let up on the mouse) to allow the paint message to go through since they have a low priority. This is the way many windows in 3ds Max work.
Parameters
changeInt- This is the interval of time over which the message is active. Currently, all plug-ins will receive FOREVER for this interval, with the exception of REFMSG_FLAGDEPENDENTS notifications. In that case, changeInt.Start() is the timepoint to perform the dependency test.
hTarget- This is the handle of the reference target the message was sent by. The reference maker uses this handle to know specifically which reference target sent the message.
partID- This contains information specific to the message passed in. Some messages don't use the partID at all. See the section List of Reference Messages for more information about the meaning of the partID for some common messages.
message- The message parameters passed into this method is the specific message which needs to be handled.
propagate- If called through ReferenceMaker::NotifyDependents(), the value of 'propagate' passed to it. Used if calling NotifyDependents() from within NotifyRefChanged().
Returns
The return value from this method is of type RefResult. This is usually REF_SUCCEED indicating the message was processed. Sometimes, the return value may be REF_STOP. This return value is used to stop the message from being propagated to the dependents of the item.

Implements ReferenceMaker.

91  { return REF_SUCCEED; }
@ REF_SUCCEED
The operation succeeded.
Definition: ref.h:765

◆ 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.

93 { return SAMPLER_CLASS_ID; }
#define SAMPLER_CLASS_ID
Sampler super-class ID.
Definition: plugapi.h:447

◆ Save()

IOResult Save ( ISave isave)
inlinevirtual
Remarks
Implemented by the System.

This method saves the name of the sampler. This should be called at the start of a plug-in's save methods.
Parameters:
ISave *isave

An interface for saving data.

Reimplemented from ReferenceMaker.

103 { return SpecialFX::Save(isave); }
CoreExport IOResult Save(ISave *isave)

◆ Load()

IOResult Load ( ILoad iload)
inlinevirtual
Remarks
Implemented by the System.

This method loads the name of the sampler. This should be called at the start of a plug-in's load methods.
Parameters:
ILoad *iload

An interface for loading data.

Reimplemented from ReferenceMaker.

110 { return SpecialFX::Load(iload); }
CoreExport IOResult Load(ILoad *iload)

◆ DoSamples()

virtual void DoSamples ( ShadeOutput pOut,
SamplingCallback cb,
ShadeContext sc,
MASK  mask = NULL 
)
pure virtual
Remarks
This is the method where the Sampler plug-in does its sampling loop. Upon completion it returns the color and transparency back to 3ds Max in c and t.

A sampler samples a range of 0.0 to 1.0. For a pixel sampler this range gets mapped to a single pixel. The sampler doesn't need to be concerned with this however. It just works within the 0.0 to 1.0 space determining where to put the samples. Essentially, this method generates a set of points and calls SamplingCallback::SampleAtOffset() for each one. Then it sums up the results of the values returned from SampleAtOffset(), divides by the number of samples, and stores the results in c and t.
Parameters:
ShadeOutput* pOut

This is the output of the sampling.

SamplingCallback* cb

This is the callback provided by 3ds Max which the sampler uses to actually do the sampling.

ShadeContext* sc

The Shade Context which provides information about the pixel being sampled.

MASK mask=NULL

The 64 bit pixel mask. This mask coresponds to the 8x8 sub-pixel area grid. The actual geometry covers only some portion of these bits. This is essentially an 8x8 raster for the inside of the pixel where bits are set over the polygon being rendered and bits are off for areas not over the polygon. Developers typically only want to sample where the geometry is and thus when the bits are on. If not the results are very poor visually.

Note: Most polygons are quite small in a typically complex scene being rendered. In other words, most polygons that need to get sampled will only have a small number of these mask bits on since the polygons are very small relative to the pixel. For instance, edge on polygons may project down to only a few bits within the pixel. Consequently it is quite possible that there may be zero samples, i.e. no geometry in the mask. Developers need to check for this zero samples condition. If this is the case then a method of ShadeContext called SurfacePtScreen() is used. This method returns a point which is guaranteed to be on the fragment no matter how small it is. This point can then be used for at least a single sample.
Sample Code:
The following is a brief analysis of the DoSamples() method from the Uniform Sampler of 3ds Max. This sampler sub-divides the sample area into a grid and samples the pixel at the center point of each grid unit.

This code is from the file /MAXSDK/SAMPLES/RENDER/SAMPLERS/STDSAMPLERS.CPP.

The complete code is shown below and then a code fragment analysis follows:

void UniformSampler::DoSamples( ShadeOutput* pOut, SamplingCallback* cb, ShadeContext* sc, MASK mask ) {
int sideSamples = GetSideSamples();
DbgAssert( sideSamples > 0 );
// we map 0...sideSz into 0..1
float sideSzInv = 1.0f / float(sideSamples);
float sampleScale = texSuperSampleOn ? sideSzInv : 1.0f;
Point2 samplePt;
float nSamples = 0.0f;
pOut->Reset();
ShadeOutput sampOut( sc->NRenderElements() );
// Sampling Loop
for( int y = 0; y < sideSamples; ++y ) {
samplePt.y = (float(y) + 0.5f) * sideSzInv;
for( int x = 0; x < sideSamples; ++x ) {
samplePt.x = (float(x) + 0.5f) * sideSzInv;
if ( sampleInMask( samplePt, mask, sc->globContext->fieldRender ) ) {
// returns true for unclipped samples
if (cb->SampleAtOffset( &sampOut, samplePt, sampleScale )) {
(*pOut) += sampOut;
nSamples += 1.0f;
}
}
}
} // end, sampling loop
if ( nSamples == 0.0f ) {
// gets center of frag in screen space
samplePt = sc->SurfacePtScreen();
cb->SampleAtOffset( pOut, samplePt, 1.0f );
}
else {
pOut->Scale( 1.0f / nSamples );
}
}
Definition: point2.h:44
float y
Definition: point2.h:49
float x
Definition: point2.h:48
BOOL fieldRender
Definition: RenderGlobalContext.h:170
Definition: samplers.h:28
virtual BOOL SampleAtOffset(ShadeOutput *pOut, Point2 &sample, float sampleScale)=0
Definition: ShadeContext.h:369
virtual int NRenderElements()
Definition: ShadeContext.h:1013
RenderGlobalContext * globContext
Definition: ShadeContext.h:384
virtual Point2 SurfacePtScreen()
Definition: ShadeContext.h:587
Definition: ShadeContext.h:134
void Reset(int nEle=-1)
Definition: ShadeContext.h:189
void Scale(float x)
Definition: ShadeContext.h:236
controller mat max min numsubs x z controller keys x z controller keys x
Definition: generics.inl:212
#define DbgAssert(expr)
Definition: assert1.h:82
ULONG MASK[2]
Definition: samplers.h:20
The above code is broken into smaller fragments to look at below:

int sideSamples = GetSideSamples();
Here the sampler is just getting the number of sides in the sampling grid. This is computed based on the Quality spinner in the user interface. In this sampler this results in a number between 2 and 6 (developers can look at the UniformSampler::GetSideSamples() method to see this). Thus the resulting sampling grid is 2x2 or 3x3, up to 6x6. Then the number of samples is computed by multiplying the number of sides times itself.

int numSamples = sideSamples * sideSamples;
Next the side size inverse is computed to know how big the step size is. This is the amount to step along each time.

The sample scale is how large is the piece that's being sampled. For example, if the grid is 2x2 then each sample is scaled by 1/2

float sideSzInv = 1.0f / float(sideSamples);
float sampleScale = texSuperSampleOn ? sideSzInv : 1.0f;
Next the number of samples, and the color and transparency are initialized to zero:

float nSamples = 0.0f;
pOut->Reset();
ShadeOutput sampOut( sc->NRenderElements() );
Then the sampling loop begins. Here the positions of individual sampling points are computed. Each point is then checked to see if it corresponds to a point in the mask (is over a polygon). (The sampleInMask function is defined in /MAXSDK/SAMPLES/RENDER/SAMPLERS/SAMPLERUTIL.CPP). If it is a point that's over a polygon then SampleAtOffset() is called. What SampleAtOffset() does is turn the passed 2D sample into a 3D sample and fills out a ShadeOutput with a color and transparency. These returned values are summed up over the sampling loop ((*pOut) += sampOut;).

for( int y = 0; y < sideSamples; ++y ) {
samplePt.y = (float(y) + 0.5f) * sideSzInv;
for( int x = 0; x < sideSamples; ++x ) {
samplePt.x = (float(x) + 0.5f) * sideSzInv;
if ( sampleInMask( samplePt, mask, sc->globContext->fieldRender ) ) {
// returns true for unclipped samples
if (cb->SampleAtOffset( &sampOut, samplePt, sampleScale )) {
(*pOut) += sampOut;
nSamples += 1.0f;
}
}
}
}
At the end of the sampling loop a check is done to see if there were zero samples. This is the case if the geometry is very small relative to the pixel. There are two approaches that one might take when there are zero samples. One is to simply return black. A strict 'jitter-type' sampler might do this since, in fact, no samples were hit. This will result in artifacts to the image however. A better approach is to use the ShadeContext method SurfacePtScreen() to return a point which is guaranteed to be at the center of the fragment. Then this point is passed to SampleAtOffset() so a single sample which is on the fragment is used.

If a single sample point was used, DoSamples() is finished. The reults are in pOut as returned from SampleAtOffset().

If a number of samples was taken, the shade info is scaled by the inverse of the number of samples (nSamples) to get the final colors.

if ( nSamples == 0.0f ) {
// gets center of frag in screen space
samplePt = sc->SurfacePtScreen();
cb->SampleAtOffset( pOut, samplePt, 1.0f );
}
else {
pOut->Scale( 1.0f / nSamples );
}

◆ GetNSamples()

virtual int GetNSamples ( )
pure virtual
Remarks
This methods returns the integer number of samples given the current quality setting. If doing adaptive sampling (where the number of samples may vary) return the maximum number of samples possible.

◆ SetQuality()

virtual void SetQuality ( float  value)
pure virtual
Remarks
Sets the sampling quality. This is the one default parameter.
Parameters:
float value

Quality is nominal with a range of 0.0 to 1.0.

◆ GetQuality()

virtual float GetQuality ( )
pure virtual
Remarks
Returns the sampling quality in the range of 0.0 to 1.0. Quality means how many samples are taken to compute the shade in a pixel. Higher quality is of course achieved by more samples. Quality 0.0 means "minimal", Quality 1.0 means "best", and Quality 0.5 means "good, the default ". Some samplers do not have adjustable quality (like 3ds Max 2.5 Star), in which case the quality spinner is disabled and this method is ignored.

◆ SupportsQualityLevels()

virtual int SupportsQualityLevels ( )
pure virtual
Remarks
This method returns 0 on "unchangeable", otherwise the number of quality levels.

◆ SetEnable()

virtual void SetEnable ( BOOL  samplingOn)
pure virtual
Remarks
Sets the Enable Sampler state to on or off.
Parameters:
BOOL samplingOn

TRUE for on; FALSE for off.

◆ GetEnable()

virtual BOOL GetEnable ( )
pure virtual
Remarks
Returns TRUE if sampling is enabled; otherwise FALSE.

◆ GetDefaultComment()

virtual const MCHAR* GetDefaultComment ( )
pure virtual
Remarks
Returns a comment string for the Sampler which appears in the Materials Editor user inteface.

◆ SupportsStdParams()

virtual ULONG SupportsStdParams ( )
inlinevirtual
Remarks
This method determines which of the various optional parameters are displayed. Zero or more of the following values (which may be added together):

IS_ADAPTIVE – Samples is adaptive in some way.

ADAPTIVE_CHECK_BOX – Enable the Adaptive check box.

ADAPTIVE_THRESHOLD – Enable the adaptive Threshold spinner.

SUPER_SAMPLE_TEX_CHECK_BOX – Enable the texture Super Sampling check box.

ADVANCED_DLG_BUTTON – Enable the Advanced button. This allows an additional popup dialog to be presented to the user. See the method ExecuteParamDialog().

OPTIONAL_PARAM_0 – Enable optional spinner 0. See the methods GetOptionalParamName(), GetOptionalParamMax(), etc.

OPTIONAL_PARAM_1 – Enable optional spinner 1.

The following option is simply a set of these:

R3_ADAPTIVE = (IS_ADAPTIVE+ADAPTIVE_CHECK_BOX+ADAPTIVE_THRESHOLD)
Default Implementation:
{ return 0; }
333 { return 0; }

◆ SetTextureSuperSampleOn()

virtual void SetTextureSuperSampleOn ( BOOL  on)
inlinevirtual
Remarks
This method is called on the Sampler to reflect the change in the 'Supersamp. Tex.' checkbox state. This determines whether to cut down the texture sample size of each sample, or whether to always use 1 pixel texture sample size.
Parameters:
BOOL on

TRUE for on; FALSE for off.
Default Implementation:
{}
346 {}

◆ GetTextureSuperSampleOn()

virtual BOOL GetTextureSuperSampleOn ( )
inlinevirtual
Remarks
Returns TRUE if Super Sampling is on; otherwise FALSE. See SetTextureSuperSampleOn() above.
Default Implementation:
{ return FALSE; }
351 { return FALSE; }

◆ SetAdaptiveOn()

virtual void SetAdaptiveOn ( BOOL  on)
inlinevirtual
Remarks
This method is called on the Sampler to reflect the change in the 'Adaptive' checkbox state.
Parameters:
BOOL on

TRUE for on; FALSE for off.
Default Implementation:
{}
360 {}

◆ IsAdaptiveOn()

virtual BOOL IsAdaptiveOn ( )
inlinevirtual
Remarks
Returns TRUE if Adaptive is on (cheched in the user interface); otherwise FALSE.
Default Implementation:
{ return FALSE; }
365 { return FALSE; }

◆ SetAdaptiveThreshold()

virtual void SetAdaptiveThreshold ( float  value)
inlinevirtual
Remarks
This method is called on the Sampler to reflect the change in the 'Threshold' spinner.
Parameters:
float value

The value to set. Range 0-1.
Default Implementation:
{}
374 {}

◆ GetAdaptiveThreshold()

virtual float GetAdaptiveThreshold ( )
inlinevirtual
Remarks
Returns the adaptive threshold setting.
Default Implementation:
{ return 0.0f; }
378 { return 0.0f; }

◆ GetNOptionalParams()

virtual long GetNOptionalParams ( )
inlinevirtual
Remarks
Samplers plug-ins support two optional parameter which may be used by the plug-in for its own needs. This methods returns the number of parameters it supports. Note that the max value is 2.
Default Implementation:
{ return 0; }
386 { return 0; }

◆ GetOptionalParamName()

virtual MCHAR* GetOptionalParamName ( long  nParam)
inlinevirtual
Remarks
Returns the name of the specified parameter.
Parameters:
long nParam

The zero based index of the optional parameter: 0 for the first one, 1 for the second.
Default Implementation:
{ return _M(""); }
394 { return const_cast<MCHAR*>(_M("")); }
#define _M(x)
Used to wrap string literals.
Definition: strbasic.h:67
#define MCHAR
MBCS/Unicode helper defines std::wofstream doesn't mix well with Unicode.
Definition: strbasic.h:42

◆ GetOptionalParamMax()

virtual float GetOptionalParamMax ( long  nParam)
inlinevirtual
Remarks
Returns the maximum value of the specified optional parameter.
Parameters:
long nParam

The zero based index of the optional parameter: 0 for the first one, 1 for the second.
Default Implementation:
{ return 1.0f; }
403 { return 1.0f; }

◆ GetOptionalParam()

virtual float GetOptionalParam ( long  nParam)
inlinevirtual
Remarks
Returns the value of the specified optional parameter.
Parameters:
long nParam

The zero based index of the optional parameter: 0 for the first one, 1 for the second.
Default Implementation:
{ return 0.0f; }
411 { return 0.0f; };

◆ SetOptionalParam()

virtual void SetOptionalParam ( long  nParam,
float  val 
)
inlinevirtual
Remarks
Sets the value of the specified optional parameter.
Parameters:
long nParam

The zero based index of the optional parameter: 0 for the first one, 1 for the second.

float val

The value to set.
Default Implementation:
{}
421 {};

◆ ExecuteParamDialog()

virtual void ExecuteParamDialog ( HWND  hWndParent,
StdMat2 mtl 
)
inlinevirtual
Remarks
This method is called to put up a modal dialog which allows editing of the extended parameters. The rest of the operation of 3ds Max should be disalbed by this modal dialog (which is why you should use GetMAXHWnd()). This method is called when the Advanced button is pressed (which is enabled by using the ADVANCED_DLG_BUTTON flag returned from SupportsStdParams().
Parameters:
HWND hWndParent

The parent window handle. Use Interface::GetMAXHWnd().

StdMat2* mtl

Points to the owning Standard material.
Default Implementation:
{}
438 {}

◆ SetDlgThing()

virtual BOOL SetDlgThing ( EffectParamDlg dlg)
inlinevirtual
Remarks
You should implement this method if you are using the ParamMap2 AUTO_UI system and the sampler has secondary dialogs that have something other than the incoming effect as their 'thing'. Called once for each secondary dialog for you to install the correct thing. Return TRUE if you process the dialog, FALSE otherwise, in which case the incoming effect will be set into the dialog.

Note: Developers needing more information on this method can see the remarks for MtlBase::CreateParamDlg() which describes a similar example of this method in use (in that case it's for use by a texture map plug-in).
Parameters:
EffectParamDlg* dlg

Points to the ParamDlg.
Default Implementation:
{ return FALSE; }

Reimplemented from SpecialFX.

460 { return FALSE; }