ToneOperator Class Reference

ToneOperator Class Referenceabstract

#include <toneop.h>

Class Description

See also
Class SpecialFX, Class ToneOperatorInterface, Class IRendParams, Class RendParams, Class RenderGlobalContext, Class RenderMapsContext, Class ShadeContext, Class Interval.

Description:
This is the base class for the creation of Tone Operator plug-ins. A Tone Operator performs two functions:

1. It converts physically based values to RGB for filtering and display. The renderer calls the tone operator immediately after Mtl::Shade is called.

2. It balances physical and non-physical lighting.

The tone operator balances the physical and non-physical lighting by providing a scale relationship between them. The scale converts physical candelas to the non-physical value 1.0. Physically based objects in the 3ds Max scene use this scale to convert their values for use by the renderer and materials. The tone operator then converts the scaled value to RGB for display.

An example of this is the tone operator for a radiosity plug-in. 3ds Max works in a lighting space where values run from 0 to 1 and don't have any meaning. Pre-rendered Reflection maps, Refraction maps and self-illumination maps also use a 0 to 1 scale without any meaning. A radiosity plug-in introduces physical values to 3ds Max that range from 0 to 90000 for the sun.

So the question is "How do we mix these values with physical values?" One solution is to use a scale. Physical values are scaled to "3ds Max" values. Then they are processed by the shaders and materials, and then the scaled values are converted to RGB by ScaledToRGB.

So the PhysicalUnits, ScalePhysical and ScaleRGB are used to convert from 3ds Max lighting values to physical lighting values. We can use this to balance 3ds Max lights with physical lights, and to assign physical values to 3ds Max lights when we want to use them in a radiosity solution.

The tone operator may include a UI that allows the user to set the scale, or it can set the scale apriori. The scale is also used for reflection maps, which are usually implemented in 32 bit bitmaps. If the scale is set too high, reflection maps can show banding because of rounding errors. If the scale is set too low, reflection maps can wash out because of clipping values to 0...255.

The tone operator uses the standard Special Effects parameter dialog class for its user interface.

Note: typedef SFXParamDlg ToneOpParamDlg;
+ Inheritance diagram for ToneOperator:

Public Member Functions

 ToneOperator ()
 
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 BOOL Active (TimeValue t)
 
virtual void SetActive (bool active, TimeValue t)
 
bool GetProcessBackground ()
 
void SetProcessBackground (bool active)
 
bool GetIndirectOnly ()
 
void SetIndirectOnly (bool active)
 
virtual ToneOpParamDlgCreateParamDialog (IRendParams *ip)
 
virtual BOOL SetDlgThing (ToneOpParamDlg *dlg)
 
virtual bool IsPhysicalSpace () const
 
virtual void Update (TimeValue t, Interval &valid)
 
void Update (const TimeValue t, INode *const cameraNode, const IPoint2 renderResolution, const float pixelAspectRatio, Interval &validity)
 Shortcut method for easily supporting new functionality from ToneOperator2. More...
 
virtual bool BuildMaps (TimeValue t, RenderMapsContext &rmc)
 
virtual void SubRenderSample (float energy[3])
 
virtual void ScaledToRGB (float energy[3])=0
 
void ScaledToRGB (float energy[3], const Point2 &xyCoord)
 Shortcut method for easily supporting new functionality from ToneOperator2. More...
 
virtual float ScaledToRGB (float energy)=0
 
float ScaledToRGB (float energy, const Point2 &xyCoord)
 Shortcut method for easily supporting new functionality from ToneOperator2. More...
 
virtual float GetPhysicalUnit (TimeValue t, Interval &valid=Interval(0, 0)) const =0
 
virtual void SetPhysicalUnit (float value, TimeValue t)=0
 
virtual void ScalePhysical (float energy[3]) const =0
 
virtual float ScalePhysical (float energy) const =0
 
virtual void ScaleRGB (float color[3]) const =0
 
virtual float ScaleRGB (float color) const =0
 
bool CanInvert ()
 
void RGBToScaled (float energy[3])
 
float RGBToScaled (float energy)
 
- Public Member Functions inherited from SpecialFX
virtual MSTR GetName ()
 
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)
 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)
 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 NumSubs ()
 
virtual AnimatableSubAnim (int i)
 
virtual CoreExport MSTR SubAnimName (int i)
 
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 IsSubClassOf (Class_ID classID)
 returns true if the animatable has sub-classed off the given class 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 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)
 The following methods deal with AppData. 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 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 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 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 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 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)
 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)
 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...
 

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 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...
 
- 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 ()
 
void UnblockEval ()
 
int Evaluating ()
 
CoreExport RefResult StdNotifyRefChanged (const Interval &changeInt, RefTargetHandle hTarget, PartID partID, RefMessage message, BOOL propagate=TRUE)
 
- 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
 

Constructor & Destructor Documentation

ToneOperator ( )
inline
void ClearAFlag(DWORD mask)
Clears one or more bits in the Animatable flags.
Definition: Animatable.h:267
#define A_TONEOP_PROCESS_BG
The exposure control proceses the background.
Definition: AnimatableFlags.h:66

Member Function Documentation

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.

72 {return REF_SUCCEED;}
The operation succeeded.
Definition: ref.h:733
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. List of Super Class IDs.
See also
SClass_ID

Reimplemented from ReferenceTarget.

73 { return TONE_OPERATOR_CLASS_ID; }
#define TONE_OPERATOR_CLASS_ID
Tone operator super-class ID.
Definition: plugapi.h:390
IOResult Save ( ISave isave)
inlinevirtual
Remarks
Implemented by the System.

To facilitate naming atmospheric or rendering effects, a 'name' string has been added to the base class. This method should be called from the developers sub-classed Atmospheric or Effects plug-in to save the name.

Reimplemented from SpecialFX.

77 { return SpecialFX::Save(isave); }
CoreExport IOResult Save(ISave *isave)
IOResult Load ( ILoad iload)
inlinevirtual
Remarks
Implemented by the System.

To facilitate naming atmospheric or rendering effects, a 'name' string has been added to the base class. This method should be called from the developers sub-classed Atmospheric or Effects plug-in to load the name.

Reimplemented from SpecialFX.

78 { return SpecialFX::Load(iload); }
CoreExport IOResult Load(ILoad *iload)
virtual BOOL Active ( TimeValue  t)
inlinevirtual
Remarks
Returns TRUE if the effect is active; otherwise FALSE.
Parameters:
TimeValue t

The time at which to check.
Default Implementation:
{ return FALSE; }

Reimplemented from SpecialFX.

80 { return !TestAFlag(A_TONEOP_DISABLED); }
BOOL TestAFlag(DWORD mask)
Tests one or more bits in the Animatable flags.
Definition: Animatable.h:275
#define A_TONEOP_DISABLED
The exposure control is disabled.
Definition: AnimatableFlags.h:64
void SetActive ( bool  active,
TimeValue  t 
)
inlinevirtual
Remarks
This method indicates whether the tone operator is active. The default implementation does not use the TimeValue t. The result of the default implementation can be retrieved using SpecialFX::GetActive. If you override this method and change the mechanism for storing this state, you should also override SpecialFX::GetActive so the correct state is returned.
Parameters:
bool active

A boolean indicating if the tone operator is active.

TimeValue t

