10[[nodiscard]]
inline EdgeId
mapEdge(
const WholeEdgeMap & map, EdgeId src )
12 EdgeId res = map[ src.undirected() ];
13 if ( res && src.odd() )
19[[nodiscard]]
inline UndirectedEdgeId
mapEdge(
const WholeEdgeMap & map, UndirectedEdgeId src )
21 EdgeId eres = map[ src ];
22 return eres ? eres.undirected() : UndirectedEdgeId{};
29 auto it = map.find( src.undirected() );
30 if ( it != map.end() )
42 auto it = map.find( src );
43 return it != map.end() ? it->second.undirected() : UndirectedEdgeId{};
50 [src](
const WholeEdgeMap& map ) {
return mapEdge( map, src ); },
59 [src](
const WholeEdgeMap& map ) {
return mapEdge( map, src ); },
65[[nodiscard]]
inline UndirectedEdgeId
mapEdge(
const UndirectedEdgeBMap & map, UndirectedEdgeId src )
67 return getAt( map.b, src );
71[[nodiscard]]
MRMESH_API UndirectedEdgeBitSet
mapEdges(
const WholeEdgeMap & map,
const UndirectedEdgeBitSet & src );
77[[nodiscard]]
MRMESH_API UndirectedEdgeBitSet
mapEdges(
const UndirectedEdgeBMap & map,
const UndirectedEdgeBitSet & src );
#define MRMESH_API
Definition MRMesh/MRMeshFwd.h:80
Definition MRCameraOrientationPlugin.h:8
T getAt(const Buffer< T, I > &bmap, I key, T def={})
given some buffer map and a key, returns the value associated with the key, or default value if key i...
Definition MRBuffer.h:119
HashMap< UndirectedEdgeId, EdgeId > WholeEdgeHashMap
mapping of whole edges: map[e]->f, map[e.sym()]->f.sym(), where only map[e] for even edges is stored
Definition MRMesh/MRMeshFwd.h:601
MRMESH_API UndirectedEdgeBitSet mapEdges(const WholeEdgeMap &map, const UndirectedEdgeBitSet &src)
given input bit-set (src), converts each id corresponding to set bit using given map,...
EdgeId mapEdge(const WholeEdgeMap &map, EdgeId src)
given input edge (src), converts its id using given map
Definition MRMapEdge.h:10
std::variant< Dense, Hash > var
Definition MRMapOrHashMap.h:19
Definition MRMesh/MRMeshFwd.h:776