MCPcopy Create free account
hub / github.com/Hopson97/HopsonCraft / createModelMatrix

Function createModelMatrix

Source/Maths/Matrix_Maths.cpp:23–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21 }
22
23 Matrix4 createModelMatrix(const Entity& entity)
24 {
25 Matrix4 matrix;
26
27 matrix = glm::translate(matrix, entity.position);
28
29 matrix = glm::rotate(matrix, glm::radians(entity.rotation.x), {1, 0, 0});
30 matrix = glm::rotate(matrix, glm::radians(entity.rotation.y), {0, 1, 0});
31 matrix = glm::rotate(matrix, glm::radians(entity.rotation.z), {0, 0, 1});
32
33 return matrix;
34 }
35
36 Matrix4 createProjMatrix(float fieldOfView)
37 {

Callers 2

updateMethod · 0.85
prepareMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected