Blender
V3.3
source
blender
io
stl
importer
stl_import_binary_reader.hh
Go to the documentation of this file.
1
/* SPDX-License-Identifier: GPL-2.0-or-later */
2
7
#pragma once
8
9
#include <cstdio>
10
11
#include "
BKE_mesh.h
"
12
13
/* Binary STL spec.:
14
* UINT8[80] – Header - 80 bytes
15
* UINT32 – Number of triangles - 4 bytes
16
* For each triangle - 50 bytes:
17
* REAL32[3] – Normal vector - 12 bytes
18
* REAL32[3] – Vertex 1 - 12 bytes
19
* REAL32[3] – Vertex 2 - 12 bytes
20
* REAL32[3] – Vertex 3 - 12 bytes
21
* UINT16 – Attribute byte count - 2 bytes
22
*/
23
24
namespace
blender::io::stl
{
25
26
const
size_t
BINARY_HEADER_SIZE
= 80;
27
const
size_t
BINARY_STRIDE
= 12 * 4 + 2;
28
29
Mesh
*
read_stl_binary
(FILE *
file
,
Main
*bmain,
char
*mesh_name,
bool
use_custom_normals);
30
31
}
// namespace blender::io::stl
BKE_mesh.h
file
FILE * file
Definition:
deg_debug_stats_gnuplot.cc:29
blender::io::stl
Definition:
stl_import.cc:30
blender::io::stl::read_stl_binary
Mesh * read_stl_binary(FILE *file, Main *bmain, char *mesh_name, bool use_custom_normals)
Definition:
stl_import_binary_reader.cc:32
blender::io::stl::BINARY_STRIDE
const size_t BINARY_STRIDE
Definition:
stl_import_binary_reader.hh:27
blender::io::stl::BINARY_HEADER_SIZE
const size_t BINARY_HEADER_SIZE
Definition:
stl_import_binary_reader.hh:26
Main
Definition:
BKE_main.h:121
Mesh
Definition:
DNA_mesh_types.h:151
Generated on Sat Jul 27 2024 14:57:55 for Blender by
doxygen
1.9.1