3ds Max C++ API Reference
ToneOperator Class Referenceabstract

This is the base class for plugins which perform tone mapping operations in 3ds Max. More...

#include <ToneOperator.h>

+ Inheritance diagram for ToneOperator:

Classes

class  ThreadedProcessor
 Enables processing a tone operator independently of class ToneOperator, for example in a multi-threaded manner. More...
 

Public Member Functions

 ToneOperator ()
 The constructor initializes internal data. More...
 
RefResult NotifyRefChanged (const Interval &changeInt, RefTargetHandle hTarget, PartID &partID, RefMessage message, BOOL propagate) override
 This default implementation does nothing. More...
 
SClass_ID SuperClassID () override final
 Returns the super class ID of ToneOperator. More...
 
IOResult Save (ISave *isave) override
 Saves internal data and must be called by the derived method. More...
 
IOResult Load (ILoad *iload) override
 Loads internal data and must be called by the derived method. More...
 
virtual BOOL Active (TimeValue t) override
 Returns whether the ToneOperator is currently active. More...
 
virtual void SetActive (bool active, TimeValue t)
 This method indicates whether the tone operator is active. More...
 
bool GetProcessBackground () const
 Returns the state of A_TONEOP_PROCESS_BG, indicating whether the ToneOperator will be processing the background. More...
 
void SetProcessBackground (bool active)
 This method allows you to set A_TONEOP_PROCESS_BG. More...
 
bool GetIndirectOnly () const
 Returns whether tone mapping should apply to indirect lighting only. More...
 
void SetIndirectOnly (bool active)
 Sets whether tone mapping should apply to indirect lighting only. More...
 
virtual ToneOpParamDlgCreateParamDialog (IRendParams *ip)
 Put up a modal dialog that lets the user edit the plug-ins parameters. More...
 
virtual BOOL SetDlgThing (ToneOpParamDlg *dlg)
 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'. More...
 
virtual bool BuildMaps (TimeValue t, RenderMapsContext &rmc)
 This method is called for the operator to do any work it needs to do prior to rendering. More...
 
virtual void SubRenderSample (float energy[3])
 This method is called during subrenders to give the tone operator a chance to sample the image with full dynamic range. More...
 
virtual const ThreadedProcessorAllocateThreadedProcessor () const =0
 Allocates an interface which enables processing of the tone operator from arbitrary (or multiple) threads. More...
 
Initialization
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. More...
 
virtual void Update (TimeValue t, Interval &valid)=0
 Initializes the tone operator at the given time, but without any information w.r.t. More...
 
Physical to RGB conversion

These methods convert physical (energy) values into RGB space.

virtual void ScaledToRGB (float energy[3], const Point2 &xyCoord) const =0
 Scales a value from physical space to RGB space. More...
 
virtual float ScaledToRGB (float energy, const Point2 &xyCoord) const =0
 Scales a grayscale value from physical space to RGB space. More...
 
virtual void ScaledToRGB (float color[3]) const =0
 Equivalent of virtual void ScaledToRGB(float energy[3], const Point2& xyCoord) const, but without any support for view-dependent tone mapping. More...
 
virtual float ScaledToRGB (float energy) const =0
 Equivalent of virtual void ScaledToRGB(float energy, const Point2& xyCoord) const, but without any support for view-dependent tone mapping. More...
 
Physical scale

Returns the physical scale to be used when rendering.

virtual float GetPhysicalUnit (TimeValue t, Interval &valid) const =0
 For a full description of the physical scale, see the details description for class ToneOperator. More...
 
virtual void SetPhysicalUnit (float value, TimeValue t)=0
 Sets the physical scale to be used when rendering. More...
 
virtual void ScalePhysical (float energy[3]) const =0
 Scale physical values so they can be used in the renderer. More...
 
virtual float ScalePhysical (float energy) const =0
 Grayscale version of virtual void ScalePhysical(float energy[3]) const. More...
 
virtual void ScaleRGB (float color[3]) const =0
 Scale RGB values, just supplied to invert ScalePhysical. More...
 
virtual float ScaleRGB (float color) const =0
 Grayscale version of virtual void ScaleRGB(float color[3]) const. More...
 
Inversion (RGB to Physical conversion)
virtual bool CanInvert () const =0
 Returns whether this ToneOperator supports the inversion functions. More...
 
virtual void InverseMap (float rgb[3], const Point2 &xyCoord) const =0
 Convers an RGB value back into physical space. More...
 
virtual float InverseMap (float rgb, const Point2 &xyCoord) const =0
 Convers an RGB value back into physical space. More...
 
virtual void InverseMap (float rgb[3]) const =0
 Equivalent of virtual void InverseMap(float rgb[3], const Point2& xyCoord) const, but without any support for view-dependent tone mapping. More...
 
virtual float InverseMap (float rgb) const =0
 Equivalent of virtual void InverseMap(float rgb, const Point2& xyCoord) const, but without any support for view-dependent tone mapping. More...
 
void RGBToScaled (float energy[3], const Point2 &xyCoord) const
 Alias for InverseMap() More...
 
float RGBToScaled (float energy, const Point2 &xyCoord) const
 Alias for InverseMap() More...
 
void RGBToScaled (float energy[3]) const
 Alias for InverseMap() More...
 
float RGBToScaled (float energy) const
 Alias for InverseMap() More...
 
- Public Member Functions inherited from SpecialFX
virtual MSTR GetName () MAX_SEALED
 
virtual MSTR GetName (bool localized) const
 
CoreExport IOResult Save (ISave *isave)
 
CoreExport IOResult Load (ILoad *iload)
 
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

This is the base class for plugins which perform tone mapping operations in 3ds Max.

The tone mapping process

Renderers typically perform lighting simulation in physical space, using units like candelas or watts to represent the intensity of light. If they do not strictly use physical units, they will at least perform calculations in linear space. Rendered images, however, are typically expressed in RGB space (usually sRGB), which is usually non-linear. The purpose of the tone operator (or tone mapper) is to transform linear, physical quantities into (potentially non-linear) RGB values. This process is similar to what happens when photographic film or sensors convert photons into colors (either chemically or electronically).
The physical scale

The physical scale is used to reconcile physical and non-physical light sources in a scene; it defines the equivalence between a photometric light that emits in candelas and a standard light that emits in arbtrary units. For example, a physical scale of 1500 would cause a non-physical emissive surface with a value of PI (3.1416) to emit 1500 cd/m^2. The physical scale affects environment lighting as well; non-physical envrionment lighting will be affected in the same way.

The tone operator expects that all physical values be pre-divided by the physical scale. That is, any value fed to ScaledToRGB() is expected to be expressed in candela/physical_scale. The physical scale therefore adjusts physical values, rather than non-physical ones, in order to preserve compatibility with legacy features that were implemented before the concept of physical units was introduced to 3ds Max. The ToneOperator will multiply any values fed to ScaledToRGB() by the physical scale to undo this division.
Inverse tone mapping

The process of converting an RGB value back into physical quantities is called inverse tone mapping. This process is especially useful when rendering with a backgorund or environment image which is already expressed in non-linear, RGB values. The image in question must first be inverse-tone-mapped to ensure that, once it goes through the rendering and tone mapping processes, it looks exactly as it did originally. Ideally, all environment images fed to the renderer should be expressed in physical, linear quantities - but that is not always possible.

Constructor & Destructor Documentation

◆ ToneOperator()

ToneOperator ( )
inline

The constructor initializes internal data.

17 {
19 }
void ClearAFlag(DWORD mask)
Clears one or more bits in the Animatable flags.
Definition: Animatable.h:304
#define A_TONEOP_PROCESS_BG
The exposure control proceses the background.
Definition: AnimatableFlags.h:64

Member Function Documentation

◆ NotifyRefChanged()

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

This default implementation does nothing.

Implements ReferenceMaker.

22 {
23  return REF_SUCCEED;
24 }
@ REF_SUCCEED
The operation succeeded.
Definition: ref.h:765

◆ SuperClassID()

SClass_ID SuperClassID ( )
inlinefinaloverridevirtual

Returns the super class ID of ToneOperator.

Reimplemented from ReferenceTarget.

27 {
28  return TONE_OPERATOR_CLASS_ID;
29 }
#define TONE_OPERATOR_CLASS_ID
Tone operator super-class ID.
Definition: plugapi.h:455

◆ Save()

