67 std::ostream::pos_type numTrisPos_ = 0;
68 std::uint32_t headNumTris_ = 0;
69 std::uint32_t savedNumTris_ = 0;
#define MRMESH_API
Definition MRMeshFwd.h:80
~BinaryStlSaver()
calls updateHeadCounter();
bool writeTri(const Triangle3f &tri)
writes one more triangle in the stream
BinaryStlSaver(std::ostream &out, const SaveSettings &settings={}, std::uint32_t expectedNumTris=0)
writes STL header in the stream
tl::expected< T, E > Expected
Definition MRExpected.h:31
Triangle3< float > Triangle3f
Definition MRMeshFwd.h:468
Expected< void > toAsciiStl(const Mesh &mesh, const std::filesystem::path &file, const SaveSettings &settings={})
Expected< void > toPly(const Mesh &mesh, const std::filesystem::path &file, const SaveSettings &settings={})
saves in .ply file
Expected< void > toObj(const Mesh &mesh, const std::filesystem::path &file, const SaveSettings &settings, int firstVertId)
Expected< void > toBinaryStl(const Mesh &mesh, const std::filesystem::path &file, const SaveSettings &settings={})
Expected< void > toAnySupportedFormat(const Mesh &mesh, const std::filesystem::path &file, const SaveSettings &settings={})
detects the format from file extension and save mesh to it
Expected< void > to3mf(const Mesh &mesh, const std::filesystem::path &file, const SaveSettings &settings={})
saves in .3mf file
Expected< void > toOff(const Mesh &mesh, const std::filesystem::path &file, const SaveSettings &settings={})
saves in .off file
Expected< void > toMrmesh(const Mesh &mesh, const std::filesystem::path &file, const SaveSettings &settings={})
Expected< void > toModel3mf(const Mesh &mesh, const std::filesystem::path &file, const SaveSettings &settings={})
saves in 3mf .model file
only for bindings generation
Definition MRCameraOrientationPlugin.h:8
determines how to save points/lines/mesh
Definition MRSaveSettings.h:20