candlewick 0.1.0
A renderer
Loading...
Searching...
No Matches
MeshTransforms.h
Go to the documentation of this file.
1#pragma once
2
3#include "Utils.h"
4#include <Eigen/Geometry>
5#include <SDL3/SDL_stdinc.h>
6#include <span>
7
8namespace candlewick {
9
12void apply3DTransformInPlace(MeshData &meshData, const Eigen::Affine3f &tr);
13
16void triangleStripGenerateIndices(Uint32 vertexCount,
17 std::vector<Uint32> &indices);
18
24
25namespace detail {
27 std::pair<Uint32, Uint32>
28 mergeCalcIndexVertexCount(std::span<const MeshData> meshes);
29} // namespace detail
30
32MeshData mergeMeshes(std::span<const MeshData> meshes);
33
35MeshData mergeMeshes(std::vector<MeshData> &&meshes);
36
37} // namespace candlewick
A class to store type-erased vertex data and index data.
Definition MeshData.h:33
Definition errors.h:34
std::pair< Uint32, Uint32 > mergeCalcIndexVertexCount(std::span< const MeshData > meshes)
Number of vertices and indices in the merged mesh.
Definition Camera.h:8
void triangleStripGenerateIndices(Uint32 vertexCount, std::vector< Uint32 > &indices)
Generate indices for a triangle strip geometry, given the vertex count.
MeshData mergeMeshes(std::span< const MeshData > meshes)
Merge meshes down to a single mesh with consistent indexing.
void apply3DTransformInPlace(MeshData &meshData, const Eigen::Affine3f &tr)
Apply an Eigen::Affine3f 3D transform to a mesh in-place, transforming its vertices.
MeshData generateIndices(const MeshData &meshData)
Convert MeshData object to an indexed mesh.