File scene_io.h
File List > include > uipc > io > scene_io.h
Go to the documentation of this file
#pragma once
#include <uipc/core/scene.h>
#include <uipc/common/exception.h>
#include <uipc/geometry/simplicial_complex.h>
namespace uipc::core
{
class UIPC_IO_API SceneIO
{
public:
SceneIO(Scene& scene);
void write_surface(std::string_view filename);
geometry::SimplicialComplex simplicial_surface(IndexT dim = -1) const;
static Scene load(std::string_view filename);
static void save(const Scene& scene, std::string_view filename);
void save(std::string_view filename) const;
void commit(const SceneSnapshot& reference, std::string_view filename);
void update(std::string_view filename);
Json to_json() const;
static Scene from_json(const Json& json);
Json commit_to_json(const SceneSnapshot& reference) const;
void update_from_json(const Json& json);
private:
Scene& m_scene;
void write_surface_obj(std::string_view filename);
};
class UIPC_IO_API SceneIOError : public Exception
{
public:
using Exception::Exception;
};
} // namespace uipc::core