Destructor
| 71 | |
| 72 | // Destructor |
| 73 | HeightField::~HeightField() { |
| 74 | |
| 75 | // Destroy the mesh |
| 76 | destroy(); |
| 77 | |
| 78 | // Destroy the VBOs and VAO |
| 79 | mVBOIndices.destroy(); |
| 80 | mVBOVertices.destroy(); |
| 81 | mVBONormals.destroy(); |
| 82 | mVBOTextureCoords.destroy(); |
| 83 | mVAO.destroy(); |
| 84 | |
| 85 | mPhysicsWorld->destroyRigidBody(mBody); |
| 86 | mPhysicsCommon.destroyHeightFieldShape(mHeightFieldShape); |
| 87 | mPhysicsCommon.destroyHeightField(mHeightField); |
| 88 | } |
| 89 | |
| 90 | // Render the sphere at the correct position and with the correct orientation |
| 91 | void HeightField::render(openglframework::Shader& shader, |
no test coverage detected