IOResult Save ( ISave isave)
inlineoverridevirtual

Saves internal data and must be called by the derived method.

Reimplemented from ReferenceMaker.

32 {
33  return SpecialFX::Save(isave);
34 }
CoreExport IOResult Save(ISave *isave)

◆ Load()

IOResult Load ( ILoad iload)
inlineoverridevirtual

Loads internal data and must be called by the derived method.

Reimplemented from ReferenceMaker.

37 {
38  return SpecialFX::Load(iload);
39 }
CoreExport IOResult Load(ILoad *iload)

◆ Active()

BOOL Active ( TimeValue  t)
inlineoverridevirtual

Returns whether the ToneOperator is currently active.

See also
SetActive()

Reimplemented from SpecialFX.

42 {
43  return !TestAFlag(A_TONEOP_DISABLED);
44 }
bool TestAFlag(DWORD mask) const
Tests one or more bits in the Animatable flags.
Definition: Animatable.h:312
#define A_TONEOP_DISABLED
The exposure control is disabled.
Definition: AnimatableFlags.h:62

◆ SetActive()

void SetActive ( bool  active,
TimeValue  t 
)
inlinevirtual

This method indicates whether the tone operator is active.

Remarks
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
activeA boolean indicating if the tone operator is active.
tThe time at which the active check is made.
49  {
50  if (active ^ (TestAFlag(A_TONEOP_DISABLED) == 0)) {
51  if (active) {
53  }
54  else {
56  }
58  }
59 }
void SetAFlag(DWORD mask)
Definition: Animatable.h:299
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.
#define REFMSG_CHANGE
Sent to dependents of a ReferenceTarget that has changed in some way.
Definition: ref.h:251
const PartID PART_ALL
Combination of ALL_CHANNELS and PART_TM.
Definition: ref.h:92
#define FOREVER
Definition: interval.h:168

◆ GetProcessBackground()

bool GetProcessBackground ( ) const
inline

Returns the state of A_TONEOP_PROCESS_BG, indicating whether the ToneOperator will be processing the background.

74 {
75  return TestAFlag(A_TONEOP_PROCESS_BG) != 0;
76 }

◆ SetProcessBackground()

void SetProcessBackground ( bool  active)
inline

This method allows you to set A_TONEOP_PROCESS_BG.

Parameters
activeTRUE to activate, FALSE to deactivate.
61  {
62  if (active ^ (TestAFlag(A_TONEOP_PROCESS_BG) != 0)) {
63  if (active) {
65  }
66  else {
68  }
70  }
71 }

◆ GetIndirectOnly()

bool GetIndirectOnly ( ) const
inline

Returns whether tone mapping should apply to indirect lighting only.

91 {
92  return TestAFlag(A_TONEOP_INDIRECT_ONLY) != 0;
93 }
#define A_TONEOP_INDIRECT_ONLY
Only processes indirect lights only.
Definition: AnimatableFlags.h:66

◆ SetIndirectOnly()

void SetIndirectOnly ( bool  active)
inline

Sets whether tone mapping should apply to indirect lighting only.

78  {
79  if (active ^ (TestAFlag(A_TONEOP_INDIRECT_ONLY) != 0)) {
80  if (active) {
82  }
83  else {
85  }
87  }
88 }

◆ CreateParamDialog()

ToneOpParamDlg * CreateParamDialog ( IRendParams ip)
inlinevirtual

Put up a modal dialog that lets the user edit the plug-ins parameters.

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
ipPoints to the render parameter dialog interface. You may call the methods of that class using this pointer.
Returns
Pointer to the tone operator dialog.

Reimplemented from SpecialFX.

125 {
126  return nullptr;
127 }

◆ SetDlgThing()

BOOL SetDlgThing ( ToneOpParamDlg dlg)
inlinevirtual

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. Return TRUE if you process the dialog, false otherwise.

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
dlgPoints tot he tone operator dialog.
Returns
Return TRUE if you process the dialog, FALSE otherwise.

Reimplemented from SpecialFX.

130 {
131  return FALSE;
132 }

◆ Update() [1/2]

virtual void Update ( const TimeValue  t,
INode *const  cameraNode,
const IPoint2 renderResolution,
const float  pixelAspectRatio,
Interval validity 
)
pure virtual

