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

Method deleteConvexMeshShape

src/engine/PhysicsCommon.cpp:454–468  ·  view source on GitHub ↗

Delete a convex mesh shape * @param convexMeshShape A pointer to the convex mesh shape to destroy */

Source from the content-addressed store, hash-verified

452 * @param convexMeshShape A pointer to the convex mesh shape to destroy
453 */
454void PhysicsCommon::deleteConvexMeshShape(ConvexMeshShape* convexMeshShape) {
455
456 // If the shape is still part of some colliders
457 if (convexMeshShape->mColliders.size() > 0) {
458
459 RP3D_LOG("PhysicsCommon", Logger::Level::Error, Logger::Category::PhysicCommon,
460 "Error when destroying the ConvexMeshShape because it is still used by some colliders", __FILE__, __LINE__);
461 }
462
463 // Call the destructor of the shape
464 convexMeshShape->~ConvexMeshShape();
465
466 // Release allocated memory
467 mMemoryManager.release(MemoryManager::AllocationType::Pool, convexMeshShape, sizeof(ConvexMeshShape));
468}
469
470// Create and return a height-field
471/**

Callers

nothing calls this directly

Calls 3

~ConvexMeshShapeMethod · 0.80
sizeMethod · 0.45
releaseMethod · 0.45

Tested by

no test coverage detected