21#ifndef OCCTL_HPP_IO_GLTF_HPP
22#define OCCTL_HPP_IO_GLTF_HPP
33namespace occtl::io_gltf
47 bool load_all_scenes =
false;
48 bool skip_empty_nodes =
true;
49 bool use_mesh_name_as_fallback =
true;
50 bool apply_scale =
true;
51 bool parallel =
false;
52 bool single_precision =
true;
53 bool fill_incomplete =
true;
54 int memory_limit_mib = -1;
75 bool force_uv_export =
false;
76 bool embed_textures_in_glb =
true;
77 bool merge_faces =
false;
78 bool split_indices_16 =
false;
94inline std::pair<Graph, NodeId> read(
const std::string& thePath,
99 const ::occtl_io_gltf_read_options_t aOpts = theOptions.to_c();
101 return {Graph(aRaw), NodeId(aRoot)};
106inline void write(
const Graph& theGraph,
108 const std::string& thePath,
111 const ::occtl_io_gltf_write_options_t aOpts = theOptions.to_c();
RAII handle for a topology graph. Mirrors occtl_graph_t.
Definition topo.hpp:1444
::occtl_graph_t * get() const noexcept
Borrows-it pointer to the underlying C handle, for direct ABI calls.
Definition topo.hpp:1494
Session-local identity of a graph node. Mirrors occtl_node_id_t.
Definition topo.hpp:52
::occtl_node_id_t get() const noexcept
Borrows-it view of the underlying C value type, for direct ABI calls.
Definition topo.hpp:64
C++ veneer for the core module.
void check(const ::occtl_status_t theStatus)
Throw on non-OK; otherwise a no-op.
Definition core.hpp:85
TransformFormat
Transform encoding used when writing glTF node transforms.
Definition io_gltf.hpp:38
OCCT-Light: glTF 2.0 / GLB file I/O.
@ OCCTL_IO_GLTF_TRANSFORM_TRS
Definition occtl_io_gltf.h:53
@ OCCTL_IO_GLTF_TRANSFORM_COMPACT
Definition occtl_io_gltf.h:51
@ OCCTL_IO_GLTF_TRANSFORM_MAT4
Definition occtl_io_gltf.h:52
occtl_status_t occtl_io_gltf_write(const occtl_graph_t *graph, occtl_node_id_t root, const char *path, const occtl_io_gltf_write_options_t *options)
enum occtl_io_gltf_transform_format occtl_io_gltf_transform_format_t
occtl_status_t occtl_io_gltf_read(const char *path, occtl_graph_t **out_graph, occtl_node_id_t *out_root, const occtl_io_gltf_read_options_t *options)
struct occtl_graph occtl_graph_t
Definition occtl_topo_types.h:152
Options for read. PascalCase mirror of occtl_io_gltf_read_options_t.
Definition io_gltf.hpp:46
Options for write. PascalCase mirror of occtl_io_gltf_write_options_t.
Definition io_gltf.hpp:73
Definition occtl_io_gltf.h:64
int32_t single_precision
Definition occtl_io_gltf.h:72
int32_t fill_incomplete
Definition occtl_io_gltf.h:73
int32_t memory_limit_mib
Definition occtl_io_gltf.h:74
int32_t load_all_scenes
Definition occtl_io_gltf.h:67
int32_t apply_scale
Definition occtl_io_gltf.h:70
int32_t parallel
Definition occtl_io_gltf.h:71
int32_t use_mesh_name_as_fallback
Definition occtl_io_gltf.h:69
int32_t skip_empty_nodes
Definition occtl_io_gltf.h:68
Definition occtl_io_gltf.h:84
int32_t force_uv_export
Definition occtl_io_gltf.h:88
occtl_io_gltf_transform_format_t transform_format
Definition occtl_io_gltf.h:87
int32_t embed_textures_in_glb
Definition occtl_io_gltf.h:89
int32_t split_indices_16
Definition occtl_io_gltf.h:91
int32_t merge_faces
Definition occtl_io_gltf.h:90
Definition occtl_topo_types.h:50
C++ veneer for the topo module.