13[[nodiscard]]
inline EdgeId
mapEdge(
const WholeEdgeMap & map, EdgeId src )
15 EdgeId res = map[ src.undirected() ];
16 if ( res && src.odd() )
22[[nodiscard]]
inline UndirectedEdgeId
mapEdge(
const WholeEdgeMap & map, UndirectedEdgeId src )
24 EdgeId eres = map[ src ];
25 return eres ? eres.undirected() : UndirectedEdgeId{};
32 auto it = map.find( src.undirected() );
33 if ( it != map.end() )
45 auto it = map.find( src );
46 return it != map.end() ? it->second.undirected() : UndirectedEdgeId{};
53 [src](
const WholeEdgeMap& map ) {
return mapEdge( map, src ); },
62 [src](
const WholeEdgeMap& map ) {
return mapEdge( map, src ); },
68[[nodiscard]]
inline UndirectedEdgeId
mapEdge(
const UndirectedEdgeBMap & map, UndirectedEdgeId src )
70 return getAt( map.b, src );
74[[nodiscard]]
MRMESH_API UndirectedEdgeBitSet
mapEdges(
const WholeEdgeMap & map,
const UndirectedEdgeBitSet & src );
80[[nodiscard]]
MRMESH_API UndirectedEdgeBitSet
mapEdges(
const UndirectedEdgeBMap & map,
const UndirectedEdgeBitSet & src );
#define MRMESH_API
Definition MRMeshFwd.h:80
std::variant< Dense, Hash > var
default construction will select dense map
Definition MRMapOrHashMap.h:23
T getAt(const Buffer< T, I > &bmap MR_LIFETIMEBOUND_NESTED, 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:128
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 MRMeshFwd.h:615
MapOrHashMap< UndirectedEdgeId, EdgeId > WholeEdgeMapOrHashMap
mapping of whole edges: map[e]->f, map[e.sym()]->f.sym(), where only map[e] for even edges is stored
Definition MRMeshFwd.h:625
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:13
only for bindings generation
Definition MRCameraOrientationPlugin.h:8
Definition MRMeshFwd.h:785