IPFAction.h

Module description

Functions

virtual bool Init (IObject *pCont, Object *pSystem, INode *node, Tab< Object * > &actions, Tab< INode * > &actionNodes)=0
 Returns true if the operation has been proceeded successfully. More...
 
virtual bool Release (IObject *pCont)=0
 See Init(). More...
 
virtual const ParticleChannelMaskChannelsUsed (const Interval &time) const =0
 See Init(). More...
 
PFExport void ChannelsUsed (const Interval &time, FPValue *channels) const
 "Function publishing" alternative for ChannelsUsed method. More...
 
virtual const Interval ActivityInterval () const =0
 Casting the FPValue->ptr parameter to Tab<Interface_ID>* as in PFExport void ChannelsUsed(...); an Action may have a time interval when the Action is active. More...
 
virtual bool IsFertile () const
 Birth Action is a special type of actions since it can create particles from scratch. More...
 
virtual bool IsNonExecutable () const
 There is a special case of non-executable actions. More...
 
virtual bool Has3dIcon () const
 An action may have 3d icon representation in viewport. More...
 
virtual int IsColorCoordinated () const
 If an operator/test has a 3D icon the icon can be automatically color matched to the color of the display operator in the same event. More...
 
virtual bool SupportRand () const =0
 An Action may carry some chaos/unpredictibility in its processing. More...
 
virtual int GetRand ()=0
 For chaos/unpredictibility action, gets rand value. More...
 
virtual void SetRand (int seed)=0
 For chaos/unpredictibility action, sets rand value. More...
 
PFExport int NewRand ()
 For chaos/unpredictibility action, sets and returns new rand value. More...
 
static PFExport int NewRand (IParamBlock2 *pblock, ParamID randomSeedParamID)
 Alternative for PFExport int NewRand(); but not in FnPub interface. More...
 
virtual bool IsMaterialHolder () const
 If the Action may potentically change particle material, then return true. More...
 
virtual MtlGetMaterial ()
 Returns a material for particles. More...
 
virtual bool SetMaterial (Mtl *mtl)
 Return true if material was set successfully. More...
 
virtual bool SupportScriptWiring () const
 An Action may have parameters controlled by script channels. More...
 
virtual bool GetUseScriptWiring () const
 Supports script wiring. More...
 
virtual void SetUseScriptWiring (bool useScriptWiring)
 Supports script wiring. More...
 
virtual bool IsEmitterTMDependent () const
 An Action may or may not be dependent on the particle system emitter. More...
 
virtual bool IsEmitterPropDependent () const
 Checks the props category for dependency. More...
 
virtual IObjectGetCurrentState (IObject *pContainer)
 Returns action state (see IPFActionState.h for details). More...
 
virtual void SetCurrentState (IObject *actionState, IObject *pContainer)
 Sets the state of the action to the given state. More...
 
FPInterfaceDescGetDesc ()
 

Function Documentation

bool Init ( IObject pCont,
Object pSystem,
INode node,
Tab< Object * > &  actions,
Tab< INode * > &  actionNodes 
)
pure virtual

Returns true if the operation has been proceeded successfully.

The method is called when the ActionList is established the first time, when there is a first particle that enters the ActionList and there is a need to proceed particles. /param pCont: particle container with particle data /param pSystem: the particle system that generates the particle stream; the same operator may get calls from different particle systems; if the result varies according to the particle system that generates particles, then this parameter is useful. /param pNode: INode of the particle system that generates the particles. /param actions: Tab<Object*> of Actions in the current ActionList. The stack will be used to proceed particles. The stack is mutable: an Action may change the stack (to remove or add some Actions) to fine-tune the order of execution or add some extra actions. The next parameter should sync with the mutation. /param actionNodes: Tab<INode*> of action nodes.

Implemented in PFSimpleAction.

bool Release ( IObject pCont)
pure virtual

See Init().

Implemented in PFSimpleAction.

const ParticleChannelMask & ChannelsUsed ( const Interval time) const
pure virtual

See Init().

Implemented in PFSimpleAction.

PFExport void ChannelsUsed ( const Interval time,
FPValue channels 
) const

"Function publishing" alternative for ChannelsUsed method.

Reserved for future use.

const Interval ActivityInterval ( ) const
pure virtual

Casting the FPValue->ptr parameter to Tab<Interface_ID>* as in PFExport void ChannelsUsed(...); an Action may have a time interval when the Action is active.

