DirectZ
|
Defines various useful N dimensional structures such as matrices and vectors as well as helper functions. More...
#include <cassert>
#include <cmath>
#include <random>
#include <chrono>
#include <stdexcept>
#include <string.h>
#include "Renderer.hpp"
Go to the source code of this file.
Classes | |
struct | dz::vec< T, N > |
Template struct representing an N-dimensional vector of type T. More... | |
struct | dz::color_vec< T, N > |
struct | dz::mat< T, C, R > |
A generic fixed-size matrix template supporting common matrix operations. More... | |
struct | dz::Random |
Utility class for generating random values with optional seeding and support for multiple numeric types. More... | |
struct | dz::AABB< T, N > |
Axis-Aligned Bounding Box (AABB) template structure. More... | |
struct | dz::quat< T > |
A quaternion class for representing rotations in 3D space. More... |
Namespaces | |
namespace | dz |
Functions | |
template<typename T> | |
mat< T, 4, 4 > | dz::lookAt (const vec< T, 3 > &eye, const vec< T, 3 > ¢er, const vec< T, 3 > &up) |
Constructs a right-handed view matrix simulating a camera "look at" transform. | |
template<typename T> | |
mat< T, 4, 4 > | dz::perspectiveRH_ZO (T fovy, T aspect, T zNear, T zFar) |
template<typename T> | |
mat< T, 4, 4 > | dz::perspectiveRH_NO (T fovy, T aspect, T zNear, T zFar) |
template<typename T> | |
mat< T, 4, 4 > | dz::perspectiveLH_ZO (T fovy, T aspect, T zNear, T zFar) |
template<typename T> | |
mat< T, 4, 4 > | dz::perspectiveLH_NO (T fovy, T aspect, T zNear, T zFar) |
template<typename T> | |
mat< T, 4, 4 > | dz::perspective (T fovy, T aspect, T zNear, T zFar) |
Creates a perspective projection matrix suitable for rendering 3D scenes. | |
template<typename T> | |
mat< T, 4, 4 > | dz::infinitePerspectiveRH_NO (T fovy, T aspect, T zNear) |
template<typename T> | |
mat< T, 4, 4 > | dz::infinitePerspectiveRH_ZO (T fovy, T aspect, T zNear) |
template<typename T> | |
mat< T, 4, 4 > | dz::infinitePerspectiveLH_NO (T fovy, T aspect, T zNear) |
template<typename T> | |
mat< T, 4, 4 > | dz::infinitePerspectiveLH_ZO (T fovy, T aspect, T zNear) |
template<typename T> | |
mat< T, 4, 4 > | dz::infinitePerspective (T fovy, T aspect, T zNear) |
Creates an infinite perspective projection matrix. | |
template<typename T> | |
mat< T, 4, 4 > | dz::orthographic (T left, T right, T bottom, T top, T znear, T zfar) |
Creates an orthographic projection matrix. | |
template<typename T> | |
T | dz::radians (T degrees) |
Converts an angle from degrees to radians. | |
template<typename T> | |
T | dz::degrees (T radians) |
Converts an angle from radians to degrees. | |
template<typename T> | |
mat< T, 3, 3 > | dz::quat_to_mat3 (const quat< T > &q) |
template<typename T> | |
quat< T > | dz::slerp (const quat< T > &a, const quat< T > &b, T t) |
Spherical linear interpolation between two quaternions. | |
template<typename T> | |
quat< T > | dz::quat_from_axis_angle (const vec< T, 3 > &axis, T angle) |
Constructs a quaternion from an axis-angle representation. | |
template<typename T> | |
mat< T, 4, 4 > | dz::quat_to_mat4 (const quat< T > &q) |
Converts a quaternion to a 4x4 rotation matrix. |
Defines various useful N dimensional structures such as matrices and vectors as well as helper functions.