Delete a concave mesh shape * @param concaveMeshShape A pointer to the concave mesh shape to destroy */
| 581 | * @param concaveMeshShape A pointer to the concave mesh shape to destroy |
| 582 | */ |
| 583 | void PhysicsCommon::deleteConcaveMeshShape(ConcaveMeshShape* concaveMeshShape) { |
| 584 | |
| 585 | // If the shape is still part of some colliders |
| 586 | if (concaveMeshShape->mColliders.size() > 0) { |
| 587 | |
| 588 | RP3D_LOG("PhysicsCommon", Logger::Level::Error, Logger::Category::PhysicCommon, |
| 589 | "Error when destroying the ConcaveMeshShape because it is still used by some colliders", __FILE__, __LINE__); |
| 590 | } |
| 591 | |
| 592 | // Call the destructor of the shape |
| 593 | concaveMeshShape->~ConcaveMeshShape(); |
| 594 | |
| 595 | // Release allocated memory |
| 596 | mMemoryManager.release(MemoryManager::AllocationType::Pool, concaveMeshShape, sizeof(ConcaveMeshShape)); |
| 597 | } |
| 598 | |
| 599 | // Create a convex mesh from a PolygonVertexArray describing vertices and faces |
| 600 | /// The data (vertices, faces indices, ...) are copied from the PolygonVertexArray into the |
nothing calls this directly
no test coverage detected