| 5 | #include <iostream> |
| 6 | |
| 7 | int main() |
| 8 | { |
| 9 | // load points |
| 10 | auto loadRes = MR::PointsLoad::fromAnySupportedFormat( "Points.ply" ); |
| 11 | if ( !loadRes.has_value() ) |
| 12 | { |
| 13 | std::cerr << loadRes.error() << "\n"; |
| 14 | return 1; // error while loading file |
| 15 | } |
| 16 | auto triangulationRes = MR::triangulatePointCloud( *loadRes ); |
| 17 | assert( triangulationRes ); // can be nullopt only if canceled by progress callback |
| 18 | |
| 19 | auto saveRes = MR::MeshSave::toAnySupportedFormat( *triangulationRes, "Mesh.ctm" ); |
| 20 | if ( !saveRes.has_value() ) |
| 21 | { |
| 22 | std::cerr << saveRes.error() << "\n"; |
| 23 | return 1; // error while saving file |
| 24 | } |
| 25 | return 0; |
| 26 | } |
nothing calls this directly
no test coverage detected