| 94 | } |
| 95 | |
| 96 | bool same( const MeshTopology & topology, const MeshTriPoint& lhs, const MeshTriPoint & rhs ) |
| 97 | { |
| 98 | if ( !lhs ) |
| 99 | return !rhs; |
| 100 | if ( auto le = lhs.onEdge( topology ) ) |
| 101 | return same( topology, le, rhs.onEdge( topology ) ); |
| 102 | |
| 103 | assert ( topology.left( lhs.e ) ); |
| 104 | if ( topology.left( lhs.e ) != topology.left( rhs.e ) ) |
| 105 | return false; |
| 106 | |
| 107 | if ( lhs == rhs ) |
| 108 | return true; |
| 109 | |
| 110 | auto r = rhs.lnext( topology ); |
| 111 | if ( lhs == r ) |
| 112 | return true; |
| 113 | |
| 114 | r = r.lnext( topology ); |
| 115 | return lhs == r; |
| 116 | } |
| 117 | |
| 118 | MeshTriPoint getVertexAsMeshTriPoint( const MeshTopology & topology, EdgeId e, VertId v ) |
| 119 | { |