GotoTrack.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #ifndef CRYINCLUDE_CRYMOVIE_GOTOTRACK_H
  9. #define CRYINCLUDE_CRYMOVIE_GOTOTRACK_H
  10. #pragma once
  11. #include "IMovieSystem.h"
  12. #include "AnimTrack.h"
  13. //////////////////////////////////////////////////////////////////////////
  14. //////////////////////////////////////////////////////////////////////////
  15. /** Goto track, every key on this track negates boolean value.
  16. */
  17. class CGotoTrack
  18. : public TAnimTrack<IDiscreteFloatKey>
  19. {
  20. public:
  21. AZ_CLASS_ALLOCATOR(CGotoTrack, AZ::SystemAllocator);
  22. AZ_RTTI(CGotoTrack, "{B9A6BD22-F669-4D84-AD1D-B7BD07165C5D}", IAnimTrack);
  23. CGotoTrack();
  24. virtual AnimValueType GetValueType();
  25. void GetValue(float time, float& value, bool applyMultiplier=false);
  26. void SetValue(float time, const float& value, bool bDefault = false, bool applyMultiplier = false);
  27. void SerializeKey(IDiscreteFloatKey& key, XmlNodeRef& keyNode, bool bLoading);
  28. void GetKeyInfo(int key, const char*& description, float& duration);
  29. static void Reflect(AZ::ReflectContext* context);
  30. protected:
  31. void SetKeyAtTime(float time, IKey* key);
  32. float m_DefaultValue;
  33. };
  34. #endif // CRYINCLUDE_CRYMOVIE_GOTOTRACK_H