Euphoria
actor.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <memory>
4 
5 #include "base/mat4.h"
6 #include "base/vec3.h"
7 #include "base/quat.h"
8 #include "base/rgb.h"
9 
10 #include "render/instance.h"
11 #include "render/compiledmesh.h"
12 
13 namespace eu::render
14 {
16  {
17  std::vector<CompiledMeshMaterial> materials;
18  };
19 
20  struct Actor : public Instance
21  {
22  std::shared_ptr<CompiledMesh> mesh;
23  std::shared_ptr<MaterialOverride> overriden_materials;
24 
25  Actor(const std::shared_ptr<CompiledMesh>& mesh);
26 
27  [[nodiscard]] std::shared_ptr<MaterialOverride>
28  create_override() const;
29 
30  void
31  render
32  (
33  const mat4f& projection_matrix,
34  const mat4f& view_matrix,
35  const vec3f& camera,
36  const Light& light
37  ) override;
38  };
39 
40 }
41 
Definition: mat4.h:14
Actor(const std::shared_ptr< CompiledMesh > &mesh)
Definition: actor.cc:7
void render(const mat4f &projection_matrix, const mat4f &view_matrix, const vec3f &camera, const Light &light) override
Definition: actor.cc:30
std::shared_ptr< MaterialOverride > overriden_materials
Definition: actor.h:23
std::shared_ptr< MaterialOverride > create_override() const
Definition: actor.cc:15
std::shared_ptr< CompiledMesh > mesh
Definition: actor.h:22
std::vector< CompiledMeshMaterial > materials
Definition: actor.h:17
Definition: vec3.h:48