The time at which the active check is made.
Default Implementation:
if (active ^ (TestAFlag(A_ATMOS_DISABLED) == 0)) {

if (active) {

ClearAFlag(A_ATMOS_DISABLED);

}

else {

SetAFlag(A_ATMOS_DISABLED);

}

NotifyDependents(FOREVER, PART_ALL, REFMSG_CHANGE);

}
19  {
20  if (active ^ (TestAFlag(A_TONEOP_DISABLED) == 0)) {
21  if (active) {
23  }
24  else {
26  }
28  }
29 }
BOOL TestAFlag(DWORD mask)
Tests one or more bits in the Animatable flags.
Definition: Animatable.h:275
void ClearAFlag(DWORD mask)
Clears one or more bits in the Animatable flags.
Definition: Animatable.h:267
void SetAFlag(DWORD mask)
Definition: Animatable.h:262
virtual CoreExport RefResult NotifyDependents(const Interval &changeInt, PartID partID, RefMessage message, SClass_ID sclass=NOTIFY_ALL, BOOL propagate=TRUE, RefTargetHandle hTarg=NULL)
Notify all dependent RefMakers concerned with the message.
const PartID PART_ALL
Combination of ALL_CHANNELS and PART_TM.
Definition: ref.h:94
#define A_TONEOP_DISABLED
The exposure control is disabled.
Definition: AnimatableFlags.h:64
#define REFMSG_CHANGE
Sent to dependents of a ReferenceTarget that has changed in some way.
Definition: ref.h:255
#define FOREVER
Definition: interval.h:154
bool GetProcessBackground ( )
inline
Remarks
Returns the state of A_TONEOP_PROCESS_BG, indicating whether the ToneOperator will be processing the background.
106 { return TestAFlag(A_TONEOP_PROCESS_BG) != 0; }
BOOL TestAFlag(DWORD mask)
Tests one or more bits in the Animatable flags.
Definition: Animatable.h:275
#define A_TONEOP_PROCESS_BG
The exposure control proceses the background.
Definition: AnimatableFlags.h:66
void SetProcessBackground ( bool  active)
inline
Remarks
This method allows you to set A_TONEOP_PROCESS_BG.
Parameters:
bool active

TRUE to activate, FALSE to deactivate.
31  {
32  if (active ^ (TestAFlag(A_TONEOP_PROCESS_BG) != 0)) {
33  if (active) {
35  }
36  else {
38  }
40  }
41 }
BOOL TestAFlag(DWORD mask)
Tests one or more bits in the Animatable flags.
Definition: Animatable.h:275
void ClearAFlag(DWORD mask)
Clears one or more bits in the Animatable flags.
Definition: Animatable.h:267
void SetAFlag(DWORD mask)
Definition: Animatable.h:262
#define A_TONEOP_PROCESS_BG
The exposure control proceses the background.
Definition: AnimatableFlags.h:66
virtual CoreExport RefResult NotifyDependents(const Interval &changeInt, PartID partID, RefMessage message, SClass_ID sclass=NOTIFY_ALL, BOOL propagate=TRUE, RefTargetHandle hTarg=NULL)
Notify all dependent RefMakers concerned with the message.
const PartID PART_ALL
Combination of ALL_CHANNELS and PART_TM.
Definition: ref.h:94
#define REFMSG_CHANGE
Sent to dependents of a ReferenceTarget that has changed in some way.
Definition: ref.h:255
#define FOREVER
Definition: interval.h:154
bool GetIndirectOnly ( )
inline
113 { return TestAFlag(A_TONEOP_INDIRECT_ONLY) != 0; }
BOOL TestAFlag(DWORD mask)
Tests one or more bits in the Animatable flags.
Definition: Animatable.h:275
#define A_TONEOP_INDIRECT_ONLY
Only processes indirect lights only.
Definition: AnimatableFlags.h:68
void SetIndirectOnly ( bool  active)
inline
43  {
44  if (active ^ (TestAFlag(A_TONEOP_INDIRECT_ONLY) != 0)) {
45  if (active) {
47  }
48  else {
50  }
52  }
53 }
BOOL TestAFlag(DWORD mask)
Tests one or more bits in the Animatable flags.
Definition: Animatable.h:275
void ClearAFlag(DWORD mask)
Clears one or more bits in the Animatable flags.
Definition: Animatable.h:267
void SetAFlag(DWORD mask)
Definition: Animatable.h:262
virtual CoreExport RefResult NotifyDependents(const Interval &changeInt, PartID partID, RefMessage message, SClass_ID sclass=NOTIFY_ALL, BOOL propagate=TRUE, RefTargetHandle hTarg=NULL)
Notify all dependent RefMakers concerned with the message.
#define A_TONEOP_INDIRECT_ONLY
Only processes indirect lights only.
Definition: AnimatableFlags.h:68
const PartID PART_ALL
Combination of ALL_CHANNELS and PART_TM.
Definition: ref.h:94
#define REFMSG_CHANGE
Sent to dependents of a ReferenceTarget that has changed in some way.
Definition: ref.h:255
#define FOREVER
Definition: interval.h:154
virtual ToneOpParamDlg* CreateParamDialog ( IRendParams ip)
inlinevirtual
Remarks
This method creates the rollup pages in the render panel that lets the user edit the tone operator's parameters. You can use IRendParams::AddRollupPage and IRendParams::DeleteRollupPage to manage your rollup pages directly. Or, if your parameters are stored in a ParamBlock2 object, you can use CreateRParamMap2 and DestroyRParamMap2 to manage the rollups. You may return NULL, if no UI is required.
Parameters:
IRendParams *ip

