Euphoria
compiledmesh.h
Go to the documentation of this file.
1#pragma once
2#include "eu/core/mesh.h"
4
5namespace eu::core
6{
7struct CompiledGeomVertexAttributes;
8struct Mesh;
9}
10
11namespace eu::render
12{
13struct Material;
14struct World;
15struct MeshInstance;
16struct CompiledGeom;
17
19{
20 std::shared_ptr<CompiledGeom> geom;
21 // std::size_t material;
22};
23
25{
26 std::string name;
28 std::vector<CompiledMeshGeom> geoms;
29};
30
32{
33 // todo(Gustav): change the single list to a hierachy?
34 std::vector<CompiledTransformedMesh> meshes;
35 // std::vector<Material> materials;
36};
37
39
40
41// ------------------------------------------------------------------------------------------------
42
43
45{
46 std::vector<std::shared_ptr<MeshInstance>> geoms;
47};
48
50{
52 std::vector<TransformedMeshInWorld> meshes;
53 // std::vector<Material> materials;
54
55 void add_to_world(CompiledMesh* m, World* world, std::shared_ptr<Material> mat);
56 void set_transform(const m4& trans);
57};
58
59}
#define DEBUG_LABEL_ARG_MANY
first debug label argument of many
constexpr m4 m4_identity
The identity matrix.
Definition mat4.h:177
Definition ui.h:4
CompiledMesh compile_mesh(DEBUG_LABEL_ARG_MANY const core::Mesh &mesh, const core::CompiledGeomVertexAttributes &geom_layout)
A (inclusive) range between two values.
Definition range.h:19
A list of CompiledVertexLayoutNoNameList (for geom)
4x4 matrix
Definition mat4.h:19
std::shared_ptr< CompiledGeom > geom
std::vector< CompiledTransformedMesh > meshes
std::vector< CompiledMeshGeom > geoms
CompiledMesh * compiled_mesh
void set_transform(const m4 &trans)
void add_to_world(CompiledMesh *m, World *world, std::shared_ptr< Material > mat)
std::vector< TransformedMeshInWorld > meshes
std::vector< std::shared_ptr< MeshInstance > > geoms
A list of objects to render.
Definition world.h:194