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

Function findCollidingTriangleBitsets

source/MRMesh/MRMeshCollide.cpp:132–152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

130}
131
132std::pair<FaceBitSet, FaceBitSet> findCollidingTriangleBitsets( const MeshPart& a, const MeshPart& b,
133 const AffineXf3f* rigidB2A )
134{
135 const auto pairs = findCollidingTriangles( a, b, rigidB2A );
136 FaceId aMax, bMax;
137 for ( const auto & p : pairs )
138 {
139 aMax = std::max( aMax, p.aFace );
140 bMax = std::max( bMax, p.bFace );
141 }
142
143 std::pair<FaceBitSet, FaceBitSet> res;
144 res.first.resize( aMax + 1 );
145 res.second.resize( bMax + 1 );
146 for ( const auto & p : pairs )
147 {
148 res.first.set( p.aFace );
149 res.second.set( p.bFace );
150 }
151 return res;
152}
153
154inline std::pair<int, int> sharedVertex( const VertId av[3], const VertId bv[3] )
155{

Callers 1

mainFunction · 0.85

Calls 4

findCollidingTrianglesFunction · 0.85
maxFunction · 0.85
resizeMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected