Loading...
Searching...
No Matches
IParticleAffector.h
Go to the documentation of this file.
// Copyright (C) 2002-2012 Nikolaus Gebhardt
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h
#ifndef __I_PARTICLE_AFFECTOR_H_INCLUDED__
#define __I_PARTICLE_AFFECTOR_H_INCLUDED__
#include "IAttributeExchangingObject.h"
#include "SParticle.h"
namespace irr
{
namespace scene
{
enum E_PARTICLE_AFFECTOR_TYPE
{
EPAT_NONE = 0,
EPAT_ATTRACT,
EPAT_FADE_OUT,
EPAT_GRAVITY,
EPAT_ROTATE,
EPAT_SCALE,
EPAT_COUNT
};
const c8* const ParticleAffectorTypeNames[] =
{
"None",
"Attract",
"FadeOut",
"Gravity",
"Rotate",
"Scale",
0
};
class IParticleAffector : public virtual io::IAttributeExchangingObject
{
public:
IParticleAffector() : Enabled(true) {}
virtual void affect(u32 now, SParticle* particlearray, u32 count) = 0;
virtual void setEnabled(bool enabled) { Enabled = enabled; }
virtual bool getEnabled() const { return Enabled; }
virtual E_PARTICLE_AFFECTOR_TYPE getType() const = 0;
protected:
bool Enabled;
};
} // end namespace scene
} // end namespace irr
#endif
IAttributeExchangingObject.h
SParticle.h
irr::io::IAttributeExchangingObject
An object which is able to serialize and deserialize its attributes into an attributes object.
Definition IAttributeExchangingObject.h:52
irr::scene::IParticleAffector::IParticleAffector
IParticleAffector()
constructor
Definition IParticleAffector.h:46
irr::scene::IParticleAffector::Enabled
bool Enabled
Definition IParticleAffector.h:64
irr::scene::IParticleAffector::getEnabled
virtual bool getEnabled() const
Gets whether or not the affector is currently enabled.
Definition IParticleAffector.h:58
irr::scene::IParticleAffector::affect
virtual void affect(u32 now, SParticle *particlearray, u32 count)=0
Affects an array of particles.
irr::scene::IParticleAffector::setEnabled
virtual void setEnabled(bool enabled)
Sets whether or not the affector is currently enabled.
Definition IParticleAffector.h:55
irr::scene::IParticleAffector::getType
virtual E_PARTICLE_AFFECTOR_TYPE getType() const =0
Get emitter type.
irr::scene
All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees a...
Definition CDynamicMeshBuffer.h:16
irr::scene::ParticleAffectorTypeNames
const c8 *const ParticleAffectorTypeNames[]
Names for built in particle affectors.
Definition IParticleAffector.h:29
irr::scene::E_PARTICLE_AFFECTOR_TYPE
E_PARTICLE_AFFECTOR_TYPE
Types of built in particle affectors.
Definition IParticleAffector.h:18
irr::scene::EPAT_GRAVITY
@ EPAT_GRAVITY
Definition IParticleAffector.h:22
irr::scene::EPAT_ROTATE
@ EPAT_ROTATE
Definition IParticleAffector.h:23
irr::scene::EPAT_COUNT
@ EPAT_COUNT
Definition IParticleAffector.h:25
irr::scene::EPAT_ATTRACT
@ EPAT_ATTRACT
Definition IParticleAffector.h:20
irr::scene::EPAT_SCALE
@ EPAT_SCALE
Definition IParticleAffector.h:24
irr::scene::EPAT_FADE_OUT
@ EPAT_FADE_OUT
Definition IParticleAffector.h:21
irr::scene::EPAT_NONE
@ EPAT_NONE
Definition IParticleAffector.h:19
irr
Everything in the Irrlicht Engine can be found in this namespace.
Definition aabbox3d.h:13
irr::u32
unsigned int u32
32 bit unsigned variable.
Definition irrTypes.h:58
irr::c8
char c8
8 bit character variable.
Definition irrTypes.h:31
irr::scene::SParticle
Struct for holding particle data.
Definition SParticle.h:18
- Irrlicht Engine Documentation © 2003-2012 by Nikolaus Gebhardt. Generated on for Irrlicht 3D Engine by Doxygen 1.15.0