xcal
基于 C++23 的现代图形渲染引擎
载入中...
搜索中...
未找到
命名空间 | 宏定义 | 函数
function.hpp 文件参考

Header file for mathematical functions 更多...

#include <cmath>
#include "./declaration.hpp"
function.hpp 的引用(Include)关系图:
此图展示该文件直接或间接的被哪些文件引用了:

浏览源代码.

命名空间

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
 

详细描述

Header file for mathematical functions

作者
XCDH
版本
1.0
日期
2023-10-05

在文件 function.hpp 中定义.

宏定义说明

◆ XCMATH_FUNCTION_HPP

#define XCMATH_FUNCTION_HPP

在文件 function.hpp10 行定义.