the namespace for the whole SPARK library More...
Namespaces | |
namespace | GL |
the namespace for openGL dependent SPARK code | |
namespace | IRR |
the namespace for Irrlicht dependent SPARK code | |
namespace | SFML |
the namespace for SFML dependent SPARK code | |
Classes | |
class | ArrayBuffer |
A template buffer that holds an array of elements of type T. More... | |
class | ArrayBufferCreator |
Template class to create an ArrayBuffer. More... | |
class | Buffer |
An abstract class that defines the interface for the additional buffers of Group. More... | |
class | BufferCreator |
A class used by a Group to create an additional Buffer. More... | |
class | BufferHandler |
A base interface that allows manipulation on Buffer. More... | |
class | Emitter |
An abstract class that defines an emitter of particles. More... | |
class | SPKFactory |
A singleton class that allows to easily define, create, destroy and organize SPARK objects (Registerable). More... | |
class | Group |
A group of many particles. More... | |
struct | InterpolatorEntry |
An entry in the interpolator graph. More... | |
class | Interpolator |
An interpolator that offers flexible control over particle parameters. More... | |
class | Model |
A model of particles for particles' generation and evolution. More... | |
class | Modifier |
A abstract class that defines a physical object acting on particles. More... | |
class | Particle |
A single particle (a point in space with a velocity and different parameters). More... | |
class | Pool |
A generic container to handle a pool of objects. More... | |
class | Registerable |
the abstract base class for SPARK objects More... | |
class | RegWrapper |
A Wrapper class that allows to use any type of object as a Registerable. More... | |
class | Renderer |
An abstract class that renders particles. More... | |
class | System |
A whole system of particles. More... | |
class | Transformable |
an abstract class that allows matrix transformations More... | |
class | Vector3D |
A triplet of coordinates in 3D. More... | |
class | Zone |
An abstract class that defines a zone in space. More... | |
class | NormalEmitter |
An Emitter that emits particles following a Zone normals. More... | |
class | RandomEmitter |
An Emitter that emits in a random direction. More... | |
class | SphericEmitter |
An Emitter that emits particles in a portion of sphere. More... | |
class | StaticEmitter |
An Emitter that emits particles with no initial velocity. More... | |
class | StraightEmitter |
An Emitter that emits in a given direction. More... | |
class | Collision |
A Modifier that perfoms particle against particle collisions in the Group. More... | |
class | Destroyer |
A Modifier that destroy particles. More... | |
class | LinearForce |
A Modifier applying a linear force on particles. More... | |
class | ModifierGroup |
A Group of Modifiers. More... | |
class | Obstacle |
A Modifier that acts as an obstacle on particles. More... | |
class | PointMass |
A Modifier defining a point with a mass that attracts or repulses particles. More... | |
class | Rotator |
A Modifier allowing to rotate particle with their rotation speed. More... | |
class | Vortex |
A modifier defining a vortex in the universe. More... | |
class | LineRendererInterface |
Base Interface for rendering particles with lines. More... | |
class | Oriented2DRendererInterface |
Base Interface for rendering particles that can be oriented in a 2D world. More... | |
class | Oriented3DRendererInterface |
Base Interface for rendering particles that can be oriented in a 3D world. More... | |
class | PointRendererInterface |
Base Interface for rendering particles with points. More... | |
class | QuadRendererInterface |
Base Interface for rendering particles with quads. More... | |
class | AABox |
A Zone defining an axis-aligned Box. More... | |
class | Cylinder |
A Zone defining a cylinder in the universe. More... | |
class | Line |
A Zone defining a line in the universe. More... | |
class | Plane |
A Zone defining a plane in the universe. More... | |
class | Point |
A Zone defining a point in the universe. More... | |
class | Ring |
A ZOne defining a flat ring in the universe. More... | |
class | Sphere |
A Zone defining a sphere in the universe. More... | |
Typedefs | |
typedef ArrayBuffer< float > | FloatBuffer |
A buffer storing an array of floats. | |
typedef ArrayBufferCreator< float > | FloatBufferCreator |
the buffer creator of the float buffer | |
typedef unsigned long | SPK_ID |
the ID type of a Registerable | |
Enumerations | |
enum | ModelParam { PARAM_RED = 0, PARAM_GREEN = 1, PARAM_BLUE = 2, PARAM_ALPHA = 3, PARAM_SIZE = 4, PARAM_MASS = 5, PARAM_ANGLE = 6, PARAM_TEXTURE_INDEX = 7, PARAM_ROTATION_SPEED = 8, PARAM_CUSTOM_0 = 9, PARAM_CUSTOM_1 = 10, PARAM_CUSTOM_2 = 11 } |
Constants for the Model parameters. More... | |
enum | InterpolationType { INTERPOLATOR_LIFETIME, INTERPOLATOR_AGE, INTERPOLATOR_PARAM, INTERPOLATOR_VELOCITY } |
Constants defining which type of value is used for interpolation. More... | |
enum | ModelParamFlag { FLAG_NONE = 0, FLAG_RED = 1 << PARAM_RED, FLAG_GREEN = 1 << PARAM_GREEN, FLAG_BLUE = 1 << PARAM_BLUE, FLAG_ALPHA = 1 << PARAM_ALPHA, FLAG_SIZE = 1 << PARAM_SIZE, FLAG_MASS = 1 << PARAM_MASS, FLAG_ANGLE = 1 << PARAM_ANGLE, FLAG_TEXTURE_INDEX = 1 << PARAM_TEXTURE_INDEX, FLAG_ROTATION_SPEED = 1 << PARAM_ROTATION_SPEED, FLAG_CUSTOM_0 = 1 << PARAM_CUSTOM_0, FLAG_CUSTOM_1 = 1 << PARAM_CUSTOM_1, FLAG_CUSTOM_2 = 1 << PARAM_CUSTOM_2 } |
Constants used to set bits in Model flags. More... | |
enum | ModifierTrigger { ALWAYS = 1 << 0, INSIDE_ZONE = 1 << 1, OUTSIDE_ZONE = 1 << 2, INTERSECT_ZONE = 1 << 3, ENTER_ZONE = 1 << 4, EXIT_ZONE = 1 << 5 } |
Constants defining the triggers for Modifier. More... | |
enum | BlendingMode { BLENDING_NONE, BLENDING_ADD, BLENDING_ALPHA } |
Constants defining the available blending modes. More... | |
enum | RenderingHint { ALPHA_TEST = 1 << 0, DEPTH_TEST = 1 << 1, DEPTH_WRITE = 1 << 2 } |
Constants defining the available rendering hints. More... | |
enum | StepMode { STEP_REAL, STEP_CONSTANT, STEP_ADAPTIVE } |
Enumeration defining how to handle the step time of particle systems. More... | |
enum | ForceFactor { FACTOR_NONE, FACTOR_LINEAR, FACTOR_SQUARE } |
An enum defining the way a factor is applied to a force. More... | |
enum | Orientation2D { ORIENTATION2D_UP, ORIENTATION2D_DIRECTION, ORIENTATION2D_POINT, ORIENTATION2D_AXIS } |
Defines the orientation of a particle oriented in 2D. More... | |
enum | LookOrientation { LOOK_CAMERA_PLANE, LOOK_CAMERA_POINT, LOOK_AXIS, LOOK_POINT } |
Defines the orientation of the vector Look of an oriented 3D particle. More... | |
enum | UpOrientation { UP_CAMERA, UP_DIRECTION, UP_AXIS, UP_POINT } |
Defines the orientation of the vector Up of an oriented 3D particle. More... | |
enum | LockedAxis { LOCK_LOOK, LOCK_UP } |
Defines which axis is locked and will not change when computing a cross product. More... | |
enum | OrientationPreset { CAMERA_PLANE_ALIGNED = PACK_ORIENTATION(LOCK_LOOK,LOOK_CAMERA_PLANE,UP_CAMERA), CAMERA_POINT_ALIGNED = PACK_ORIENTATION(LOCK_LOOK,LOOK_CAMERA_POINT,UP_CAMERA), DIRECTION_ALIGNED = PACK_ORIENTATION(LOCK_UP,LOOK_CAMERA_PLANE,UP_DIRECTION), AROUND_AXIS = PACK_ORIENTATION(LOCK_UP,LOOK_CAMERA_POINT,LOOK_AXIS), TOWARDS_POINT = PACK_ORIENTATION(LOCK_LOOK,LOOK_POINT,UP_CAMERA), FIXED_ORIENTATION = PACK_ORIENTATION(LOCK_LOOK,LOOK_AXIS,UP_AXIS) } |
Orientation presets to easily set up common orientations. More... | |
enum | PointType { POINT_SQUARE, POINT_CIRCLE, POINT_SPRITE } |
Constants defining the type of points to render. More... | |
enum | TexturingMode { TEXTURE_NONE, TEXTURE_2D, TEXTURE_3D } |
Constants defining the way to apply texture over the particles. More... | |
Functions | |
template<typename T > | |
T | random (T min, T max) |
Returns a random number in the range [min,max[. | |
Vector3D | operator+ (const Vector3D &v0, const Vector3D &v1) |
Adds two Vector3D. | |
Vector3D | operator- (const Vector3D &v0, const Vector3D &v1) |
Substracts two Vector3D. | |
Vector3D | operator+ (const Vector3D &v, float f) |
Adds a Vector3D and a float. | |
Vector3D | operator+ (float f, const Vector3D &v) |
Adds a float and a Vector3D. | |
Vector3D | operator- (const Vector3D &v, float f) |
Substracts a float to a Vector3D. | |
Vector3D | operator- (float f, const Vector3D &v) |
Substracts a Vector3D to a float. | |
Vector3D | operator* (const Vector3D &v, float f) |
Multiplies a Vector3D by a float. | |
Vector3D | operator* (float f, const Vector3D &v) |
Multiplies a float by a Vector3D. | |
Vector3D | operator/ (const Vector3D &v, float f) |
Divides a Vector3D by a float. | |
Vector3D | operator/ (float f, const Vector3D &v) |
Divides a float by a Vector3D. | |
bool | operator== (const Vector3D &v0, const Vector3D &v1) |
Tests whether 2 Vector3D are equal. | |
bool | operator!= (const Vector3D &v0, const Vector3D &v1) |
Tests whether 2 Vector3D are different. | |
std::ostream & | operator<< (std::ostream &s, const Vector3D &v) |
Writes a Vector3D on an output stream. | |
SPK_PREFIX float | getSqrDist (const Vector3D &v0, const Vector3D &v1) |
Returns the square distance between two Vector3D. | |
SPK_PREFIX float | getDist (const Vector3D &v0, const Vector3D &v1) |
Returns the distance between two Vector3D. | |
float | dotProduct (const Vector3D &v0, const Vector3D &v1) |
Returns the dot product between two Vector3D. | |
SPK_PREFIX Vector3D | crossProduct (const Vector3D &v0, const Vector3D &v1) |
Returns the cross product between two Vector3D. | |
SPK_PREFIX void | crossProduct (const Vector3D &v0, const Vector3D &v1, Vector3D &result) |
Computes the cross product between two Vector3D and stores the result in the Vector3D result. | |
Variables | |
SPK_PREFIX unsigned int | randomSeed |
the random seed for the pseudo random numbers generation (1 by default) | |
SPK_PREFIX const SPK_ID | NO_ID |
the ID constant value for unregistered Registerable | |
SPK_PREFIX const std::string | NO_NAME |
an empty string defining the name of an object with no name |
the namespace for the whole SPARK library
typedef ArrayBuffer<float> FloatBuffer |
A buffer storing an array of floats.
Definition at line 101 of file SPK_ArrayBuffer.h.
typedef ArrayBufferCreator<float> FloatBufferCreator |
the buffer creator of the float buffer
Definition at line 103 of file SPK_ArrayBuffer.h.
typedef unsigned long SPK_ID |
the ID type of a Registerable
Definition at line 48 of file SPK_Registerable.h.
enum BlendingMode |
Constants defining the available blending modes.
Definition at line 41 of file SPK_Renderer.h.
enum ForceFactor |
An enum defining the way a factor is applied to a force.
FACTOR_NONE |
No factor is applied |
FACTOR_LINEAR |
A linear factor is applied |
FACTOR_SQUARE |
A square factor is applied |
Definition at line 37 of file SPK_LinearForce.h.
enum InterpolationType |
Constants defining which type of value is used for interpolation.
Definition at line 37 of file SPK_Interpolator.h.
enum LockedAxis |
Defines which axis is locked and will not change when computing a cross product.
Note that the side vector cannot be locked as it is always derived from the look and up vectors.
Definition at line 73 of file SPK_Oriented3DRendererInterface.h.
enum LookOrientation |
Defines the orientation of the vector Look of an oriented 3D particle.
Enumerators marked as (fast) are the ones that only needs to be computed once for a set of particles instead of being computed for each particles.
Definition at line 42 of file SPK_Oriented3DRendererInterface.h.
enum ModelParam |
Constants for the Model parameters.
PARAM_RED |
The red component of the Particle |
PARAM_GREEN |
The green component of the Particle |
PARAM_BLUE |
The blue component of the Particle |
PARAM_ALPHA |
The alpha component of the Particle |
PARAM_SIZE |
The size of the Particle |
PARAM_MASS |
The mass of the Particle |
PARAM_ANGLE |
The angle of the texture of the Particle |
PARAM_TEXTURE_INDEX |
the index of texture of the Particle |
PARAM_ROTATION_SPEED |
the rotation speed of the particle (must be used with a rotator modifier) |
PARAM_CUSTOM_0 |
Reserved for a user custom parameter. This is not used by SPARK |
PARAM_CUSTOM_1 |
Reserved for a user custom parameter. This is not used by SPARK |
PARAM_CUSTOM_2 |
Reserved for a user custom parameter. This is not used by SPARK |
enum ModelParamFlag |
Constants used to set bits in Model flags.
These constant values are simply 1 << ModelParam constants
Definition at line 39 of file SPK_Model.h.
enum ModifierTrigger |
enum Orientation2D |
Defines the orientation of a particle oriented in 2D.
Definition at line 35 of file SPK_Oriented2DRendererInterface.h.
enum OrientationPreset |
Orientation presets to easily set up common orientations.
Definition at line 83 of file SPK_Oriented3DRendererInterface.h.
enum PointType |
Constants defining the type of points to render.
POINT_SQUARE |
Points are renderered as squares |
POINT_CIRCLE |
Points are renderered as circles |
POINT_SPRITE |
Points are renderered as point sprites (textured points) |
Definition at line 34 of file SPK_PointRendererInterface.h.
enum RenderingHint |
Constants defining the available rendering hints.
Definition at line 53 of file SPK_Renderer.h.
enum StepMode |
Enumeration defining how to handle the step time of particle systems.
Definition at line 43 of file SPK_System.h.
enum TexturingMode |
Constants defining the way to apply texture over the particles.
TEXTURE_NONE |
Constant telling no texturing is used |
TEXTURE_2D |
Constant telling a 2D texture is used |
TEXTURE_3D |
Constant telling a 3D texture is used |
Definition at line 36 of file SPK_QuadRendererInterface.h.
enum UpOrientation |
Defines the orientation of the vector Up of an oriented 3D particle.
Enumerators marked as (fast) are the ones that only needs to be computed once for a set of particles instead of being computed for each particles.
Definition at line 58 of file SPK_Oriented3DRendererInterface.h.
SPK_PREFIX void SPK::crossProduct | ( | const Vector3D & | v0, | |
const Vector3D & | v1, | |||
Vector3D & | result | |||
) |
SPK_PREFIX Vector3D SPK::crossProduct | ( | const Vector3D & | v0, | |
const Vector3D & | v1 | |||
) |
float dotProduct | ( | const Vector3D & | v0, | |
const Vector3D & | v1 | |||
) |
Returns the dot product between two Vector3D.
Definition at line 498 of file SPK_Vector3D.h.
SPK_PREFIX float SPK::getDist | ( | const Vector3D & | v0, | |
const Vector3D & | v1 | |||
) |
SPK_PREFIX float SPK::getSqrDist | ( | const Vector3D & | v0, | |
const Vector3D & | v1 | |||
) |
Returns the square distance between two Vector3D.
This method is faster than getDist(const Vector3D&,const Vector3D&) and should be used when possible.
bool operator!= | ( | const Vector3D & | v0, | |
const Vector3D & | v1 | |||
) |
Vector3D operator* | ( | float | f, | |
const Vector3D & | v | |||
) |
Multiplies a float by a Vector3D.
This function performs these operations :
result.x = f * v.x
result.y = f * v.y
result.z = f * v.z
f | : the floating number | |
v | : the vector3D |
Definition at line 538 of file SPK_Vector3D.h.
Vector3D operator* | ( | const Vector3D & | v, | |
float | f | |||
) |
Multiplies a Vector3D by a float.
This function performs these operations :
result.x = v.x * f
result.y = v.y * f
result.z = v.z * f
v | : the vector3D | |
f | : the floating number |
Definition at line 533 of file SPK_Vector3D.h.
Vector3D operator+ | ( | float | f, | |
const Vector3D & | v | |||
) |
Adds a float and a Vector3D.
This function performs these operations :
result.x = f + v.x
result.y = f + v.y
result.z = f + v.z
f | : the floating number | |
v | : the vector3D |
Definition at line 518 of file SPK_Vector3D.h.
Vector3D operator+ | ( | const Vector3D & | v, | |
float | f | |||
) |
Adds a Vector3D and a float.
This function performs these operations :
result.x = v.x + f
result.y = v.y + f
result.z = v.z + f
v | : the vector3D | |
f | : the floating number |
Definition at line 513 of file SPK_Vector3D.h.
Vector3D operator+ | ( | const Vector3D & | v0, | |
const Vector3D & | v1 | |||
) |
Adds two Vector3D.
This function performs these operations :
result.x = v0.x + v1.x
result.y = v0.y + v1.y
result.z = v0.z + v1.z
v0 | : the first vector3D | |
v1 | : the second vector3D |
Definition at line 503 of file SPK_Vector3D.h.
Vector3D operator- | ( | float | f, | |
const Vector3D & | v | |||
) |
Substracts a Vector3D to a float.
This function performs these operations :
result.x = f - v.x
result.y = f - v.y
result.z = f - v.z
f | : the floating number | |
v | : the vector3D |
Definition at line 528 of file SPK_Vector3D.h.
Vector3D operator- | ( | const Vector3D & | v, | |
float | f | |||
) |
Substracts a float to a Vector3D.
This function performs these operations :
result.x = v.x - f
result.y = v.y - f
result.z = v.z - f
v | : the vector3D | |
f | : the floating number |
Definition at line 523 of file SPK_Vector3D.h.
Vector3D operator- | ( | const Vector3D & | v0, | |
const Vector3D & | v1 | |||
) |
Substracts two Vector3D.
This function performs these operations :
result.x = v0.x - v1.x
result.y = v0.y - v1.y
result.z = v0.z - v1.z
v0 | : the first vector3D | |
v1 | : the second vector3D |
Definition at line 508 of file SPK_Vector3D.h.
Vector3D operator/ | ( | float | f, | |
const Vector3D & | v | |||
) |
Divides a float by a Vector3D.
This function performs these operations :
result.x = f / v.x
result.y = f / v.y
result.z = f / v.z
f | : the floating number | |
v | : the vector3D |
Definition at line 549 of file SPK_Vector3D.h.
Vector3D operator/ | ( | const Vector3D & | v, | |
float | f | |||
) |
Divides a Vector3D by a float.
This function performs these operations :
result.x = v.x / f
result.y = v.y / f
result.z = v.z / f
v | : the vector3D | |
f | : the floating number |
Definition at line 543 of file SPK_Vector3D.h.
std::ostream & operator<< | ( | std::ostream & | s, | |
const Vector3D & | v | |||
) |
Writes a Vector3D on an output stream.
The Vector3D is written that way : (x,y,z)
s | : the output stream where to write | |
v | : the Vector3D to write to the output stream |
Definition at line 564 of file SPK_Vector3D.h.
bool operator== | ( | const Vector3D & | v0, | |
const Vector3D & | v1 | |||
) |
T SPK::random | ( | T | min, | |
T | max | |||
) |
Returns a random number in the range [min,max[.
Note that the sequence of pseudo random number generated depends on the initial seed which can be set by setting randomSeed.
min | : the minimum value | |
max | : the maximum value |
the ID constant value for unregistered Registerable
SPK_PREFIX const std::string NO_NAME |
an empty string defining the name of an object with no name
SPK_PREFIX unsigned int randomSeed |
the random seed for the pseudo random numbers generation (1 by default)