Skip to content

[Documentation] There are some significant inconsistencies and errors in the 5.6.1 docs #471

Description

@Avelina9X

Under Geometry - Convex Meshes

We have the following code example:

PxConvexMeshDesc convexDesc;
convexDesc.points.count     = 5;
convexDesc.points.stride    = sizeof(PxVec3);
convexDesc.points.data      = convexVerts;
convexDesc.flags            = PxConvexFlag::eCOMPUTE_CONVEX | PxConvexFlag::eDISABLE_MESH_VALIDATION | PxConvexFlag::eFAST_INERTIA_COMPUTATION;

#ifdef _DEBUG
    // mesh should be validated before cooking without the mesh cleaning
    bool res = PxValidateConvexMesh(cookingParams, convexDesc);
    PX_ASSERT(res);
#endif

PxConvexMesh* aConvexMesh = PxCreateConvexMesh(cookingParams, convexDesc,
    thePhysics->getPhysicsInsertionCallback());

However it is not possible to validate a convex mesh consisting of only points, as the validation code requires polygon indices to present.

Under Geometry - Triangle Meshes

We have the following code example:

PxTolerancesScale scale;
PxCookingParams params(scale);
// disable mesh cleaning - perform mesh validation on development configurations
params.meshPreprocessParams |= PxMeshPreprocessingFlag::eDISABLE_CLEAN_MESH;
// disable edge precompute, edges are set for each triangle, slows contact generation
params.meshPreprocessParams |= PxMeshPreprocessingFlag::eDISABLE_ACTIVE_EDGES_PRECOMPUTE;
// lower hierarchy for internal mesh
params.meshCookingHint = PxMeshCookingHint::eCOOKING_PERFORMANCE;

PxTriangleMeshDesc meshDesc;
meshDesc.points.count           = nbVerts;
meshDesc.points.stride          = sizeof(PxVec3);
meshDesc.points.data            = verts;

meshDesc.triangles.count        = triCount;
meshDesc.triangles.stride       = 3*sizeof(PxU32);
meshDesc.triangles.data         = indices32;

#ifdef _DEBUG
    // mesh should be validated before cooked without the mesh cleaning
    bool res = PxValidateTriangleMesh(params, meshDesc);
    PX_ASSERT(res);
#endif

PxTriangleMesh* aTriangleMesh = PxCreateTriangleMesh(params, meshDesc,
    thePhysics->getPhysicsInsertionCallback());

However the PxCookingParams::meshCookingHint field no longer exists, nor does PxMeshCookingHint in general, as they were deprecated during PhysX 3 and subsequently removed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions