Euphoria
instance.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "base/mat4.h"
4 #include "base/vec3.h"
5 #include "base/quat.h"
6 
7 
8 namespace eu::render
9 {
10  struct Light;
11 
12  struct Instance
13  {
14  bool remove_this = false;
17 
18  Instance();
19  virtual ~Instance() = default;
20 
21  Instance(const Instance&) = delete;
22  Instance(Instance&&) = delete;
23  void operator=(const Instance&) = delete;
24  void operator=(Instance&&) = delete;
25 
26  [[nodiscard]] mat4f calc_model_matrix() const;
27 
28  virtual void render
29  (
30  const mat4f& projection_matrix,
31  const mat4f& view_matrix,
32  const vec3f& camera,
33  const Light& light
34  ) = 0;
35  };
36 
37  [[nodiscard]] mat4f calc_model_matrix
38  (
39  const vec3f& position,
40  const quatf& rotation
41  );
42 }
mat4f calc_model_matrix(const vec3f &position, const quatf &rotation)
Definition: instance.cc:19
Definition: mat4.h:14
Definition: quat.h:15
virtual ~Instance()=default
Instance(const Instance &)=delete
void operator=(Instance &&)=delete
Instance(Instance &&)=delete
virtual void render(const mat4f &projection_matrix, const mat4f &view_matrix, const vec3f &camera, const Light &light)=0
mat4f calc_model_matrix() const
Definition: instance.cc:12
void operator=(const Instance &)=delete
Definition: vec3.h:48