Public Member Functions | Public Attributes

SpecialFX Class Reference

Search for all occurrences

Detailed Description

See also:
Class ReferenceTarget, Class SFXParamDlg, Class IRendParams, Class Atmospheric, Class Effect, Class AppendGizmoRestore, Class DeleteGizmoRestore.

Description:
This class is available in release 3.0 and later only.

This is the base class for Atmospheric, Renderer Effect, and Shader Plug-Ins. It contains a few methods common to each of those plug-in classes.
Data Members:
MSTR name;

This is the name which appears in Track View.

#include <sfx.h>

Inheritance diagram for SpecialFX:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual MSTR  GetName ()
virtual BOOL  Active (TimeValue t)
virtual void  Update (TimeValue t, Interval &valid)
CoreExport IOResult  Save (ISave *isave)
CoreExport IOResult  Load (ILoad *iload)
virtual SFXParamDlg CreateParamDialog (IRendParams *ip)
virtual BOOL  SetDlgThing (SFXParamDlg *dlg)
virtual int  NumGizmos ()
virtual INode GetGizmo (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 Attributes

MSTR  name

Member Function Documentation

virtual MSTR GetName ( ) [inline, virtual]
Remarks:
This method is used to retrieve the name for the plug-in. This name will appear in the track view and the list of current atmospheric or rendering effects.

Reimplemented in MSPluginSpecialFX< Effect8 >, and MSPluginSpecialFX< Atmospheric >.

{ return _M(""); }      
virtual BOOL Active ( TimeValue  t ) [inline, virtual]
Remarks:
Returns TRUE if the effect is active; otherwise FALSE.
Parameters:
TimeValue t

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

Reimplemented in ToneOperator, MSPluginSpecialFX< Effect8 >, MSPluginSpecialFX< Atmospheric >, MSSpecialFXXtnd< Effect, MSPluginEffect >, and MSSpecialFXXtnd< Atmospheric, MSPluginAtmos >.

{ return !TestAFlag(A_ATMOS_DISABLED); }
virtual void Update ( TimeValue  t,
Interval valid 
) [inline, virtual]
Remarks:
This method is called once per frame when the renderer begins. This gives the atmospheric or rendering effect the chance to cache any values it uses internally so they don't have to be computed on every frame.
Parameters:
TimeValue t

The current time of the call.

Interval& valid

The validity interval of the cache created by the plug-in. The plug-in may set this for its own use. The plug-in can then check if the cache is up to date and update it if not.

Reimplemented in ToneOperator, MSPluginSpecialFX< Effect8 >, MSPluginSpecialFX< Atmospheric >, MSSpecialFXXtnd< Effect, MSPluginEffect >, and MSSpecialFXXtnd< Atmospheric, MSPluginAtmos >.

{ }
CoreExport IOResult Save ( ISave isave ) [virtual]
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 ReferenceMaker.

Reimplemented in RadiosityEffect, IRenderElement, Sampler, Atmospheric, Effect, FilterKernel, BaseShader, ToneOperator, MSPluginSpecialFX< Effect8 >, and MSPluginSpecialFX< Atmospheric >.

CoreExport IOResult Load ( ILoad iload ) [virtual]
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 ReferenceMaker.

Reimplemented in RadiosityEffect, IRenderElement, Sampler, Atmospheric, Effect, FilterKernel, BaseShader, ToneOperator, MSPluginSpecialFX< Effect8 >, and MSPluginSpecialFX< Atmospheric >.

virtual SFXParamDlg* CreateParamDialog ( IRendParams ip ) [inline, virtual]
Remarks:
This method creates and returns a new instance of a class derived from SFXParamDlg to manage the user interface. This put up a modal dialog that lets the user edit the plug-ins parameters.
Parameters:
IRendParams *ip

This is the interface given to the plug-in so it may display its parameters.
Default Implementation:
{ return NULL; }

Reimplemented in RadiosityEffect, IRenderElement, Atmospheric, Effect, FilterKernel, ToneOperator, MSPluginEffect, MSEffectXtnd, MSPluginAtmos, and MSAtmosXtnd.

{ return NULL; }
virtual BOOL SetDlgThing ( SFXParamDlg dlg ) [inline, virtual]
Remarks:
Implement this if you are using the ParamMap2 AUTO_UI system and the effect 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.

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

Points to the ParamDlg.
Returns:
Return TRUE if you process the dialog; otherwise FALSE.
Default Implementation:
{ return FALSE; }

Reimplemented in RadiosityEffect, IRenderElement, Sampler, Atmospheric, Effect, ToneOperator, MSPluginAtmos, and MSAtmosXtnd.

{ return FALSE; }
virtual int NumGizmos ( ) [inline, virtual]
Remarks:
If an atmospheric or rendering effect has references to gizmos or other objects in the scene it can optionally provide access to the object list. This method returns the number of gizmos or objects the plug-in has.
Default Implementation:
{return 0;}

Reimplemented in MSPluginSpecialFX< Effect8 >, MSPluginSpecialFX< Atmospheric >, MSSpecialFXXtnd< Effect, MSPluginEffect >, and MSSpecialFXXtnd< Atmospheric, MSPluginAtmos >.

{ return 0; }
virtual INode* GetGizmo ( int  i ) [inline, virtual]
Remarks:
Returns a pointer to the 'i-th' gizmo or object node.
Parameters:
int i

The index of the gizmo to return.
Default Implementation:
{return NULL;}

Reimplemented in MSPluginSpecialFX< Effect8 >, MSPluginSpecialFX< Atmospheric >, MSSpecialFXXtnd< Effect, MSPluginEffect >, and MSSpecialFXXtnd< Atmospheric, MSPluginAtmos >.

{ return NULL; }
virtual void DeleteGizmo ( int  i ) [inline, virtual]
Remarks:
Deletes the 'i-th' gizmo or object from those used by the plug-in.
Parameters:
int i

The index of the gizmo to delete.
Default Implementation:
{}

Reimplemented in MSPluginSpecialFX< Effect8 >, MSPluginSpecialFX< Atmospheric >, MSSpecialFXXtnd< Effect, MSPluginEffect >, and MSSpecialFXXtnd< Atmospheric, MSPluginAtmos >.

{ }
virtual void AppendGizmo ( INode node ) [inline, virtual]
Remarks:
Adds the specified node to the end of the list of gizmos used by the plug-in.
Parameters:
INode *node

Points to the node to append.
Default Implementation:
{}

Reimplemented in MSPluginSpecialFX< Effect8 >, MSPluginSpecialFX< Atmospheric >, MSSpecialFXXtnd< Effect, MSPluginEffect >, and MSSpecialFXXtnd< Atmospheric, MSPluginAtmos >.

{ }
virtual BOOL OKGizmo ( INode node ) [inline, virtual]
Remarks:
This method is called to approve a node for possible use as gizmo. Return TRUE if the node is okay; otherwise FALSE.
Parameters:
INode *node

The node to check.
Default Implementation:
{ return FALSE; }

Reimplemented in MSPluginSpecialFX< Effect8 >, MSPluginSpecialFX< Atmospheric >, MSSpecialFXXtnd< Effect, MSPluginEffect >, and MSSpecialFXXtnd< Atmospheric, MSPluginAtmos >.

{ return FALSE; } // approve a node for possible use as gizmo
virtual void EditGizmo ( INode node ) [inline, virtual]
Remarks:
This method is called to select the specified gizmo and displays parameters for it (if any).

In the Special Effects section of the light dialog there is a button labelled 'Setup'. The Setup button brings up the Environment dialog (for Atmospherics) or the Render Effects dialog (for Render Effects) and selects the choosen effect. It also selects the "gizmo" within that effect, so if there are particular parameters for each gizmo the user will see them. Pressing that button causes this method to be called.
Parameters:
INode *node

The gizmo node.
Default Implementation:
{}

Reimplemented in MSPluginSpecialFX< Effect8 >, MSPluginSpecialFX< Atmospheric >, MSSpecialFXXtnd< Effect, MSPluginEffect >, and MSSpecialFXXtnd< Atmospheric, MSPluginAtmos >.

{ } // selects this gizmo & displays params for it if any
virtual void InsertGizmo ( int  i,
INode node 
) [inline, virtual]
Remarks:
Inserts the specified gizmo node into the list of gizmos. This method must be defined to use the DeleteGizmoRestore class.
Parameters:
int i

The zero based index of the position in the list of where the insertion should take place.

INode *node

The gizmo node to insert.
Default Implementation:
{ assert(0); }
{ assert(0); } // must be defined to use DeleteGizmoRestore
CoreExport SvGraphNodeReference SvTraverseAnimGraph ( IGraphObjectManager gom,
Animatable owner,
int  id,
DWORD  flags 
) [virtual]
Remarks:
This method is available in release 3.0 and later only.

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

See Class IGraphObjectManager.
Parameters:
gom Points to the schematic view window manager.
owner The owning animatable.
id This is usually the sub-anim number (but can actually be any value the developer chooses).
flags See List of Schematic %View AddAnimatable Flags.
Returns:
A SvGraphNodeReference object.

Reimplemented from Animatable.


Member Data Documentation


SpecialFX SpecialFX SpecialFX SpecialFX SpecialFX SpecialFX SpecialFX SpecialFX SpecialFX SpecialFX
SpecialFX SpecialFX SpecialFX SpecialFX SpecialFX SpecialFX SpecialFX SpecialFX SpecialFX SpecialFX