3
0

SkinnedMeshInstance.cpp 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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 <Atom/Feature/SkinnedMesh/SkinnedMeshInstance.h>
  9. namespace AZ
  10. {
  11. namespace Render
  12. {
  13. void SkinnedMeshInstance::SuppressSignalOnDeallocate()
  14. {
  15. for (auto& vectorOfAllocations : m_allocations)
  16. {
  17. for (auto& allocationPtr : vectorOfAllocations)
  18. {
  19. if (allocationPtr)
  20. {
  21. allocationPtr->SuppressSignalOnDeallocate();
  22. }
  23. }
  24. }
  25. }
  26. void SkinnedMeshInstance::DisableSkinning(uint32_t lodIndex, uint32_t meshIndex)
  27. {
  28. m_isSkinningEnabled[lodIndex][meshIndex] = false;
  29. }
  30. void SkinnedMeshInstance::EnableSkinning(uint32_t lodIndex, uint32_t meshIndex)
  31. {
  32. m_isSkinningEnabled[lodIndex][meshIndex] = true;
  33. }
  34. bool SkinnedMeshInstance::IsSkinningEnabled(uint32_t lodIndex, uint32_t meshIndex) const
  35. {
  36. return m_isSkinningEnabled[lodIndex][meshIndex];
  37. }
  38. } // namespace Render
  39. }// namespace AZ