Files
test2/source/blender/io/stl/intern
Jesse Yurkovich 4987ef010c Cleanup: STL: Address the ODR violation and tidy up processing
Remove the one-definition-rule violation due to two `Triangle` types
being used inside the same `blender::io::stl` namespace. Make a small
set of non-functional changes in the surrounding code along the way to
use `const` in more places.

STL had 4(!!) triangle types:
- A `class Triangle` : Used for import, contains indices
- A `struct Triangle` : Used for export, contains verts/normals, the ODR
  violation
- A `struct ExportBinaryTriangle` : Used for export but is really the
  same as the above type
- A `struct STLBinaryTriangle` : Used for import but was a duplicate
  of the above type

Now STL has just 2. The `class Triangle` containing indices during
import and a `struct PackedTriangle` containing the verts/normals for
everything else. The duplicated `BINARY_HEADER_SIZE` constant is now
common as well.

Performance remains the same for both import/export and ascii/binary.

Pull Request: https://projects.blender.org/blender/blender/pulls/121179
2024-04-28 03:06:39 +02:00
..