IParticleGravityAffector.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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 IRR_I_PARTICLE_GRAVITY_AFFECTOR_H_INCLUDED
  5. #define IRR_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 // IRR_I_PARTICLE_GRAVITY_AFFECTOR_H_INCLUDED