BlastActorDesc.h 1.5 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. #pragma once
  9. #include <AzCore/std/containers/vector.h>
  10. #include <AzFramework/Physics/Material/PhysicsMaterialId.h>
  11. #include <AzFramework/Physics/Configuration/RigidBodyConfiguration.h>
  12. namespace Nv::Blast
  13. {
  14. class TkActor;
  15. } // namespace Nv::Blast
  16. namespace Blast
  17. {
  18. class BlastFamily;
  19. //! Data required to create a BlastActor.
  20. struct BlastActorDesc
  21. {
  22. BlastFamily* m_family;
  23. Nv::Blast::TkActor* m_tkActor;
  24. Physics::MaterialId m_physicsMaterialId;
  25. AZ::Vector3 m_parentLinearVelocity = AZ::Vector3::CreateZero();
  26. AZ::Vector3 m_parentCenterOfMass = AZ::Vector3::CreateZero();
  27. AzPhysics::RigidBodyConfiguration m_bodyConfiguration; //!< Either rigid dynamic or rigid static
  28. AZStd::vector<uint32_t> m_chunkIndices; //!< Chunks that are going to simulate this actor.
  29. AZStd::shared_ptr<AZ::Entity> m_entity; //!< Entity that the actor should use to simulate rigid body
  30. bool m_isStatic = false; //!< Denotes whether actor should be simulated by a static or dynamic rigid body.
  31. bool m_isLeafChunk = false; //!< Denotes whether this actor represented by a single leaf chunk.
  32. float m_scale = 1.0f; //!< Uniform scale applied to the actor.
  33. };
  34. } // namespace Blast