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

Method ~Sphere

testbed/common/Sphere.cpp:74–92  ·  view source on GitHub ↗

Destructor

Source from the content-addressed store, hash-verified

72
73// Destructor
74Sphere::~Sphere() {
75
76 if (totalNbSpheres == 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.destroySphereShape(mCollisionShape);
91 totalNbSpheres--;
92}
93
94// Render the sphere at the correct position and with the correct orientation
95void Sphere::render(openglframework::Shader& shader, const openglframework::Matrix4& worldToCameraMatrix) {

Callers

nothing calls this directly

Calls 3

destroyRigidBodyMethod · 0.80
destroySphereShapeMethod · 0.80
destroyMethod · 0.45

Tested by

no test coverage detected