OCCT-Light 0.1
C ABI and C++ veneer for multi-language CAD workflows
Loading...
Searching...
No Matches
occtl_io_gltf.h
Go to the documentation of this file.
1// Copyright (c) 2026 Capgemini Engineering Research and Development.
2//
3// This file is part of OCCT-Light software library.
4//
5// This library is free software; you can redistribute it and/or modify it under
6// the terms of the GNU Affero General Public License version 3 as published
7// by the Free Software Foundation, with an option to use any later version.
8// Consult the file LICENSE_AGPL_30.txt included in OCCT-Light distribution
9// for complete text of the license and disclaimer of any warranty.
10//
11// Alternatively, this file may be used under the terms of a commercial
12// license or contractual agreement.
13//
14// SPDX-License-Identifier: AGPL-3.0-or-later
15
32#ifndef OCCTL_IO_GLTF_H
33#define OCCTL_IO_GLTF_H
34
35#include <stddef.h>
36#include <stdint.h>
37
38#include "occtl_core.h"
39#include "occtl_topo.h"
40
41#ifdef __cplusplus
42extern "C"
43{
44#endif
45
56
57#define OCCTL_IO_GLTF_READ_OPTIONS_VERSION_1 1u
58#define OCCTL_IO_GLTF_WRITE_OPTIONS_VERSION_1 1u
59
76
77#define OCCTL_IO_GLTF_READ_OPTIONS_INIT \
78 {OCCTL_IO_GLTF_READ_OPTIONS_VERSION_1, NULL, 0, 1, 1, 1, 0, 1, 1, -1}
79
94
95#define OCCTL_IO_GLTF_WRITE_OPTIONS_INIT \
96 {OCCTL_IO_GLTF_WRITE_OPTIONS_VERSION_1, NULL, OCCTL_IO_GLTF_TRANSFORM_COMPACT, 0, 1, 0, 0, 0}
97
110
123
145OCCTL_API occtl_status_t OCCTL_CALL occtl_io_gltf_read(const char* path,
146 occtl_graph_t** out_graph,
147 occtl_node_id_t* out_root,
148 const occtl_io_gltf_read_options_t* options);
149
174OCCTL_API occtl_status_t OCCTL_CALL
176 occtl_node_id_t root,
177 const char* path,
178 const occtl_io_gltf_write_options_t* options);
179
180#ifdef __cplusplus
181} /* extern "C" */
182#endif
183
184#endif /* OCCTL_IO_GLTF_H */
OCCT-Light: core public API.
#define OCCTL_API
Definition occtl_core.h:111
enum occtl_status occtl_status_t
void occtl_io_gltf_read_options_init(occtl_io_gltf_read_options_t *options)
struct occtl_io_gltf_read_options occtl_io_gltf_read_options_t
occtl_io_gltf_transform_format
Definition occtl_io_gltf.h:50
@ 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
struct occtl_io_gltf_write_options occtl_io_gltf_write_options_t
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)
void occtl_io_gltf_write_options_init(occtl_io_gltf_write_options_t *options)
OCCT-Light: topology module public API.
struct occtl_graph occtl_graph_t
Definition occtl_topo_types.h:152
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
uint32_t struct_version
Definition occtl_io_gltf.h:65
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
const void * p_next
Definition occtl_io_gltf.h:66
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
uint32_t struct_version
Definition occtl_io_gltf.h:85
occtl_io_gltf_transform_format_t transform_format
Definition occtl_io_gltf.h:87
const void * p_next
Definition occtl_io_gltf.h:86
int32_t embed_textures_in_glb
Definition occtl_io_gltf.h:89
int32_t parallel
Definition occtl_io_gltf.h:92
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