JitterMoveEvent.h 674 B

1234567891011121314151617181920212223242526272829303132
  1. // Copyright (C) 2009-present, Panagiotis Christopoulos Charitos and contributors.
  2. // All rights reserved.
  3. // Code licensed under the BSD License.
  4. // http://www.anki3d.org/LICENSE
  5. #pragma once
  6. #include <AnKi/Scene/Events/Event.h>
  7. #include <AnKi/Math.h>
  8. namespace anki {
  9. /// @addtogroup scene
  10. /// @{
  11. /// An event for simple movable animations
  12. class JitterMoveEvent : public Event
  13. {
  14. public:
  15. JitterMoveEvent(Second startTime, Second duration, SceneNode* movableSceneNode);
  16. void update(Second prevUpdateTime, Second crntTime) override;
  17. void setPositionLimits(Vec3 posMin, Vec3 posMax);
  18. private:
  19. Vec3 m_originalPos;
  20. Vec3 m_newPos;
  21. };
  22. /// @}
  23. } // end namespace anki