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

Function findEdgeTriIntersectionPoint

source/MRMesh/MRMeshBoolean.cpp:37–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35};
36
37Vector3f findEdgeTriIntersectionPoint( const Mesh& edgeMesh, EdgeId edge, const Mesh& triMesh, FaceId tri,
38 const CoordinateConverters& converters,
39 const AffineXf3f* rigidB2A = nullptr,
40 EdgeTriComponent meshBComponent = EdgeTriComponent::Edge )
41{
42 Vector3f ev0, ev1;
43 ev0 = edgeMesh.orgPnt( edge );
44 ev1 = edgeMesh.destPnt( edge );
45
46 Vector3f fv0, fv1, fv2;
47 triMesh.getTriPoints( tri, fv0, fv1, fv2 );
48
49 if ( rigidB2A )
50 {
51 const auto& xf = *rigidB2A;
52 switch ( meshBComponent )
53 {
54 case EdgeTriComponent::Edge:
55 ev0 = xf( ev0 );
56 ev1 = xf( ev1 );
57 break;
58 case EdgeTriComponent::Tri:
59 fv0 = xf( fv0 );
60 fv1 = xf( fv1 );
61 fv2 = xf( fv2 );
62 break;
63 }
64 }
65
66 return findTriangleSegmentIntersectionPrecise( fv0, fv1, fv2, ev0, ev1, converters );
67}
68
69void gatherEdgeInfo( const MeshTopology& topology, EdgeId e, FaceBitSet& faces, VertBitSet& orgs, VertBitSet& dests )
70{

Callers 1

getBooleanPointsFunction · 0.85

Calls 4

getTriPointsMethod · 0.80
orgPntMethod · 0.45
destPntMethod · 0.45

Tested by

no test coverage detected