Euphoria
instance.cc
Go to the documentation of this file.
1 #include "render/instance.h"
2 
3 namespace eu::render
4 {
6  : position(zero3f)
7  , rotation(q_identity)
8  {
9  }
10 
11  mat4f
13  {
15  }
16 
17  [[nodiscard]] mat4f
19  (
20  const vec3f& position,
21  const quatf& rotation
22  )
23  {
24  return mat4f::from_translation(position) * rotation.to_mat4();
25  }
26 }
mat4f calc_model_matrix(const vec3f &position, const quatf &rotation)
Definition: instance.cc:19
constexpr quatf q_identity
Definition: quat.h:71
constexpr vec3f zero3f
Definition: vec3.h:95
Definition: mat4.h:14
static mat4f from_translation(const vec3f &v)
Definition: mat4.cc:51
Definition: quat.h:15
mat4f to_mat4() const
Definition: quat.cc:75
mat4f calc_model_matrix() const
Definition: instance.cc:12
Definition: vec3.h:48