SLProject 4.0.000
SLParticleSystem Class Reference

SLParticleSystem creates a particle meshes from a point primitive buffer. More...

#include <SLParticleSystem.h>

Inheritance diagram for SLParticleSystem:
[legend]

Public Member Functions

 SLParticleSystem (SLAssetManager *assetMgr, const SLint amount, const SLVec3f &velocityRandomStart, const SLVec3f &velocityRandomEnd, const SLfloat &timeToLive, SLGLTexture *texC, const SLstring &name="Particle system", SLGLTexture *texFlipbook=nullptr)
 SLParticleSystem ctor with some initial values. The number of particles. More...
 
void draw (SLSceneView *sv, SLNode *node)
 
void deleteData ()
 deleteData deletes all mesh data and VAOs More...
 
void deleteDataGpu ()
 deleteData deletes all mesh data and VAOs More...
 
void buildAABB (SLAABBox &aabb, const SLMat4f &wmNode)
 
void generate ()
 Function which will generate the particles and attributes them to the VAO. More...
 
void generateBernsteinPAlpha ()
 
void generateBernsteinPSize ()
 
void changeTexture ()
 
void setNotVisibleInFrustum ()
 
void pauseOrResume ()
 
SLVec3f acceleration ()
 
SLfloat accelerationConst ()
 
SLint amount ()
 
SLfloat angularVelocityConst ()
 
SLVec2f angularVelocityRange ()
 
float * bezierControlPointAlpha ()
 
float * bezierStartEndPointAlpha ()
 
float * bezierControlPointSize ()
 
float * bezierStartEndPointSize ()
 
SLBillboardType billboardType ()
 
SLCol4f color ()
 
SLVColorLUTPointcolorPoints ()
 
SLbool doDirectionSpeed ()
 
SLbool doSpeedRange ()
 
SLbool doAcc ()
 
SLbool doAccDiffDir ()
 
SLbool doAlphaOverLT ()
 
SLbool doAlphaOverLTCurve ()
 
SLbool doBlendBrightness ()
 
SLbool doCounterGap ()
 
SLbool doColor ()
 
SLbool doColorOverLT ()
 
SLbool doGravity ()
 
SLbool doFlipBookTexture ()
 
SLbool doRotation ()
 
SLbool doRotRange ()
 
SLbool doSizeOverLT ()
 
SLbool doSizeOverLTCurve ()
 
SLbool doShape ()
 
SLbool doShapeSurface ()
 
SLbool doShapeOverride ()
 
SLbool doShapeSpawnBase ()
 
SLbool doWorldSpace ()
 
SLVec3f direction ()
 
AvgFloatdrawTime ()
 
SLVec3f emitterPos () const
 
SLVec3f gravity ()
 
SLint flipbookColumns ()
 
SLint flipbookRows ()
 
int frameRateFB ()
 
SLbool isGenerated ()
 
SLbool isPaused ()
 
SLfloat radiusW ()
 
SLfloat radiusH ()
 
SLfloat scale ()
 
SLShapeType shapeType ()
 
SLfloat shapeAngle ()
 
SLfloat shapeHeight ()
 
SLfloat shapeRadius ()
 
SLVec3f shapeScale ()
 
SLfloat shapeWidth ()
 
SLfloat speed ()
 
SLVec2f speedRange ()
 
SLGLTexturetextureFirst ()
 
SLGLTexturetextureFlipbook ()
 
SLfloat timeToLive ()
 
AvgFloatupdateTime ()
 
SLint velocityType ()
 
SLVec3f velocityConst ()
 
SLVec3f velocityRndMin ()
 
SLVec3f velocityRndMax ()
 
void amount (SLint i)
 
void accConst (SLfloat f)
 
void acceleration (SLVec3f v)
 
void acceleration (SLfloat vX, SLfloat vY, SLfloat vZ)
 
void angularVelocityConst (SLfloat f)
 
void angularVelocityRange (SLVec2f v)
 
void angularVelocityRange (SLfloat vX, SLfloat vY)
 
void billboardType (SLBillboardType bt)
 
void bezierControlPointAlpha (float arrayPoint[4])
 
void bezierStartEndPointAlpha (float arrayPoint[4])
 
void bezierControlPointSize (float arrayPoint[4])
 
void bezierStartEndPointSize (float arrayPoint[4])
 
void color (SLCol4f c)
 
void colorArr (SLfloat *arr)
 
void direction (SLVec3f v)
 
void direction (SLfloat vX, SLfloat vY, SLfloat vZ)
 
void doAcceleration (SLbool b)
 
void doAlphaOverLT (SLbool b)
 
void doAlphaOverLTCurve (SLbool b)
 
void doAccDiffDir (SLbool b)
 
void doBlendBrightness (SLbool b)
 
void doColor (SLbool b)
 
void doColorOverLT (SLbool b)
 
void doCounterGap (SLbool b)
 
void doDirectionSpeed (SLbool b)
 
void doGravity (SLbool b)
 
void doFlipBookTexture (SLbool b)
 
void doRotation (SLbool b)
 
void doRotRange (SLbool b)
 
void doSpeedRange (SLbool b)
 
void doShape (SLbool b)
 
void doShapeSurface (SLbool b)
 
void doShapeOverride (SLbool b)
 
void doShapeSpawnBase (SLbool b)
 
void doSizeOverLT (SLbool b)
 
void doSizeOverLTCurve (SLbool b)
 
void doWorldSpace (SLbool b)
 
void emitterPos (SLVec3f p)
 
void gravity (SLVec3f v)
 
void gravity (SLfloat vX, SLfloat vY, SLfloat vZ)
 
void flipbookColumns (SLint i)
 
void flipbookRows (SLint i)
 
void frameRateFB (int i)
 
void isGenerated (SLbool b)
 
void radiusW (SLfloat f)
 
void radiusH (SLfloat f)
 
void scale (SLfloat f)
 
void speed (SLfloat f)
 
void speedRange (SLVec2f v)
 
void speedRange (SLfloat vX, SLfloat vY)
 
void shapeType (SLShapeType st)
 
void shapeAngle (SLfloat f)
 
void shapeRadius (SLfloat r)
 
void shapeScale (SLVec3f v)
 
void shapeScale (SLfloat vX, SLfloat vY, SLfloat vZ)
 
void shapeHeight (SLfloat f)
 
void shapeWidth (SLfloat f)
 
void timeToLive (SLfloat f)
 
void textureFirst (SLGLTexture *t)
 
void textureFlipbook (SLGLTexture *t)
 
void velocityType (SLint i)
 
void velocityConst (SLVec3f v)
 
void velocityConst (SLfloat vX, SLfloat vY, SLfloat vZ)
 
void velocityRndMin (SLVec3f v)
 
