IPFAction.h
 
 
 
IPFAction.h

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.
virtual bool  Release (IObject *pCont)=0
  See Init().
virtual const ParticleChannelMask ChannelsUsed (const Interval &time) const =0
  See Init().
PFExport void  ChannelsUsed (const Interval &time, FPValue *channels) const
  "Function publishing" alternative for ChannelsUsed method.
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.
virtual bool  IsFertile () const
  Birth Action is a special type of actions since it can create particles from scratch.
virtual bool  IsNonExecutable () const
  There is a special case of non-executable actions.
virtual bool  Has3dIcon () const
  An action may have 3d icon representation in viewport.
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.
virtual bool  SupportRand () const =0
  An Action may carry some chaos/unpredictibility in its processing.
virtual int  GetRand ()=0
  For chaos/unpredictibility action, gets rand value.
virtual void  SetRand (int seed)=0
  For chaos/unpredictibility action, sets rand value.
PFExport int  NewRand ()
  For chaos/unpredictibility action, sets and returns new rand value.
static PFExport int  NewRand (IParamBlock2 *pblock, ParamID randomSeedParamID)
  Alternative for PFExport int NewRand(); but not in FnPub interface.
virtual bool  IsMaterialHolder () const
  If the Action may potentically change particle material, then return true.
virtual Mtl GetMaterial ()
  Returns a material for particles.
virtual bool  SetMaterial (Mtl *mtl)
  Return true if material was set successfully.
virtual bool  SupportScriptWiring () const
  An Action may have parameters controlled by script channels.
virtual bool  GetUseScriptWiring () const
  Supports script wiring.
virtual void  SetUseScriptWiring (bool useScriptWiring)
  Supports script wiring.
virtual bool  IsEmitterTMDependent () const
  An Action may or may not be dependent on the particle system emitter.
virtual bool  IsEmitterPropDependent () const
  Checks the props category for dependency.
virtual IObject GetCurrentState (IObject *pContainer)
  Returns action state (see IPFActionState.h for details).
virtual void  SetCurrentState (IObject *actionState, IObject *pContainer)
  Sets the state of the action to the given state.
FPInterfaceDesc GetDesc ()
virtual bool  IsMaterialHolder () const
  If the ActionList has an associated material (either via material inheritance or from any actions at the action list, then return true.
virtual bool  InheritsMaterial () const
  Defines whether this action list depends on the upstream action lists to generate its material.
virtual bool  GenerateInheritedMaterial (void)
  Generates material as defined by inheritance.
virtual Mtl GetMaterial ()
  Returns a material for particles.
virtual bool  SetMaterial (Mtl *mtl)
  Return true if material was set successfully.
virtual int  GetMaterialPriority (void) const
  Returns material priority number.
virtual int  GetStreamDepth (void) const
  Returns stream depth index - shortest distance to pf source up stream.
virtual void  SetStreamDepth (int streamDepth)
  Sets stream depth index - shortest distance to pf source up stream.
virtual INodeTab UpStreamActionLists (void)=0
  Returns Tab of up-stream action list nodes (for read and write)
virtual INodeTab UpStreamMaterialActionLists (void)=0
  Returns Tab of up-stream action list nodes that are relevant for material inheritance re-generation (for read and write)
virtual void  SetVisited (bool visited)
  The method is used to implemented Visitor pattern in the actionList graph.
virtual bool  IsVisited (void) const
  The method is used to implemented Visitor pattern in the actionList graph.
virtual void  SetSortOrder (int index)
  The method is used to sort action lists to resolve material dependency for inheritance.
virtual int  GetSortOrder (void) const
  The method is used to sort action lists to resolve material dependency for inheritance.
virtual bool  UpdateMaterial (bool doReport)
  Returns whether the event material was updated.
virtual int  UpdateMaterials (bool doReport)
  Returns number of actionLists/events with materials updated.
virtual int  UpdateMaterialsDownstream (bool doReport)
  Returns number of actionLists/events with materials updated.
FPInterfaceDesc GetDesc ()

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]
const ParticleChannelMask & ChannelsUsed ( const Interval time ) const [pure virtual]
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 [inline, virtual]

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.

{ return false; }
bool IsNonExecutable ( ) const [inline, virtual]

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

{ return false; }
bool Has3dIcon ( ) const [inline, virtual]

An action may have 3d icon representation in viewport.

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

{ return false; }
int IsColorCoordinated ( ) const [inline, virtual]

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.

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

Reimplemented in PFSimpleAction.

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

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

bool IsMaterialHolder ( ) const [inline, virtual]

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

{ return false; }
Mtl * GetMaterial ( ) [inline, virtual]

Returns a material for particles.

{ return NULL; }
bool SetMaterial ( Mtl mtl ) [inline, virtual]

Return true if material was set successfully.

{ return false; }
bool SupportScriptWiring ( ) const [inline, virtual]

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.

{ return false; }
bool GetUseScriptWiring ( ) const [inline, virtual]

Supports script wiring.

See SupportScriptWiring().

{ return false; }
void SetUseScriptWiring ( bool  useScriptWiring ) [inline, virtual]

Supports script wiring.

See SupportScriptWiring().

{ ; }
bool IsEmitterTMDependent ( ) const [inline, virtual]

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.

{ return false; }
bool IsEmitterPropDependent ( ) const [inline, virtual]

Checks the props category for dependency.

See IsEmitterTMDependent().

{ return false; }
IObject * GetCurrentState ( IObject pContainer ) [inline, virtual]

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.

{ return NULL; }
void SetCurrentState ( IObject actionState,
IObject pContainer 
) [inline, virtual]

Sets the state of the action to the given state.

Reimplemented in PFSimpleAction.

{ ; }
FPInterfaceDesc * GetDesc ( ) [inline, virtual]
Remarks:
Returns a pointer to the class which contains the interface metadata.

Implements FPInterface.

bool IsMaterialHolder ( ) const [inline, virtual]

If the ActionList has an associated material (either via material inheritance or from any actions at the action list, then return true.

{ return false; }
bool InheritsMaterial ( ) const [inline, virtual]

Defines whether this action list depends on the upstream action lists to generate its material.

If the action list has an operator with a material, and it does not inherit material then it returns false

{ return false; }
bool GenerateInheritedMaterial ( void  ) [inline, virtual]

Generates material as defined by inheritance.

{ return false; }
Mtl * GetMaterial ( ) [inline, virtual]

Returns a material for particles.

{ return NULL; }
bool SetMaterial ( Mtl mtl ) [inline, virtual]

Return true if material was set successfully.

{  UNUSED_PARAM(mtl); return false; }
virtual int GetMaterialPriority ( void  ) const [inline, virtual]

Returns material priority number.

The priority is used when defining material inheritance, for example material inheritance can be defined by inheriting material with highest (largest) priority.

{ return 0; }
virtual int GetStreamDepth ( void  ) const [inline, virtual]

Returns stream depth index - shortest distance to pf source up stream.

{ return 0; }
void SetStreamDepth ( int  streamDepth ) [inline, virtual]

Sets stream depth index - shortest distance to pf source up stream.

{  UNUSED_PARAM(streamDepth); }
INodeTab & UpStreamActionLists ( void  ) [pure virtual]

Returns Tab of up-stream action list nodes (for read and write)

INodeTab & UpStreamMaterialActionLists ( void  ) [pure virtual]

Returns Tab of up-stream action list nodes that are relevant for material inheritance re-generation (for read and write)

void SetVisited ( bool  visited ) [inline, virtual]

The method is used to implemented Visitor pattern in the actionList graph.

{  UNUSED_PARAM(visited); }
bool IsVisited ( void  ) const [inline, virtual]

The method is used to implemented Visitor pattern in the actionList graph.

{ return false; }
void SetSortOrder ( int  index ) [inline, virtual]

The method is used to sort action lists to resolve material dependency for inheritance.

{  UNUSED_PARAM(index); }
int GetSortOrder ( void  ) const [inline, virtual]

The method is used to sort action lists to resolve material dependency for inheritance.

{ return 0; }
virtual bool UpdateMaterial ( bool  doReport ) [inline, virtual]

Returns whether the event material was updated.

{  UNUSED_PARAM(doReport); return 0; }
virtual int UpdateMaterials ( bool  doReport ) [inline, virtual]

Returns number of actionLists/events with materials updated.

{  UNUSED_PARAM(doReport); return 0; }
virtual int UpdateMaterialsDownstream ( bool  doReport ) [inline, virtual]

Returns number of actionLists/events with materials updated.

The functions updates materials in all events in the downstream of the current event; The function does not update material in the current event; use UpdateMaterial function instead for this purpose

{  UNUSED_PARAM(doReport); return 0; }
FPInterfaceDesc * GetDesc ( ) [inline, virtual]
Remarks:
Returns a pointer to the class which contains the interface metadata.

Implements FPInterface.