Points to the render parameter dialog interface. You may call the methods of that class using this pointer.
Returns
Pointer to the tone operator dialog.
Default Implementation:
{ return NULL; }

Reimplemented from SpecialFX.

133 { return NULL; }
#define NULL
Definition: autoptr.h:20
virtual BOOL SetDlgThing ( ToneOpParamDlg dlg)
inlinevirtual
Remarks
Implement this if you are using the ParamMap2 AUTO_UI system and the atmosphere has secondary dialogs that don't have the effect as their 'thing'. Called once for each secondary dialog for you to install the correct thing.
Parameters:
ToneOpParamDlg* dlg

Points tot he tone operator dialog.
Returns
Return TRUE if you process the dialog, FALSE otherwise.

Reimplemented from SpecialFX.

147 { return FALSE; }
virtual bool IsPhysicalSpace ( ) const
inlinevirtual
Remarks
Returns a boolean which indicates if this tone operator really maps physical values to RGB. This method is provided so shaders can determine whether the shading calculations are in physical or RGB space.
Default Implementation:
{ return true; }
159 { return true; }
virtual void Update ( TimeValue  t,
Interval valid 
)
inlinevirtual
Remarks
This method is called once per frame when the renderer begins. This gives the tone operator the chance to cache any values it uses internally so they don't have to be computed on every pixel. But, this method should not be used to perform any very long tasks. This would be the likely method that caches the frames physical scaling value.
Parameters:
TimeValue t

The time at which the rendering is beginning.

Interval& valid

The validity interval for the update.
Default Implementation:
{ }

Reimplemented from SpecialFX.

180 { }
void Update ( const TimeValue  t,
INode *const  cameraNode,
const IPoint2  renderResolution,
const float  pixelAspectRatio,
Interval validity 
)
inline

Shortcut method for easily supporting new functionality from ToneOperator2.

This method automatically checks if this class implements the new ToneOperator2 interface. If it does, it forwards the call to it. Otherwise, it calls the legacy method from ToneOperator.