void velocityRndMin (SLfloat vX, SLfloat vY, SLfloat vZ)
 
void velocityRndMax (SLVec3f v)
 
void velocityRndMax (SLfloat vX, SLfloat vY, SLfloat vZ)
 
- Public Member Functions inherited from SLMesh
 SLMesh (SLAssetManager *assetMgr, const SLstring &name="Mesh")
 
 ~SLMesh () override
 The destructor deletes everything by calling deleteData. More...
 
virtual void init (SLNode *node)
 SLMesh::shapeInit sets the transparency flag of the AABB. More...
 
virtual void draw (SLSceneView *sv, SLNode *node)
 
void drawIntoDepthBuffer (SLSceneView *sv, SLNode *node, SLMaterial *depthMat)
 Simplified drawing method for shadow map creation. More...
 
void addStats (SLNodeStats &stats)
 
virtual void buildAABB (SLAABBox &aabb, const SLMat4f &wmNode)
 
void updateAccelStruct ()
 
SLbool hit (SLRay *ray, SLNode *node)
 
virtual void preShade (SLRay *ray)
 
virtual void deleteData ()
 SLMesh::deleteData deletes all mesh data and vbo's. More...
 
virtual void deleteDataGpu ()
 
void deleteSelected (SLNode *node)
 Deletes the rectangle selected vertices and the dependent triangles. More...
 
void deleteUnused ()
 Deletes unused vertices (= vertices that are not indexed in I16 or I32) More...
 
virtual void calcMinMax ()
 
virtual void calcNormals ()
 SLMesh::calcNormals recalculates vertex normals for triangle meshes. More...
 
void calcCenterRad (SLVec3f &center, SLfloat &radius)
 
SLbool hitTriangleOS (SLRay *ray, SLNode *node, SLuint iT)
 
virtual void generateVAO (SLGLVertexArray &vao)
 Generate the Vertex Array Object for a specific shader program. More...
 
void computeHardEdgesIndices (float angleRAD, float epsilon)
 computes the hard edges and stores the vertex indexes separately More...
 
void transformSkin (const std::function< void(SLMesh *)> &cbInformNodes)
 Transforms the vertex positions and normals with by joint weights. More...
 
void deselectPartialSelection ()
 
SLMaterialmat () const
 
SLMaterialmatOut () const
 
SLGLPrimitiveType primitive () const
 
const SLAnimSkeletonskeleton () const
 
SLuint numI () const
 
SLGLVertexArrayvao ()
 
SLbool isSelected () const
 
SLfloat edgeAngleDEG () const
 
SLfloat edgeWidth () const
 
SLCol4f edgeColor () const
 
SLVec3f finalP (SLuint i)
 
SLVec3f finalN (SLuint i)
 
SLbool accelStructIsOutOfDate ()
 
void mat (SLMaterial *m)
 
void matOut (SLMaterial *m)
 
void primitive (SLGLPrimitiveType pt)
 
void skeleton (SLAnimSkeleton *skel)
 
void isSelected (bool isSelected)
 
void edgeWidth (SLfloat ew)
 
void edgeAngleDEG (SLfloat ea)
 
void edgeColor (const SLCol4f &ec)
 
void vertexPosEpsilon (SLfloat eps)
 
- Public Member Functions inherited from SLObject
 SLObject (const SLstring &Name="", const SLstring &url="")
 
virtual ~SLObject ()
 
void name (const SLstring &Name)
 
void url (const SLstring &url)
 
const SLstringname () const
 
const SLstringurl () const
 

Private Member Functions

SLVec3f getPointInSphere (float radius, SLVec3f randomX)
 Function which return a position in a sphere. More...
 
SLVec3f getPointOnSphere (float radius, SLVec3f randomX)
 Function which return a position on a sphere. More...
 
SLVec3f getDirectionSphere (SLVec3f position)
 Function which return the direction towards the exterior of a sphere. More...
 
SLVec3f getPointInBox (SLVec3f boxScale)
 Function which return a position in a box. More...
 
SLVec3f getPointOnBox (SLVec3f boxScale)
 Function which return a position on a box. More...
 
SLVec3f getDirectionBox (SLVec3f position)
 Function which return the direction towards the exterior of a box. More...
 
SLVec3f getPointInCone ()
 Function which return a position in the cone define in the particle system. More...
 
SLVec3f getPointOnCone ()
 Function which return a position on the cone define in the particle system. More...
 
SLVec3f getDirectionCone (SLVec3f position)
 Function which return a direction following the cone shape. More...
 
SLVec3f getPointInPyramid ()
 Function which return a position in the pyramid define in the particle system. More...
 
SLVec3f getPointOnPyramid ()
 Function which return a position on the pyramid define in the particle system. More...
 
SLVec3f getDirectionPyramid (SLVec3f position)
 Function which return a direction following the pyramid shape. More...
 

Private Attributes

SLint _amount
 Amount of a particle. More...
 
SLVec3f _emitterPos
 Position of the particle emitter. More...
 
SLfloat _timeToLive
 Time to live of a particle. More...
 
SLfloat _radiusW = 0.4f
 width radius of a particle More...
 
SLfloat _radiusH = 0.4f
 height radius of a particle More...
 
SLfloat _scale = 1.0f
 Scale of a particle (Scale the radius) More...
 
SLVec4f _bernsteinPYAlpha = SLVec4f(2.0f, -3.0f, 0.0f, 1.0f)
 Vector for bezier curve (default linear function) More...
 
float _bezierControlPointAlpha [4] = {0.0f, 1.0f, 1.0f, 0.0f}
 Floats for bezier curve control points (P1: 01 ; P2: 23) More...
 
float _bezierStartEndPointAlpha [4] = {0.0f, 1.0f, 1.0f, 0.0f}
 Floats for bezier curve end start points (Start: 01 ; End: 23) More...
 
SLVec4f _bernsteinPYSize = SLVec4f(-1.4f, 1.8f, 0.6f, 0.0f)
 Vector for bezier curve (default linear function) More...
 
float _bezierControlPointSize [4] = {0.0f, 0.0f, 1.0f, 1.0f}
 Floats for bezier curve control points (P1: 01 ; P2: 23) More...
 
float _bezierStartEndPointSize [4] = {0.0f, 0.0f, 1.0f, 1.0f}
 Floats for bezier curve end start points (Start: 01 ; End: 23) More...
 
SLVec3f _acceleration = SLVec3f(1, 1, 1)
 Vector for acceleration (different direction as the velocity) More...
 
SLfloat _accelerationConst = 0.0f
 Acceleration constant (same direction as the velocity) More...
 
SLVec3f _gravity = SLVec3f(0.0f, -9.81f, 0.0f)
 Vector for gravity (2nd. acceleration vector) More...
 
