Skip to content

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() const;
    geometry::SimplicialComplex simplicial_surface(IndexT dim) const;

  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