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

Function vertEdge2MeshTriPoints

source/MRMesh/MRMeshTriPoint.cpp:131–158  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129}
130
131static bool vertEdge2MeshTriPoints( const MeshTopology & topology, VertId av, const MeshEdgePoint & be, MeshTriPoint & a, MeshTriPoint & b )
132{
133 if ( topology.org( be.e ) == av )
134 {
135 a = MeshTriPoint( be.e, { 0, 0 } );
136 b = MeshTriPoint( be );
137 return true;
138 }
139 if ( topology.dest( be.e ) == av )
140 {
141 a = MeshTriPoint( be.e, { 1, 0 } );
142 b = MeshTriPoint( be );
143 return true;
144 }
145 if ( topology.left( be.e ) && topology.dest( topology.next( be.e ) ) == av )
146 {
147 a = MeshTriPoint( be.e, { 0, 1 } );
148 b = MeshTriPoint( be );
149 return true;
150 }
151 if ( topology.right( be.e ) && topology.dest( topology.prev( be.e ) ) == av )
152 {
153 a = MeshTriPoint( be.e.sym(), { 0, 1 } );
154 b = MeshTriPoint( be.sym() );
155 return true;
156 }
157 return false;
158}
159
160static bool edgePoint2MeshTriPoint( const MeshTopology & topology, const MeshEdgePoint & ae, FaceId f, MeshTriPoint & a )
161{

Callers 1

fromSameTriangleFunction · 0.85

Calls 8

leftMethod · 0.80
rightMethod · 0.80
MeshTriPointClass · 0.70
orgMethod · 0.45
destMethod · 0.45
nextMethod · 0.45
prevMethod · 0.45
symMethod · 0.45

Tested by

no test coverage detected