Delete a height-field shape * @param heightFieldShape A pointer to the height field shape to destroy */
| 534 | * @param heightFieldShape A pointer to the height field shape to destroy |
| 535 | */ |
| 536 | void PhysicsCommon::deleteHeightFieldShape(HeightFieldShape* heightFieldShape) { |
| 537 | |
| 538 | // If the shape is still part of some colliders |
| 539 | if (heightFieldShape->mColliders.size() > 0) { |
| 540 | |
| 541 | RP3D_LOG("PhysicsCommon", Logger::Level::Error, Logger::Category::PhysicCommon, |
| 542 | "Error when destroying the HeightFieldShape because it is still used by some colliders", __FILE__, __LINE__); |
| 543 | } |
| 544 | |
| 545 | // Call the destructor of the shape |
| 546 | heightFieldShape->~HeightFieldShape(); |
| 547 | |
| 548 | // Release allocated memory |
| 549 | mMemoryManager.release(MemoryManager::AllocationType::Pool, heightFieldShape, sizeof(HeightFieldShape)); |
| 550 | } |
| 551 | |
| 552 | // Create and return a concave mesh shape |
| 553 | /** |
nothing calls this directly
no test coverage detected