Back to class index
| Polyhedron::FindClosestVertexSyntaxint Polyhedron::FindClosestVertex(const float4 &pt, float &outDistanceSq) const; [15 lines of code]Searches each vertex of this polyhedron to find the closest vertex to the given target point. Parametersfloat &outDistanceSq [out]Outputs the distance between the target point and the closest vertex, or FLOAT_INF if no such point was found. Return ValueAn index to the vertex array of this polyhedron denoting the closest vertex to the target point. Returns -1 if no such point is found. (no vertices in polyhedron, or all of them contained NaNs/Infs) |