MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / triPoint

Function triPoint

source/MRMesh/MRMeshMath.cpp:30–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28}
29
30Vector3f triPoint( const MeshTopology & topology, const VertCoords & points, const MeshTriPoint & p )
31{
32 if ( p.bary.b == 0 )
33 {
34 // do not require to have triangular face to the left of p.e
35 const Vector3f v0 = orgPnt( topology, points, p.e );
36 const Vector3f v1 = destPnt( topology, points, p.e );
37 return ( 1 - p.bary.a ) * v0 + p.bary.a * v1;
38 }
39 Vector3f v0, v1, v2;
40 getLeftTriPoints( topology, points, p.e, v0, v1, v2 );
41 return p.bary.interpolate( v0, v1, v2 );
42}
43
44MeshTriPoint toTriPoint( const MeshTopology & topology, const VertCoords & points, FaceId f, const Vector3f & p )
45{

Callers 3

triPointMethod · 0.85
getClosestVertexFunction · 0.85
getClosestEdgeFunction · 0.85

Calls 4

orgPntFunction · 0.85
destPntFunction · 0.85
getLeftTriPointsFunction · 0.70
interpolateMethod · 0.45

Tested by

no test coverage detected