SLVec3f _velocityConst = SLVec3f(0, 1, 0)
 Velocity constant (go in xyz direction) More...
 
SLVec3f _velocityRndMin = SLVec3f(-1, -1, -1)
 Min. random velocity. More...
 
SLVec3f _velocityRndMax = SLVec3f(1, 1, 1)
 Max. random velocity. More...
 
SLVec3f _direction = SLVec3f(0, 0, 0)
 Direction of particle. More...
 
SLfloat _speed = 1.0f
 Speed of particle. More...
 
SLVec2f _speedRange = SLVec2f(1, 2)
 Speed random between two value. More...
 
SLCol4f _color = SLCol4f(0.66f, 0.0f, 0.66f, 0.2f)
 Color for particle. More...
 
SLfloat _colorArr [256 *3]
 Color values of color gradient widget. More...
 
SLVColorLUTPoint _colorPoints
 
int _drawBuf = 0
 Color gradient points. More...
 
int _flipbookFPS = 16
 Number of update of flipbook by second. More...
 
float _flipboookLastUpdate = 0.0f
 Last time flipbook was updated. More...
 
SLint _flipbookColumns = 8
 Number of flipbook sub-textures by column. More...
 
SLint _flipbookRows = 8
 Number of flipbook sub-textures by row. More...
 
AvgFloat _updateTime
 Averaged time for updating in MS. More...
 
AvgFloat _drawTime
 Averaged time for drawing in MS. More...
 
SLfloat _startDrawTimeMS = 0.0f
 Time since start of draw in MS. More...
 
SLfloat _startUpdateTimeMS = 0.0f
 Time since start for updating in MS. More...
 
SLfloat _startUpdateTimeS = 0.0f
 Time since start for updating in S. More...
 
SLfloat _deltaTimeUpdateS = 0.0f
 Delta time in between two frames S. More...
 
SLfloat _notVisibleTimeS = 0.0f
 Time since start when node not visible in S. More...
 
SLfloat _lastTimeBeforePauseS = 0.0f
 Time since the particle system is paused. More...
 
SLfloat _shapeRadius = 1.0f
 Radius of sphere and cone shape. More...
 
SLVec3f _shapeScale = SLVec3f(1.0f)
 Scale of box shape. More...
 
SLfloat _shapeHeight = 3.0f
 Height of cone and pyramid shapes. More...
 
SLfloat _shapeAngle = 10.0f
 Angle of cone and pyramid shapes. More...
 
SLfloat _shapeWidth = 2.0f
 Width of pyramid shape. More...
 
SLfloat _angularVelocityConst = 30.0f
 Rotation rate const (change in angular rotation divide by change in time) More...
 
SLVec2f _angularVelocityRange = SLVec2f(-30.0f, 30.0f)
 Rotation rate range (change in angular rotation divide by change in time) More...
 
