xcal
基于 C++23 的现代图形渲染引擎
|
Header file for mathematical functions 更多...
命名空间 | |
namespace | xcmath |
Compiler-specific type information handling for MSVC | |
宏定义 | |
#define | XCMATH_FUNCTION_HPP |
函数 | |
template<typename T > | |
constexpr T | xcmath::radians (T degrees) |
Convert degrees to radians | |
template<typename T > | |
constexpr T | xcmath::degrees (T radians) |
Convert radians to degrees | |
template<class _Tp , size_t _length = 3, size_t _dim = 4> requires ((_length == 3 || _length == 4) && (_dim == 4 || _dim == 3)) | |
mat< _Tp, _dim, _dim > | xcmath::rotate (const mat< _Tp, _dim, _dim > &m, _Tp angle, const vec< _Tp, _length > &axis) |
Apply rotation for transform or rotation matrix around an axis | |
template<class _Tp , class _MTp = _Tp, size_t _dim = 3> requires (std::is_floating_point_v<_Tp> && (_dim == 3 || _dim == 4)) | |
mat< _MTp, _dim, _dim > | xcmath::rotate (const mat< _MTp, _dim, _dim > &m, _Tp angle) |
Apply rotation for 2D transform or rotation matrix around an axis | |
template<class _Tp , class _ATp = _Tp, size_t _dim = 3> requires (std::is_floating_point_v<_Tp> && std::is_floating_point_v<_ATp>) | |
mat< _Tp, _dim, _dim > | xcmath::rotate (const mat< _Tp, _dim, _dim > &m, _ATp angle, _Tp x, _Tp y, _Tp z) |
Apply rotation for matrix around an axis specified by coordinates | |
template<class _Tp , size_t _len = 4, size_t _vlen = 3> requires ((_len == 4 || _len == 3) && _vlen == _len - 1) | |
constexpr mat< _Tp, _len, _len > | xcmath::translate (const mat< _Tp, _len, _len > &m, const vec< _Tp, _vlen > &v) |
Apply translation for matrix | |
template<class _Tp , size_t _len = 4> requires (_len == 4 || _len == 3) | |
constexpr mat< _Tp, _len, _len > | xcmath::translate (const mat< _Tp, _len, _len > &m, const vec< _Tp, _len > &v) |
Apply translation for matrix using a homogenous vector | |
template<class _Tp , class _ATp = _Tp, size_t _dim = 4> requires (std::is_floating_point_v<_Tp> && std::is_floating_point_v<_ATp> && (_dim == 4 || _dim == 3)) | |
constexpr mat< _Tp, _dim, _dim > | xcmath::scale (const mat< _Tp, _dim, _dim > &m, const vec< _ATp, _dim - 1 > &v) |
Apply translation to a matrix | |
template<class _Tp , class _STp , size_t _dim = 4> requires (std::is_arithmetic_v<_STp> && (_dim == 4 || _dim == 3)) | |
constexpr mat< _Tp, _dim, _dim > | xcmath::scale (const mat< _Tp, _dim, _dim > &m, const _STp s) |
Scale a matrix by a vector | |
#define XCMATH_FUNCTION_HPP |
在文件 function.hpp 第 10 行定义.