IParticleGravityAffector.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. // Copyright (C) 2002-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 __I_PARTICLE_GRAVITY_AFFECTOR_H_INCLUDED__
  5. #define __I_PARTICLE_GRAVITY_AFFECTOR_H_INCLUDED__
  6. #include "IParticleAffector.h"
  7. namespace irr
  8. {
  9. namespace scene
  10. {
  11. //! A particle affector which applies gravity to particles.
  12. class IParticleGravityAffector : public IParticleAffector
  13. {
  14. public:
  15. //! Set the time in milliseconds when the gravity force is totally lost
  16. /** At that point the particle does not move any more. */
  17. virtual void setTimeForceLost( f32 timeForceLost ) = 0;
  18. //! Set the direction and force of gravity in all 3 dimensions.
  19. virtual void setGravity( const core::vector3df& gravity ) = 0;
  20. //! Get the time in milliseconds when the gravity force is totally lost
  21. virtual f32 getTimeForceLost() const = 0;
  22. //! Get the direction and force of gravity.
  23. virtual const core::vector3df& getGravity() const = 0;
  24. //! Get emitter type
  25. virtual E_PARTICLE_AFFECTOR_TYPE getType() const _IRR_OVERRIDE_ { return EPAT_GRAVITY; }
  26. };
  27. } // end namespace scene
  28. } // end namespace irr
  29. #endif // __I_PARTICLE_GRAVITY_AFFECTOR_H_INCLUDED__