See also
virtual void ToneOperator2::Update(const TimeValue, INode*, const IPoint2&, float, Interval&)
Remarks
This method suffers from the overhead of a dynamic cast, but that is expected to go away in the near future as all functionality from ToneOperator2 will be folded into ToneOperator.
77 {
78  // Forward the call to ToneOperator2, if possible
79  ToneOperator2* const tone_op2 = dynamic_cast<ToneOperator2*>(this);
80  if(tone_op2 != nullptr)
81  {
82  tone_op2->Update(t, cameraNode, renderResolution, pixelAspectRatio, validity);
83  }
84  else
85  {
86  // Not a ToneOperator2: forward to legacy method
87  Update(t, validity);
88  }
89 }
Extended version of the ToneOperator interface.
Definition: toneop.h:370
virtual void Update(TimeValue t, Interval &valid)
Definition: toneop.h:180
virtual void Update(const TimeValue t, INode *const cameraNode, const IPoint2 &renderResolution, const float pixelAspectRatio, Interval &validity)=0
Initializes the tone operator at the given time, and with the given camera & view options...
virtual bool BuildMaps ( TimeValue  t,
RenderMapsContext rmc 
)
inlinevirtual
Remarks
This method is called for the operator to do any work it needs to do prior to rendering. You may use this method to perform a subrender to sample the rendered output for histogramming or automatic exposure.
Parameters:
TimeValue t

The time at which the rendering is taking place.

RenderMapsContext& rmc

The context of the map rendering.
Returns
True means this method succeeded. False means it didn't. This method should return false if it the sub-render fails or if it can't allocate memory or some other error occurs. If BuildMaps returns false, the render is aborted.
Default Implementation:
{ return true; }
209  { return true; }
virtual void SubRenderSample ( float  energy[3])
inlinevirtual
215 { }
virtual void ScaledToRGB ( float  energy[3])
pure virtual
Remarks
This method maps a scaled energy value into RGB. This version converts a color value. The converted color value is stored in energy.

This method assumes that Update() has been called to cache the various values needed by the tone operator.

Note: By using a float array to pass in color values, we can use the same routine to handle the various classes used to store color information, for example, Color, AColor and Point3.
Parameters:
float energy[3]

The input energy value to convert. The converted color value is stored here as well. The red, green and blue components are stored in that order in the array. The valid ranges are -infinity to +infinity, but the returned value is clipped by the renderer very quickly to [0,1]. The tone operator can do it's own clipping, but it isn't required.
void ScaledToRGB ( float  energy[3],
const Point2 xyCoord 
)
inline

Shortcut method for easily supporting new functionality from ToneOperator2.

This method automatically checks if this class implements the new ToneOperator2 interface. If it does, it forwards the call to it. Otherwise, it calls the legacy method from ToneOperator.

See also
virtual void ToneOperator2::ScaledToRGB(float energy[3], const Point2& xyCoord) const
Remarks
This method suffers from the overhead of a dynamic cast, but that is expected to go away in the near future as all functionality from ToneOperator2 will be folded into ToneOperator.
92 {
93  // Forward the call to ToneOperator2, if possible
94  const ToneOperator2* const tone_op2 = dynamic_cast<const ToneOperator2*>(this);
95  if(tone_op2 != nullptr)
96  {
97  return tone_op2->ScaledToRGB(energy, xyCoord);
98  }
99  else
100  {
101  return ScaledToRGB(energy);
102  }
103 }
virtual void ScaledToRGB(float energy[3])=0
Extended version of the ToneOperator interface.
Definition: toneop.h:370
virtual void ScaledToRGB(float energy[3], const Point2 &xyCoord) const =0
Scales a value from physical space to RGB space.
virtual float ScaledToRGB ( float  energy)
pure virtual
Remarks
This method maps a scaled energy value to monochrome. The converted monochrome value is returned. This method assumes that Update() has been called to cache the various values needed by the tone operator.
Parameters:
float energy

The input energy value to convert.
float ScaledToRGB ( float  energy,
const Point2 xyCoord 
)
inline

Shortcut method for easily supporting new functionality from ToneOperator2.

This method automatically checks if this class implements the new ToneOperator2 interface. If it does, it forwards the call to it. Otherwise, it calls the legacy method from ToneOperator.

