MCPcopy Create free account
hub / github.com/DanielChappuis/reactphysics3d / findVertexIndex

Method findVertexIndex

testbed/common/ConvexMesh.cpp:254–263  ·  view source on GitHub ↗

Return the index of a given vertex in the mesh

Source from the content-addressed store, hash-verified

252
253// Return the index of a given vertex in the mesh
254int 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}

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected