v0.1.0
Fast, portable C library for geometry input/output
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Modules
stl_infos.h
Go to the documentation of this file.
1 /****************************************************************************
2 ** gmio
3 ** Copyright Fougue (24 Jun. 2016)
4 ** contact@fougue.pro
5 **
6 ** This software is a reusable library whose purpose is to provide complete
7 ** I/O support for various CAD file formats (eg. STL)
8 **
9 ** This software is governed by the CeCILL-B license under French law and
10 ** abiding by the rules of distribution of free software. You can use,
11 ** modify and/ or redistribute the software under the terms of the CeCILL-B
12 ** license as circulated by CEA, CNRS and INRIA at the following URL
13 ** "http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html".
14 ****************************************************************************/
15 
23 #ifndef GMIO_STL_INFOS_H
24 #define GMIO_STL_INFOS_H
25 
26 #include "stl_global.h"
27 
28 #include "../gmio_core/internal/helper_stream.h"
29 
30 #include <stddef.h>
31 
32 #include "stl_format.h"
33 #include "stlb_header.h"
34 
37 {
40 
42  uint32_t facet_count;
43 
48 
55 
62 
65 };
66 
69 {
72 
75 
78 
81 
85 
88 
91 };
92 
95 {
98 
102 
108 };
109 
111 
127  struct gmio_stl_infos* infos,
128  struct gmio_stream* stream,
129  unsigned flags,
130  const struct gmio_stl_infos_get_options* options);
131 
145  struct gmio_stream* stream,
146  struct gmio_memblock* stream_memblock);
147 
149 
150 #endif /* GMIO_STL_INFOS_H */
151 
uint32_t facet_count
Count of facets(triangles)
Definition: stl_infos.h:42
-> gmio_stl_infos::format
Definition: stl_infos.h:87
char * stla_solidname
STL ascii only: name of the solid.
Definition: stl_infos.h:54
#define GMIO_API
Expands either to GMIO_DECL_EXPORT or GMIO_DECL_IMPORT when respectively compiling/using the DLL...
Definition: global.h:76
Detection of STL format from input stream.
struct gmio_stlb_header stlb_header
STL binary only: header(80-bytes) of STL data.
Definition: stl_infos.h:64
size_t stla_solidname_maxlen
STL ascii only: maximum length(capacity) of stla_solidname.
Definition: stl_infos.h:61
Options of function gmio_stl_infos_get()
Definition: stl_infos.h:94
-> gmio_stl_infos::stla_solidname or gmio_stl_infos::stlb_header
Definition: stl_infos.h:83
-> gmio_stl_infos::stla_solidname
Definition: stl_infos.h:77
80-byte data at the beginning of any STL binary file
Definition: stlb_header.h:30
-> gmio_stl_infos::facet_count
Definition: stl_infos.h:71
Declaration of gmio_stlb_header.
All infos.
Definition: stl_infos.h:90
gmio_stl_format
This enums defines the various STL formats.
Definition: stl_format.h:34
gmio_streamsize_t gmio_stla_infos_get_streamsize(struct gmio_stream *stream, struct gmio_memblock *stream_memblock)
Returns the size(in bytes) of the next STL ascii solid in stream.
-> gmio_stl_infos::size
Definition: stl_infos.h:74
int gmio_stl_infos_get(struct gmio_stl_infos *infos, struct gmio_stream *stream, unsigned flags, const struct gmio_stl_infos_get_options *options)
Finds informations about STL contents.
#define GMIO_C_LINKAGE_BEGIN
Expands to extern "C" { when building with a C++ compiler.
Definition: global.h:181
-> gmio_stl_infos::stlb_header
Definition: stl_infos.h:80
Global declarations for the STL module.
Informations retrieved by gmio_stl_infos_get()
Definition: stl_infos.h:36
enum gmio_stl_format format_hint
Assume STL input format, if GMIO_STL_FORMAT_UNKNOWN then it is automatically guessed.
Definition: stl_infos.h:101
#define GMIO_C_LINKAGE_END
Expands to } when building with a C++ compiler.
Definition: global.h:183
enum gmio_stl_format format
STL format of the input stream.
Definition: stl_infos.h:39
int64_or_long gmio_streamsize_t
Type able to represent the size(in bytes) of a stream.
Definition: stream.h:44
struct gmio_memblock stream_memblock
See gmio_stl_read_options::stream_memblock.
Definition: stl_infos.h:97
gmio_stl_info_flag
Flags(OR-combinations) for each STL info.
Definition: stl_infos.h:68
Stream that can get input from an arbitrary data source or can write output to an arbitrary data sink...
Definition: stream.h:65
gmio_streamsize_t size_limit
Restrict gmio_stl_infos_get() to not read further this limit(in bytes)
Definition: stl_infos.h:107
Basic memory block.
Definition: memblock.h:45
gmio_streamsize_t size
Size of the STL data in bytes.
Definition: stl_infos.h:47
Fougue © 2016