Blender
V4.3
source
blender
io
stl
intern
stl_data.hh
Go to the documentation of this file.
1
/* SPDX-FileCopyrightText: 2024 Blender Authors
2
*
3
* SPDX-License-Identifier: GPL-2.0-or-later */
4
5
#pragma once
6
7
#include "
BLI_math_vector_types.hh
"
8
9
#include <cstdint>
10
11
namespace
blender::io::stl
{
12
13
#pragma pack(push, 1)
14
struct
PackedTriangle
{
15
float3
normal
;
16
float3
vertices[3];
17
uint16_t
attribute_byte_count
;
18
};
19
#pragma pack(pop)
20
21
inline
constexpr
size_t
BINARY_HEADER_SIZE
= 80;
22
inline
constexpr
size_t
BINARY_STRIDE
=
sizeof
(
PackedTriangle
);
23
24
static_assert
(
sizeof
(
PackedTriangle
) == 12 + (12 * 3) + 2,
25
"PackedTriangle expected size mismatch"
);
26
27
}
// namespace blender::io::stl
BLI_math_vector_types.hh
blender::io::stl
Definition
stl_export.cc:38
blender::io::stl::BINARY_STRIDE
constexpr size_t BINARY_STRIDE
Definition
stl_data.hh:22
blender::io::stl::BINARY_HEADER_SIZE
constexpr size_t BINARY_HEADER_SIZE
Definition
stl_data.hh:21
uint16_t
unsigned short uint16_t
Definition
stdint.h:79
blender::VecBase< float, 3 >
blender::io::stl::PackedTriangle
Definition
stl_data.hh:14
blender::io::stl::PackedTriangle::attribute_byte_count
uint16_t attribute_byte_count
Definition
stl_data.hh:17
blender::io::stl::PackedTriangle::normal
float3 normal
Definition
stl_data.hh:15
Generated on Thu Feb 6 2025 07:36:39 for Blender by
doxygen
1.11.0