Initializes the tone operator at the given time, and with the given camera & view options.

This method needs to be called before any ToneOperator functionality is used - for example, before ScaledToRGB() is called. It enables the ToneOperator to initialize itself with the given view parameters, as well as cache data which would be costly to compute for every pixel. Using the tone operator without previously calling this method will result in incorrect tone mapping: the parameters being used may not be updated for the correct time or camera.

Parameters
tThe time at which the tone operator is to be evaluated.
cameraNodeThe camera node being used for rendering. The tone operator is free to affect the tone mapping process based on the camera parameters.
renderResolutionThe resolution being rendered, used to determine the position in raster space when calling ScaleToRGB().
pixelAspectRatioThe pixel aspect ratio, which can be used to derive an image aspect ratio.
[in,out]validityThe validity of the parameters which were evaluated by the call.

◆ Update() [2/2]

virtual void Update ( TimeValue  t,
Interval valid 
)
pure virtual

Initializes the tone operator at the given time, but without any information w.r.t.

the view and camera. Consequently, some features may not be available.

Instead, whenever possible, use: virtual void Update(const TimeValue t, INode* const cameraNode, const IPoint2& renderResolution, const float pixelAspectRatio, Interval& validity)

Reimplemented from SpecialFX.

◆ BuildMaps()

bool BuildMaps ( TimeValue  t,
RenderMapsContext rmc 
)
inlinevirtual

This method is called for the operator to do any work it needs to do prior to rendering.

Rendering using the RenderMapsContext uses the identity tone operator.

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
tThe time at which the rendering is taking place.
rmcThe 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.
116 {
117  return true;
118 }

◆ SubRenderSample()

void SubRenderSample ( float  energy[3])
inlinevirtual

This method is called during subrenders to give the tone operator a chance to sample the image with full dynamic range.

If your operator needs to sample the image, you can set a flag so you know when you are sampling.

121 {
122 }

◆ ScaledToRGB() [1/4]

virtual void ScaledToRGB ( float  energy[3],
const Point2 xyCoord 
) const
pure virtual

Scales a value from physical space to RGB space.

Rendered images, as directly output by renderers, will store values in physical units (candelas per meter-squared) which must be transformed into RGB space before they can be viewed on a monitor. This method performs this transformation.

Parameters
[in,out]energyThe physical RGB value, which gets converted in-place into an RGB value.
xyCoordThe x/y coordinate of the pixel being scaled, the valid range being [0, renderResolution] (renderResolution having been passed to Update()).

◆ ScaledToRGB() [2/4]

virtual float ScaledToRGB ( float  energy,
const Point2 xyCoord 
) const
pure virtual

Scales a grayscale value from physical space to RGB space.

See also
void ScaledToRGB(energy[3], xyCoord) const
Parameters
[in,out]energyThe physical RGB grayscale value, which gets converted in-place into an RGB grayscale value.
xyCoordThe x/y coordinate of the pixel being scaled, the valid range being [0, renderResolution] (renderResolution having been passed to Update()).

◆ ScaledToRGB() [3/4]

virtual void ScaledToRGB ( float  color[3]) const
pure virtual

Equivalent of virtual void ScaledToRGB(float energy[3], const Point2& xyCoord) const, but without any support for view-dependent tone mapping.

◆ ScaledToRGB() [4/4]

virtual float ScaledToRGB ( float  energy) const
pure virtual

Equivalent of virtual void ScaledToRGB(float energy, const Point2& xyCoord) const, but without any support for view-dependent tone mapping.

◆ GetPhysicalUnit()

virtual float GetPhysicalUnit ( TimeValue  t,
Interval valid 
) const
pure virtual

For a full description of the physical scale, see the details description for class ToneOperator.

Parameters
tThe time at which to fetch the phyisical scale.
validThe validity of the physical scale value is intersected into this interval.

◆ SetPhysicalUnit()

virtual void SetPhysicalUnit ( float  value,
TimeValue  t 
)
pure virtual

Sets the physical scale to be used when rendering.

For a full description of the physical scale, see the details description for class ToneOperator.

Parameters
valueThe new physical scale.
tThe time at which to set the new physical scale.

◆ ScalePhysical() [1/2]

