Destructor
| 83 | |
| 84 | // Destructor |
| 85 | Box::~Box() { |
| 86 | |
| 87 | if (totalNbBoxes == 1) { |
| 88 | |
| 89 | // Destroy the VBOs and VAO |
| 90 | mVBOVertices.destroy(); |
| 91 | mVBONormals.destroy(); |
| 92 | mVAO.destroy(); |
| 93 | } |
| 94 | mPhysicsWorld->destroyRigidBody(mBody); |
| 95 | mPhysicsCommon.destroyBoxShape(mBoxShape); |
| 96 | totalNbBoxes--; |
| 97 | } |
| 98 | |
| 99 | // Render the cube at the correct position and with the correct orientation |
| 100 | void Box::render(openglframework::Shader& shader, const openglframework::Matrix4& worldToCameraMatrix) { |
nothing calls this directly
no test coverage detected