See also
virtual void ToneOperator2::ScaledToRGB(float energy, const Point2& xyCoord) const
Remarks
This method suffers from the overhead of a dynamic cast, but that is expected to go away in the near future as all functionality from ToneOperator2 will be folded into ToneOperator.
106 {
107  // Forward the call to ToneOperator2, if possible
108  const ToneOperator2* const tone_op2 = dynamic_cast<const ToneOperator2*>(this);
109  if(tone_op2 != nullptr)
110  {
111  return tone_op2->ScaledToRGB(energy, xyCoord);
112  }
113  else
114  {
115  return ScaledToRGB(energy);
116  }
117 }
virtual void ScaledToRGB(float energy[3])=0
Extended version of the ToneOperator interface.
Definition: toneop.h:370
virtual void ScaledToRGB(float energy[3], const Point2 &xyCoord) const =0
Scales a value from physical space to RGB space.
virtual float GetPhysicalUnit ( TimeValue  t,
Interval valid = Interval(0, 0) 
) const
pure virtual
Remarks
This method returns the physical value that is scaled to 1.
Parameters:
TimeValue t

The time at which to return the value.

Interval& valid = Interval(0,0)

The validity interval for the value.
virtual void SetPhysicalUnit ( float  value,
TimeValue  t 
)
pure virtual
Remarks
This method sets the physical value that is scale to 1. This is simply a programmatic method to change the physical scaling of the tone operator. Valid values are (0,+infinity).
Parameters:
TimeValue t

The time at which to set the value.

Interval& valid = Interval(0,0)

The validity interval for the value.
virtual void ScalePhysical ( float  energy[3]) const
pure virtual
Remarks
This method is used to scale a physical color value so it may be used in the renderer.

This method assumes that Update has been called to cache the various values needed by the tone operator.

Note: By using a float array to pass in color values, we can use the same routine to handle the various classes used to store color information, for example, Color, AColor and Point3.
Parameters:
float energy[3]

The input and output (converted) color value. The colors are stored as red=energy[0], green=energy[1], and blue=energy[2].
virtual float ScalePhysical ( float  energy) const
pure virtual
Remarks
This method is used to scale a physical monochrome value so it may be used in the renderer.

This method assumes that Update has been called to cache the various values needed by the tone operator.
Parameters:
float energy

The input value to scale.
Returns
The scaled output value is returned.
virtual void ScaleRGB ( float  color[3]) const
pure virtual
Remarks
This method is called to scale RGB values (the inverse of ScalePhysical()).

This method assumes that Update has been called to cache the various values needed by the tone operator.
Parameters:
float color[3]

The input values to scale and storage for the output scaled values as well. The colors are stored as red=energy[0], green=energy[1], and blue=energy[2]. The output values are in the range 0-1.
virtual float ScaleRGB ( float  color) const
pure virtual
Remarks
This method is called to scale a monochrome value (the inverse of ScalePhysical()).
Parameters:
float color

The input value to scale.
Returns
The scaled output value is returned.
bool CanInvert ( )
inline
56 {
58 }
#define INVERTABLE_TONE_OPERATOR_INTERFACE
Definition: toneop.h:434
#define NULL
Definition: autoptr.h:20
virtual CoreExport void * GetInterface(ULONG id)
Inherited from Animatable.
void RGBToScaled ( float  energy[3])
inline
62 {
64 
65  if (p != NULL)
66  p->InverseMap(energy);
67 }
#define INVERTABLE_TONE_OPERATOR_INTERFACE
Definition: toneop.h:434
#define NULL
Definition: autoptr.h:20
Definition: toneop.h:436
virtual CoreExport void * GetInterface(ULONG id)
Inherited from Animatable.
virtual void InverseMap(float rgb[3])=0
float RGBToScaled ( float  energy)
inline
70 {
72 
73  return p == NULL ? energy : p->InverseMap(energy);
74 }
#define INVERTABLE_TONE_OPERATOR_INTERFACE
Definition: toneop.h:434
#define NULL
Definition: autoptr.h:20
Definition: toneop.h:436
virtual CoreExport void * GetInterface(ULONG id)
Inherited from Animatable.
virtual void InverseMap(float rgb[3])=0