|
Wasabi
|
#include <WParticles.hpp>
Public Member Functions | |
| virtual std::string | GetTypeName () const override |
| virtual void | SetID (uint32_t newID) override |
| virtual void | SetName (std::string newName) override |
| WError | Create (uint32_t maxParticles=5000, WParticlesBehavior *behavior=nullptr) |
| WParticlesBehavior * | GetBehavior () const |
| bool | WillRender (class WRenderTarget *rt) |
| void | Render (class WRenderTarget *rt, class WMaterial *material=nullptr) |
| void | SetPriority (uint32_t priority) |
| uint32_t | GetPriority () const |
| W_DEFAULT_PARTICLE_EFFECT_TYPE | GetEffectType () const |
| void | Show () |
| void | Hide () |
| bool | Hidden () const |
| void | EnableFrustumCulling () |
| void | DisableFrustumCulling () |
| bool | InCameraView (class WCamera *cam) |
| WMatrix | GetWorldMatrix () |
| bool | UpdateLocals () |
| virtual bool | Valid () const override |
| virtual void | OnStateChange (STATE_CHANGE_TYPE type) override |
Public Member Functions inherited from WBase | |
| WBase (class Wasabi *const app, uint32_t ID=0) | |
| uint32_t | GetID () const |
| std::string | GetName () const |
| class Wasabi * | GetAppPtr () const |
| void | AddReference () |
| void | RemoveReference () |
Public Member Functions inherited from WOrientation | |
| void | SetPosition (float x, float y, float z) |
| void | SetPosition (const WVector3 pos) |
| void | Point (float x, float y, float z) |
| void | Point (WVector3 target) |
| void | SetAngle (WQuaternion quat) |
| void | SetToRotation (const WOrientation *const device) |
| void | SetULRVectors (WVector3 up, WVector3 look, WVector3 right) |
| void | SetToTransformation (WMatrix mtx) |
| void | Yaw (float angle) |
| void | Roll (float angle) |
| void | Pitch (float angle) |
| void | Move (float units) |
| void | Strafe (float units) |
| void | Fly (float units) |
| float | GetPositionX () const |
| float | GetPositionY () const |
| float | GetPositionZ () const |
| WVector3 | GetPosition () const |
| float | GetAngleX () const |
| float | GetAngleY () const |
| float | GetAngleZ () const |
| WQuaternion | GetRotation () const |
| WVector3 | GetUVector () const |
| WVector3 | GetLVector () const |
| WVector3 | GetRVector () const |
| virtual void | SetBindingMatrix (WMatrix mtx) |
| void | RemoveBinding () |
| WMatrix | GetBindingMatrix () const |
| bool | IsBound () const |
| WMatrix | ComputeTransformation () const |
| WMatrix | ComputeInverseTransformation () const |
Public Member Functions inherited from WMaterialsStore | |
| void | AddEffect (class WEffect *effect, uint32_t bindingSet=0) |
| void | RemoveEffect (class WEffect *effect) |
| void | RemoveEffect (class WMaterial *material) |
| void | ClearEffects () |
| class WMaterial * | GetMaterial (class WEffect *effect) |
| class WMaterialCollection & | GetMaterials () |
Static Public Member Functions | |
| static std::string | _GetTypeName () |
Protected Member Functions | |
| WParticles (class Wasabi *const app, W_DEFAULT_PARTICLE_EFFECT_TYPE type, uint32_t ID=0) | |
Protected Member Functions inherited from WMaterialsStore | |
| void | _AddMaterial (class WMaterial *material) |
| virtual void | OnMaterialAdded (class WMaterial *newMaterial) |
Friends | |
| class | WParticlesManager |
Additional Inherited Members | |
Protected Attributes inherited from WBase | |
| class Wasabi * | m_app |
| uint32_t | m_ID |
| std::string | m_name |
Protected Attributes inherited from WMaterialsStore | |
| std::unordered_map< class WEffect *, class WMaterial * > | m_materialMap |
| class WMaterialCollection * | m_materialsCollection |
This represents a particles system and is responsible for animating and rendering it.
|
static |
Returns "Particles" string.
| WError WParticles::Create | ( | uint32_t | maxParticles = 5000, |
| WParticlesBehavior * | behavior = nullptr |
||
| ) |
Initializes the particle system. This must be called for a WParticles object to be Valid().
| maxParticles | Maximum number of particles that the system can render simultaneously. Pass 0 to free resources and uninitialize the system |
| behavior | Behavior object for this system, pass nullptr to use WDefaultParticleBehavior |
| void WParticles::DisableFrustumCulling | ( | ) |
Disables frustum culling, see EnableFrustumCulling() for more info.
| void WParticles::EnableFrustumCulling | ( | ) |
Enables frustum culling. Frustum culling causes the particle system to only be rendered if part of its geometry is within the viewing frustum of the camera.
| WParticlesBehavior* WParticles::GetBehavior | ( | ) | const |
Retrieves the behavior object for this particle system.
| W_DEFAULT_PARTICLE_EFFECT_TYPE WParticles::GetEffectType | ( | ) | const |
| uint32_t WParticles::GetPriority | ( | ) | const |
Retrieves the current priority of the sprite. See SetPriority().
|
overridevirtual |
This function must be implemented by a child class. This is used for debugging, in which a class should return its name.
Implements WBase.
| WMatrix WParticles::GetWorldMatrix | ( | ) |
Retrieves the world matrix for the particle system.
| bool WParticles::Hidden | ( | ) | const |
Checks if the particle system is hidden.
| void WParticles::Hide | ( | ) |
Hides the particle system.
| bool WParticles::InCameraView | ( | class WCamera * | cam | ) |
Checks if the particle system appears anywhere in the view of the camera
| cam | Camera to check against |
|
overridevirtual |
A callback called by this class when the entity changes its position or orientation.
| type | Orientation change type |
Reimplemented from WOrientation.
| void WParticles::Render | ( | class WRenderTarget * | rt, |
| class WMaterial * | material = nullptr |
||
| ) |
Renders the particle system to the given render target. If a material is provided, the following variables will be set:
| material | Material to set its variables and bind (if provided) |
|
overridevirtual |
|
overridevirtual |
| void WParticles::SetPriority | ( | uint32_t | priority | ) |
Sets the priority of the particles. Particles with higher priority will render on top of those with lower priority (i.e. renders after after).
| priority | New priority to set |
| void WParticles::Show | ( | ) |
Shows the particle system so that it can be rendered.
| bool WParticles::UpdateLocals | ( | ) |
Updates the world matrix of the particle system.
|
overridevirtual |
Implements WBase.
| bool WParticles::WillRender | ( | class WRenderTarget * | rt | ) |
Checks whether a call to Render() will cause any rendering (draw call) to happen.
1.8.17