#ifndef __C_PARTICLE_ATTRACTION_AFFECTOR_H_INCLUDED__
#define __C_PARTICLE_ATTRACTION_AFFECTOR_H_INCLUDED__
#include "IParticleAttractionAffector.h"
namespace irr
{
namespace scene
{
class CParticleAttractionAffector : public IParticleAttractionAffector
{
public:
CParticleAttractionAffector(
const core::vector3df& point = core::vector3df(), f32 speed = 1.0f,
bool attract = true, bool affectX = true,
bool affectY = true, bool affectZ = true );
virtual void affect(u32 now, SParticle* particlearray, u32 count);
virtual void setPoint( const core::vector3df& point ) { Point = point; }
virtual void setSpeed( f32 speed ) { Speed = speed; }
virtual void setAttract( bool attract ) { Attract = attract; }
virtual void setAffectX( bool affect ) { AffectX = affect; }
virtual void setAffectY( bool affect ) { AffectY = affect; }
virtual void setAffectZ( bool affect ) { AffectZ = affect; }
virtual const core::vector3df& getPoint() const { return Point; }
virtual f32 getSpeed() const { return Speed; }
virtual bool getAttract() const { return Attract; }
virtual bool getAffectX() const { return AffectX; }
virtual bool getAffectY() const { return AffectY; }
virtual bool getAffectZ() const { return AffectZ; }
virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const;
virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options);
private:
core::vector3df Point;
f32 Speed;
bool AffectX;
bool AffectY;
bool AffectZ;
bool Attract;
u32 LastTime;
};
}
}
#endif