OCCT-Light 0.1
C ABI and C++ veneer for multi-language CAD workflows
Loading...
Searching...
No Matches
io_gltf.hpp File Reference

C++ veneer for glTF / GLB I/O. More...

#include <occtl/occtl_io_gltf.h>
#include <occtl-hpp/core.hpp>
#include <occtl-hpp/topo.hpp>
#include <string>
#include <utility>
#include <vector>
Include dependency graph for io_gltf.hpp:

Go to the source code of this file.

Classes

struct  occtl::io_gltf::ReadOptions
 Options for read. PascalCase mirror of occtl_io_gltf_read_options_t. More...
 
struct  occtl::io_gltf::WriteOptions
 Options for write. PascalCase mirror of occtl_io_gltf_write_options_t. More...
 

Enumerations

enum class  occtl::io_gltf::TransformFormat { Compact = OCCTL_IO_GLTF_TRANSFORM_COMPACT , Mat4 = OCCTL_IO_GLTF_TRANSFORM_MAT4 , Trs = OCCTL_IO_GLTF_TRANSFORM_TRS }
 Transform encoding used when writing glTF node transforms.
 

Functions

std::pair< Graph, NodeIdocctl::io_gltf::read (const std::string &thePath, const ReadOptions &theOptions=ReadOptions{})
 Reads a glTF or GLB file into a fresh graph and returns (graph, root).
 
void occtl::io_gltf::write (const Graph &theGraph, const NodeId theRoot, const std::string &thePath, const WriteOptions &theOptions=WriteOptions{})
 Writes the topology rooted at theRoot to a glTF or GLB file.
 

Detailed Description

C++ veneer for glTF / GLB I/O.

Function Documentation

◆ read()

std::pair< Graph, NodeId > occtl::io_gltf::read ( const std::string &  thePath,
const ReadOptions theOptions = ReadOptions{} 
)
inline

Reads a glTF or GLB file into a fresh graph and returns (graph, root).

Exceptions
Erroron failure.

◆ write()

void occtl::io_gltf::write ( const Graph theGraph,
const NodeId  theRoot,
const std::string &  thePath,
const WriteOptions theOptions = WriteOptions{} 
)
inline

Writes the topology rooted at theRoot to a glTF or GLB file.

Exceptions
Erroron failure.