Delete a capsule collision shape * @param capsuleShape A pointer to the capsule shape to destroy */
| 406 | * @param capsuleShape A pointer to the capsule shape to destroy |
| 407 | */ |
| 408 | void PhysicsCommon::deleteCapsuleShape(CapsuleShape* capsuleShape) { |
| 409 | |
| 410 | // If the shape is still part of some colliders |
| 411 | if (capsuleShape->mColliders.size() > 0) { |
| 412 | |
| 413 | RP3D_LOG("PhysicsCommon", Logger::Level::Error, Logger::Category::PhysicCommon, |
| 414 | "Error when destroying the CapsuleShape because it is still used by some colliders", __FILE__, __LINE__); |
| 415 | } |
| 416 | |
| 417 | // Call the destructor of the shape |
| 418 | capsuleShape->~CapsuleShape(); |
| 419 | |
| 420 | // Release allocated memory |
| 421 | mMemoryManager.release(MemoryManager::AllocationType::Pool, capsuleShape, sizeof(CapsuleShape)); |
| 422 | } |
| 423 | |
| 424 | // Create and return a convex mesh shape |
| 425 | /** |
nothing calls this directly
no test coverage detected