An Emitter that emits particles in a portion of sphere. More...
Public Member Functions | |
SphericEmitter (const Vector3D &direction=Vector3D(0.0f, 0.0f,-1.0f), float angleA=0.0f, float angleB=0.0f) | |
Constructor of SphericEmitter. | |
void | setDirection (const Vector3D &direction) |
Sets the direction of this SphericEmitter. | |
void | setAngles (float angleA, float angleB) |
Sets the angles of this SphericEmitter. | |
const Vector3D & | getDirection () const |
Gets the direction of this SphericEmitter. | |
const Vector3D & | getTransformedDirection () const |
Gets the direction of this SphericEmitter. | |
float | getAngleMin () const |
Gets the minimum angle of this SphericEmitter. | |
float | getAngleMax () const |
Gets the maximum angle of this SphericEmitter. | |
Static Public Member Functions | |
static SphericEmitter * | create (const Vector3D &direction=Vector3D(0.0f, 0.0f,-1.0f), float angleA=0.0f, float angleB=0.0f) |
Creates and registers a new SphericEmitter. | |
Protected Member Functions | |
virtual void | innerUpdateTransform () |
Updates all the parameters in the world coordinates. |
An Emitter that emits particles in a portion of sphere.
This Emitter can emit particles in a spheric way. To do that 2 angles and a direction Vector3D can be parametered :
Here are a few examples :
Definition at line 50 of file SPK_SphericEmitter.h.
SphericEmitter | ( | const Vector3D & | direction = Vector3D(0.0f, 0.0f,-1.0f) , |
|
float | angleA = 0.0f , |
|||
float | angleB = 0.0f | |||
) |
Constructor of SphericEmitter.
direction | : the direction of the SphericEmitter | |
angleA | : the first angle in radians of the SphericEmitter | |
angleB | : the second angle in radians of the SphericEmitter |
SphericEmitter * create | ( | const Vector3D & | direction = Vector3D(0.0f,0.0f,-1.0f) , |
|
float | angleA = 0.0f , |
|||
float | angleB = 0.0f | |||
) | [static] |
Creates and registers a new SphericEmitter.
direction | : the direction of the SphericEmitter | |
angleA | : the first angle in radians of the SphericEmitter | |
angleB | : the second angle in radians of the SphericEmitter |
Definition at line 155 of file SPK_SphericEmitter.h.
float getAngleMax | ( | ) | const |
Gets the maximum angle of this SphericEmitter.
Definition at line 177 of file SPK_SphericEmitter.h.
float getAngleMin | ( | ) | const |
Gets the minimum angle of this SphericEmitter.
Definition at line 172 of file SPK_SphericEmitter.h.
const Vector3D & getDirection | ( | ) | const |
Gets the direction of this SphericEmitter.
Definition at line 162 of file SPK_SphericEmitter.h.
const Vector3D & getTransformedDirection | ( | ) | const |
Gets the direction of this SphericEmitter.
Definition at line 167 of file SPK_SphericEmitter.h.
virtual void innerUpdateTransform | ( | ) | [protected, virtual] |
Updates all the parameters in the world coordinates.
This method can be overriden in derived classes of Transformable (By default it does nothing).
It is this method task to compute all parameters of the class that are dependent of the world transform.
Reimplemented from Transformable.
void setAngles | ( | float | angleA, | |
float | angleB | |||
) |
Sets the angles of this SphericEmitter.
Note that angles are clamped between 0 and 2 * PI AngleA does not have to be inferior to angleB, it has no importance as angles are sorted within the method.
angleA | : the first angle in radians of this SphericEmitter | |
angleB | : the second angle in radians of this SphericEmitter |
void setDirection | ( | const Vector3D & | direction | ) |
Sets the direction of this SphericEmitter.
Note that it is not necessary to provide a normalized Vector3D. This Vector3D only indicates a direction, its norm does not matter.
direction | : the direction of this SphericEmitter |