SPK Namespace Reference

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

Detailed Description

the namespace for the whole SPARK library


Typedef Documentation

typedef ArrayBuffer<float> FloatBuffer

A buffer storing an array of floats.

Definition at line 101 of file SPK_ArrayBuffer.h.

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.


Enumeration Type Documentation

Constants defining the available blending modes.

Since:
1.04.00
Enumerator:
BLENDING_NONE 

No blending is applied. The particles will appeared as opaque

BLENDING_ADD 

The additive blending is useful to render particles that supposed to emit light (fire, magic spells...)

BLENDING_ALPHA 

The alpha blending is useful to render transparent particles

Definition at line 41 of file SPK_Renderer.h.

An enum defining the way a factor is applied to a force.

Since:
1.03.00
Enumerator:
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.

Constants defining which type of value is used for interpolation.

Since:
1.05.00
Enumerator:
INTERPOLATOR_LIFETIME 

Constant defining the life time as the value used to interpolate

INTERPOLATOR_AGE 

Constant defining the age as the value used to interpolate

INTERPOLATOR_PARAM 

Constant defining a parameter as the value used to interpolate

INTERPOLATOR_VELOCITY 

Constant defining the square norm of the velocity as the value used to interpolate

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.

Since:
1.04.00
Enumerator:
LOCK_LOOK 

The look vector is locked

LOCK_UP 

The up vector is locked

Definition at line 73 of file SPK_Oriented3DRendererInterface.h.

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.

Since:
1.04.00
Enumerator:
LOOK_CAMERA_PLANE 

Look towards the camera plane (fast)

LOOK_CAMERA_POINT 

Look towards the camera point (better effect but more expensive)

LOOK_AXIS 

The look vector is defined by an axis (fast)

LOOK_POINT 

Look towards a point in the universe

Definition at line 42 of file SPK_Oriented3DRendererInterface.h.

enum ModelParam

Constants for the Model parameters.

Enumerator:
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

Definition at line 141 of file SPK_DEF.h.

Constants used to set bits in Model flags.

These constant values are simply 1 << ModelParam constants

Enumerator:
FLAG_NONE 

the flag bit for no parameter

FLAG_RED 

the flag bit for PARAM_RED

FLAG_GREEN 

the flag bit for PARAM_GREEN

FLAG_BLUE 

the flag bit for PARAM_BLUE

FLAG_ALPHA 

the flag bit for PARAM_ALPHA

FLAG_SIZE 

the flag bit for PARAM_SIZE

FLAG_MASS 

the flag bit for PARAM_MASS

FLAG_ANGLE 

the flag bit for PARAM_ANGLE

FLAG_TEXTURE_INDEX 

the flag bit for PARAM_TEXTURE_INDEX

FLAG_ROTATION_SPEED 

the flag bit for PARAM_ROTATION_SPEED

FLAG_CUSTOM_0 

the flag bit for PARAM_CUSTOM_0

FLAG_CUSTOM_1 

the flag bit for PARAM_CUSTOM_1

FLAG_CUSTOM_2 

the flag bit for PARAM_CUSTOM_2

Definition at line 39 of file SPK_Model.h.

Constants defining the triggers for Modifier.

Enumerator:
ALWAYS 

No trigger, a Particle is always modified

INSIDE_ZONE 

Trigger defining a Particle inside the Zone

OUTSIDE_ZONE 

Trigger defining a Particle outside the Zone

INTERSECT_ZONE 

Trigger defining a Particle intersecting the Zone (in any direction)

ENTER_ZONE 

Trigger defining a Particle entering the Zone

EXIT_ZONE 

Trigger defining a Particle exiting the Zone

Definition at line 42 of file SPK_Modifier.h.

Defines the orientation of a particle oriented in 2D.

Since:
1.04.00
Enumerator:
ORIENTATION2D_UP 

Oriented towards the camera plane

ORIENTATION2D_DIRECTION 

Oriented towards the direction of the particle

ORIENTATION2D_POINT 

Oriented towards a point in the universe

ORIENTATION2D_AXIS 

The orientation vector is defined by an axis

Definition at line 35 of file SPK_Oriented2DRendererInterface.h.

Orientation presets to easily set up common orientations.

Since:
1.04.00
Enumerator:
CAMERA_PLANE_ALIGNED 

Particles are oriented towards the camera plane (the most common)

CAMERA_POINT_ALIGNED 

Particles are oriented towards the camera point (better effect but more expensive)

DIRECTION_ALIGNED 

Particles are oriented function of their direction and try to look to the camera

AROUND_AXIS 

Particles can only rotate around an axis and try to look to the camera

TOWARDS_POINT 

Particles are oriented towards a point in the universe

FIXED_ORIENTATION 

Particles have a fixed orientation in the universe

Definition at line 83 of file SPK_Oriented3DRendererInterface.h.

enum PointType

Constants defining the type of points to render.

Enumerator:
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.

Constants defining the available rendering hints.

Since:
1.04.00
Enumerator:
ALPHA_TEST 

