Particle System interface.
General | |
| virtual void | Reset ()=0 |
| Reset the group. More... | |
| virtual void | Seed (tU32 anSeed)=0 |
| Set the random number generator seed. More... | |
| virtual void | SetMaxNumParticles (tU32 anNum)=0 |
| Set the maximum number of particles. {Property}. More... | |
| virtual tU32 | GetMaxNumParticles () const =0 |
| Get the maximum number of particles. {Property}. More... | |
| virtual tU32 | GetNumParticles () const =0 |
| Get the number of particles currently in the group. (aka active particles) {Property}. More... | |
| virtual void | SetTimeStep (tF32 afTimeStep)=0 |
| Set the timestep. {Property} {Property}. More... | |
| virtual tF32 | GetTimeStep () const =0 |
| Get the timestep. {Property}. More... | |
| virtual void | SetTextureAnimationGrid (const sVec2i &avGridSize)=0 |
| Set the 'grid' size for the animated textures. {Property}. More... | |
| virtual sVec2i | GetTextureAnimationGrid () const =0 |
| Get the 'grid' size for the animated textures. {Property}. More... | |
| virtual tBool | GetData (sParticleSystemData *apData) const =0 |
| Get the particles data pointers. More... | |
Domain | |
| virtual tBool | SetDomainType (eParticleDomain aType)=0 |
| Set the domain's type. {Property}. More... | |
| virtual eParticleDomain | GetDomainType () const =0 |
| Get the domain's type. {Property}. More... | |
| virtual void | SetDomainA (const sVec3f &aV)=0 |
| Set the domain's A vector. {Property}. More... | |
| virtual sVec3f | GetDomainA () const =0 |
| Get the domain's A vector. {Property}. More... | |
| virtual void | SetDomainB (const sVec3f &aV)=0 |
| Set the domain's B vector. {Property}. More... | |
| virtual sVec3f | GetDomainB () const =0 |
| Get the domain's B vector. {Property}. More... | |
| virtual void | SetDomainC (const sVec3f &aV)=0 |
| Set the domain's C vector. {Property}. More... | |
| virtual sVec3f | GetDomainC () const =0 |
| Get the domain's C vector. {Property}. More... | |
| virtual tBool | SetDomainPoint (sVec3f avPoint)=0 |
| Set the domain to a point. More... | |
| virtual tBool | SetDomainLine (sVec3f avStart, sVec3f avEnd)=0 |
| Set the domain to a line. More... | |
| virtual tBool | SetDomainTriangle (sVec3f avA, sVec3f avB, sVec3f avC)=0 |
| Set the domain to a triangle. More... | |
| virtual tBool | SetDomainPlane (sPlanef aPlane)=0 |
| Set the domain to a plane. More... | |
| virtual tBool | SetDomainAABB (sVec3f avMin, sVec3f avMax)=0 |
| Set the domain to a box. More... | |
| virtual tBool | SetDomainSphere (sVec3f avCenter, tF32 afRadius1, tF32 afRadius2)=0 |
| Set the domain to a sphere. More... | |
| virtual tBool | SetDomainCylinder (sVec3f avStart, sVec3f avEnd, tF32 afRadius1, tF32 afRadius2)=0 |
| Set the domain to a cylinder. More... | |
| virtual tBool | SetDomainCone (sVec3f avStart, sVec3f avEnd, tF32 afRadius1, tF32 afRadius2)=0 |
| Set the domain to a cone. More... | |
| virtual tBool | SetDomainBlob (sVec3f avPosition, tF32 afStdDev)=0 |
| Set the domain to a blob. More... | |
| virtual tBool | SetDomainDisk (sVec3f avPosition, sVec3f avNormal, tF32 afRadius1, tF32 afRadius2)=0 |
| Set the domain to a disk. More... | |
| virtual tBool | SetDomainRect (sVec3f avPoint, sVec3f avUBasis, sVec3f avVBasis)=0 |
| Set the domain to a rectangle. More... | |
States | |
| virtual void | Color (sColor4f aColor)=0 |
| Define the color. More... | |
| virtual void | ColorDomain ()=0 |
| Define the color in the current domain. More... | |
| virtual void | AlphaDomain ()=0 |
| Define the alpha in the current domain. More... | |
| virtual void | Size (sVec3f avSize)=0 |
| Define the size. More... | |
| virtual void | SizeDomain ()=0 |
| Define the size in the current domain. More... | |
| virtual void | Mass (tF32 afMass)=0 |
| Define the mass. More... | |
| virtual void | StartingAge (tF32 afAge, tF32 afSigma)=0 |
| Define the starting age. More... | |
| virtual void | UpVector (sVec3f avUp)=0 |
| Define the up vector. More... | |
| virtual void | UpVectorDomain ()=0 |
| Define the up vector in the current domain. More... | |
| virtual void | Velocity (sVec3f avUp)=0 |
| Define the velocity. More... | |
| virtual void | VelocityDomain ()=0 |
| Define the velocity in the current domain. More... | |
| virtual void | RotationVector (sVec3f avUp)=0 |
| Define the rotation vector. More... | |
| virtual void | RotationVectorDomain ()=0 |
| Define the rotation vector in the current domain. More... | |
| virtual void | PositionB (sVec3f avPos)=0 |
| Define the secondary position. More... | |
| virtual void | PositionBDomain ()=0 |
| Define the secondary position in the current domain. More... | |
| virtual void | PositionBTracks (tBool abDoCopy)=0 |
| Specify how the secondary position of each new particle is chosen. Specify how the positionB of each new particle emitted will be chosen. The positionB is the destination position or initial position of particles. See ActionRestore for a use of positionB. If abDoCopy is true then when a particle is created its positionB will be the same as its initial particle position (the default). If abDoCopy is false then when a particle is created its positionB will be chosen from the PositionB domain. More... | |
Actions | |
| virtual void | ActionAvoidDomain (tF32 afMagnitude, tF32 afEpsilon, tF32 afLookAhead)=0 |
| Steer particles away from a domain of space. Particles are tested to see whether they will pass from being outside the specified domain to being inside it within look_ahead time units from now if the next pMove action were to occur now. magnitude tells how drastically the particle velocities are modified to avoid the obstacle at each time step. As with most acceleration actions, the amount of acceleration falls off inversely with r2. But when r is small, the acceleration would be infinite, so epsilon is always added to r. The specific direction and amount of turn is dependent on the kind of domain being avoided. More... | |
| virtual void | ActionBounceDomain (tF32 afFriction, tF32 afResilience, tF32 afCutoff)=0 |
| Bounce particles off a domain of space. Particles are tested to see whether they will pass from being outside the specified domain to being inside it if the next pMove action were to occur now. If they would pass through the surface of the domain, they are instead bounced off it. That is, their velocity vector is decomposed into components normal to the surface and tangent to the surface. The direction of the normal component is reversed, and the components are recomposed into a new velocity heading away from the surface. The normal component is multiplied by the resilience parameter and the tangential component, if its magnitude is greater than cutoff, is multiplied by (1 - the friction parameter) when being composed into the new velocity vector. The cutoff parameter can allow particles to glide smoothly along a surface without sticking. More... | |
| virtual void | ActionCopyVertexB (tBool abCopyPos=eTrue, tBool abCopyVel=eFalse)=0 |
| Set the secondary position from current position. If copy_pos is true, sets the positionB of each particle in the current particle group to be equal to the current position of that particle. This makes each particle "remember" this position so it can later return to it using pRestore. If copy_vel is true, sets the velocityB of each particle in the current particle group to be equal to the current velocity of that particle. This is useful for computing the orientation of the particle when rendering it using pDrawGroupl. More... | |
| virtual void | ActionDamping (sVec3f avDamping, tF32 afVLow=0.0f, tF32 afVHigh=kfParticlesMax)=0 |
| Simulate air by slowing down particle velocities. If a particle's velocity magnitude is within vlow and vhigh, then multiply each component of the velocity by the respective damping constant. Typically, the three components of damping will have the same value. More... | |
| virtual void | ActionRotationDamping (sVec3f avDamping, tF32 afVLow=0.0f, tF32 afVHigh=kfParticlesMax)=0 |
| Rotation damping. More... | |
| virtual void | ActionExplosion (sVec3f avCenter, tF32 afVelocity, tF32 afMagnitude, tF32 afStdev, tF32 afEpsilon=kfParticlesEpsilon, tF32 afAge=0.0f)=0 |
| An Explosion. Causes an explosion by accelerating all particles away from the center. Particles are accelerated away from the center by an amount proportional to magnitude. As with most acceleration actions, the amount of acceleration falls off inversely with r2. But when r is small, the acceleration would be infinite, so epsilon is always added to r. The shock wave of the explosion has a gaussian magnitude. The center of the gaussian travels outward from the center at the specified velocity. So at a given time step, particles at a distance (velocity * age) from center will receive the most acceleration, and particles not at the peak of the shock wave will receive a lesser acceleration. The shock wave has a standard deviation of stdev, which is the sharpness or broadness of the strength of the wave. age is used to calculate the radius of the shock wave. For pExplosion calls in action lists, age is the initial age of the explosion. It is incremented by dt after each call. For immediate mode, age is the current age of the explosion, and it is up to the application to increment the age parameter for each call to pExlosion. More... | |
| virtual void | ActionFollow (tF32 afMagnitude=1.0f, tF32 afEpsilon=kfParticlesEpsilon, tF32 afMaxRadius=kfParticlesMax)=0 |
| Accelerate toward the next particle in the group. This allows snaky effects where the particles follow each other. Each particle is accelerated toward the next particle in the group by an amount proportional to magnitude. As with most acceleration actions, the amount of acceleration falls off inversely with r2. But when r is small, the acceleration would be infinite, so epsilon is always added to r. afMaxRadius defines the sphere of influence of this action. No particle further than afMaxRadius from its predecessor is affected. More... | |
| virtual void | ActionGravitate (tF32 afMagnitude=1.0f, tF32 afEpsilon=kfParticlesEpsilon, tF32 afMaxRadius=kfParticlesMax)=0 |
| Accelerate each particle toward each other particle. Each particle is accelerated toward each other particle in the group by an amount proportional to magnitude. As with most acceleration actions, the amount of acceleration falls off inversely with r2. But when r is small, the acceleration would be infinite, so epsilon is always added to r. afMaxRadius defines the sphere of influence of this action. No particle further than afMaxRadius from another particle is affected. More... | |
| virtual void | ActionGravity (sVec3f avDirection)=0 |
| Accelerate particles in the given direction. The gravity acceleration vector is simply added to the velocity vector of each particle at each time step. The magnitude of the gravity vector is the acceleration due to gravity. For example, pGravity(0, 0, -9.8) specifies gravity in the negative Z direction. More... | |
| virtual void | ActionJet (sVec3f avCenter, tF32 afMagnitude=1.0f, tF32 afEpsilon=kfParticlesEpsilon, tF32 afMaxRadius=kfParticlesMax)=0 |
| Accelerate particles that are near the center of the jet. For each particle, chooses an acceleration vector from the domain and applies it to the particle's velocity. The amount of acceleration applied is directly proportional to magnitude. As with most acceleration actions, the amount of acceleration falls off inversely with r2. But when r is small, the acceleration would be infinite, so epsilon is always added to r. The domain from which acceleration vectors are chosen is the current velocity domain. afMaxRadius defines the sphere of influence of this action. No particle further than afMaxRadius from the center is affected. More... | |
| virtual void | ActionKillOld (tF32 afAgeLimit, tBool abKillLessThan=eFalse)=0 |
| Remove old particles. Removes all particles older than age_limit. But if kill_less_than is true, it instead removes all particles newer than age_limit. age_limit is not clamped, so negative values are ok. This can be used in conjunction with pStartingAge(-n) to create and then kill a particular set of particles. More... | |
| virtual void | ActionMatchVelocity (tF32 afMagnitude=1.0f, tF32 afEpsilon=kfParticlesEpsilon, tF32 afMaxRadius=kfParticlesMax)=0 |
| Modify each particle's velocity to be similar to that of its neighbors. Each particle is accelerated toward the weighted mean of the velocities of other particles in the group by an amount proportional to magnitude. As with most acceleration actions, the amount of acceleration falls off inversely with r2 to the other particles. But when r is small, the acceleration would be infinite, so epsilon is always added to r. Using an epsilon similar in magnitude to magnitude can increase the range of influence of nearby particles on this particle. More... | |
| virtual void | ActionMatchRotVelocity (tF32 afMagnitude=1.0f, tF32 afEpsilon=kfParticlesEpsilon, tF32 afMaxRadius=kfParticlesMax)=0 |
| Modify each particle's rotational velocity to be similar to that of its neighbors. More... | |
| virtual void | ActionMove ()=0 |
| Move particle positions based on velocities. This action actually updates the particle positions by adding the current velocity to the current position. This is typically the last particle action performed in an iteration of a particle simulation, and typically only occurs once per action list. The velocity is multiplied by the time step length, dt, before being added to the position. This implements Euler's method of numerical integration with a constant, but specifiable step size. See pTimeStep for more on varying the step size. More... | |
| virtual void | ActionOrbitLine (sVec3f avPoint, sVec3f avAxis, tF32 afMagnitude=1.0f, tF32 afEpsilon=kfParticlesEpsilon, tF32 afMaxRadius=kfParticlesMax)=0 |
| Accelerate toward the closest point on the given line. p and axis define an infinite line, where p can be any point on the line and axis is any vector parallel to the line. For each particle, this action computes the vector to the closest point on the line, and accelerates the particle in the vector direction. The amount of acceleration applied is directly proportional to magnitude. As with most acceleration actions, the amount of acceleration falls off inversely with r2. But when r is small, the acceleration would be infinite, so epsilon is always added to r. afMaxRadius defines the infinite cylinder of influence of this action. No particle further than afMaxRadius from the line is affected. More... | |
| virtual void | ActionOrbitPoint (sVec3f avCenter, tF32 afMagnitude=1.0f, tF32 afEpsilon=kfParticlesEpsilon, tF32 afMaxRadius=kfParticlesMax)=0 |
| Accelerate toward the given center point. For each particle, this action computes the vector to the center point, and accelerates the particle in the vector direction. The amount of acceleration applied is directly proportional to magnitude. As with most acceleration actions, the amount of acceleration falls off inversely with r2. But when r is small, the acceleration would be infinite, so epsilon is always added to r. afMaxRadius defines the sphere of influence of this action. No particle further than afMaxRadius from the center is affected. More... | |
| virtual void | ActionRandomAccelerationDomain ()=0 |
| Accelerate particles in random directions. For each particle, chooses an acceleration vector from the specified domain and adds it to the particle's velocity. Reducing the time step, dt, will make a higher probability of being near the original velocity after unit time. Smaller dt approach a normal distribution of velocity vectors instead of a square wave distribution. More... | |
| virtual void | ActionRandomDisplaceDomain ()=0 |
| Immediately replace position with a position from the domain. For each particle, chooses a displacement vector from the specified domain and adds it to the particle's position. Reducing the time step, dt, will make a higher probability of being near the original position after unit time. Smaller dt approach a normal distribution of particle positions instead of a square wave distribution. More... | |
| virtual void | ActionRandomVelocityDomain ()=0 |
| Immediately replace velocity with a velocity from the domain. For each particle, sets the particle's velocity vector to a random vector in the specified domain. This function is not affected by dt. If you can think of an appropriate way for this to vary with dt, let me know. More... | |
| virtual void | ActionRandomRotVelocity ()=0 |
| Immediately replace rotation velocity with a velocity from the domain. More... | |
| virtual void | ActionRestore (tF32 afTime, tBool abVel=eTrue, tBool abRVel=eTrue)=0 |
| Over time, restore particles to their secondary positions. Computes a new velocity for each particle that will make the particle arrive at its positionB at the specified amount of time in the future. The curved path that the particles take is a parametric quadratic. Once the specified amount of time has passed, the particles are clamped to their positionB and their velocities are set to 0 to freeze them in place. If pRestore is called in immediate mode, it is the application's responsibility to decrease time_left by dt on each call. When in an action list, time_left gets decremented automatically. The positionB attribute of each particle is typically the particle's position when it was created, or it can be specified within a domain. This is controlled by pVertexBTracks, pVertexB, and pVertexBD. The positionB can be set at any time to the particle's current position using the pCopyVertexB action. More... | |
| virtual void | ActionSinkDomain (tBool abKillInside)=0 |
| Kill particles with positions on wrong side of the specified domain. If kill_inside is true, deletes all particles inside the given domain. If kill_inside is false, deletes all particles outside the given domain. More... | |
| virtual void | ActionSinkVelocityDomain (tBool abKillInside)=0 |
| Kill particles with velocities on wrong side of the specified domain. If kill_inside is true, deletes all particles whose velocity vectors are inside the given domain. If kill_inside is false, deletes all particles whose velocity vectors are outside the given domain. This allows particles to die when they turn around, get too fast or too slow, etc. More... | |
| virtual void | ActionSort (sVec3f avEye, sVec3f avLookAt)=0 |
| Sort the particles relativly to the specified eye and view direction. More... | |
| virtual void | ActionSource (tF32 afParticleRate, const sVec3f &vWordPos, const sVec2i &avTexFrameRange)=0 |
| Add particles in the specified domain. Adds new particles to the current particle group. The particle positions are chosen from the given domain. The particle colors, sizes, initial ages, velocities, and secondary positions are chosen according to their current domains. See pColor, pColorD, pSize, pStartingAge, pVelocity, pVelocityD, pVertexB, pVertexBD, and pVertexBTracks. When pSource is called within an action list, the particle attribute domains used are those that were current when the pSource command was called within the pNewActionList / pEndActionList block instead of when pCallActionList is called. Note that this is unlike OpenGL. particle_rate is the number of particles to add per unit time. If particle_rate / dt is a fraction then pSource adjusts the number of particles to add during this time step so that the average number added per unit time is particle_rate. More... | |
| virtual void | ActionSpeedLimit (tF32 afMinSpeed, tF32 afMaxSpeed=kfParticlesMax)=0 |
| Clamp each particle's speed to the given min and max. Computes each particle's speed (the magnitude of its velocity vector) and if it is less than min_speed or greater than max_speed it is clamped to those bounds, while preserving the velocity vector's direction. More... | |
| virtual void | ActionTargetColor (sColor4f avColor, tF32 afScale)=0 |
| Change color of all particles toward the specified color. Modifies the color and alpha of each particle to be scale percent of the way closer to the specified color and alpha. scale is multiplied by dt before scaling the sizes. Thus, using smaller dt causes a slightly faster approach to the target color. More... | |
| virtual void | ActionTargetSize (sVec3f avSize, sVec3f avScale)=0 |
| Change sizes of all particles toward the specified size. Modifies the size of each particle to be scale percent of the way closer to the specified size triple. This makes sizes grow asymptotically closer to the given size. scale is multiplied by dt before scaling the sizes. Thus, using smaller dt causes a slightly faster approach to the target size. The separate scales for each component allow only selected components to be scaled. More... | |
| virtual void | ActionTargetVelocity (sVec3f avVel, tF32 afScale)=0 |
| Modifies the velocity of each particle to be scale percent of the way closer to the specified velocity triple. This makes velocities grow asymptotically closer to the given velocity. scale is multiplied by dt before scaling the velocities. Thus, using smaller dt causes a slightly faster approach to the target velocity. More... | |
| virtual void | ActionTargetRotVelocity (sVec3f avVel, tF32 afScale)=0 |
| Modifies the rotation velocity of each particle to be scale percent of the way closer to the specified velocity triple. This makes velocities grow asymptotically closer to the given velocity. scale is multiplied by dt before scaling the velocities. Thus, using smaller dt causes a slightly faster approach to the target velocity. More... | |
| virtual void | ActionVortex (sVec3f avCenter, sVec3f avAxis, tF32 afMagnitude=1.0f, tF32 afTightnessExponent=1.0f, tF32 afRotSpeed=1.0f, tF32 afEpsilon=kfParticlesEpsilon, tF32 afMaxRadius=kfParticlesMax)=0 |
| Swirl particles around a vortex. Center and axis define an infinite line, where center represents the tip of the vortex and axis is a vector along the line, the length of which is irrelevant. As with most acceleration actions, the amount of acceleration falls off inversely with r2 to the center. But when r is small, the acceleration would be infinite, so epsilon is always added to r. Using an epsilon similar in magnitude to magnitude can increase the range of influence of the vortex. afMaxRadius defines the sphere of influence of this action. No particle further than afMaxRadius from the vortex center is affected. More... | |
| virtual tF32 | ActionTextureAnimation (tI32 anInc, tBool abClamp, tF32 afCurrentFrameTime, tF32 afFrameTime, const sVec2i &avTexFrameRange)=0 |
| Set the next texture animation frame (adds the specified increment, which can be negative). More... | |
| virtual void | ActionTextureRotation (tF32 afScale)=0 |
| Rotates the particle's texture coordinates. More... | |
| virtual void | ActionTargetColorAge (sColor4f avColor, tF32 afScale, tF32 afStartAge, tF32 afEndAge)=0 |
| Modifies the particles color over time. More... | |
| virtual void | ActionTargetSizeAge (sVec3f avSize, sVec3f avScale, tF32 afStartAge, tF32 afEndAge)=0 |
| Modified the particles size over time. More... | |
Rendering | |
| virtual tBool | SetRenderingMode (eParticleRendering aRen)=0 |
| Set the particle rendering mode. {Property}. More... | |
| virtual eParticleRendering | GetRenderingMode () const =0 |
| Get the particle rendering mode. {Property}. More... | |
| virtual void | SetRenderingData (iUnknown *apData)=0 |
| Set the particle rendering data. More... | |
| virtual iUnknown * | GetRenderingData () const =0 |
| Get the particle rendering data. {Property}. More... | |
| virtual void | SetTransformMatrix (const sMatrixf &aMatrix)=0 |
| Set the transform matrix. {Property}. More... | |
| virtual sMatrixf | GetTransformMatrix () const =0 |
| Get the transform matrix. {Property}. More... | |
| virtual void | SetTransformEnabled (tBool abTransformEnabled)=0 |
| Set whether the particle group is transformed. {Property}. More... | |
| virtual tBool | GetTransformEnabled () const =0 |
| Get whether the particle group is transformed. {Property}. More... | |
| virtual tBool | Render (iCanvas *apCanvas)=0 |
| Render the particle system. More... | |
Additional Inherited Members | |
Public Member Functions inherited from iUnknown | |
| virtual tBool | IsOK () const =0 |
| Check if the object is valid. More... | |
| virtual tI32 | AddRef ()=0 |
| Signal that one more reference of the object has been created. More... | |
| virtual tI32 | Release ()=0 |
| Release a reference of the object. More... | |
| virtual void | DeleteThis ()=0 |
| Bypass any reference counting and delete this object. More... | |
| virtual void | Invalidate ()=0 |
| Invalidate the object. More... | |
| virtual iUnknown * | QueryInterface (const tUUID &aIID)=0 |
| Query an interface. More... | |
| virtual void | ListInterfaces (iMutableCollection *apLst, tU32 anFlags) const =0 |
| Fill a UUID list containing the UUIDs of the implemented interfaces. More... | |
| virtual tI32 | SetNumRefs (tI32 anNumRefs)=0 |
| Set the reference counter directly. More... | |
| virtual tI32 | GetNumRefs () const =0 |
| Get the number of references to this object. More... | |
|
pure virtual |
Reset the group.
Set the maximum number of particles. {Property}.
|
pure virtual |
Get the maximum number of particles. {Property}.
|
pure virtual |
Get the number of particles currently in the group. (aka active particles) {Property}.
|
pure virtual |
Get the timestep. {Property}.
Set the 'grid' size for the animated textures. {Property}.
|
pure virtual |
Get the 'grid' size for the animated textures. {Property}.
|
pure virtual |
Get the particles data pointers.
|
pure virtual |
Set the domain's type. {Property}.
|
pure virtual |
Get the domain's type. {Property}.
|
pure virtual |
Get the domain's A vector. {Property}.
|
pure virtual |
Get the domain's B vector. {Property}.
|
pure virtual |
Get the domain's C vector. {Property}.
Set the domain to a triangle.
Set the domain to a sphere.
|
pure virtual |
Set the domain to a cylinder.
|
pure virtual |
Set the domain to a cone.
Set the domain to a blob.
|
pure virtual |
Set the domain to a disk.
Set the domain to a rectangle.
|
pure virtual |
Define the color in the current domain.
|
pure virtual |
Define the alpha in the current domain.
|
pure virtual |
Define the size in the current domain.
Define the starting age.
|
pure virtual |
Define the up vector in the current domain.
|
pure virtual |
Define the velocity in the current domain.
|
pure virtual |
Define the rotation vector in the current domain.
|
pure virtual |
Define the secondary position in the current domain.
Specify how the secondary position of each new particle is chosen. Specify how the positionB of each new particle emitted will be chosen. The positionB is the destination position or initial position of particles. See ActionRestore for a use of positionB. If abDoCopy is true then when a particle is created its positionB will be the same as its initial particle position (the default). If abDoCopy is false then when a particle is created its positionB will be chosen from the PositionB domain.
Steer particles away from a domain of space. Particles are tested to see whether they will pass from being outside the specified domain to being inside it within look_ahead time units from now if the next pMove action were to occur now. magnitude tells how drastically the particle velocities are modified to avoid the obstacle at each time step. As with most acceleration actions, the amount of acceleration falls off inversely with r2. But when r is small, the acceleration would be infinite, so epsilon is always added to r. The specific direction and amount of turn is dependent on the kind of domain being avoided.
Bounce particles off a domain of space. Particles are tested to see whether they will pass from being outside the specified domain to being inside it if the next pMove action were to occur now. If they would pass through the surface of the domain, they are instead bounced off it. That is, their velocity vector is decomposed into components normal to the surface and tangent to the surface. The direction of the normal component is reversed, and the components are recomposed into a new velocity heading away from the surface. The normal component is multiplied by the resilience parameter and the tangential component, if its magnitude is greater than cutoff, is multiplied by (1 - the friction parameter) when being composed into the new velocity vector. The cutoff parameter can allow particles to glide smoothly along a surface without sticking.
Set the secondary position from current position. If copy_pos is true, sets the positionB of each particle in the current particle group to be equal to the current position of that particle. This makes each particle "remember" this position so it can later return to it using pRestore. If copy_vel is true, sets the velocityB of each particle in the current particle group to be equal to the current velocity of that particle. This is useful for computing the orientation of the particle when rendering it using pDrawGroupl.
|
pure virtual |
Simulate air by slowing down particle velocities. If a particle's velocity magnitude is within vlow and vhigh, then multiply each component of the velocity by the respective damping constant. Typically, the three components of damping will have the same value.
|
pure virtual |
Rotation damping.
|
pure virtual |
An Explosion. Causes an explosion by accelerating all particles away from the center. Particles are accelerated away from the center by an amount proportional to magnitude. As with most acceleration actions, the amount of acceleration falls off inversely with r2. But when r is small, the acceleration would be infinite, so epsilon is always added to r. The shock wave of the explosion has a gaussian magnitude. The center of the gaussian travels outward from the center at the specified velocity. So at a given time step, particles at a distance (velocity * age) from center will receive the most acceleration, and particles not at the peak of the shock wave will receive a lesser acceleration. The shock wave has a standard deviation of stdev, which is the sharpness or broadness of the strength of the wave. age is used to calculate the radius of the shock wave. For pExplosion calls in action lists, age is the initial age of the explosion. It is incremented by dt after each call. For immediate mode, age is the current age of the explosion, and it is up to the application to increment the age parameter for each call to pExlosion.
|
pure virtual |
Accelerate toward the next particle in the group. This allows snaky effects where the particles follow each other. Each particle is accelerated toward the next particle in the group by an amount proportional to magnitude. As with most acceleration actions, the amount of acceleration falls off inversely with r2. But when r is small, the acceleration would be infinite, so epsilon is always added to r. afMaxRadius defines the sphere of influence of this action. No particle further than afMaxRadius from its predecessor is affected.
|
pure virtual |
Accelerate each particle toward each other particle. Each particle is accelerated toward each other particle in the group by an amount proportional to magnitude. As with most acceleration actions, the amount of acceleration falls off inversely with r2. But when r is small, the acceleration would be infinite, so epsilon is always added to r. afMaxRadius defines the sphere of influence of this action. No particle further than afMaxRadius from another particle is affected.
Accelerate particles in the given direction. The gravity acceleration vector is simply added to the velocity vector of each particle at each time step. The magnitude of the gravity vector is the acceleration due to gravity. For example, pGravity(0, 0, -9.8) specifies gravity in the negative Z direction.
|
pure virtual |
Accelerate particles that are near the center of the jet. For each particle, chooses an acceleration vector from the domain and applies it to the particle's velocity. The amount of acceleration applied is directly proportional to magnitude. As with most acceleration actions, the amount of acceleration falls off inversely with r2. But when r is small, the acceleration would be infinite, so epsilon is always added to r. The domain from which acceleration vectors are chosen is the current velocity domain. afMaxRadius defines the sphere of influence of this action. No particle further than afMaxRadius from the center is affected.
Remove old particles. Removes all particles older than age_limit. But if kill_less_than is true, it instead removes all particles newer than age_limit. age_limit is not clamped, so negative values are ok. This can be used in conjunction with pStartingAge(-n) to create and then kill a particular set of particles.
|
pure virtual |
Modify each particle's velocity to be similar to that of its neighbors. Each particle is accelerated toward the weighted mean of the velocities of other particles in the group by an amount proportional to magnitude. As with most acceleration actions, the amount of acceleration falls off inversely with r2 to the other particles. But when r is small, the acceleration would be infinite, so epsilon is always added to r. Using an epsilon similar in magnitude to magnitude can increase the range of influence of nearby particles on this particle.
|
pure virtual |
Modify each particle's rotational velocity to be similar to that of its neighbors.
|
pure virtual |
Move particle positions based on velocities. This action actually updates the particle positions by adding the current velocity to the current position. This is typically the last particle action performed in an iteration of a particle simulation, and typically only occurs once per action list. The velocity is multiplied by the time step length, dt, before being added to the position. This implements Euler's method of numerical integration with a constant, but specifiable step size. See pTimeStep for more on varying the step size.
|
pure virtual |
Accelerate toward the closest point on the given line. p and axis define an infinite line, where p can be any point on the line and axis is any vector parallel to the line. For each particle, this action computes the vector to the closest point on the line, and accelerates the particle in the vector direction. The amount of acceleration applied is directly proportional to magnitude. As with most acceleration actions, the amount of acceleration falls off inversely with r2. But when r is small, the acceleration would be infinite, so epsilon is always added to r. afMaxRadius defines the infinite cylinder of influence of this action. No particle further than afMaxRadius from the line is affected.
|
pure virtual |
Accelerate toward the given center point. For each particle, this action computes the vector to the center point, and accelerates the particle in the vector direction. The amount of acceleration applied is directly proportional to magnitude. As with most acceleration actions, the amount of acceleration falls off inversely with r2. But when r is small, the acceleration would be infinite, so epsilon is always added to r. afMaxRadius defines the sphere of influence of this action. No particle further than afMaxRadius from the center is affected.
|
pure virtual |
Accelerate particles in random directions. For each particle, chooses an acceleration vector from the specified domain and adds it to the particle's velocity. Reducing the time step, dt, will make a higher probability of being near the original velocity after unit time. Smaller dt approach a normal distribution of velocity vectors instead of a square wave distribution.
|
pure virtual |
Immediately replace position with a position from the domain. For each particle, chooses a displacement vector from the specified domain and adds it to the particle's position. Reducing the time step, dt, will make a higher probability of being near the original position after unit time. Smaller dt approach a normal distribution of particle positions instead of a square wave distribution.
|
pure virtual |
Immediately replace velocity with a velocity from the domain. For each particle, sets the particle's velocity vector to a random vector in the specified domain. This function is not affected by dt. If you can think of an appropriate way for this to vary with dt, let me know.
|
pure virtual |
Immediately replace rotation velocity with a velocity from the domain.
Over time, restore particles to their secondary positions. Computes a new velocity for each particle that will make the particle arrive at its positionB at the specified amount of time in the future. The curved path that the particles take is a parametric quadratic. Once the specified amount of time has passed, the particles are clamped to their positionB and their velocities are set to 0 to freeze them in place. If pRestore is called in immediate mode, it is the application's responsibility to decrease time_left by dt on each call. When in an action list, time_left gets decremented automatically. The positionB attribute of each particle is typically the particle's position when it was created, or it can be specified within a domain. This is controlled by pVertexBTracks, pVertexB, and pVertexBD. The positionB can be set at any time to the particle's current position using the pCopyVertexB action.
Kill particles with positions on wrong side of the specified domain. If kill_inside is true, deletes all particles inside the given domain. If kill_inside is false, deletes all particles outside the given domain.
Kill particles with velocities on wrong side of the specified domain. If kill_inside is true, deletes all particles whose velocity vectors are inside the given domain. If kill_inside is false, deletes all particles whose velocity vectors are outside the given domain. This allows particles to die when they turn around, get too fast or too slow, etc.
Sort the particles relativly to the specified eye and view direction.
|
pure virtual |
Add particles in the specified domain. Adds new particles to the current particle group. The particle positions are chosen from the given domain. The particle colors, sizes, initial ages, velocities, and secondary positions are chosen according to their current domains. See pColor, pColorD, pSize, pStartingAge, pVelocity, pVelocityD, pVertexB, pVertexBD, and pVertexBTracks. When pSource is called within an action list, the particle attribute domains used are those that were current when the pSource command was called within the pNewActionList / pEndActionList block instead of when pCallActionList is called. Note that this is unlike OpenGL. particle_rate is the number of particles to add per unit time. If particle_rate / dt is a fraction then pSource adjusts the number of particles to add during this time step so that the average number added per unit time is particle_rate.
|
pure virtual |
Clamp each particle's speed to the given min and max. Computes each particle's speed (the magnitude of its velocity vector) and if it is less than min_speed or greater than max_speed it is clamped to those bounds, while preserving the velocity vector's direction.
Change color of all particles toward the specified color. Modifies the color and alpha of each particle to be scale percent of the way closer to the specified color and alpha. scale is multiplied by dt before scaling the sizes. Thus, using smaller dt causes a slightly faster approach to the target color.
Change sizes of all particles toward the specified size. Modifies the size of each particle to be scale percent of the way closer to the specified size triple. This makes sizes grow asymptotically closer to the given size. scale is multiplied by dt before scaling the sizes. Thus, using smaller dt causes a slightly faster approach to the target size. The separate scales for each component allow only selected components to be scaled.
Modifies the velocity of each particle to be scale percent of the way closer to the specified velocity triple. This makes velocities grow asymptotically closer to the given velocity. scale is multiplied by dt before scaling the velocities. Thus, using smaller dt causes a slightly faster approach to the target velocity.
Modifies the rotation velocity of each particle to be scale percent of the way closer to the specified velocity triple. This makes velocities grow asymptotically closer to the given velocity. scale is multiplied by dt before scaling the velocities. Thus, using smaller dt causes a slightly faster approach to the target velocity.
|
pure virtual |
Swirl particles around a vortex. Center and axis define an infinite line, where center represents the tip of the vortex and axis is a vector along the line, the length of which is irrelevant. As with most acceleration actions, the amount of acceleration falls off inversely with r2 to the center. But when r is small, the acceleration would be infinite, so epsilon is always added to r. Using an epsilon similar in magnitude to magnitude can increase the range of influence of the vortex. afMaxRadius defines the sphere of influence of this action. No particle further than afMaxRadius from the vortex center is affected.
|
pure virtual |
Set the next texture animation frame (adds the specified increment, which can be negative).
| anInc | increment per frame update, 1 to go fwd, -1 to go backward, invalid to pick a random frame |
| abClamp | if true the range will be the maximum |
| afCurrentFrameTime | is the time that has been accumulated for the current frame |
| afFrameTime | is the time that the frame will be displayed |
| avTexFrameRange | is the range of frames to play |
Rotates the particle's texture coordinates.
|
pure virtual |
Modifies the particles color over time.
|
pure virtual |
Modified the particles size over time.
|
pure virtual |
Set the particle rendering mode. {Property}.
|
pure virtual |
Get the particle rendering mode. {Property}.
Set the particle rendering data.
|
pure virtual |
Get the particle rendering data. {Property}.
Set the transform matrix. {Property}.
|
pure virtual |
Get the transform matrix. {Property}.
Set whether the particle group is transformed. {Property}.
|
pure virtual |
Get whether the particle group is transformed. {Property}.
1.8.7