SLBillboardType _billboardType = BT_Camera
 Billboard type (BT_Camera, BT_Vertical, BT_Horizontal. More...
 
SLShapeType _shapeType = ST_Sphere
 Shape type (ST_) More...
 
SLint _velocityType = 0
 Velocity type. More...
 
SLGLTexture_textureFirst
 Main texture of PS (non flipbook) More...
 
SLGLTexture_textureFlipbook
 Flipbook texture with e.g. multiple flames at subsequent frames. More...
 
SLGLVertexArray _vao1
 First OpenGL Vertex Array Object for swapping between updating/drawing. More...
 
SLGLVertexArray _vao2
 Second OpenGL Vertex Array Object for swapping between updating/drawing. More...
 
SLbool _isVisibleInFrustum = true
 Boolean to set time since node not visible. More...
 
SLbool _isPaused = false
 Boolean to stop updating. More...
 
SLbool _isGenerated = false
 Boolean to generate particle system and load it on the GPU. More...
 
SLbool _doBlendBrightness = false
 Boolean for glow/brightness on pixel with many particle. More...
 
SLbool _doDirectionSpeed = false
 Boolean for direction and speed (override velocity) More...
 
SLbool _doSpeedRange = false
 Boolean for speed range. More...
 
SLbool _doCounterGap = true
 Boolean for counter lag/gap, can create flickering with few particle (explained in documentation) when enable. More...
 
SLbool _doAcceleration = false
 Boolean for acceleration. More...
 
SLbool _doAccDiffDir = false
 Boolean for acceleration (different direction) More...
 
SLbool _doRotation = true
 Boolean for rotation. More...
 
SLbool _doRotRange = false
 Boolean for rotation range (random value between range) More...
 
SLbool _doColor = true
 Boolean for color. More...
 
SLbool _doShape = false
 Boolean for shape feature. More...
 
SLbool _doShapeSurface = false
 Boolean for shape surface (particle will be spawned on surface) More...
 
SLbool _doShapeOverride = false
 Boolean for override direction for shape direction. More...
 
SLbool _doShapeSpawnBase = false
 Boolean for spawn at base of shape (for cone and pyramid) More...
 
SLbool _doWorldSpace = false
 Boolean for world space position. More...
 
SLbool _doGravity = false
 Boolean for gravity. More...
 
SLbool _doAlphaOverLT = true
 Boolean for alpha over life time. More...
 
SLbool _doColorOverLT = false
 Boolean for color over life time. More...
 
SLbool _doAlphaOverLTCurve = false
 Boolean for alpha over life time curve. More...
 
SLbool _doSizeOverLT = true
 Boolean for size over life time. More...
 
SLbool _doSizeOverLTCurve = false
 Boolean for size over life time curve. More...
 
SLbool _doFlipBookTexture = false
 Boolean for flipbook texture. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from SLMesh
static void calcTex3DMatrix (SLNode *node)
 
- Public Attributes inherited from SLMesh
SLVVec3f P
 Vector for vertex positions layout (location = 0) More...
 
SLVVec3f N
 Vector for vertex normals (opt.) layout (location = 1) More...
 
SLVVec2f UV [2]
 Array of 2 Vectors for tex. coords. (opt.) layout (location = 2) More...
 
SLVCol4f C
 Vector of vertex colors (opt.) layout (location = 4) More...
 
SLVVec4f T
 Vector of vertex tangents (opt.) layout (location = 5) More...
 
SLVVuchar Ji
 2D Vector of per vertex joint ids (opt.) layout (location = 6) More...
 
SLVVfloat Jw
 2D Vector of per vertex joint weights (opt.) layout (location = 7) More...
 
SLVVec3f skinnedP
 temp. vector for CPU skinned vertex positions More...
 
SLVVec3f skinnedN
 temp. vector for CPU skinned vertex normals More...
 
SLVushort I16
 Vector of vertex indices 16 bit. More...
 
SLVuint I32
 Vector of vertex indices 32 bit. More...
 
SLVuint IS32
 Vector of rectangle selected vertex indices 32 bit. More...
 
SLVushort IE16
 Vector of hard edges vertex indices 16 bit (see computeHardEdgesIndices) More...
 
SLVuint IE32
 Vector of hard edges vertex indices 32 bit (see computeHardEdgesIndices) More...
 
SLVec3f minP
 min. vertex in OS More...
 
SLVec3f maxP
 max. vertex in OS More...
 
- Protected Attributes inherited from SLMesh
SLGLPrimitiveType _primitive
 Primitive type (default triangles) More...
 
SLMaterial_mat
 Pointer to the inside material. More...
 
SLMaterial_matOut
 Pointer to the outside material. More...
 
SLGLVertexArray _vao
 Main OpenGL Vertex Array Object for drawing. More...
 
SLGLVertexArrayExt _vaoN
 OpenGL VAO for optional normal drawing. More...
 
SLGLVertexArrayExt _vaoT
 OpenGL VAO for optional tangent drawing. More...
 
SLGLVertexArrayExt _vaoS
 OpenGL VAO for optional selection drawing. More...
 
SLbool _isSelected
 Flag if mesh is partially of fully selected. More...
 
SLfloat _edgeAngleDEG
 Edge crease angle in degrees between face normals (30 deg. default) More...
 
SLfloat _edgeWidth
 Line width for hard edge drawing. More...
 
SLCol4f _edgeColor
 Color for hard edge drawing. More...
 
SLfloat _vertexPosEpsilon
 Vertex position epsilon used in computeHardEdgesIndices. More...
 
SLbool _isVolume
 Flag for RT if mesh is a closed volume. More...
 
SLAccelStruct_accelStruct
 KD-tree or uniform grid. More...
 
SLbool _accelStructIsOutOfDate
 Flag id accel.struct needs update. More...
 
SLAnimSkeleton_skeleton
 The skeleton this mesh is bound to. More...
 
SLVMat4f _jointMatrices
 Joint matrix vector for this mesh. More...
 
SLVVec3f_finalP
 Pointer to final vertex position vector. More...
 
SLVVec3f_finalN
 pointer to final vertex normal vector More...
 
- Protected Attributes inherited from SLObject
SLstring _name
 name of an object More...
 
SLstring _url
 uniform resource locator More...
 

Detailed Description

SLParticleSystem creates a particle meshes from a point primitive buffer.

The SLParticleSystem mesh object of which the vertices are drawn as points. An OpenGL transform feedback buffer is used to update the particle positions on the GPU and a geometry shader is used the create two triangles per particle vertex and orient them as a billboard to the viewer. Geometry shaders are only supported under OpenGL >= 4.0 and OpenGL ES >= 3.2. This is the case on most desktop systems and on Android SDK > 24 but not on iOS which has only OpenGL ES 3.0.
. The particle system supports many options of which many can be turned on the do* methods. All options can also be modified in the UI when the mesh is selected. See the different demo scenes in the app_demo_slproject under the demo scene group Particle Systems.

Constructor & Destructor Documentation

◆ SLParticleSystem()

SLParticleSystem::SLParticleSystem ( SLAssetManager assetMgr,
const SLint  amount,
const SLVec3f velocityRandomStart,
const SLVec3f velocityRandomEnd,
const SLfloat timeToLive,
SLGLTexture texC,
const SLstring name = "Particle system",
SLGLTexture texFlipbook = nullptr 
)

SLParticleSystem ctor with some initial values. The number of particles.

The particle emitter position, the start and end random value range The time to live of the particle (lifetime). A texture, a name and a flipbook texture.

Member Function Documentation

◆ accConst()

void SLParticleSystem::accConst ( SLfloat  f)
inline

◆ acceleration() [1/3]

SLVec3f SLParticleSystem::acceleration ( )
inline

◆ acceleration() [2/3]

void SLParticleSystem::acceleration ( SLfloat  vX,
SLfloat  vY,
SLfloat  vZ 
)
inline

◆ acceleration() [3/3]

void SLParticleSystem::acceleration ( SLVec3f  v)
inline

◆ accelerationConst()

SLfloat SLParticleSystem::accelerationConst ( )
inline

◆ amount() [1/2]

SLint SLParticleSystem::amount ( )
inline

◆ amount() [2/2]

void SLParticleSystem::amount ( SLint  i)
inline

◆ angularVelocityConst() [1/2]

SLfloat SLParticleSystem::angularVelocityConst ( )
inline

◆ angularVelocityConst() [2/2]

void SLParticleSystem::angularVelocityConst ( SLfloat  f)
inline

◆ angularVelocityRange() [1/3]

SLVec2f SLParticleSystem::angularVelocityRange ( )
inline

◆ angularVelocityRange() [2/3]

void SLParticleSystem::angularVelocityRange ( SLfloat  vX,
SLfloat  vY 
)
inline

◆ angularVelocityRange() [3/3]

void SLParticleSystem::angularVelocityRange ( SLVec2f  v)
inline

◆ bezierControlPointAlpha() [1/2]

float * SLParticleSystem::bezierControlPointAlpha ( )
inline

◆ bezierControlPointAlpha() [2/2]

void SLParticleSystem::bezierControlPointAlpha ( float  arrayPoint[4])
inline

◆ bezierControlPointSize() [1/2]

float * SLParticleSystem::bezierControlPointSize ( )
inline

◆ bezierControlPointSize() [2/2]

void SLParticleSystem::bezierControlPointSize ( float  arrayPoint[4])
inline

◆ bezierStartEndPointAlpha() [1/2]

float * SLParticleSystem::bezierStartEndPointAlpha ( )
inline

◆ bezierStartEndPointAlpha() [2/2]

void SLParticleSystem::bezierStartEndPointAlpha ( float  arrayPoint[4])
inline

◆ bezierStartEndPointSize() [1/2]

float * SLParticleSystem::bezierStartEndPointSize ( )
inline

◆ bezierStartEndPointSize() [2/2]

void SLParticleSystem::bezierStartEndPointSize ( float  arrayPoint[4])
inline

◆ billboardType() [1/2]

SLBillboardType SLParticleSystem::billboardType ( )
inline

◆ billboardType() [2/2]

void SLParticleSystem::billboardType ( SLBillboardType  bt)
inline

◆ buildAABB()

void SLParticleSystem::buildAABB ( SLAABBox aabb,
const SLMat4f wmNode 
)
virtual

SLParticleSystem::buildAABB builds the passed axis-aligned bounding box in OS and updates the min & max points in WS with the passed WM of the node. Take into account features like acceleration, gravity, shape, velocity. SLMesh::buildAABB builds the passed axis-aligned bounding box in OS and updates the min& max points in WS with the passed WM of the node. Todo: Can ben enhance furthermore the acceleration doesn't work wll for the moments The negative value for the acceleration are not take into account and also acceleration which goes against the velocity. To adapt the acceleration to exactly the same as the gravity not enough time to do it. Need to adapt more accurately when direction speed is negative (for shape override example with Cone)

Reimplemented from SLMesh.

◆ changeTexture()

void SLParticleSystem::changeTexture ( )

Change the current use texture, this will switch between the normal texture and the flipbook texture (and vice versa)

◆ color() [1/2]

SLCol4f SLParticleSystem::color ( )
inline

◆ color() [2/2]

void SLParticleSystem::color ( SLCol4f  c)
inline

◆ colorArr()

void SLParticleSystem::colorArr ( SLfloat arr)
inline

◆ colorPoints()

SLVColorLUTPoint & SLParticleSystem::colorPoints ( )
inline

◆ deleteData()

void SLParticleSystem::deleteData ( )
virtual

deleteData deletes all mesh data and VAOs

Reimplemented from SLMesh.

◆ deleteDataGpu()

void SLParticleSystem::deleteDataGpu ( )
virtual

deleteData deletes all mesh data and VAOs

Reimplemented from SLMesh.

◆ direction() [1/3]

SLVec3f SLParticleSystem::direction ( )
inline

◆ direction() [2/3]

void SLParticleSystem::direction ( SLfloat  vX,
SLfloat  vY,
SLfloat  vZ 
)
inline

◆ direction() [3/3]

void SLParticleSystem::direction ( SLVec3f  v)
inline

◆ doAcc()

SLbool SLParticleSystem::doAcc ( )
inline

◆ doAccDiffDir() [1/2]

SLbool SLParticleSystem::doAccDiffDir ( )
inline

◆ doAccDiffDir() [2/2]

void SLParticleSystem::doAccDiffDir ( SLbool  b)
inline

◆ doAcceleration()

void SLParticleSystem::doAcceleration ( SLbool  b)
inline

◆ doAlphaOverLT() [1/2]

SLbool SLParticleSystem::doAlphaOverLT ( )
inline

◆ doAlphaOverLT() [2/2]

void SLParticleSystem::doAlphaOverLT ( SLbool  b)
inline

◆ doAlphaOverLTCurve() [1/2]

SLbool SLParticleSystem::doAlphaOverLTCurve ( )
inline

◆ doAlphaOverLTCurve() [2/2]

void SLParticleSystem::doAlphaOverLTCurve ( SLbool  b)
inline

◆ doBlendBrightness() [1/2]

SLbool SLParticleSystem::doBlendBrightness ( )
inline

◆ doBlendBrightness() [2/2]

void SLParticleSystem::doBlendBrightness ( SLbool  b)
inline

◆ doColor() [1/2]

SLbool SLParticleSystem::doColor ( )
inline

◆ doColor() [2/2]

void SLParticleSystem::doColor ( SLbool  b)
inline

◆ doColorOverLT() [1/2]

SLbool SLParticleSystem::doColorOverLT ( )
inline

◆ doColorOverLT() [2/2]

void SLParticleSystem::doColorOverLT ( SLbool  b)
inline

◆ doCounterGap() [1/2]

SLbool SLParticleSystem::doCounterGap ( )
inline

◆ doCounterGap() [2/2]

void SLParticleSystem::doCounterGap ( SLbool  b)
inline

◆ doDirectionSpeed() [1/2]

SLbool SLParticleSystem::doDirectionSpeed ( )
inline

◆ doDirectionSpeed() [2/2]

void SLParticleSystem::doDirectionSpeed ( SLbool  b)
inline

◆ doFlipBookTexture() [1/2]

SLbool SLParticleSystem::doFlipBookTexture ( )
inline

◆ doFlipBookTexture() [2/2]

void SLParticleSystem::doFlipBookTexture ( SLbool  b)
inline

◆ doGravity() [1/2]

SLbool SLParticleSystem::doGravity ( )
inline

◆ doGravity() [2/2]

void SLParticleSystem::doGravity ( SLbool  b)
inline

◆ doRotation() [1/2]

SLbool SLParticleSystem::doRotation ( )
inline

◆ doRotation() [2/2]

void SLParticleSystem::doRotation ( SLbool  b)
inline

◆ doRotRange() [1/2]

SLbool SLParticleSystem::doRotRange ( )
inline

◆ doRotRange() [2/2]

void SLParticleSystem::doRotRange ( SLbool  b)
inline

◆ doShape() [1/2]

SLbool SLParticleSystem::doShape ( )
inline

◆ doShape() [2/2]

void SLParticleSystem::doShape ( SLbool  b)
inline

◆ doShapeOverride() [1/2]

SLbool SLParticleSystem::doShapeOverride ( )
inline

◆ doShapeOverride() [2/2]

void SLParticleSystem::doShapeOverride ( SLbool  b)
inline

◆ doShapeSpawnBase() [1/2]

SLbool SLParticleSystem::doShapeSpawnBase ( )
inline

◆ doShapeSpawnBase() [2/2]

void SLParticleSystem::doShapeSpawnBase ( SLbool  b)
inline

◆ doShapeSurface() [1/2]

SLbool SLParticleSystem::doShapeSurface ( )
inline

◆ doShapeSurface() [2/2]

void SLParticleSystem::doShapeSurface ( SLbool  b)
inline

◆ doSizeOverLT() [1/2]

SLbool SLParticleSystem::doSizeOverLT ( )
inline

◆ doSizeOverLT() [2/2]

void SLParticleSystem::doSizeOverLT ( SLbool  b)
inline

◆ doSizeOverLTCurve() [1/2]

SLbool SLParticleSystem::doSizeOverLTCurve ( )
inline

◆ doSizeOverLTCurve() [2/2]

void SLParticleSystem::doSizeOverLTCurve ( SLbool  b)
inline

◆ doSpeedRange() [1/2]

SLbool SLParticleSystem::doSpeedRange ( )
inline

◆ doSpeedRange() [2/2]

void SLParticleSystem::doSpeedRange ( SLbool  b)
inline

◆ doWorldSpace() [1/2]

SLbool SLParticleSystem::doWorldSpace ( )
inline

◆ doWorldSpace() [2/2]

void SLParticleSystem::doWorldSpace ( SLbool  b)
inline

◆ draw()

void SLParticleSystem::draw ( SLSceneView sv,
SLNode node 
)
virtual

Draw function override from SLMesh. In this function I start by generate the particle and programs if they are not, then I check if the particle have been culled by the frustum culling or if they have been resumed by the user. After I update the particle in the update pass, then and finally I draw them.

Reimplemented from SLMesh.

◆ drawTime()

AvgFloat & SLParticleSystem::drawTime ( )
inline

◆ emitterPos() [1/2]

SLVec3f SLParticleSystem::emitterPos ( ) const
inline

◆ emitterPos() [2/2]

void SLParticleSystem::emitterPos ( SLVec3f  p)
inline

◆ flipbookColumns() [1/2]

SLint SLParticleSystem::flipbookColumns ( )
inline

◆ flipbookColumns() [2/2]

void SLParticleSystem::flipbookColumns ( SLint  i)
inline

◆ flipbookRows() [1/2]

SLint SLParticleSystem::flipbookRows ( )
inline

◆ flipbookRows() [2/2]

void SLParticleSystem::flipbookRows ( SLint  i)
inline

◆ frameRateFB() [1/2]

int SLParticleSystem::frameRateFB ( )
inline

◆ frameRateFB() [2/2]

void SLParticleSystem::frameRateFB ( int  i)
inline

◆ generate()

void SLParticleSystem::generate ( )

Function which will generate the particles and attributes them to the VAO.

◆ generateBernsteinPAlpha()

void SLParticleSystem::generateBernsteinPAlpha ( )

Generate Bernstein Polynomial with 4 controls points for alpha over life. ContP contains 2 and 3 controls points StatEnd contains 1 and 4 controls points

◆ generateBernsteinPSize()

void SLParticleSystem::generateBernsteinPSize ( )

Generate Bernstein Polynomial with 4 controls points for size over life. ContP contains 2 and 3 controls points StatEnd contains 1 and 4 controls points

◆ getDirectionBox()

SLVec3f SLParticleSystem::getDirectionBox ( SLVec3f  position)
private

Function which return the direction towards the exterior of a box.

◆ getDirectionCone()

SLVec3f SLParticleSystem::getDirectionCone ( SLVec3f  position)
private

Function which return a direction following the cone shape.

◆ getDirectionPyramid()

SLVec3f SLParticleSystem::getDirectionPyramid ( SLVec3f  position)
private

Function which return a direction following the pyramid shape.

◆ getDirectionSphere()

SLVec3f SLParticleSystem::getDirectionSphere ( SLVec3f  position)
private

Function which return the direction towards the exterior of a sphere.

◆ getPointInBox()

SLVec3f SLParticleSystem::getPointInBox ( SLVec3f  boxScale)
private

Function which return a position in a box.

◆ getPointInCone()

SLVec3f SLParticleSystem::getPointInCone ( )
private

Function which return a position in the cone define in the particle system.

◆ getPointInPyramid()

SLVec3f SLParticleSystem::getPointInPyramid ( )
private

Function which return a position in the pyramid define in the particle system.

◆ getPointInSphere()

SLVec3f SLParticleSystem::getPointInSphere ( float  radius,
SLVec3f  randomX 
)
private

Function which return a position in a sphere.

◆ getPointOnBox()

SLVec3f SLParticleSystem::getPointOnBox ( SLVec3f  boxScale)
private

Function which return a position on a box.

◆ getPointOnCone()

SLVec3f SLParticleSystem::getPointOnCone ( )
private

Function which return a position on the cone define in the particle system.

◆ getPointOnPyramid()

SLVec3f SLParticleSystem::getPointOnPyramid ( )
private

Function which return a position on the pyramid define in the particle system.

◆ getPointOnSphere()

SLVec3f SLParticleSystem::getPointOnSphere ( float  radius,
SLVec3f  randomX 
)
private

Function which return a position on a sphere.

◆ gravity() [1/3]

SLVec3f SLParticleSystem::gravity ( )
inline

◆ gravity() [2/3]

void SLParticleSystem::gravity ( SLfloat  vX,
SLfloat  vY,
SLfloat  vZ 
)
inline

◆ gravity() [3/3]

void SLParticleSystem::gravity ( SLVec3f  v)
inline

◆ isGenerated() [1/2]

SLbool SLParticleSystem::isGenerated ( )
inline

◆ isGenerated() [2/2]

void SLParticleSystem::isGenerated ( SLbool  b)
inline

◆ isPaused()

SLbool SLParticleSystem::isPaused ( )
inline

◆ pauseOrResume()

void SLParticleSystem::pauseOrResume ( )

Function called by the user to pause or resume the particle system. This will freeze the particle system there won't be any updating, only the drawing

◆ radiusH() [1/2]

SLfloat SLParticleSystem::radiusH ( )
inline

◆ radiusH() [2/2]

void SLParticleSystem::radiusH ( SLfloat  f)
inline

◆ radiusW() [1/2]

SLfloat SLParticleSystem::radiusW ( )
inline

◆ radiusW() [2/2]

void SLParticleSystem::radiusW ( SLfloat  f)
inline

◆ scale() [1/2]

SLfloat SLParticleSystem::scale ( )
inline

◆ scale() [2/2]

void SLParticleSystem::scale ( SLfloat  f)
inline

◆ setNotVisibleInFrustum()

void SLParticleSystem::setNotVisibleInFrustum ( )

Function called inside SLNode cull3DRec(..) which flags the particle system to be not visible in the view frustum. This is needed to correct later the start time of the PS when it reappears again.

◆ shapeAngle() [1/2]

SLfloat SLParticleSystem::shapeAngle ( )
inline

◆ shapeAngle() [2/2]

void SLParticleSystem::shapeAngle ( SLfloat  f)
inline

◆ shapeHeight() [1/2]

SLfloat SLParticleSystem::shapeHeight ( )
inline

◆ shapeHeight() [2/2]

void SLParticleSystem::shapeHeight ( SLfloat  f)
inline

◆ shapeRadius() [1/2]

SLfloat SLParticleSystem::shapeRadius ( )
inline

◆ shapeRadius() [2/2]

void SLParticleSystem::shapeRadius ( SLfloat  r)
inline

◆ shapeScale() [1/3]

SLVec3f SLParticleSystem::shapeScale ( )
inline

◆ shapeScale() [2/3]

void SLParticleSystem::shapeScale ( SLfloat  vX,
SLfloat  vY,
SLfloat  vZ 
)
inline

◆ shapeScale() [3/3]

void SLParticleSystem::shapeScale ( SLVec3f  v)
inline

◆ shapeType() [1/2]

SLShapeType SLParticleSystem::shapeType ( )
inline

◆ shapeType() [2/2]

void SLParticleSystem::shapeType ( SLShapeType  st)
inline

◆ shapeWidth() [1/2]

SLfloat SLParticleSystem::shapeWidth ( )
inline

◆ shapeWidth() [2/2]

void SLParticleSystem::shapeWidth ( SLfloat  f)
inline

◆ speed() [1/2]

SLfloat SLParticleSystem::speed ( )
inline

◆ speed() [2/2]

void SLParticleSystem::speed ( SLfloat  f)
inline

◆ speedRange() [1/3]

SLVec2f SLParticleSystem::speedRange ( )
inline

◆ speedRange() [2/3]

void SLParticleSystem::speedRange ( SLfloat  vX,
SLfloat  vY 
)
inline

◆ speedRange() [3/3]

void SLParticleSystem::speedRange ( SLVec2f  v)
inline

◆ textureFirst() [1/2]

SLGLTexture * SLParticleSystem::textureFirst ( )
inline

◆ textureFirst() [2/2]

void SLParticleSystem::textureFirst ( SLGLTexture t)
inline

◆ textureFlipbook() [1/2]

SLGLTexture * SLParticleSystem::textureFlipbook ( )
inline

◆ textureFlipbook() [2/2]

void SLParticleSystem::textureFlipbook ( SLGLTexture t)
inline

◆ timeToLive() [1/2]

SLfloat SLParticleSystem::timeToLive ( )
inline

◆ timeToLive() [2/2]

void SLParticleSystem::timeToLive ( SLfloat  f)
inline

◆ updateTime()

AvgFloat & SLParticleSystem::updateTime ( )
inline

◆ velocityConst() [1/3]

SLVec3f SLParticleSystem::velocityConst ( )
inline

◆ velocityConst() [2/3]

void SLParticleSystem::velocityConst ( SLfloat  vX,
SLfloat  vY,
SLfloat  vZ 
)
inline

◆ velocityConst() [3/3]

void SLParticleSystem::velocityConst ( SLVec3f  v)
inline

◆ velocityRndMax() [1/3]

SLVec3f SLParticleSystem::velocityRndMax ( )
inline

◆ velocityRndMax() [2/3]

void SLParticleSystem::velocityRndMax ( SLfloat  vX,
SLfloat  vY,
SLfloat  vZ 
)
inline

◆ velocityRndMax() [3/3]

void SLParticleSystem::velocityRndMax ( SLVec3f  v)
inline

◆ velocityRndMin() [1/3]

SLVec3f SLParticleSystem::velocityRndMin ( )
inline

◆ velocityRndMin() [2/3]

void SLParticleSystem::velocityRndMin ( SLfloat  vX,
SLfloat  vY,
SLfloat  vZ 
)
inline

◆ velocityRndMin() [3/3]

void SLParticleSystem::velocityRndMin ( SLVec3f  v)
inline

◆ velocityType() [1/2]

SLint SLParticleSystem::velocityType ( )
inline

◆ velocityType() [2/2]

void SLParticleSystem::velocityType ( SLint  i)
inline

Member Data Documentation

◆ _acceleration

SLVec3f SLParticleSystem::_acceleration = SLVec3f(1, 1, 1)
private

Vector for acceleration (different direction as the velocity)

◆ _accelerationConst

SLfloat SLParticleSystem::_accelerationConst = 0.0f
private

Acceleration constant (same direction as the velocity)

◆ _amount

SLint SLParticleSystem::_amount
private

Amount of a particle.

◆ _angularVelocityConst

SLfloat SLParticleSystem::_angularVelocityConst = 30.0f
private

Rotation rate const (change in angular rotation divide by change in time)

◆ _angularVelocityRange

SLVec2f SLParticleSystem::_angularVelocityRange = SLVec2f(-30.0f, 30.0f)
private

Rotation rate range (change in angular rotation divide by change in time)

◆ _bernsteinPYAlpha

SLVec4f SLParticleSystem::_bernsteinPYAlpha = SLVec4f(2.0f, -3.0f, 0.0f, 1.0f)
private

Vector for bezier curve (default linear function)

◆ _bernsteinPYSize

SLVec4f SLParticleSystem::_bernsteinPYSize = SLVec4f(-1.4f, 1.8f, 0.6f, 0.0f)
private

Vector for bezier curve (default linear function)

◆ _bezierControlPointAlpha

float SLParticleSystem::_bezierControlPointAlpha[4] = {0.0f, 1.0f, 1.0f, 0.0f}
private

Floats for bezier curve control points (P1: 01 ; P2: 23)

◆ _bezierControlPointSize

float SLParticleSystem::_bezierControlPointSize[4] = {0.0f, 0.0f, 1.0f, 1.0f}
private

Floats for bezier curve control points (P1: 01 ; P2: 23)

◆ _bezierStartEndPointAlpha

float SLParticleSystem::_bezierStartEndPointAlpha[4] = {0.0f, 1.0f, 1.0f, 0.0f}
private

Floats for bezier curve end start points (Start: 01 ; End: 23)

◆ _bezierStartEndPointSize

float SLParticleSystem::_bezierStartEndPointSize[4] = {0.0f, 0.0f, 1.0f, 1.0f}
private

Floats for bezier curve end start points (Start: 01 ; End: 23)

◆ _billboardType

SLBillboardType SLParticleSystem::_billboardType = BT_Camera
private

Billboard type (BT_Camera, BT_Vertical, BT_Horizontal.

◆ _color

SLCol4f SLParticleSystem::_color = SLCol4f(0.66f, 0.0f, 0.66f, 0.2f)
private

Color for particle.

◆ _colorArr

SLfloat SLParticleSystem::_colorArr[256 *3]
private

Color values of color gradient widget.

◆ _colorPoints

SLVColorLUTPoint SLParticleSystem::_colorPoints
private

◆ _deltaTimeUpdateS

SLfloat SLParticleSystem::_deltaTimeUpdateS = 0.0f
private

Delta time in between two frames S.

◆ _direction

SLVec3f SLParticleSystem::_direction = SLVec3f(0, 0, 0)
private

Direction of particle.

◆ _doAccDiffDir

SLbool SLParticleSystem::_doAccDiffDir = false
private

Boolean for acceleration (different direction)

◆ _doAcceleration

SLbool SLParticleSystem::_doAcceleration = false
private

Boolean for acceleration.

◆ _doAlphaOverLT

SLbool SLParticleSystem::_doAlphaOverLT = true
private

Boolean for alpha over life time.

◆ _doAlphaOverLTCurve

SLbool SLParticleSystem::_doAlphaOverLTCurve = false
private

Boolean for alpha over life time curve.

◆ _doBlendBrightness

SLbool SLParticleSystem::_doBlendBrightness = false
private

Boolean for glow/brightness on pixel with many particle.

◆ _doColor

SLbool SLParticleSystem::_doColor = true
private

Boolean for color.

◆ _doColorOverLT

SLbool SLParticleSystem::_doColorOverLT = false
private

Boolean for color over life time.

◆ _doCounterGap

SLbool SLParticleSystem::_doCounterGap = true
private

Boolean for counter lag/gap, can create flickering with few particle (explained in documentation) when enable.

◆ _doDirectionSpeed

SLbool SLParticleSystem::_doDirectionSpeed = false
private

Boolean for direction and speed (override velocity)

◆ _doFlipBookTexture

SLbool SLParticleSystem::_doFlipBookTexture = false
private

Boolean for flipbook texture.

◆ _doGravity

SLbool SLParticleSystem::_doGravity = false
private

Boolean for gravity.

◆ _doRotation

SLbool SLParticleSystem::_doRotation = true
private

Boolean for rotation.

◆ _doRotRange

SLbool SLParticleSystem::_doRotRange = false
private

Boolean for rotation range (random value between range)

◆ _doShape

SLbool SLParticleSystem::_doShape = false
private

Boolean for shape feature.

◆ _doShapeOverride

SLbool SLParticleSystem::_doShapeOverride = false
private

Boolean for override direction for shape direction.

◆ _doShapeSpawnBase

SLbool SLParticleSystem::_doShapeSpawnBase = false
private

Boolean for spawn at base of shape (for cone and pyramid)

◆ _doShapeSurface

SLbool SLParticleSystem::_doShapeSurface = false
private

Boolean for shape surface (particle will be spawned on surface)

◆ _doSizeOverLT

SLbool SLParticleSystem::_doSizeOverLT = true
private

Boolean for size over life time.

◆ _doSizeOverLTCurve

SLbool SLParticleSystem::_doSizeOverLTCurve = false
private

Boolean for size over life time curve.

◆ _doSpeedRange

SLbool SLParticleSystem::_doSpeedRange = false
private

Boolean for speed range.

◆ _doWorldSpace

SLbool SLParticleSystem::_doWorldSpace = false
private

Boolean for world space position.

◆ _drawBuf

int SLParticleSystem::_drawBuf = 0
private

Color gradient points.

Boolean to switch buffer

◆ _drawTime

AvgFloat SLParticleSystem::_drawTime
private

Averaged time for drawing in MS.

◆ _emitterPos

SLVec3f SLParticleSystem::_emitterPos
private

Position of the particle emitter.

◆ _flipbookColumns

SLint SLParticleSystem::_flipbookColumns = 8
private

Number of flipbook sub-textures by column.

◆ _flipbookFPS

int SLParticleSystem::_flipbookFPS = 16
private

Number of update of flipbook by second.

◆ _flipbookRows

SLint SLParticleSystem::_flipbookRows = 8
private

Number of flipbook sub-textures by row.

◆ _flipboookLastUpdate

float SLParticleSystem::_flipboookLastUpdate = 0.0f
private

Last time flipbook was updated.

◆ _gravity

SLVec3f SLParticleSystem::_gravity = SLVec3f(0.0f, -9.81f, 0.0f)
private

Vector for gravity (2nd. acceleration vector)

◆ _isGenerated

SLbool SLParticleSystem::_isGenerated = false
private

Boolean to generate particle system and load it on the GPU.

◆ _isPaused

SLbool SLParticleSystem::_isPaused = false
private

Boolean to stop updating.

◆ _isVisibleInFrustum

SLbool SLParticleSystem::_isVisibleInFrustum = true
private

Boolean to set time since node not visible.

◆ _lastTimeBeforePauseS

SLfloat SLParticleSystem::_lastTimeBeforePauseS = 0.0f
private

Time since the particle system is paused.

◆ _notVisibleTimeS

SLfloat SLParticleSystem::_notVisibleTimeS = 0.0f
private

Time since start when node not visible in S.

◆ _radiusH

SLfloat SLParticleSystem::_radiusH = 0.4f
private

height radius of a particle

◆ _radiusW

SLfloat SLParticleSystem::_radiusW = 0.4f
private

width radius of a particle

◆ _scale

SLfloat SLParticleSystem::_scale = 1.0f
private

Scale of a particle (Scale the radius)

◆ _shapeAngle

SLfloat SLParticleSystem::_shapeAngle = 10.0f
private

Angle of cone and pyramid shapes.

◆ _shapeHeight

SLfloat SLParticleSystem::_shapeHeight = 3.0f
private

Height of cone and pyramid shapes.

◆ _shapeRadius

SLfloat SLParticleSystem::_shapeRadius = 1.0f
private

Radius of sphere and cone shape.

◆ _shapeScale

SLVec3f SLParticleSystem::_shapeScale = SLVec3f(1.0f)
private

Scale of box shape.

◆ _shapeType

SLShapeType SLParticleSystem::_shapeType = ST_Sphere
private

Shape type (ST_)

◆ _shapeWidth

SLfloat SLParticleSystem::_shapeWidth = 2.0f
private

Width of pyramid shape.

◆ _speed

SLfloat SLParticleSystem::_speed = 1.0f
private

Speed of particle.

◆ _speedRange

SLVec2f SLParticleSystem::_speedRange = SLVec2f(1, 2)
private

Speed random between two value.

◆ _startDrawTimeMS

SLfloat SLParticleSystem::_startDrawTimeMS = 0.0f
private

Time since start of draw in MS.

◆ _startUpdateTimeMS

SLfloat SLParticleSystem::_startUpdateTimeMS = 0.0f
private

Time since start for updating in MS.

◆ _startUpdateTimeS

SLfloat SLParticleSystem::_startUpdateTimeS = 0.0f
private

Time since start for updating in S.

◆ _textureFirst

SLGLTexture* SLParticleSystem::_textureFirst
private

Main texture of PS (non flipbook)

◆ _textureFlipbook

SLGLTexture* SLParticleSystem::_textureFlipbook
private

Flipbook texture with e.g. multiple flames at subsequent frames.

◆ _timeToLive

SLfloat SLParticleSystem::_timeToLive
private

Time to live of a particle.

◆ _updateTime

AvgFloat SLParticleSystem::_updateTime
private

Averaged time for updating in MS.

◆ _vao1

SLGLVertexArray SLParticleSystem::_vao1
private

First OpenGL Vertex Array Object for swapping between updating/drawing.

◆ _vao2

SLGLVertexArray SLParticleSystem::_vao2
private

Second OpenGL Vertex Array Object for swapping between updating/drawing.

◆ _velocityConst

SLVec3f SLParticleSystem::_velocityConst = SLVec3f(0, 1, 0)
private

Velocity constant (go in xyz direction)

◆ _velocityRndMax

SLVec3f SLParticleSystem::_velocityRndMax = SLVec3f(1, 1, 1)
private

Max. random velocity.

◆ _velocityRndMin

SLVec3f SLParticleSystem::_velocityRndMin = SLVec3f(-1, -1, -1)
private

Min. random velocity.

◆ _velocityType

SLint SLParticleSystem::_velocityType = 0
private

Velocity type.


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