Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
pappeste
2021-06-18 16:05:20 -07:00
committed by Esteban Papp
parent 7a929165c6
commit f53d1f955a
6 changed files with 16 additions and 16 deletions
+2 -2
View File
@@ -69,7 +69,7 @@ namespace PhysX
auto lockToDefault = [gui]()
{
gui->addItem(QLatin1String(Physics::DefaultPhysicsMaterialLabel.data(), Physics::DefaultPhysicsMaterialLabel.size()));
gui->addItem(QLatin1String(Physics::DefaultPhysicsMaterialLabel.data(), static_cast<int>(Physics::DefaultPhysicsMaterialLabel.size())));
gui->setCurrentIndex(0);
return false;
};
@@ -98,7 +98,7 @@ namespace PhysX
// Add default physics material first
m_libraryIds.push_back(Physics::MaterialId());
gui->addItem(QLatin1String(Physics::DefaultPhysicsMaterialLabel.data(), Physics::DefaultPhysicsMaterialLabel.size()));
gui->addItem(QLatin1String(Physics::DefaultPhysicsMaterialLabel.data(), static_cast<int>(Physics::DefaultPhysicsMaterialLabel.size())));
for (const auto& material : materials)
{
@@ -780,7 +780,7 @@ namespace PhysX
entityRigidbody->GetRigidBody()->IsKinematic() == false)
{
AZStd::string assetPath = m_shapeConfiguration.m_physicsAsset.m_configuration.m_asset.GetHint().c_str();
const uint lastSlash = assetPath.rfind('/');
const uint lastSlash = static_cast<uint>(assetPath.rfind('/'));
if (lastSlash != AZStd::string::npos)
{
assetPath = assetPath.substr(lastSlash + 1);
@@ -831,7 +831,7 @@ namespace PhysX
if (shapeConfiguration)
{
m_colliderDebugDraw.BuildMeshes(*shapeConfiguration, shapeIndex);
m_colliderDebugDraw.BuildMeshes(*shapeConfiguration, static_cast<AZ::u32>(shapeIndex));
}
}
}
@@ -917,7 +917,7 @@ namespace PhysX
const AZ::Vector3 overallScale = Utils::GetTransformScale(GetEntityId()) * m_cachedNonUniformScale * assetScale;
m_colliderDebugDraw.DrawMesh(debugDisplay, *colliderConfiguration, *cookedMeshShapeConfiguration,
overallScale, shapeIndex);
overallScale, static_cast<AZ::u32>(shapeIndex));
break;
}
case Physics::ShapeType::Sphere:
@@ -155,7 +155,7 @@ namespace PhysX
if (materialIndexIter != materialIndexByName.end())
{
return materialIndexIter->second;
return static_cast<AZ::u16>(materialIndexIter->second);
}
// Add it to the list otherwise
@@ -417,7 +417,7 @@ namespace PhysX
AZ_Assert(pxCooking, "Failed to create PxCooking");
physx::PxBoundedData strideData;
strideData.count = vertices.size();
strideData.count = static_cast<physx::PxU32>(vertices.size());
strideData.stride = sizeof(Vec3);
strideData.data = vertices.data();
@@ -453,7 +453,7 @@ namespace PhysX
physx::PxTriangleMeshDesc meshDesc;
meshDesc.points = strideData;
meshDesc.triangles.count = indices.size() / 3;
meshDesc.triangles.count = static_cast<physx::PxU32>(indices.size() / 3);
meshDesc.triangles.stride = sizeof(AZ::u32) * 3;
meshDesc.triangles.data = indices.data();
@@ -638,9 +638,9 @@ namespace PhysX
{
decomposer->Compute(
vhacdVertices.data(),
vhacdVertices.size() / 3,
static_cast<uint32_t>(vhacdVertices.size() / 3),
nodeExportData.m_indices.data(),
nodeExportData.m_indices.size() / 3,
static_cast<uint32_t>(nodeExportData.m_indices.size() / 3),
vhacdParams
);
}
@@ -656,9 +656,9 @@ namespace PhysX
decomposer->Compute(
vhacdVertices.data(),
vhacdVertices.size() / 3,
static_cast<uint32_t>(vhacdVertices.size() / 3),
vhacdIndices.data(),
vhacdIndices.size() / 3,
static_cast<uint32_t>(vhacdIndices.size() / 3),
vhacdParams
);
}
@@ -841,7 +841,7 @@ namespace PhysX
// by the amount of vertices already added in the last iteration
for (const NodeCollisionGeomExportData& exportData : totalExportData)
{
vtx_idx startingIndex = mergedVertices.size();
vtx_idx startingIndex = static_cast<vtx_idx>(mergedVertices.size());
mergedVertices.insert(mergedVertices.end(), exportData.m_vertices.begin(), exportData.m_vertices.end());
@@ -279,7 +279,7 @@ namespace PhysX::Pipeline
{
if (volumeTermWeight >= 0.0 && volumeTermWeight < 1.0)
{
const AZ::u32 numberOfVertices = vertices.size();
const AZ::u32 numberOfVertices = static_cast<AZ::u32>(vertices.size());
// Convert vertices and compute the mean of the vertex cloud.
AZStd::vector<Vector> verticesConverted(numberOfVertices, Vector{{ 0.0, 0.0, 0.0 }});
+1 -1
View File
@@ -867,7 +867,7 @@ namespace PhysX
if (newJoint != nullptr)
{
AzPhysics::JointIndex index = index = m_joints.size();
AzPhysics::JointIndex index = static_cast<AzPhysics::JointIndex>(m_joints.size());
m_joints.emplace_back(newJointCrc, newJoint);
const AzPhysics::JointHandle newJointHandle(newJointCrc, index);
@@ -219,7 +219,7 @@ namespace PhysX
if (m_sceneList.size() < std::numeric_limits<AzPhysics::SceneIndex>::max()) //add a new scene if it is under the limit
{
const AzPhysics::SceneHandle sceneHandle(AZ::Crc32(config.m_sceneName), (m_sceneList.size()));
const AzPhysics::SceneHandle sceneHandle(AZ::Crc32(config.m_sceneName), static_cast<AzPhysics::SceneIndex>(m_sceneList.size()));
m_sceneList.emplace_back(AZStd::make_unique<PhysXScene>(config, sceneHandle));
m_sceneAddedEvent.Signal(sceneHandle);
return sceneHandle;