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

Method deleteConcaveMeshShape

src/engine/PhysicsCommon.cpp:583–597  ·  view source on GitHub ↗

Delete a concave mesh shape * @param concaveMeshShape A pointer to the concave mesh shape to destroy */

Source from the content-addressed store, hash-verified

581 * @param concaveMeshShape A pointer to the concave mesh shape to destroy
582 */
583void 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

Callers

nothing calls this directly

Calls 3

~ConcaveMeshShapeMethod · 0.80
sizeMethod · 0.45
releaseMethod · 0.45

Tested by

no test coverage detected