3 #include <ThirdParty/glm/glm/glm.hpp> 9 #include <ThirdParty/EASTL-master/include/EASTL/map.h> 10 #include <ThirdParty/EASTL-master/include/EASTL/shared_ptr.h> 89 void SetEndColor(glm::vec4 colorMin, glm::vec4 colorMax);
120 eastl::pair<glm::vec3, glm::vec3>
GetForce();
146 eastl::pair<float, float>
GetSpeed();
161 eastl::pair<float, float>
GetMass();
366 eastl::weak_ptr<Mesh>
GetMesh()
const;
562 bool gravity =
false;
BillboardData CreateParticleBillboardData() const
ParticleType GetParticleType() const
Returns the type of the particle.
LineEndAction lineEndAction
void SetMeshRotation(glm::vec3 rotationMin, glm::vec3 rotationMax)
Sets the range of rotations in euler angles the mesh can start with.
void SetStartColor(glm::vec4 colorMin, glm::vec4 colorMax)
Sets the range of possible start colors of the particle.
void SetBillboardSizeInterpolateType(InterpolateType type)
Sets the interpolation type for the billboard size.
void SetMeshScaleEnd(glm::vec3 scaleMin, glm::vec3 scaleMax)
Sets the range for the end scale of the mesh.
void SetForce(glm::vec3 forceMin, glm::vec3 forceMax)
Sets the min and max for the range of forces that can be applied on the particle. ...
void SetMeshLit(bool lit)
Sets whether or not the lightning calculations will be done when rendering the mesh. NOTE: Only works for mesh particles.
void SetBillboardRoll(float rollMin, float rollMax)
Sets the range of roll rotations the billboard can start with.
float startLineThicknessMin
ParticleType particleType
eastl::weak_ptr< Material > GetMaterial() const
Returns the material used for the mesh.
void SetMaterial(eastl::weak_ptr< Material > material)
Sets the material used for the mesh. Material color is overriden by the particle color.
void SetMass(float massMin, float massMax)
Sets the range of masses a particle can be created with. NOTE: If the mass is zero forces won't inter...
void SetLineThicknessInterpolateType(InterpolateType type)
Sets the interpolation type of the line thickness.
eastl::pair< float, float > GetLineEndThickness()
Returns the range of thicknesses a line can end with.
InterpolateType GetBillboardSizeInterpolateType() const
Returns the interpolation type for the billboard size.
void SetBillboardSizeStart(glm::vec2 sizeMin, glm::vec2 sizeMax)
Sets the range for start size of the billboard.
bool IsMeshLit() const
Returns whether or not the lightning calculations will be done when rendering the mesh...
InterpolateType sizeInterpolateType
bool IsGravityEnabled() const
Returns whether or not gravity is enabled for the particle.
glm::vec4 startRotationSpeed
glm::vec4 endRotationSpeedMax
glm::vec4 endRotationSpeed
void SetBillboardSizeEnd(glm::vec2 sizeMin, glm::vec2 sizeMax)
Sets the range for the end size of the billboard.
void SetMeshRotationSpeedStart(glm::vec3 speedMin, glm::vec3 speedMax)
Sets the range of rotation speeds in euler angles the mesh can start with.
eastl::pair< glm::vec4, glm::vec4 > GetStartColor()
Returns a pair containing the range of possible start colors of the particle.
eastl::pair< glm::vec3, glm::vec3 > GetMeshRotation()
Returns the range of rotations in euler angles the mesh can start with.
void SetEndColor(glm::vec4 colorMin, glm::vec4 colorMax)
Sets the range of possible end colors of the particle.
InterpolateType GetColorInterpolateType() const
Returns the interpolation type used for the color.
eastl::pair< glm::vec4, glm::vec4 > GetEndColor()
Returns a pair containing the range of possible end colors of the particle.
InterpolateType scaleInterpolateType
InterpolateType colorInterpolateType
InterpolateType GetBillboardRollSpeedInterpolateType() const
Returns the interpolation type for the roll speed.
glm::vec4 startRotationSpeedMax
InterpolateType GetMeshRotationSpeedInterpolateType() const
Returns the interpolation type for the rotation speed.
ParticleData CreateParticle(glm::vec4 position, glm::vec4 direction) const
eastl::weak_ptr< Texture > texture
void SetLineStartThickness(float thicknessMin, float thicknessMax)
Sets the range of thicknesses a line can start with (interpolation is based on lifetime, not segment count).
eastl::pair< glm::vec3, glm::vec3 > GetMeshRotationSpeedStart()
Returns the rotation speeds in euler angles the mesh can start with.
void SetMeshScaleInterpolateType(InterpolateType type)
Sets the interpolation type for the mesh scale.
void SetLineEndAction(LineEndAction action)
Sets the action that should be taken when trying to create segments after having reached the maximum ...
void SetLineEndthickness(float thicknessMin, float thicknessMax)
Sets the range of thicknesses a line can end with (interpolation is based on lifetime, not segment count).
eastl::weak_ptr< Texture > GetTexture() const
Returns the texture used by the particle.
glm::vec4 startRotationSpeedMin
eastl::pair< glm::vec2, glm::vec2 > GetBillboardSizeStart()
Returns the range of start sizes for the billboard.
eastl::weak_ptr< Mesh > GetMesh() const
Returns the mesh used for mesh particles.
bool CanCastShadows() const
Returns whether or not the particle can cast shadows.
InterpolateType rollSpeedInterpolateType
void SetBlendMode(BlendMode mode)
Sets the blend mode of the particle.
eastl::pair< glm::vec3, glm::vec3 > GetMeshRotationSpeedEnd()
Returns the rotation speeds in euler angles the mesh can end with.
InterpolateType GetLineThicknessInterpolateType() const
Returns the interpolation type of the line thickness.
InterpolateType rotationSpeedInterpolateType
void SetMeshScaleStart(glm::vec3 scaleMin, glm::vec3 scaleMax)
Sets the range for start scale of the mesh.
float currentRotationSpeed
int GetNewSegmentsPerFrame() const
Returns the ammount of new segments that get created each frame.
void SetCastsShadows(bool castShadows)
Sets whether or not the particle can cast shadows. NOTE: This only works for mesh particles...
eastl::pair< float, float > GetBillboardRoll()
Returns the range of roll rotations the billboard can start with.
eastl::weak_ptr< Material > material
void SetBillboardRollSpeedEnd(float speedMin, float speedMax)
Sets the range of roll rotation speeds the billboard can end with.
InterpolateType GetMeshScaleInterpolateType() const
Returns the interpolation type for the mesh scale.
BlendMode particleBlendMode
BlendMode GetParticleBlendMode() const
Returns the blend mode of the particle.
glm::vec4 currentRotationSpeed
LineEndAction GetLineEndAction() const
Returns the action that should be taken when trying to create segments after having reached the maxim...
float endLineThicknessMin
LineData CreateParticleLineData() const
eastl::weak_ptr< Mesh > mesh
eastl::pair< float, float > GetBillboardRollSpeedStart()
Returns the angle of roll rotation speeds the billboard can start with.
float startLineThicknessMax
void SetMeshRotationSpeedInterpolateType(InterpolateType type)
Sets the interpolation type for the rotation speed.
void SetColorInterpolateType(InterpolateType type)
Sets the interpolation type used for the color.
void SetLifetime(float lifetimeMin, float lifetimeMax)
Sets the range of possible lifetimes the particle can have.
void SetSpeed(float speedMin, float speedMax)
Sets the range of possible speeds the particle can be created with.
eastl::pair< float, float > GetLineStartThickness()
Returns the range of thicknesses a line can start with.
float RandomFloatLinear(float min, float max) const
void SetGravityEnabled(bool gravity)
Turns gravity on and off for the particle. Gravitic constant will be 9.81. If you want different grav...
glm::vec4 currentRotation
eastl::pair< float, float > GetBillboardRollSpeedEnd()
Returns the angle of roll rotation speeds the billboard can end with.
void SetMesh(eastl::weak_ptr< Mesh > mesh)
Sets the mesh used for mesh particles.
void SetMeshRotationSpeedEnd(glm::vec3 speedMin, glm::vec3 speedMax)
Sets the range of rotation speeds in euler angles the mesh can end with.
void SetLineMaxSegments(int segments)
Sets the maximum amount of segments a line particle can have.
glm::vec4 endRotationSpeedMin
eastl::pair< float, float > GetSpeed()
Returns the range of possible speeds the particle can be created with.
void SetBillboardRollSpeedInterpolateType(InterpolateType type)
Sets the interpolation type for the roll speed.
eastl::pair< glm::vec3, glm::vec3 > GetMeshScaleEnd()
Returns the range of end scales for the mesh.
void SetTexture(eastl::weak_ptr< Texture > texture)
Sets the texture of the particle. Only applies to lines and billboards. Can be left empty to use just...
void SetParticleType(ParticleType type)
Sets the type of the particle.
void SetNewSegmentsPerFrame(int segments)
Sets the amount of new segments that get created each frame.
eastl::pair< glm::vec3, glm::vec3 > GetMeshScaleStart()
Returns the range of start scales for the mesh.
eastl::pair< glm::vec3, glm::vec3 > GetForce()
Returns a pair containing the range of possible forces that can be applied on the particle...
bool HasTexture() const
Returns whether or not the particle has a texture.
float endLineThicknessMax
eastl::pair< float, float > GetMass()
Returns the range of possible masses the particle can be created with.
eastl::pair< float, float > GetLifetime()
Returns the range of possible lifetimes the particle can have.
InterpolateType lineThicknessInterpolateType
int GetLineMaxSegments() const
Returns the maximum number of segments a line particle can have.
MeshData CreateParticleMeshData() const
eastl::pair< glm::vec2, glm::vec2 > GetBillboardSizeEnd()
Returns the range of end sizes for the billboard.
void SetBillboardRollSpeedStart(float speedMin, float speedMax)
Sets the range of roll rotation speeds the billboard can start with.