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

Method createConcaveMeshShape

src/engine/PhysicsCommon.cpp:558–566  ·  view source on GitHub ↗

Create and return a concave mesh shape * @param triangleMesh A pointer to the triangle mesh to use to create the concave mesh shape * @param scaling An optional scaling factor to scale the triangle mesh * @return A pointer to the created concave mesh shape */

Source from the content-addressed store, hash-verified

556 * @return A pointer to the created concave mesh shape
557 */
558ConcaveMeshShape* PhysicsCommon::createConcaveMeshShape(TriangleMesh* triangleMesh, const Vector3& scaling) {
559
560 ConcaveMeshShape* shape = new (mMemoryManager.allocate(MemoryManager::AllocationType::Pool, sizeof(ConcaveMeshShape))) ConcaveMeshShape(triangleMesh,
561 mMemoryManager.getHeapAllocator(), mTriangleShapeHalfEdgeStructure, scaling);
562
563 mConcaveMeshShapes.add(shape);
564
565 return shape;
566}
567
568// Destroy a concave mesh shape
569/**

Callers 3

TestRaycastMethod · 0.80
TestWorldQueriesMethod · 0.80
ConcaveMeshMethod · 0.80

Calls 2

allocateMethod · 0.45
addMethod · 0.45

Tested by 2

TestRaycastMethod · 0.64
TestWorldQueriesMethod · 0.64