MCPcopy Create free account
hub / github.com/DanielChappuis/reactphysics3d / ~Capsule

Method ~Capsule

testbed/common/Capsule.cpp:74–93  ·  view source on GitHub ↗

Destructor

Source from the content-addressed store, hash-verified

72
73// Destructor
74Capsule::~Capsule() {
75
76 if (totalNbCapsules == 1) {
77
78 // Destroy the mesh
79 destroy();
80
81 // Destroy the VBOs and VAO
82 mVBOIndices.destroy();
83 mVBOVertices.destroy();
84 mVBONormals.destroy();
85 mVBOTextureCoords.destroy();
86 mVAO.destroy();
87 }
88
89 mPhysicsWorld->destroyRigidBody(mBody);
90 mPhysicsCommon.destroyCapsuleShape(mCapsuleShape);
91
92 totalNbCapsules--;
93}
94
95// Render the sphere at the correct position and with the correct orientation
96void Capsule::render(openglframework::Shader& shader, const openglframework::Matrix4& worldToCameraMatrix) {

Callers

nothing calls this directly

Calls 3

destroyRigidBodyMethod · 0.80
destroyCapsuleShapeMethod · 0.80
destroyMethod · 0.45

Tested by

no test coverage detected