Outside this interval the Action does nothing, therefore there is no need to proceed particles outside the activity interval.

Implemented in PFSimpleAction.

bool IsFertile ( ) const
inlinevirtual

Birth Action is a special type of actions since it can create particles from scratch.

All other type of actions proceed existing particles. Only Action that can create absolutely new particles (if number of particles in the container is zero) should override this method returning true.

135 { return false; }
bool IsNonExecutable ( ) const
inlinevirtual

There is a special case of non-executable actions.

They are present in the action schematics but don't affect the particle behavior. Example: Comments operator

141 { return false; }
bool Has3dIcon ( ) const
inlinevirtual

An action may have 3d icon representation in viewport.

The 3d icon can be used as a reference for some of the action parameters.

147 { return false; }
int IsColorCoordinated ( ) const
inlinevirtual

If an operator/test has a 3D icon the icon can be automatically color matched to the color of the display operator in the same event.

For the automatic color match the operator/test should return 1 in this method. If returns 0 then the action gets the default color for operator/test. If returns -1 then the action doesn't need any color coordination from Particle Flow.

156 { return -1; }
bool SupportRand ( ) const
pure virtual

An Action may carry some chaos/unpredictibility in its processing.

This method supports chaos randomness.

Implemented in PFSimpleAction.

virtual int GetRand ( )
pure virtual

For chaos/unpredictibility action, gets rand value.

Implemented in PFSimpleAction.

void SetRand ( int  seed)
pure virtual

For chaos/unpredictibility action, sets rand value.

Implemented in PFSimpleAction.

PFExport int NewRand ( )

For chaos/unpredictibility action, sets and returns new rand value.

PFExport static int NewRand ( IParamBlock2 pblock,
ParamID  randomSeedParamID 
)
static

Alternative for PFExport int NewRand(); but not in FnPub interface.

bool IsMaterialHolder ( ) const
inlinevirtual

If the Action may potentically change particle material, then return true.

187 { return false; }
Mtl * GetMaterial ( )
inlinevirtual

Returns a material for particles.

192 { return NULL; }
#define NULL
Definition: autoptr.h:18
bool SetMaterial ( Mtl mtl)
inlinevirtual

Return true if material was set successfully.

198 { return false; }
bool SupportScriptWiring ( ) const
inlinevirtual

An Action may have parameters controlled by script channels.

How the script wiring is set up is controlled by a separate rollup with script-wiring pblock. The rollup is visible if "Use Script Wiring" option in the right-click menu is set to ON. The option is visible only for actions that support script wiring.

207 { return false; }
bool GetUseScriptWiring ( ) const
inlinevirtual

Supports script wiring.

See SupportScriptWiring().

212 { return false; }
void SetUseScriptWiring ( bool  useScriptWiring)
inlinevirtual

Supports script wiring.

See SupportScriptWiring().

217 { ; }
bool IsEmitterTMDependent ( ) const
inlinevirtual

An Action may or may not be dependent on the particle system emitter.

When the emitter is invalidated, a particle group has to decide if it needs to invalidate itself. To make the decision, the group checks all the actions if any of them are dependent on the emitter change. There are two categories of dependency: the transformation matrix of the emitter (TM), and object parameters of the emitter (props). This method checks the TM category.

227 { return false; }
bool IsEmitterPropDependent ( ) const
inlinevirtual

Checks the props category for dependency.

See IsEmitterTMDependent().

232 { return false; }
IObject * GetCurrentState ( IObject pContainer)
inlinevirtual

Returns action state (see IPFActionState.h for details).

You have to delete the IObject by DeleteIObject method when the state is no longer needed.

Reimplemented in PFSimpleAction.

239 { return NULL; }
#define NULL
Definition: autoptr.h:18
void SetCurrentState ( IObject actionState,
IObject pContainer 
)
inlinevirtual

Sets the state of the action to the given state.

Reimplemented in PFSimpleAction.

244 { ; }
FPInterfaceDesc * GetDesc ( )
inlinevirtual
Remarks
Returns a pointer to the class which contains the interface metadata.

Implements FPInterface.

249 { return GetDescByID(PFACTION_INTERFACE); }
#define PFACTION_INTERFACE
Definition: IPFAction.h:25
virtual FPInterfaceDesc * GetDescByID(Interface_ID id)
Definition: ifnpub.h:613