MCPcopy Create free account
hub / github.com/DanielChappuis/reactphysics3d / createConvexMeshShape

Method createConvexMeshShape

src/engine/PhysicsCommon.cpp:430–437  ·  view source on GitHub ↗

Create and return a convex mesh shape * @param convexMesh A pointer to the convex mesh for this shape * @param scaling Scaling factor to scale the convex mesh if necessary * @return A pointer to the created convex mesh shape */

Source from the content-addressed store, hash-verified

428 * @return A pointer to the created convex mesh shape
429 */
430ConvexMeshShape* PhysicsCommon::createConvexMeshShape(ConvexMesh* convexMesh, const Vector3& scaling) {
431
432 ConvexMeshShape* shape = new (mMemoryManager.allocate(MemoryManager::AllocationType::Pool, sizeof(ConvexMeshShape))) ConvexMeshShape(convexMesh, mMemoryManager.getHeapAllocator(), scaling);
433
434 mConvexMeshShapes.add(shape);
435
436 return shape;
437}
438
439// Destroy a convex mesh shape
440/**

Callers 6

TestRigidBodyMethod · 0.80
TestPointInsideMethod · 0.80
TestRaycastMethod · 0.80
TestWorldQueriesMethod · 0.80
ConvexMeshMethod · 0.80
ConvexHullMethod · 0.80

Calls 2

allocateMethod · 0.45
addMethod · 0.45

Tested by 4

TestRigidBodyMethod · 0.64
TestPointInsideMethod · 0.64
TestRaycastMethod · 0.64
TestWorldQueriesMethod · 0.64