FeaturePosition.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. #pragma once
  9. #include <AzCore/Math/Vector3.h>
  10. #include <AzCore/Memory/Memory.h>
  11. #include <AzCore/RTTI/RTTI.h>
  12. #include <AzCore/RTTI/TypeInfo.h>
  13. #include <AzCore/std/containers/vector.h>
  14. #include <EMotionFX/Source/EMotionFXConfig.h>
  15. #include <Feature.h>
  16. namespace AZ
  17. {
  18. class ReflectContext;
  19. }
  20. namespace EMotionFX::MotionMatching
  21. {
  22. class FrameDatabase;
  23. class EMFX_API FeaturePosition
  24. : public Feature
  25. {
  26. public:
  27. AZ_RTTI(FeaturePosition, "{3EAA6459-DB59-4EA1-B8B3-C933A83AA77D}", Feature)
  28. AZ_CLASS_ALLOCATOR_DECL
  29. FeaturePosition() = default;
  30. ~FeaturePosition() override = default;
  31. void ExtractFeatureValues(const ExtractFeatureContext& context) override;
  32. void FillQueryVector(QueryVector& queryVector, const QueryVectorContext& context) override;
  33. float CalculateFrameCost(size_t frameIndex, const FrameCostContext& context) const override;
  34. void DebugDraw(AzFramework::DebugDisplayRequests& debugDisplay,
  35. const Pose& currentPose,
  36. const FeatureMatrix& featureMatrix,
  37. const FeatureMatrixTransformer* featureTransformer,
  38. size_t frameIndex) override;
  39. static void Reflect(AZ::ReflectContext* context);
  40. size_t GetNumDimensions() const override;
  41. AZStd::string GetDimensionName(size_t index) const override;
  42. AZ::Vector3 GetFeatureData(const FeatureMatrix& featureMatrix, size_t frameIndex) const;
  43. };
  44. } // namespace EMotionFX::MotionMatching