virtual void ScalePhysical ( float  energy[3]) const
pure virtual

Scale physical values so they can be used in the renderer.

The first version of the method converts a color value and the second converts a monochrome value. The converted color value is stored in energy. The converted monochrome value is returned. This method assumes that Update has been called to cache the various values needed by the tone operator. 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. The red, green and blue components are stored in that order in the array.

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
energyThe input and output (converted) color value. The colors are stored as red=energy[0], green=energy[1], and blue=energy[2].

◆ ScalePhysical() [2/2]

virtual float ScalePhysical ( float  energy) const
pure virtual

Grayscale version of virtual void ScalePhysical(float energy[3]) const.

◆ ScaleRGB() [1/2]

virtual void ScaleRGB ( float  color[3]) const
pure virtual

Scale RGB values, just supplied to invert ScalePhysical.

The first version of the method converts a color value and the second converts a monochrome value. The converted color value is stored in energy. The converted monochrome value is returned. This method assumes that Update has been called to cache the various values needed by the tone operator. 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. The red, green and blue components are stored in that order in the array.

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

◆ ScaleRGB() [2/2]

virtual float ScaleRGB ( float  color) const
pure virtual

Grayscale version of virtual void ScaleRGB(float color[3]) const.

◆ CanInvert()

virtual bool CanInvert ( ) const
pure virtual

Returns whether this ToneOperator supports the inversion functions.

The inversion functions enable a ToneOperator to convert an RGB value back into physical units. This is especially useful for inverse tone-mapping the background map, should it not be affected by the tone operator.

◆ InverseMap() [1/4]

virtual void InverseMap ( float  rgb[3],
const Point2 xyCoord 
) const
pure virtual

Convers an RGB value back into physical space.

This is effectively the inverse of ScaledToRGB().

Remarks
The ToneOperator must be initialized with Update() before this may be called.

◆ InverseMap() [2/4]

virtual float InverseMap ( float  rgb,
const Point2 xyCoord 
) const
pure virtual

Convers an RGB value back into physical space.

This is effectively the inverse of ScaledToRGB().

Remarks
The ToneOperator must be initialized with Update() before this may be called.

◆ InverseMap() [3/4]

virtual void InverseMap ( float  rgb[3]) const
pure virtual

Equivalent of virtual void InverseMap(float rgb[3], const Point2& xyCoord) const, but without any support for view-dependent tone mapping.

◆ InverseMap() [4/4]

virtual float InverseMap ( float  rgb) const
pure virtual

Equivalent of virtual void InverseMap(float rgb, const Point2& xyCoord) const, but without any support for view-dependent tone mapping.

◆ RGBToScaled() [1/4]

void RGBToScaled ( float  energy[3],
const Point2 xyCoord 
) const
inline

Alias for InverseMap()

96 {
97  InverseMap(energy, xyCoord);
98 }
virtual void InverseMap(float rgb[3], const Point2 &xyCoord) const =0
Convers an RGB value back into physical space.

◆ RGBToScaled() [2/4]

float RGBToScaled ( float  energy,
const Point2 xyCoord 
) const
inline

Alias for InverseMap()

101 {
102  return InverseMap(energy, xyCoord);
103 }

◆ RGBToScaled() [3/4]

void RGBToScaled ( float  energy[3]) const
inline

Alias for InverseMap()

106 {
107  InverseMap(energy);
108 }

◆ RGBToScaled() [4/4]

float RGBToScaled ( float  energy) const
inline

Alias for InverseMap()

111 {
112  return InverseMap(energy);
113 }

◆ AllocateThreadedProcessor()

virtual const ThreadedProcessor* AllocateThreadedProcessor ( ) const
pure virtual

Allocates an interface which enables processing of the tone operator from arbitrary (or multiple) threads.

Returns
A pointer to a newly allocated interface which is then owned exclusively by the caller. The caller is responsible for deleting the pointer once done. May return null if the tone operator doesn't implement support for the ThreadedProcessor interface, in which case the tone operator must be processed from the main thread, using ToneOperator::ScaledToRGB().
Remarks
This method may only be called from the main thread - as every other method in in this class.
The tone operator must be updated using ToneOperator::Update() before calling this method. The processor to be returned will reflect the parameter values setup by the last call to Update().