SoParticleAnimation Class Reference
[FXViz]

FXViz Particle system animation node. More...

#include <FXViz/nodes/SoParticleAnimation.h>

Inheritance diagram for SoParticleAnimation:
SoShape SoNode SoFieldContainer SoBase SoRefCounter SoTypedObject SoParticleChemicalFlame SoParticleExplosion SoParticleFlame SoParticleLightRay SoParticleSmoke SoParticleSnow

List of all members.

Public Types

enum  ParticleShape {
  POINT_SHAPE,
  LINE_SHAPE,
  BILLBOARD_SHAPE
}
enum  EmitShapeType {
  POINT,
  CYLINDER,
  LINE,
  SQUARE,
  SPHERE,
  CIRCLE,
  DISK,
  GEOMETRY
}
enum  ParticleLife {
  ONE_EMISSION,
  CYCLIC_EMISSION
}
enum  TransparencyType {
  ADD,
  BLEND,
  INHERITED
}

Public Member Functions

virtual SoType getTypeId () const
 SoParticleAnimation ()

Static Public Member Functions

static SoType getClassTypeId ()

Public Attributes

SoSFInt32 numParticles
SoSFFloat numParticlesVariation
SoSFColor initialColor
SoSFVec3f initialColorVariation
SoSFFloat initialOpacity
SoSFFloat initialOpacityVariation
SoSFFloat initialSize
SoSFFloat initialSizeVariation
SoSFColor endColor
SoSFVec3f endColorVariation
SoSFFloat endOpacity
SoSFFloat endOpacityVariation
SoSFFloat endSize
SoSFFloat endSizeVariation
SoSFInt32 lifeSpan
SoSFFloat lifeSpanVariation
SoSFEnum particleShape
SoSFEnum emitShapeType
SoSFVec3f shapeScale
SoSFVec2f dispersionAngles
SoSFEnum particleLife
SoSFFloat speed
SoSFFloat speedVariation
SoSFFilePathString particleFilename
SoSFImage particleTexture
SoSFFloat goalFramesPerSecond
SoSFTrigger trigger
SoSFEnum transparencyType
SoSFBool on

Detailed Description

FXViz Particle system animation node.

Base class for particle system animation. Particle system animation is used for generating real-time effects such as fire, chemical flame, explosions, fluid motion, smoke, snow, etc.

A particle system is a set of particles (numParticles) where each particle is defined by the following properties:

All of these properties may fluctuate randomly for each particle within a specified range of values (initialColorVariation, initialOpacityVariation, endColorVariation, lifeSpanVariation...).

Each particle emitted from a predefined shape (emitShapeType) evolves from an initial appearance to a final appearance with a given speed and a life span in real time.

Billboard particles can be textured (particleFilename, particleTexture) to produce interesting realistic effects.

Like classical Open Inventor shapes, each particle is transformed by the current cumulative transformation and is drawn with the current lighting model and drawing style.

Classes derived from SoParticleAnimation have default field values pre-set for conveniently generating specific effects. For example, SoParticleSmoke has predefined field values for generating smoke effects.

Note: By default, particle animation uses transparency type ADD (see transparencyType). Against a white background, particles will not be visible because with this transparency type, colors are added until full saturation is reached. Since white is already fully saturated, no additional visual effect is seen. In this case, use BLEND transparency type instead and change the particle texture from the default (a circular gradient that is gray in the middle and black on the edges) to one that is gray in the middle and white on the edges. For additional realism, you can add transparency to the texture, with zero transparency in the middle increasing linearly to full transparency on the edges.

FILE FORMAT/DEFAULT

SEE ALSO

SoFXViz, SoParticleChemicalFlame, SoParticleExplosion, SoParticleFlame, SoParticleLightRay, SoParticleSmoke, SoParticleSnow.

Deprecated:

Deprecated since Open Inventor 9400
No longer supported.
See related examples:

ParticleAnimationEditor


Member Enumeration Documentation

Predefined shapes from which particles are emitted.

Enumerator:
POINT 

Emission from a point.

CYLINDER 

Emission from a cylinder.

LINE 

Emission from a line.

SQUARE 

Emission from a square.

SPHERE 

Emission from a sphere.

CIRCLE 

Emission from a circle.

DISK 

Emission from a disk.

GEOMETRY 

Emission from a specified geometric shape.

Not implemented.

Particle life.

Enumerator:
ONE_EMISSION 

Particles are emitted once.

CYCLIC_EMISSION 

Particles are emitted cyclically.

Particle shape type.

Enumerator:
POINT_SHAPE 

Each particle is a point.

LINE_SHAPE 

Each particle is a line.

BILLBOARD_SHAPE 

