Skip to content

Class uipc::core::SceneIO

ClassList > uipc > core > SceneIO

Public Functions

Type Name
SceneIO (Scene & scene)
void commit (const SceneSnapshot & reference, std::string_view filename)
Commit the scene's update to a file.
Json commit_to_json (const SceneSnapshot & reference) const
Commit the scene's update to a json object.
void save (std::string_view filename) const
Save the scene to a file.
geometry::SimplicialComplex simplicial_surface (IndexT dim=-1) const
Get the surface of the scene in the form of a simplicial complex allow to specify the dimension of the surface.
Json to_json () const
Convert the scene to a json object.
void update (std::string_view filename)
Update the scene from a SnapshotCommit file.
void update_from_json (const Json & json)
Update the scene from a scene commit json object.
void write_surface (std::string_view filename)
Write the surface of the scene to a file. Supported formats:

Public Static Functions

Type Name
Scene from_json (const Json & json)
Convert a json object to a scene.
Scene load (std::string_view filename)
Load a scene from a file.
void save (const Scene & scene, std::string_view filename)
Save the scene to a file.

Public Functions Documentation

function SceneIO

uipc::core::SceneIO::SceneIO (
    Scene & scene
) 

function commit

Commit the scene's update to a file.

void uipc::core::SceneIO::commit (
    const SceneSnapshot & reference,
    std::string_view filename
) 

Supported formats: * .json * .bson

Parameters:

  • reference
  • filename

function commit_to_json

Commit the scene's update to a json object.

Json uipc::core::SceneIO::commit_to_json (
    const SceneSnapshot & reference
) const

Supported formats: * .json * .bson

Parameters:

  • reference
  • filename

function save [1/2]

Save the scene to a file.

void uipc::core::SceneIO::save (
    std::string_view filename
) const

Supported formats: * .json * .bson

Parameters:

  • filename

function simplicial_surface

Get the surface of the scene in the form of a simplicial complex allow to specify the dimension of the surface.

geometry::SimplicialComplex uipc::core::SceneIO::simplicial_surface (
    IndexT dim=-1
) const
  • 0: point cloud
  • 1: line mesh
  • 2: triangle mesh
  • -1: all dimensions

Parameters:

  • dim

Returns:


function to_json

Convert the scene to a json object.

Json uipc::core::SceneIO::to_json () const

Returns:


function update

Update the scene from a SnapshotCommit file.

void uipc::core::SceneIO::update (
    std::string_view filename
) 

Supported formats: * - .json * .bson

Parameters:

  • filename

function update_from_json

Update the scene from a scene commit json object.

void uipc::core::SceneIO::update_from_json (
    const Json & json
) 

Supported formats: * - .json * .bson

Parameters:

  • filename

function write_surface

Write the surface of the scene to a file. Supported formats:

void uipc::core::SceneIO::write_surface (
    std::string_view filename
) 
  • .obj

Public Static Functions Documentation

function from_json

Convert a json object to a scene.

static Scene uipc::core::SceneIO::from_json (
    const Json & json
) 

Parameters:

  • json

Returns:


function load

Load a scene from a file.

static Scene uipc::core::SceneIO::load (
    std::string_view filename
) 

Supported formats: * .json * .bson

Parameters:

  • filename

Returns:


function save [2/2]

Save the scene to a file.

static void uipc::core::SceneIO::save (
    const Scene & scene,
    std::string_view filename
) 

Supported formats: * .json * .bson

Parameters:

  • scene
  • filename


The documentation for this class was generated from the following file include/uipc/io/scene_io.h