OCCT-Light 0.1
C ABI and C++ veneer for multi-language CAD workflows
Loading...
Searching...
No Matches
occtl_io_vrml.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
28#ifndef OCCTL_IO_VRML_H
29#define OCCTL_IO_VRML_H
30
31#include <stddef.h>
32#include <stdint.h>
33
34#include "occtl_core.h"
35#include "occtl_topo.h"
36
37#ifdef __cplusplus
38extern "C"
39{
40#endif
41
52
57{
60 OCCTL_IO_VRML_WRITER_VERSION_RESERVED_FUTURE = 0x7fffffff
62
73
74#define OCCTL_IO_VRML_READ_OPTIONS_VERSION_1 1u
75#define OCCTL_IO_VRML_WRITE_OPTIONS_VERSION_1 1u
76
91
92#define OCCTL_IO_VRML_READ_OPTIONS_INIT \
93 {OCCTL_IO_VRML_READ_OPTIONS_VERSION_1, \
94 NULL, \
95 1.0, \
96 OCCTL_IO_VRML_COORDINATE_SYSTEM_Z_UP, \
97 OCCTL_IO_VRML_COORDINATE_SYSTEM_Y_UP, \
98 1}
99
110
111#define OCCTL_IO_VRML_WRITE_OPTIONS_INIT \
112 {OCCTL_IO_VRML_WRITE_OPTIONS_VERSION_1, \
113 NULL, \
114 OCCTL_IO_VRML_WRITER_VERSION_2, \
115 OCCTL_IO_VRML_REPRESENTATION_WIREFRAME}
116
129
142
165OCCTL_API occtl_status_t OCCTL_CALL occtl_io_vrml_read(const char* path,
166 occtl_graph_t** out_graph,
167 occtl_node_id_t* out_root,
168 const occtl_io_vrml_read_options_t* options);
169
189OCCTL_API occtl_status_t OCCTL_CALL
191 occtl_node_id_t root,
192 const char* path,
193 const occtl_io_vrml_write_options_t* options);
194
221OCCTL_API occtl_status_t OCCTL_CALL
222 occtl_io_vrml_read_memory(const uint8_t* data,
223 size_t size,
224 occtl_graph_t** out_graph,
225 occtl_node_id_t* out_root,
226 const occtl_io_vrml_read_options_t* options);
227
255OCCTL_API occtl_status_t OCCTL_CALL
257 occtl_node_id_t root,
258 const occtl_io_vrml_write_options_t* options,
259 uint8_t* out_data,
260 size_t capacity,
261 size_t* out_size);
262
263#ifdef __cplusplus
264} /* extern "C" */
265#endif
266
267#endif /* OCCTL_IO_VRML_H */
OCCT-Light: core public API.
#define OCCTL_API
Definition occtl_core.h:111
enum occtl_status occtl_status_t
occtl_status_t occtl_io_vrml_write_memory(const occtl_graph_t *graph, occtl_node_id_t root, const occtl_io_vrml_write_options_t *options, uint8_t *out_data, size_t capacity, size_t *out_size)
occtl_io_vrml_writer_version
Definition occtl_io_vrml.h:57
@ OCCTL_IO_VRML_WRITER_VERSION_1
Definition occtl_io_vrml.h:58
@ OCCTL_IO_VRML_WRITER_VERSION_2
Definition occtl_io_vrml.h:59
occtl_io_vrml_representation
Definition occtl_io_vrml.h:67
@ OCCTL_IO_VRML_REPRESENTATION_SHADED
Definition occtl_io_vrml.h:68
@ OCCTL_IO_VRML_REPRESENTATION_WIREFRAME
Definition occtl_io_vrml.h:69
@ OCCTL_IO_VRML_REPRESENTATION_BOTH
Definition occtl_io_vrml.h:70
void occtl_io_vrml_read_options_init(occtl_io_vrml_read_options_t *options)
occtl_status_t occtl_io_vrml_read_memory(const uint8_t *data, size_t size, occtl_graph_t **out_graph, occtl_node_id_t *out_root, const occtl_io_vrml_read_options_t *options)
occtl_status_t occtl_io_vrml_read(const char *path, occtl_graph_t **out_graph, occtl_node_id_t *out_root, const occtl_io_vrml_read_options_t *options)
void occtl_io_vrml_write_options_init(occtl_io_vrml_write_options_t *options)
enum occtl_io_vrml_writer_version occtl_io_vrml_writer_version_t
enum occtl_io_vrml_representation occtl_io_vrml_representation_t
struct occtl_io_vrml_write_options occtl_io_vrml_write_options_t
enum occtl_io_vrml_coordinate_system occtl_io_vrml_coordinate_system_t
struct occtl_io_vrml_read_options occtl_io_vrml_read_options_t
occtl_status_t occtl_io_vrml_write(const occtl_graph_t *graph, occtl_node_id_t root, const char *path, const occtl_io_vrml_write_options_t *options)
occtl_io_vrml_coordinate_system
Definition occtl_io_vrml.h:46
@ OCCTL_IO_VRML_COORDINATE_SYSTEM_Z_UP
Definition occtl_io_vrml.h:48
@ OCCTL_IO_VRML_COORDINATE_SYSTEM_GLTF
Definition occtl_io_vrml.h:49
@ OCCTL_IO_VRML_COORDINATE_SYSTEM_Y_UP
Definition occtl_io_vrml.h:47
OCCT-Light: topology module public API.
struct occtl_graph occtl_graph_t
Definition occtl_topo_types.h:152
Definition occtl_io_vrml.h:81
occtl_io_vrml_coordinate_system_t system_coordinate_system
Definition occtl_io_vrml.h:86
occtl_io_vrml_coordinate_system_t file_coordinate_system
Definition occtl_io_vrml.h:88
uint32_t struct_version
Definition occtl_io_vrml.h:82
const void * p_next
Definition occtl_io_vrml.h:83
double file_length_unit_m
Definition occtl_io_vrml.h:84
int32_t fill_incomplete
Definition occtl_io_vrml.h:89
Definition occtl_io_vrml.h:104
occtl_io_vrml_representation_t representation
Definition occtl_io_vrml.h:108
occtl_io_vrml_writer_version_t writer_version
Definition occtl_io_vrml.h:107
uint32_t struct_version
Definition occtl_io_vrml.h:105
const void * p_next
Definition occtl_io_vrml.h:106
Definition occtl_topo_types.h:50