AtomActor.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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 <Integration/Rendering/RenderActor.h>
  10. #include <AzCore/EBus/EBus.h>
  11. #include <AzCore/Memory/Memory.h>
  12. #include <AzCore/std/smart_ptr/intrusive_ptr.h>
  13. #include <AzCore/Asset/AssetCommon.h>
  14. namespace EMotionFX::Integration
  15. {
  16. class ActorAsset;
  17. }
  18. namespace AZ
  19. {
  20. namespace Render
  21. {
  22. class SkinnedMeshInputBuffers;
  23. struct SkinInfluences
  24. {
  25. AZStd::vector<AZStd::array<AZ::u32, 4>> boneIndices;
  26. AZStd::vector<AZStd::array<float, 4>> boneWeights;
  27. };
  28. class AtomActor
  29. : public EMotionFX::Integration::RenderActor
  30. {
  31. public:
  32. AZ_RTTI(AtomActor, "{A24ED299-27D3-4227-9D97-D273E5D7BACC}", EMotionFX::Integration::RenderActor);
  33. AZ_CLASS_ALLOCATOR_DECL;
  34. AtomActor(EMotionFX::Integration::ActorAsset* actorAsset);
  35. ~AtomActor();
  36. AZStd::intrusive_ptr<AZ::Render::SkinnedMeshInputBuffers> FindOrCreateSkinnedMeshInputBuffers();
  37. private:
  38. AZStd::intrusive_ptr<AZ::Render::SkinnedMeshInputBuffers> m_skinnedMeshInputBuffers;
  39. EMotionFX::Integration::ActorAsset* m_actorAsset;
  40. };
  41. } // namespace Render
  42. } // namespace AZ