CParticleScaleAffector.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. // Copyright (C) 2010-2012 Nikolaus Gebhardt
  2. // This file is part of the "Irrlicht Engine".
  3. // For conditions of distribution and use, see copyright notice in irrlicht.h
  4. #ifndef C_PARTICLE_SCALE_AFFECTOR_H
  5. #define C_PARTICLE_SCALE_AFFECTOR_H
  6. #include <IParticleAffector.h>
  7. namespace irr
  8. {
  9. namespace scene
  10. {
  11. class CParticleScaleAffector : public IParticleAffector
  12. {
  13. public:
  14. CParticleScaleAffector(const core::dimension2df& scaleTo = core::dimension2df(1.0f, 1.0f));
  15. virtual void affect(u32 now, SParticle *particlearray, u32 count);
  16. //! Writes attributes of the object.
  17. //! Implement this to expose the attributes of your scene node animator for
  18. //! scripting languages, editors, debuggers or xml serialization purposes.
  19. virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const;
  20. //! Reads attributes of the object.
  21. //! Implement this to set the attributes of your scene node animator for
  22. //! scripting languages, editors, debuggers or xml deserialization purposes.
  23. //! \param startIndex: start index where to start reading attributes.
  24. //! \return: returns last index of an attribute read by this affector
  25. virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options);
  26. //! Get emitter type
  27. virtual E_PARTICLE_AFFECTOR_TYPE getType() const;
  28. protected:
  29. core::dimension2df ScaleTo;
  30. };
  31. }
  32. }
  33. #endif // C_PARTICLE_SCALE_AFFECTOR_H