v0.4.1
Fast, portable C library for geometry input/output
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Modules
stl_io_options.h
Go to the documentation of this file.
1 /****************************************************************************
2 ** Copyright (c) 2017, Fougue Ltd. <http://www.fougue.pro>
3 ** All rights reserved.
4 **
5 ** Redistribution and use in source and binary forms, with or without
6 ** modification, are permitted provided that the following conditions
7 ** are met:
8 **
9 ** 1. Redistributions of source code must retain the above copyright
10 ** notice, this list of conditions and the following disclaimer.
11 **
12 ** 2. Redistributions in binary form must reproduce the above
13 ** copyright notice, this list of conditions and the following
14 ** disclaimer in the documentation and/or other materials provided
15 ** with the distribution.
16 **
17 ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18 ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19 ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20 ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21 ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22 ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 ****************************************************************************/
29 
37 #pragma once
38 
39 #include "stl_global.h"
40 #include "stlb_header.h"
41 #include "../gmio_core/endian.h"
42 #include "../gmio_core/stream.h"
43 #include "../gmio_core/task_iface.h"
44 #include "../gmio_core/text_format.h"
45 
53 {
62 
65 
78  struct gmio_stream* stream,
80 
93 };
94 
102 {
105 
108 
111 
122 
131  const char* stla_solid_name;
132 
141 
149 
160 };
161 
Options of function gmio_stl_read()
Definition: stl_io_options.h:52
enum gmio_float_text_format stla_float32_format
The format used when writting float values as strings.
Definition: stl_io_options.h:140
bool stl_write_triangles_only
Flag allowing to skip writting of any header/footer data, but just triangles.
Definition: stl_io_options.h:121
struct gmio_task_iface task_iface
See gmio_stl_read_options::task_iface.
Definition: stl_io_options.h:107
struct gmio_stlb_header stlb_header
Header data(80-bytes)
Definition: stl_io_options.h:159
bool stla_dont_check_lc_numeric
See gmio_stl_read_options::stla_dont_check_lc_numeric.
Definition: stl_io_options.h:110
bool stla_dont_check_lc_numeric
Flag allowing to disable checking of the current locale's numeric formatting category.
Definition: stl_io_options.h:92
struct gmio_memblock stream_memblock
Used by the stream to bufferize I/O operations.
Definition: stl_io_options.h:61
80-byte data at the beginning of any STL binary file
Definition: stlb_header.h:43
Declaration of gmio_stlb_header.
struct gmio_task_iface task_iface
Optional interface by which the I/O operation can be controlled.
Definition: stl_io_options.h:64
const char * stla_solid_name
Name of the solid to appear in solid [name] facet normal ...
Definition: stl_io_options.h:131
Global declarations for the STL module.
Options of function gmio_stl_write()
Definition: stl_io_options.h:101
int64_or_long gmio_streamsize_t
Type able to represent the size(in bytes) of a stream.
Definition: stream.h:57
struct gmio_memblock stream_memblock
See gmio_stl_read_options::stream_memblock.
Definition: stl_io_options.h:104
gmio_float_text_format
Various formats to textually represent a float(single/double precision)
Definition: text_format.h:40
uint8_t stla_float32_prec
The maximum number of significant digits when writting float values.
Definition: stl_io_options.h:148
Stream that can get input from an arbitrary data source or can write output to an arbitrary data sink...
Definition: stream.h:78
gmio_streamsize_t(* func_stla_get_streamsize)(struct gmio_stream *stream, struct gmio_memblock *stream_memblock)
Optional pointer to a function that returns the size(in bytes) of the STL ascii data to read...
Definition: stl_io_options.h:77
Basic memory block.
Definition: memblock.h:57
Defines an interface through which a task can be controlled.
Definition: task_iface.h:42
Fougue © 2017