AtomBackend.cpp 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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. #include <EMotionFX/Source/Actor.h>
  9. #include <AtomBackend.h>
  10. #include <AtomActor.h>
  11. #include <AtomActorInstance.h>
  12. namespace AZ
  13. {
  14. namespace Render
  15. {
  16. class ActorAsset;
  17. AZ_CLASS_ALLOCATOR_IMPL(AtomBackend, EMotionFX::Integration::EMotionFXAllocator);
  18. EMotionFX::Integration::RenderActor* AtomBackend::CreateActor(EMotionFX::Integration::ActorAsset* asset)
  19. {
  20. return aznew AtomActor(asset);
  21. }
  22. EMotionFX::Integration::RenderActorInstance* AtomBackend::CreateActorInstance(AZ::EntityId entityId,
  23. const EMotionFX::Integration::EMotionFXPtr<EMotionFX::ActorInstance>& actorInstance,
  24. const AZ::Data::Asset<EMotionFX::Integration::ActorAsset>& asset,
  25. [[maybe_unused]] EMotionFX::Integration::SkinningMethod skinningMethod,
  26. const AZ::Transform& worldTransform,
  27. bool rayTracingEnabled)
  28. {
  29. return aznew AZ::Render::AtomActorInstance(entityId, actorInstance, asset, worldTransform, skinningMethod, rayTracingEnabled);
  30. }
  31. } // namespace Render
  32. } // namespace AZ