Load and initialize the mesh for all the contact points
| 58 | |
| 59 | // Load and initialize the mesh for all the contact points |
| 60 | void VisualContactPoint::createStaticData(const std::string& meshFolderPath) { |
| 61 | |
| 62 | if (mStaticDataCreated) return; |
| 63 | |
| 64 | // Load the mesh from a file |
| 65 | openglframework::MeshReaderWriter::loadMeshFromFile(meshFolderPath + "sphere.obj", mMesh); |
| 66 | |
| 67 | // Calculate the normals of the mesh |
| 68 | mMesh.calculateNormals(); |
| 69 | |
| 70 | mMesh.scaleVertices(VISUAL_CONTACT_POINT_RADIUS); |
| 71 | |
| 72 | createVBOAndVAO(); |
| 73 | |
| 74 | mStaticDataCreated = true; |
| 75 | } |
| 76 | |
| 77 | // Destroy the mesh for the contact points |
| 78 | void VisualContactPoint::destroyStaticData() { |
nothing calls this directly
no test coverage detected