the namespace for SFML dependent SPARK code More...
Classes | |
class | SFMLDrawableRenderer |
A Renderer drawing particles as SFML Drawables for the SFML 2D rendering engine. More... | |
class | SFMLLineRenderer |
A Renderer drawing particles as lines for the SFML 2D rendering engine. More... | |
class | SFMLPointRenderer |
A Renderer drawing particles as points for the SFML 2D rendering engine. More... | |
class | SFMLQuadRenderer |
A Renderer drawing particles as Quads for the SFML 2D rendering engine. More... | |
class | SFMLRenderer |
An abstract Renderer for the SFML renderers. More... | |
class | SFMLSystem |
A System to use particle systems as SFML Drawable object. More... | |
Enumerations | |
enum | CameraAnchor { CAMERA_CENTER = 0, CAMERA_LEFT = -1, CAMERA_RIGHT = 1, CAMERA_TOP = -1, CAMERA_BOTTOM = 1 } |
Constatns to position the camera in SFML 2D engine. More... | |
enum | ResizeMode { RESIZE_NONE, RESIZE_ZOOM_X, RESIZE_ZOOM_Y } |
Constants defining the way primitives must be resized when zooming. More... | |
Functions | |
Vector3D | vectorSPK (sf::Vector2f &v) |
Converts an SFML Vector2 into a SPARK Vector3D. | |
Vector3D | vectorSPK (sf::Vector3f &v) |
Converts an SFML Vector3 into a SPARK Vector3D. | |
sf::Vector2f | vector2SFML (Vector3D &v, bool addZ=false) |
Converts an SPARK Vector3D into a SFML Vector2. | |
sf::Vector3f | vector3SFML (Vector3D &v) |
Converts an SPARK Vector3D into a SFML Vector3. | |
void | setCameraPosition (CameraAnchor anchorX=CAMERA_RIGHT, CameraAnchor anchorY=CAMERA_BOTTOM, float altitude=10000.0f, float offset=1000.0f) |
Sets the camera position for a use in the SFML 2D engine. | |
void | setMatrix (Transformable &transformable, const sf::Matrix3 &matrix) |
A helper function to set a SFML matrix to a transformable. |
the namespace for SFML dependent SPARK code
enum CameraAnchor |
Constatns to position the camera in SFML 2D engine.
Definition at line 41 of file SPK_SFML_GLOBAL.h.
enum ResizeMode |
Constants defining the way primitives must be resized when zooming.
RESIZE_NONE |
Constant defining no resize |
RESIZE_ZOOM_X |
Constant defining a resize function of the X axis |
RESIZE_ZOOM_Y |
Constant defining a resize function of the Y axis |
Definition at line 39 of file SPK_SFMLRenderer.h.
void SPK::SFML::setCameraPosition | ( | CameraAnchor | anchorX = CAMERA_RIGHT , |
|
CameraAnchor | anchorY = CAMERA_BOTTOM , |
|||
float | altitude = 10000.0f , |
|||
float | offset = 1000.0f | |||
) |
Sets the camera position for a use in the SFML 2D engine.
This is an helper function to set up the camera position for either particle sorting or particle distance computation.
The user has to define where to place the camera with the anchor. This will influence the way particle are sorted. By default the anchor are CAMERA_RIGHT and CAMERA_BOTTOM <hich correspond to a classical way to sort objects in 2D.
The altitude and offset parameters can be used by default. However the user has the possibility to manually set them.
Basically any sorted System must be contained in the cube defined by (2 * offset,2 * offset,altitude)
System::setCameraPosition(const Vector3D&) can be used for more control.
This function basically calls System::setCameraPosition(Vector3D(anchorX * offset,anchorY * offset,altitude)).
anchorX | : the anchor on the X axis | |
anchorY | : the anchot on the Y axis | |
altitude | : the altitude of the camera | |
offset | : the offset the camera is positioned if not centered |
Definition at line 138 of file SPK_SFML_GLOBAL.h.
void SPK::SFML::setMatrix | ( | Transformable & | transformable, | |
const sf::Matrix3 & | matrix | |||
) |
A helper function to set a SFML matrix to a transformable.
transformable | : the transformable which transform should be set | |
matrix | : the SFML matrix to set to the transformable / |
Definition at line 152 of file SPK_SFML_GLOBAL.h.
sf::Vector2f SPK::SFML::vector2SFML | ( | Vector3D & | v, | |
bool | addZ = false | |||
) |
Converts an SPARK Vector3D into a SFML Vector2.
It performs this convertion :
v | : the SPARK Vector3D to convert | |
addZ | : if true the z coodinate of the SPARK Vector is added th its y coordinate for the convertion |
Definition at line 95 of file SPK_SFML_GLOBAL.h.
sf::Vector3f SPK::SFML::vector3SFML | ( | Vector3D & | v | ) |
Converts an SPARK Vector3D into a SFML Vector3.
It performs this convertion :
sf::Vector3f(v.x,v.y,v.z)
v | : the SPARK Vector3D to convert |
Definition at line 110 of file SPK_SFML_GLOBAL.h.
Vector3D SPK::SFML::vectorSPK | ( | sf::Vector3f & | v | ) |