Return the index of a given vertex in the mesh
| 252 | |
| 253 | // Return the index of a given vertex in the mesh |
| 254 | int ConvexMesh::findVertexIndex(const std::vector<openglframework::Vector3>& vertices, const openglframework::Vector3& vertex) { |
| 255 | |
| 256 | for (size_t i = 0; i < vertices.size(); i++) { |
| 257 | if (vertices[i] == vertex) { |
| 258 | return i; |
| 259 | } |
| 260 | } |
| 261 | |
| 262 | return -1; |
| 263 | } |