Delete a convex mesh shape * @param convexMeshShape A pointer to the convex mesh shape to destroy */
| 452 | * @param convexMeshShape A pointer to the convex mesh shape to destroy |
| 453 | */ |
| 454 | void 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 | /** |
nothing calls this directly
no test coverage detected