|
SleakEngine 0.1.0
C++23 multi-backend game engine
|
Vectors, matrices, quaternions, colors, AABBs, and random helpers. More...
Classes | |
| struct | AABB |
| class | Color |
| class | Matrix |
| class | Quaternion |
| Represents a quaternion for 3D rotations. More... | |
| class | Random |
| A class for generating random numbers and values. More... | |
| class | Vector |
| class | Vector2D |
| class | Vector3D |
| class | Vector4D |
Typedefs | |
| using | Matrix4 = Matrix<float, 4, 4> |
Functions | |
| template<typename T> | |
| constexpr T | Clamp (const T &value, T min, T max) |
| template<typename T> | |
| constexpr T | Clamp (const T &value, Vector2D range) |
| Clamps value into [range.x, range.y]. | |
| template<typename T> | |
| constexpr T | Lerp (const T &start, const T &end, float t) |
| Linear interpolation from start to end; t is clamped to [0,1]. | |
| template<typename T> | |
| constexpr const T & | Max (const T &value1, const T &value2) |
| template<typename T> | |
| constexpr const T & | Min (const T &value1, const T &value2) |
| Vector3D | operator* (const Quaternion &quat, const Vector3D &vec) |
| template<typename T, size_t N> | |
| Vector< T, N > | operator* (T scalar, const Vector< T, N > &vec) |
Vectors, matrices, quaternions, colors, AABBs, and random helpers.
Vector2D, Vector3D, and Vector4D are the value types nearly every other engine API accepts. Matrix4 uses the row-vector convention: a point is transformed as clip = point * viewProj.
| using Sleak::Math::Matrix4 = Matrix<float, 4, 4> |
Definition at line 413 of file Matrix.hpp.
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
| Vector3D Sleak::Math::operator* | ( | const Quaternion & | quat, |
| const Vector3D & | vec ) |
Definition at line 181 of file Quaternion.cpp.
| Vector< T, N > Sleak::Math::operator* | ( | T | scalar, |
| const Vector< T, N > & | vec ) |
Definition at line 649 of file Vector.hpp.