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

Function EMSCRIPTEN_BINDINGS

source/MRWasmModule/MRWasmOneMeshContours.cpp:14–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12using namespace MR;
13
14EMSCRIPTEN_BINDINGS( meshlib_one_mesh_contours )
15{
16 // Opaque carrier: std::vector<OneMeshContour>; produced here, consumed by cutMesh.
17 emscripten::class_<OneMeshContours>( "OneMeshContours" );
18
19 emscripten::function( "getOneMeshIntersectionContours", +[]( const Mesh& meshA, const Mesh& meshB,
20 const ContinuousContours& contours, bool getMeshAIntersections, const CoordinateConverters& converters )
21 {
22 OneMeshContours outA, outB;
23 getOneMeshIntersectionContours( meshA, meshB, contours,
24 getMeshAIntersections ? &outA : nullptr,
25 getMeshAIntersections ? nullptr : &outB, converters );
26 return getMeshAIntersections ? std::move( outA ) : std::move( outB );
27 } );
28}

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected