wren
Vulkan-based game engine
Loading...
Searching...
No Matches
wren::math Namespace Reference

Classes

class  Mat
 
struct  Mat4f
 
struct  Quaternion
 
struct  Vec
 
struct  Vec2f
 
struct  Vec3f
 
struct  Vec4f
 

Typedefs

using Mat3f = Mat<float, 3, 3>
 
using Quaternionf = Quaternion<float>
 
using Quaterniond = Quaternion<double>
 

Functions

auto degrees (float radian) -> float
 
auto radians (float degrees) -> float
 
auto translate (Mat4f mat, Vec4f offset) -> Mat4f
 
auto translate (Mat4f mat, Vec3f offset) -> Mat4f
 
auto look_at (const Vec3f &position, const Vec3f &target, const Vec3f &world_up) -> Mat4f
 
auto rotate (const Mat4f &matrix, float rotation, const Vec3f &axis) -> Mat4f
 
template<typename T >
auto ortho (T left, T right, T bottom, T top)
 
template<typename T >
auto ortho (T left, T right, T bottom, T top, T z_near, T z_far)
 
template<typename T >
auto perspective (T fov_y, T aspect, T z_near, T z_far)
 
template<typename T , std::size_t N>
auto operator<< (std::ostream &os, const Vec< T, N > &value) -> std::ostream &
 
template<typename T , std::size_t Rows, std::size_t Cols>
auto operator<< (std::ostream &os, const Mat< T, Rows, Cols > &value) -> std::ostream &
 

Typedef Documentation

◆ Mat3f

using wren::math::Mat3f = Mat<float, 3, 3>

◆ Quaterniond

◆ Quaternionf

Function Documentation

◆ degrees()

auto wren::math::degrees ( float radian) -> float
inline
Here is the caller graph for this function:

◆ look_at()

auto wren::math::look_at ( const Vec3f & position,
const Vec3f & target,
const Vec3f & world_up ) -> Mat4f
Here is the call graph for this function:

◆ operator<<() [1/2]

template<typename T , std::size_t Rows, std::size_t Cols>
auto wren::math::operator<< ( std::ostream & os,
const Mat< T, Rows, Cols > & value ) -> std::ostream&

◆ operator<<() [2/2]

template<typename T , std::size_t N>
auto wren::math::operator<< ( std::ostream & os,
const Vec< T, N > & value ) -> std::ostream&

◆ ortho() [1/2]

template<typename T >
auto wren::math::ortho ( T left,
T right,
T bottom,
T top )
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ortho() [2/2]

template<typename T >
auto wren::math::ortho ( T left,
T right,
T bottom,
T top,
T z_near,
T z_far )
inline
Here is the call graph for this function:

◆ perspective()

template<typename T >
auto wren::math::perspective ( T fov_y,
T aspect,
T z_near,
T z_far )
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ radians()

auto wren::math::radians ( float degrees) -> float
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rotate()

auto wren::math::rotate ( const Mat4f & matrix,
float rotation,
const Vec3f & axis ) -> Mat4f
Here is the call graph for this function:

◆ translate() [1/2]

auto wren::math::translate ( Mat4f mat,
Vec3f offset ) -> Mat4f
Here is the call graph for this function:

◆ translate() [2/2]

auto wren::math::translate ( Mat4f mat,
Vec4f offset ) -> Mat4f
Here is the call graph for this function:
Here is the caller graph for this function: