combined the 2 physics shape collider config pair types into 1(#778)

This commit is contained in:
amzn-sean
2021-05-18 12:39:07 +01:00
committed by GitHub
parent c4fa373e43
commit 672dad7fea
41 changed files with 225 additions and 184 deletions
@@ -226,7 +226,7 @@ namespace PhysX
void EditorShapeColliderComponent::BuildGameEntity(AZ::Entity* gameEntity)
{
auto* shapeColliderComponent = gameEntity->CreateComponent<ShapeColliderComponent>();
Physics::ShapeConfigurationList shapeConfigurationList;
AzPhysics::ShapeColliderPairList shapeConfigurationList;
shapeConfigurationList.reserve(m_shapeConfigs.size());
for (const auto& shapeConfig : m_shapeConfigs)
{
@@ -257,11 +257,12 @@ namespace PhysX
configuration.m_entityId = GetEntityId();
configuration.m_debugName = GetEntity()->GetName();
AZStd::vector<AzPhysics::ShapeColliderPair> colliderShapePairs;
AzPhysics::ShapeColliderPairList colliderShapePairs;
colliderShapePairs.reserve(m_shapeConfigs.size());
for (const auto& shapeConfig : m_shapeConfigs)
{
colliderShapePairs.emplace_back(&m_colliderConfig, shapeConfig.get());
colliderShapePairs.emplace_back(
AZStd::make_shared<Physics::ColliderConfiguration>(m_colliderConfig), shapeConfig);
}
configuration.m_colliderAndShapeData = colliderShapePairs;