Archived
1
Fork 0
This repository has been archived on 2025-04-12. You can view files and clone it, but cannot push or open issues or pull requests.
prism/engine/math/include/transform.hpp

20 lines
714 B
C++
Raw Normal View History

2020-08-11 12:07:21 -04:00
#pragma once
#include "matrix.hpp"
#include "quaternion.hpp"
#include "vector.hpp"
2020-08-11 12:07:21 -04:00
2021-05-12 09:56:44 -04:00
namespace prism {
Matrix4x4 perspective(float field_of_view, float aspect, float z_near, float z_far);
Matrix4x4 infinite_perspective(float field_of_view, float aspect, float z_near);
2020-08-11 12:07:21 -04:00
Matrix4x4 orthographic(float left, float right, float bottom, float top, float zNear, float zFar);
2021-05-12 09:56:44 -04:00
Matrix4x4 look_at(float3 eye, float3 center, float3 up);
Quaternion quat_look_at(float3 eye, float3 center, float3 up);
2020-08-11 12:07:21 -04:00
2021-05-12 09:56:44 -04:00
Matrix4x4 translate(Matrix4x4 matrix, float3 translation);
Matrix4x4 rotate(Matrix4x4 matrix, float angle, float3 axis);
Matrix4x4 scale(Matrix4x4 matrix, float3 scale);
} // namespace prism