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

Function main

examples/cpp-examples/SignedDistance.dox.cpp:6–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4#include <iostream>
5
6int main()
7{
8 auto mesh1Res = MR::MeshLoad::fromAnySupportedFormat( "mesh1.ctm" );
9 if ( !mesh1Res.has_value() )
10 {
11 std::cerr << mesh1Res.error();
12 return 1;
13 }
14 auto mesh2Res = MR::MeshLoad::fromAnySupportedFormat( "mesh2.ctm" );
15 if ( !mesh2Res.has_value() )
16 {
17 std::cerr << mesh2Res.error();
18 return 1;
19 }
20
21 auto dist = MR::findSignedDistance( *mesh1Res, *mesh2Res );
22 std::cout << "Signed distance between meshes is " << dist.signedDist << "\n";
23 return 0;
24}

Callers

nothing calls this directly

Calls 3

errorMethod · 0.80
fromAnySupportedFormatFunction · 0.50
findSignedDistanceFunction · 0.50

Tested by

no test coverage detected