IPFSystem.h

IPFSystem.h

Module description

Enumerations

enum  {
  kEmitterType_none = -1, kEmitterType_rectangle = 0, kEmitterType_circle, kEmitterType_box,
  kEmitterType_sphere, kEmitterType_mesh
}
 
enum  { kPFUpdateType_complete, kPFUpdateType_forward }
 

Functions

virtual float GetMultiplier (TimeValue time)=0
 Returns multiplier coefficient to generate particles. More...
 
virtual int GetBornAllowance ()=0
 Returns number of particles allowed to be generated at current time. More...
 
virtual bool HasEmitter ()
 PF System has an icon that can be used as an emitter for particles. More...
 
virtual int GetEmitterType (TimeValue time)
 
virtual void GetEmitterDimensions (TimeValue time, Tab< float > &dimensions)
 Returns spacial dimensions of the emitter icon. More...
 
virtual MeshGetEmitterGeometry (TimeValue time)
 Returns emitter geometry in form of mesh. More...
 
virtual bool IsEmitterGeometryAnimated ()
 If the emitter mesh is geometry-animated, return "true" in the following method. More...
 
virtual void SetRenderState (bool renderState=true)=0
 PF System has two states: render and viewport. More...
 
virtual bool IsRenderState () const =0
 Works with SetRenderState. More...
 
virtual TimeValue GetIntegrationStep () const =0
 PF System has an integration step parameter that defines granularity in proceeding particles in time. More...
 
virtual int GetUpdateType () const
 PF system has different modes for update. More...
 
virtual int NumParticlesSelected () const
 PF system may select sub-components. More...
 
virtual int GetSelectedParticleID (int i) const
 Returns born ID of the i-th selected particle. More...
 
virtual bool IsParticleSelected (int id) const
 Verifies if a particle with the given born ID is selected or not. More...
 
virtual int NumActionListsSelected () const
 Returns amount of selected action lists. More...
 
virtual INodeGetSelectedActionList (int i) const
 Returns node of the i-th selected action list. More...
 
virtual bool IsActionListSelected (INode *inode) const
 Verifies if an action list is selected or not. More...
 
virtual bool IsRunningScript () const
 Returns true if the particle system is in the process of runnint Every Step or Final Step scripts. More...
 
virtual bool IsCopyClone () const
 For internal use. More...
 
virtual void ResetCopyClone ()
 Works with IsCopyClone. More...
 
FPInterfaceDescGetDesc ()
 

Enumeration Type Documentation

anonymous enum
Enumerator
kEmitterType_none 
kEmitterType_rectangle 
kEmitterType_circle 
kEmitterType_box 
kEmitterType_sphere 
kEmitterType_mesh 
111  { kEmitterType_none = -1,
117  };
Definition: IPFSystem.h:112
Definition: IPFSystem.h:114
Definition: IPFSystem.h:115
Definition: IPFSystem.h:113
Definition: IPFSystem.h:111
Definition: IPFSystem.h:116
anonymous enum
Enumerator
kPFUpdateType_complete 
kPFUpdateType_forward 

Function Documentation

float GetMultiplier ( TimeValue  time)
pure virtual

Returns multiplier coefficient to generate particles.

Value 1.0f means that an operator produces particles at 100% rate. Value 0.5f means that an operator produces only half of particles that it supposed to be generating, i.e. if a Birth operator is set to produce 1000 particles total, then under multiplier = 0.5f the operator produces only 500 particles.

int GetBornAllowance ( )
pure virtual

Returns number of particles allowed to be generated at current time.

Particle system has an upper limit of a total number of particles in the system. At each moment of time particle system is able to calculate the current number of particle in the system and how many particles are allowed to be generated to not exceed the limit threshold. Birth and Spawn Operators use this method to find out how many particles they are allowed to generate.

bool HasEmitter ( )
inlinevirtual

PF System has an icon that can be used as an emitter for particles.

For Operators to use the icon as an emitter the following five methods should be supported. If PF System doesn't support emitter icon then it returns "false" in the first method. The default implementation of the following five methods is if PF System doesn't support icon emission.

109 { return false; }
int GetEmitterType ( TimeValue  time)
inlinevirtual
123 { return kEmitterType_none; }
Definition: IPFSystem.h:111
void GetEmitterDimensions ( TimeValue  time,
Tab< float > &  dimensions 
)
inlinevirtual

Returns spacial dimensions of the emitter icon.

It may have less or more than three as emitter type requires. For example, sphere emitter type has only one dimension.

129 { }
Mesh * GetEmitterGeometry ( TimeValue  time)
inlinevirtual

Returns emitter geometry in form of mesh.

134 { return NULL; }
#define NULL
Definition: autoptr.h:18
bool IsEmitterGeometryAnimated ( )
inlinevirtual

If the emitter mesh is geometry-animated, return "true" in the following method.

139 { return false; }
void SetRenderState ( bool  renderState = true)
pure virtual

PF System has two states: render and viewport.

At any given moment PF System is exclusively in one state or the other. PF System may have different parameters during render and viewport (i.e. Multiplier value, or emitter geometry etc.) therefore it's important to know what state the PF System is in. It's also possible to alterate the state of PF System. PF System alterates its state automatically when the rendering starts and when the rendering ends.

bool IsRenderState ( ) const
pure virtual

Works with SetRenderState.

TimeValue GetIntegrationStep ( ) const
pure virtual

PF System has an integration step parameter that defines granularity in proceeding particles in time.

An PF System may have different integration steps for viewports and for render.

int GetUpdateType ( ) const
inlinevirtual

PF system has different modes for update.

Forward mode: particles aren't updated right away. At playback time the particle history is not recalculated. Only new events that will happen with the particles have new settings Complete mode: the whole particle animation is recalculated.

170 { return GetPFUpdateType(); } // uses global UpdateType method from IPViewManager
PFExport int GetPFUpdateType()
int NumParticlesSelected ( ) const
inlinevirtual

PF system may select sub-components.

There are two types of sub-components: particles and action lists. Returns amount of selected particles.

176 { return 0; }
int GetSelectedParticleID ( int  i) const
inlinevirtual

Returns born ID of the i-th selected particle.

181 { return 0; }
bool IsParticleSelected ( int  id) const
inlinevirtual

Verifies if a particle with the given born ID is selected or not.

186 { return false; }
int NumActionListsSelected ( ) const
inlinevirtual

Returns amount of selected action lists.

191 { return 0; }
INode * GetSelectedActionList ( int  i) const
inlinevirtual

Returns node of the i-th selected action list.

196 { return NULL; }
#define NULL
Definition: autoptr.h:18
bool IsActionListSelected ( INode inode) const
inlinevirtual

Verifies if an action list is selected or not.

201 { return false; }
bool IsRunningScript ( ) const
inlinevirtual

Returns true if the particle system is in the process of runnint Every Step or Final Step scripts.

206 { return false; }
bool IsCopyClone ( ) const
inlinevirtual

For internal use.

211 { return true; }
void ResetCopyClone ( )
inlinevirtual

Works with IsCopyClone.

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

Implements FPInterface.

221 { return GetDescByID(PFSYSTEM_INTERFACE); }
#define PFSYSTEM_INTERFACE
Definition: IPFSystem.h:25
virtual FPInterfaceDesc * GetDescByID(Interface_ID id)
Definition: ifnpub.h:613