The alpha test. Enabling it is useful when rendering fully opaque particles with fully transparent zones (a texture of ball for instance)

DEPTH_TEST 

The depth test. Disabling it is useful when rendering particles with additive blending without having to sort them. Note that disabling the depth test will disable the depth write as well.

DEPTH_WRITE 

The depth write. Disabling it is useful when rendering particles with additive blending without having to sort them. Particles are still culled with the Zbuffer (when behind a wall for instance)

Definition at line 53 of file SPK_Renderer.h.

enum StepMode

Enumeration defining how to handle the step time of particle systems.

Since:
1.05.00
Enumerator:
STEP_REAL 

The step time is the deltatime passed by the user

STEP_CONSTANT 

The step time is a constant time therefore 0 to many updates may occur in a call

STEP_ADAPTIVE 

The step time is a range between 2 values therefore 0 to many updates may occur in a call

Definition at line 43 of file SPK_System.h.

Constants defining the way to apply texture over the particles.

Since:
1.02.00
Enumerator:
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.

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.

Since:
1.04.00
Enumerator:
UP_CAMERA 

The up vector is defined by the up vector of the camera (fast)

UP_DIRECTION 

The up vector is oriented towards the direction of the particle

UP_AXIS 

The up vector is is defined by an axis (fast)

UP_POINT 

The up vector is oriented towards a point

Definition at line 58 of file SPK_Oriented3DRendererInterface.h.


Function Documentation

SPK_PREFIX void SPK::crossProduct ( const Vector3D &  v0,
const Vector3D &  v1,
Vector3D &  result 
)

Computes the cross product between two Vector3D and stores the result in the Vector3D result.

Parameters:
v0 : the first Vector3D
v1 : the second Vector3D
result : the Vector3D where to store the cross product (v0 x v1)
SPK_PREFIX Vector3D SPK::crossProduct ( const Vector3D &  v0,
const Vector3D &  v1 
)

Returns the cross product between two Vector3D.

Parameters:
v0 : the first Vector3D
v1 : the second Vector3D
Returns:
the cross product (v0 x v1)
float dotProduct ( const Vector3D &  v0,
const Vector3D &  v1 
)

Returns the dot product between two Vector3D.

Parameters:
v0 : the first Vector3D
v1 : the second Vector3D
Returns:
the dot product (v0 . v1)

Definition at line 498 of file SPK_Vector3D.h.

SPK_PREFIX float SPK::getDist ( const Vector3D &  v0,
const Vector3D &  v1 
)

Returns the distance between two Vector3D.

Parameters:
v0 : the first Vector3D
v1 : the second Vector3D
Returns:
the distance between the two Vector3D
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.

Parameters:
v0 : the first Vector3D
v1 : the second Vector3D
Returns:
the square distance between the two Vector3D
bool operator!= ( const Vector3D &  v0,
const Vector3D &  v1 
)

Tests whether 2 Vector3D are different.

Parameters:
v0 : the first Vector3D to compare
v1 : the second Vector3D to compare
Returns:
true if the Vector3D are different, false if not
Since:
1.01.01

Definition at line 559 of file SPK_Vector3D.h.

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

Parameters:
f : the floating number
v : the vector3D
Returns:
the result 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

Parameters:
v : the vector3D
f : the floating number
Returns:
the result vector3D

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

Parameters:
f : the floating number
v : the vector3D
Returns:
the result 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

Parameters:
v : the vector3D
f : the floating number
Returns:
the result vector3D

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

Parameters:
v0 : the first vector3D
v1 : the second vector3D
Returns:
the result 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

Parameters:
f : the floating number
v : the vector3D
Returns:
the result 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

Parameters:
v : the vector3D
f : the floating number
Returns:
the result vector3D

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

Parameters:
v0 : the first vector3D
v1 : the second vector3D
Returns:
the result 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

Parameters:
f : the floating number
v : the vector3D
Returns:
the result 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

Parameters:
v : the vector3D
f : the floating number
Returns:
the result vector3D

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)

Parameters:
s : the output stream where to write
v : the Vector3D to write to the output stream
Returns:
the output stream
Since:
1.01.01

Definition at line 564 of file SPK_Vector3D.h.

bool operator== ( const Vector3D &  v0,
const Vector3D &  v1 
)

Tests whether 2 Vector3D are equal.

Parameters:
v0 : the first Vector3D to compare
v1 : the second Vector3D to compare
Returns:
true if the Vector3D are equal, false if not
Since:
1.01.01

Definition at line 554 of file SPK_Vector3D.h.

T SPK::random ( min,
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.

Parameters:
min : the minimum value
max : the maximum value
Returns:
a random number within [min,max[

Definition at line 115 of file SPK_DEF.h.


Variable Documentation

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

SPK_PREFIX unsigned int randomSeed

the random seed for the pseudo random numbers generation (1 by default)


Generated on Wed Apr 27 21:09:25 2011 for SPARK Particle Engine by  doxygen 1.6.1