Addressed feedback from PR 4874. (#4915)
* Addressed feedback from PR 4874. * Removed second copy of HeightfieldProviderBus.h from cmake file * Changed CookedMeshShapeConfiguration and HeightfieldShapeConfiguration to have less messy implementations, instead opting for the slightly less messy const_cast inside of Utils.cpp and DebugDraw.cpp. * Changed InitHeightfieldShapeConfiguraiton to CreateHeightfieldShapeConfiguration with a better API signature. Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com> * Fixed indentation Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
This commit is contained in:
@@ -264,7 +264,11 @@ namespace PhysX
|
||||
case Physics::ShapeType::CookedMesh:
|
||||
{
|
||||
const auto& cookedMeshConfig = static_cast<const Physics::CookedMeshShapeConfiguration&>(shapeConfig);
|
||||
physx::PxBase* meshData = static_cast<physx::PxBase*>(cookedMeshConfig.GetCachedNativeMesh());
|
||||
const physx::PxBase* constMeshData = static_cast<const physx::PxBase*>(cookedMeshConfig.GetCachedNativeMesh());
|
||||
|
||||
// Specifically removing the const from the meshData pointer because the physx APIs expect this pointer to be non-const.
|
||||
physx::PxBase* meshData = const_cast<physx::PxBase*>(constMeshData);
|
||||
|
||||
if (meshData)
|
||||
{
|
||||
if (meshData->is<physx::PxTriangleMesh>())
|
||||
|
||||
Reference in New Issue
Block a user