TimeRangesTrack.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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_TIMERANGESTRACK_H
  9. #define CRYINCLUDE_CRYMOVIE_TIMERANGESTRACK_H
  10. #pragma once
  11. //forward declarations.
  12. #include "IMovieSystem.h"
  13. #include "AnimTrack.h"
  14. /** CTimeRangesTrack contains keys that represent generic time ranges
  15. */
  16. class CTimeRangesTrack
  17. : public TAnimTrack<ITimeRangeKey>
  18. {
  19. public:
  20. AZ_CLASS_ALLOCATOR(CTimeRangesTrack, AZ::SystemAllocator);
  21. AZ_RTTI(CTimeRangesTrack, "{6BD2B893-7E42-47C7-92B3-5C58F8AE33F3}", IAnimTrack);
  22. // IAnimTrack.
  23. void GetKeyInfo(int key, const char*& description, float& duration);
  24. bool Serialize(XmlNodeRef& xmlNode, bool bLoading, bool bLoadEmptyTracks);
  25. void SerializeKey(ITimeRangeKey& key, XmlNodeRef& keyNode, bool bLoading);
  26. //! Gets the duration of an animation key.
  27. float GetKeyDuration(int key) const;
  28. int GetActiveKeyIndexForTime(const float time);
  29. static void Reflect(AZ::ReflectContext* context);
  30. };
  31. #endif // CRYINCLUDE_CRYMOVIE_TIMERANGESTRACK_H