Each particle is a rectangular billboard (i.e., a screen-aligned rectangle).

Type of transparency used by particle.

Enumerator:
ADD 

Additive alpha blending.

BLEND 

Multiplicative alpha blending.

INHERITED 

Inherited alpha blending defined by SoGLRenderAction::setTransparencyType().


Constructor & Destructor Documentation

SoParticleAnimation::SoParticleAnimation (  ) 

Constructor.


Member Function Documentation

static SoType SoParticleAnimation::getClassTypeId (  )  [static]

Returns the type identifier for this class.

Reimplemented from SoShape.

virtual SoType SoParticleAnimation::getTypeId (  )  const [virtual]

Returns the type identifier for this specific instance.

Reimplemented from SoShape.


Member Data Documentation

Defines two angles (specified in radians) within which particles are randomly emitted.

yaw = dispersionAngles[0] and pitch = dispersionAngles[1]. yaw is an angle measured from y-axis and around the x-axis. pitch is an angle measured from the z-axis and around the y-axis. These two angles are ignored for all solid emitter shapes (SoParticleAnimation::SPHERE, SoParticleAnimation::CYLINDER).

Specifies a predefined shape from which particles are emitted.

Particles are transformed by the current cumulative transformation. Particles can be uniformly emitted from:

Final particle color.

Controls magnitude of random variation in the final particle color.

End Color = endColor + (endColor * endColorVariation * RF) with -1 <= RF <= 1.

Final particle opacity: 0 = fully transparent, 1 = opaque.

Controls magnitude of random variation in the final particle opacity.

End Opacity = endOpacity + (endOpacity * endOpacityVariation * RF) with -1 <= RF <= 1.

Final particle size in world coordinates.

Controls magnitude of random variation in the final particle size.

End Size = endSize + (endSize * endSizeVariation * RF) with -1 <= RF <= 1.

Indicates the goal number of frames per second for refreshing the particles.

Setting the value to 0 requests that particles be refreshed as often as possible.

NOTE: field available since Open Inventor 4.0

Initial particle color.

Controls magnitude of random variation in the initial particle color.

Initial Color = initialColor + (initialColor * initialColorVariation * RF) with -1 <= RF <= 1.

Initial particle opacity: 0 is fully transparent, 1 is opaque.

Controls magnitude of random variation in the initial particle opacity.

Initial Opacity = initialOpacity + (initialOpacity * initialOpacityVariation * RF) with -1 <= RF <= 1.

Initial particle size in world coordinates.

Controls magnitude of random variation in the initial particle size.

Initial Size = initialSize + (initialSize * initialSizeVariation * RF) with -1 <= RF <= 1.

Particle life span in milliseconds.

Controls magnitude of random variation in the particle life span.

Life span = lifeSpan + (lifeSpan * lifeSpanVariation * RF) with -1 <= RF <= 1.

Number of emitted particles.

Controls magnitude of random variation in the number of emitted particles.

Emitted particles = numParticles + (numParticles * numParticlesVariation * RF) with -1 <= RF <= 1

Activates/deactivates the particle system.

Specifies the name of the file containing the texture to be applied to the particles.

As soon as the texture in the file is loaded, the field particleTexture is updated. The standard image file formats are supported. See SoRasterImageRW for the list. If the filename is not an absolute path name, the list of directories maintained by SoInput is searched. If the texture is not found in any of those directories, then the file is searched for relative to the directory from which the SoParticleAnimation node was read.

Specifies if particles are emitted one time (SoParticleAnimation::ONE_EMISSION) or cyclically (SoParticleAnimation::CYCLIC_EMISSION).

If one-time emission is selected, particles are emitted when the field trigger is set.

Specifies the shape of the particles.

Only SoParticleAnimation::BILLBOARD_SHAPE shapes are textured.

Specifies an in-memory texture used for particles.

It can be the contents of the file read from particleFilename, an image read directly from an Open Inventor file, or an image defined programmatically using the methods provided by SoSFImage. The default texture is a circular gradient, with gray in the middle and black on the edges. It contains no alpha values.

Specifies a nonuniform scale factor applied to the predefined shape from which particles are emitted.

Not used if emitShapeType == SoParticleAnimation::POINT.

Specifies the particle speed in units per second.

Controls magnitude of random variation in the particle speed.

Particle Speed = speed + (speed * speedVariation * RF) with -1 <= RF <= 1.

Transparency type used for drawing particles.

Has two meanings depending on the value of particleLife:.


The documentation for this class was generated from the following file:

Open Inventor by FEI reference manual, generated on 19 Aug 2019
Copyright © FEI S.A.S. All rights reserved.
http://www.openinventor.com/