Kanzi 4.0.0-beta2
math_types.hpp File Reference

Classes

struct  kanzi::gfx::ArrayType< T, TSize >
 
struct  kanzi::gfx::Box< T, TSize >
 
struct  kanzi::gfx::Matrix< T, TSize >
 
struct  kanzi::gfx::MaxBoxT
 
struct  kanzi::gfx::MaxVectorT
 
struct  kanzi::gfx::Vector< T, TSize >
 

Namespaces

namespace  kanzi
 
namespace  kanzi::gfx
 

Typedefs

using kanzi::gfx::box3u32
 
using kanzi::gfx::m2f
 
using kanzi::gfx::m3f
 
using kanzi::gfx::m4f
 
using kanzi::gfx::rects32
 
using kanzi::gfx::v2f
 
using kanzi::gfx::v2s16
 
using kanzi::gfx::v2s32
 
using kanzi::gfx::v2s8
 
using kanzi::gfx::v2u16
 
using kanzi::gfx::v2u32
 
using kanzi::gfx::v2u8
 
using kanzi::gfx::v3f
 
using kanzi::gfx::v3s16
 
using kanzi::gfx::v3s32
 
using kanzi::gfx::v3s8
 
using kanzi::gfx::v3u16
 
using kanzi::gfx::v3u32
 
using kanzi::gfx::v3u8
 
using kanzi::gfx::v4f
 
using kanzi::gfx::v4s16
 
using kanzi::gfx::v4s32
 
using kanzi::gfx::v4s8
 
using kanzi::gfx::v4u16
 
using kanzi::gfx::v4u32
 
using kanzi::gfx::v4u8
 

Functions

template<typename T >
constexpr T kanzi::gfx::angle (const Vector< T, 2 > &v)
 
template<typename T >
constexpr Box< T, 2 > kanzi::gfx::asBox2 (const Box< T, 3 > &b)
 
template<typename T , uint32_t TSize>
constexpr Vector< T, TSize+1 > kanzi::gfx::asDirection (const Vector< T, TSize > &v)
 
template<typename T , uint32_t TSize>
constexpr Vector< T, TSize+1 > kanzi::gfx::asPosition (const Vector< T, TSize > &v)
 
template<typename T , uint32_t TSize>
Vector< T, 2 > kanzi::gfx::asV2 (const Vector< T, TSize > &v)
 
template<typename T , uint32_t TSize>
Vector< T, 3 > kanzi::gfx::asV3 (const Vector< T, TSize > &v)
 
template<typename T >
Vector< T, 4 > kanzi::gfx::asV4 (const Box< T, 2 > b)
 
template<typename T , uint32_t TSize>
constexpr const Tkanzi::gfx::at (const Matrix< T, TSize > &m, uint32_t col, uint32_t row)
 
template<typename T , uint32_t TSize>
constexpr const Tkanzi::gfx::at (const Matrix< T, TSize > &m, uint32_t i)
 
template<typename T , uint32_t TSize>
constexpr const Tkanzi::gfx::at (const Vector< T, TSize > &m, uint32_t i)
 
template<typename T , uint32_t TSize>
constexpr Tkanzi::gfx::at (Matrix< T, TSize > &m, uint32_t col, uint32_t row)
 
template<typename T , uint32_t TSize>
constexpr Tkanzi::gfx::at (Matrix< T, TSize > &m, uint32_t i)
 
template<typename T , uint32_t TSize>
constexpr Tkanzi::gfx::at (Vector< T, TSize > &m, uint32_t i)
 
template<typename T , uint32_t TSize>
constexpr Vector< T, TSizekanzi::gfx::center (const Box< T, TSize > &b)
 
template<typename T1 , typename T2 , uint32_t TSize>
Vector< T1, TSizekanzi::gfx::convertType (const Vector< T2, TSize > &v)
 
template<typename T , uint32_t TSize>
constexpr Box< T, TSizekanzi::gfx::createBox (const Vector< T, TSize > &min, const Vector< T, TSize > &size)
 
template<typename T >
constexpr Matrix< T, 4 > kanzi::gfx::createLeftHandedLookAt (const Vector< T, 3 > &eye, const Vector< T, 3 > &target)
 
template<typename T >
constexpr Matrix< T, 4 > kanzi::gfx::createLeftHandedLookAt (const Vector< T, 3 > &eye, const Vector< T, 3 > &target, const Vector< T, 3 > &up)
 
template<typename T >
constexpr Matrix< T, 4 > kanzi::gfx::createLeftHandedLookAt (const Vector< T, 4 > &eye, const Vector< T, 4 > &target, const Vector< T, 4 > &up)
 
template<typename T >
constexpr Matrix< T, 4 > kanzi::gfx::createLeftHandedLookAtView (const Vector< T, 3 > &eye, const Vector< T, 3 > &target)
 
template<typename T >
constexpr Matrix< T, 4 > kanzi::gfx::createLeftHandedLookAtView (const Vector< T, 3 > &eye, const Vector< T, 3 > &target, const Vector< T, 3 > &up)
 
template<typename T >
constexpr Matrix< T, 4 > kanzi::gfx::createLeftHandedProjection (T fov, T aspectRatio, T near, T far)
 
template<typename T >
constexpr Matrix< T, 4 > kanzi::gfx::createRightHandedLookAt (const Vector< T, 3 > &eye, const Vector< T, 3 > &target)
 
template<typename T >
constexpr Matrix< T, 4 > kanzi::gfx::createRightHandedLookAt (const Vector< T, 3 > &eye, const Vector< T, 3 > &target, const Vector< T, 3 > &up)
 
template<typename T >
constexpr Matrix< T, 4 > kanzi::gfx::createRightHandedLookAt (const Vector< T, 4 > &eye, const Vector< T, 4 > &target, const Vector< T, 4 > &up)
 
template<typename T >
constexpr Matrix< T, 4 > kanzi::gfx::createRightHandedLookAtView (const Vector< T, 3 > &eye, const Vector< T, 3 > &target)
 
template<typename T >
constexpr Matrix< T, 4 > kanzi::gfx::createRightHandedLookAtView (const Vector< T, 3 > &eye, const Vector< T, 3 > &target, const Vector< T, 3 > &up)
 
template<typename T >
constexpr Matrix< T, 4 > kanzi::gfx::createRightHandedProjection (T fov, T aspectRatio, T near, T far)
 
template<typename T >
constexpr Matrix< T, 4 > kanzi::gfx::createRightHandedProjection (T left, T right, T bottom, T top, T near, T far)
 
template<typename T >
constexpr Matrix< T, 3 > kanzi::gfx::createRotation (T angle)
 
template<typename T >
constexpr Matrix< T, 4 > kanzi::gfx::createRotation (T angle, Vector< T, 3 > axis)
 
template<typename T , uint32_t TSize>
constexpr Matrix< T, TSizekanzi::gfx::createScale (const Vector< T, TSize > &s)
 
template<typename T , uint32_t TSize>
constexpr Vector< T, TSizekanzi::gfx::createVector (const T &fill)
 
template<typename T >
constexpr Vector< T, 3 > kanzi::gfx::cross (const Vector< T, 3 > &a, const Vector< T, 3 > &b)
 
template<typename T >
constexpr Vector< T, 4 > kanzi::gfx::cross (const Vector< T, 4 > &a, const Vector< T, 4 > &b)
 
template<typename T , uint32_t TSize>
constexpr T kanzi::gfx::depth (const Box< T, TSize > &b)
 
template<typename T >
constexpr T kanzi::gfx::determinant (const Matrix< T, 2 > &m)
 
template<typename T >
constexpr T kanzi::gfx::determinant (const Vector< T, 2 > &v0, const Vector< T, 2 > &v1)
 
template<typename T , uint32_t TSize>
constexpr Vector< T, TSizekanzi::gfx::dimensions (const Box< T, TSize > &b)
 
template<typename T , uint32_t TSize>
constexpr T kanzi::gfx::distance (const Vector< T, TSize > &v1, const Vector< T, TSize > &v2)
 
template<typename T , uint32_t TSize>
constexpr T kanzi::gfx::distanceSquared (const Vector< T, TSize > &v1, const Vector< T, TSize > &v2)
 
template<typename T , uint32_t TSize>
Vector< T, TSizekanzi::gfx::divideUp (const Vector< T, TSize > &v, const Vector< T, TSize > &d)
 
template<typename T >
T kanzi::gfx::divideUp (T count, T division)
 
template<typename T , uint32_t TSize>
constexpr T kanzi::gfx::dot (const Vector< T, TSize > &v1, const Vector< T, TSize > &v2)
 
template<typename T , uint32_t TSize>
constexpr Box< T, TSizekanzi::gfx::ensureNonNegativeSize (const Box< T, TSize > &inputBox)
 Converts a box to have a nonnegative size.
 
template<typename T >
constexpr T kanzi::gfx::extractRotation (const Matrix< T, 3 > &rot)
 
template<typename T >
constexpr Vector< T, 2 > kanzi::gfx::extractScale (const Matrix< T, 3 > scale)
 
template<typename T , uint32_t TSize>
constexpr Vector< T, TSize - 1 > kanzi::gfx::extractTranslation (const Matrix< T, TSize > translation)
 
template<typename T , uint32_t TSize>
constexpr Vector< T, TSizekanzi::gfx::getColumn (const Matrix< T, TSize > &m, uint32_t row)
 
template<typename T , uint32_t TSize>
constexpr Vector< T, TSizekanzi::gfx::getRow (const Matrix< T, TSize > &m, uint32_t col)
 
template<typename T , uint32_t TSize>
constexpr void kanzi::gfx::grow (Box< T, TSize > &box, const Box< T, TSize > &otherBox)
 
template<typename T , uint32_t TSize>
constexpr void kanzi::gfx::grow (Box< T, TSize > &box, const Vector< T, TSize > &point)
 
template<typename T , uint32_t TSize>
constexpr T kanzi::gfx::height (const Box< T, TSize > &b)
 
template<typename T , uint32_t TSize>
constexpr optional< Box< T, TSize > > kanzi::gfx::intersection (const Box< T, TSize > &a, const Box< T, TSize > &b)
 Creates an intersection of two boxes.
 
template<typename T , uint32_t TSize>
constexpr bool kanzi::gfx::intersects (const Box< T, TSize > &b1, const Box< T, TSize > &b2)
 
template<typename T , uint32_t TSize>
constexpr bool kanzi::gfx::intersects (const Box< T, TSize > &b1, const Vector< T, TSize > &b2)
 
template<typename T >
constexpr Matrix< T, 4 > kanzi::gfx::inverse (const Matrix< T, 4 > &m)
 
template<typename T >
constexpr Vector< T, 4 > kanzi::gfx::inverse (const Vector< T, 4 > &src)
 
template<typename T , uint32_t TSize>
constexpr Vector< T, TSizekanzi::gfx::inverse (const Vector< T, TSize > &src)
 
template<typename T , uint32_t TSize>
constexpr bool kanzi::gfx::isInverted (const Box< T, TSize > &b)
 
template<typename T , uint32_t TSize>
constexpr T kanzi::gfx::magnitude (const Vector< T, TSize > &v)
 
template<typename T , uint32_t TSize>
constexpr T kanzi::gfx::magnitudeSquared (const Vector< T, TSize > &v)
 
template<typename T , uint32_t TSize>
constexpr Box< T, TSizekanzi::gfx::max (const Box< T, TSize > &a, const Box< T, TSize > &b)
 
template<typename T , uint32_t TSize>
constexpr Vector< T, TSizekanzi::gfx::max (const Vector< T, TSize > &a, const Vector< T, TSize > &b)
 
template<typename T , uint32_t TSize>
constexpr Vector< T, TSizekanzi::gfx::max (const Vector< T, TSize > &a, T b)
 
template<typename T , uint32_t TSize>
constexpr Box< T, TSizekanzi::gfx::min (const Box< T, TSize > &a, const Box< T, TSize > &b)
 
template<typename T , uint32_t TSize>
constexpr Vector< T, TSizekanzi::gfx::min (const Vector< T, TSize > &a, const Vector< T, TSize > &b)
 
template<typename T , uint32_t TSize>
constexpr Vector< T, TSizekanzi::gfx::min (const Vector< T, TSize > &a, T b)
 
template<typename T , uint32_t TSize>
constexpr Vector< T, TSizekanzi::gfx::normalize (const Vector< T, TSize > &v)
 
template<typename T , uint32_t TSize>
bool kanzi::gfx::operator!= (const Box< T, TSize > &lhs, const Box< T, TSize > &rhs)
 
template<typename T , uint32_t TSize>
bool kanzi::gfx::operator!= (const Vector< T, TSize > &lhs, const Vector< T, TSize > &rhs)
 
template<typename T , uint32_t TSize>
constexpr Matrix< T, TSizekanzi::gfx::operator* (const Matrix< T, TSize > &lhs, const Matrix< T, TSize > &rhs)
 
template<typename T , uint32_t TSize>
constexpr Vector< T, TSizekanzi::gfx::operator* (const T &lhs, const Vector< T, TSize > &rhs)
 
template<typename T , uint32_t TSize>
constexpr Vector< T, TSizekanzi::gfx::operator* (const Vector< T, TSize > &lhs, const T &rhs)
 
template<typename T , uint32_t TSize>
constexpr Vector< T, TSizekanzi::gfx::operator* (const Vector< T, TSize > &lhs, const Vector< T, TSize > &rhs)
 
template<typename T , uint32_t TSize>
constexpr Matrix< T, TSizekanzi::gfx::operator* (Matrix< T, TSize > mat, T scalar)
 
template<typename T , uint32_t TSize>
constexpr Matrix< T, TSize > & kanzi::gfx::operator*= (Matrix< T, TSize > &mat, T scalar)
 
template<typename T , uint32_t TSize>
constexpr Matrix< T, TSizekanzi::gfx::operator*= (Matrix< T, TSize > lhs, const Matrix< T, TSize > &rhs)
 
template<typename T , uint32_t TSize>
constexpr Vector< T, TSize > & kanzi::gfx::operator*= (Vector< T, TSize > &lhs, const T &rhs)
 
template<typename T , uint32_t TSize>
constexpr Vector< T, TSize > & kanzi::gfx::operator*= (Vector< T, TSize > &lhs, const Vector< T, TSize > &rhs)
 
template<typename T , uint32_t TSize>
constexpr Box< T, TSizekanzi::gfx::operator+ (const Box< T, TSize > &b, const Vector< T, TSize > &v)
 
template<typename T , uint32_t TSize>
constexpr Box< T, TSizekanzi::gfx::operator+ (const Box< T, TSize > &b1, const Box< T, TSize > &b2)
 
template<typename T , uint32_t TSize>
constexpr Vector< T, TSizekanzi::gfx::operator+ (const T &lhs, const Vector< T, TSize > &rhs)
 
template<typename T , uint32_t TSize>
constexpr Vector< T, TSizekanzi::gfx::operator+ (const Vector< T, TSize > &lhs, const T &rhs)
 
template<typename T , uint32_t TSize>
constexpr Vector< T, TSizekanzi::gfx::operator+ (const Vector< T, TSize > &lhs, const Vector< T, TSize > &rhs)
 
template<typename T , uint32_t TSize>
constexpr Box< T, TSize > & kanzi::gfx::operator+= (Box< T, TSize > &b, const Vector< T, TSize > &v)
 
template<typename T , uint32_t TSize>
constexpr Box< T, TSize > & kanzi::gfx::operator+= (Box< T, TSize > &b1, const Box< T, TSize > &b2)
 
template<typename T , uint32_t TSize>
constexpr Vector< T, TSize > & kanzi::gfx::operator+= (Vector< T, TSize > &lhs, const T &rhs)
 
template<typename T , uint32_t TSize>
constexpr Vector< T, TSize > & kanzi::gfx::operator+= (Vector< T, TSize > &lhs, const Vector< T, TSize > &rhs)
 
template<typename T , uint32_t TSize>
constexpr Box< T, TSizekanzi::gfx::operator- (const Box< T, TSize > &b, const Vector< T, TSize > &v)
 
template<typename T , uint32_t TSize>
constexpr Box< T, TSizekanzi::gfx::operator- (const Box< T, TSize > &b1, const Box< T, TSize > &b2)
 
template<typename T , uint32_t TSize>
constexpr Vector< T, TSizekanzi::gfx::operator- (const T &lhs, const Vector< T, TSize > &rhs)
 
template<typename T , uint32_t TSize>
constexpr Vector< T, TSizekanzi::gfx::operator- (const Vector< T, TSize > &lhs, const T &rhs)
 
template<typename T , uint32_t TSize>
constexpr Vector< T, TSizekanzi::gfx::operator- (const Vector< T, TSize > &lhs, const Vector< T, TSize > &rhs)
 
template<typename T , uint32_t TSize>
constexpr Box< T, TSize > & kanzi::gfx::operator-= (Box< T, TSize > &b, const Vector< T, TSize > &v)
 
template<typename T , uint32_t TSize>
constexpr Box< T, TSize > & kanzi::gfx::operator-= (Box< T, TSize > &b1, const Box< T, TSize > &b2)
 
template<typename T , uint32_t TSize>
constexpr Vector< T, TSize > & kanzi::gfx::operator-= (Vector< T, TSize > &lhs, const T &rhs)
 
template<typename T , uint32_t TSize>
constexpr Vector< T, TSize > & kanzi::gfx::operator-= (Vector< T, TSize > &lhs, const Vector< T, TSize > &rhs)
 
template<typename T , uint32_t TSize>
constexpr Vector< T, TSizekanzi::gfx::operator/ (const T &lhs, const Vector< T, TSize > &rhs)
 
template<typename T , uint32_t TSize>
constexpr Vector< T, TSizekanzi::gfx::operator/ (const Vector< T, TSize > &lhs, const T &rhs)
 
template<typename T , uint32_t TSize>
constexpr Vector< T, TSizekanzi::gfx::operator/ (const Vector< T, TSize > &lhs, const Vector< T, TSize > &rhs)
 
template<typename T , uint32_t TSize>
constexpr Vector< T, TSize > & kanzi::gfx::operator/= (Vector< T, TSize > &lhs, const T &rhs)
 
template<typename T , uint32_t TSize>
constexpr Vector< T, TSize > & kanzi::gfx::operator/= (Vector< T, TSize > &lhs, const Vector< T, TSize > &rhs)
 
template<typename T , uint32_t TSize, typename enable_if< is_integral< T >::value, int >::type = 0>
constexpr Vector< T, TSizekanzi::gfx::operator<< (const Vector< T, TSize > &lhs, size_t shift)
 
template<typename T , uint32_t TSize, typename enable_if< is_integral< T >::value, int >::type = 0>
constexpr Vector< T, TSize > & kanzi::gfx::operator<<= (Vector< T, TSize > &lhs, size_t shift)
 
template<typename T , uint32_t TSize>
bool kanzi::gfx::operator== (const Box< T, TSize > &lhs, const Box< T, TSize > &rhs)
 
template<typename T , uint32_t TSize>
constexpr bool kanzi::gfx::operator== (const Vector< T, TSize > &lhs, const Vector< T, TSize > &rhs)
 
template<typename T , uint32_t TSize, typename enable_if< is_integral< T >::value, int >::type = 0>
constexpr Vector< T, TSizekanzi::gfx::operator>> (const Vector< T, TSize > &lhs, size_t shift)
 
template<typename T , uint32_t TSize, typename enable_if< is_integral< T >::value, int >::type = 0>
constexpr Vector< T, TSize > & kanzi::gfx::operator>>= (Vector< T, TSize > &lhs, size_t shift)
 
template<typename T , uint32_t TSize>
constexpr T kanzi::gfx::productElements (const Vector< T, TSize > &v1)
 
template<typename T >
constexpr Vector< T, 2 > kanzi::gfx::rotate (const Vector< T, 2 > &p, T a)
 
template<typename T , uint32_t TSize>
constexpr Matrix< T, TSizekanzi::gfx::scale (const Matrix< T, TSize > &mat, const Vector< T, TSize > &v)
 
template<typename T , uint32_t TSize>
constexpr T kanzi::gfx::sumElements (const Vector< T, TSize > &v1)
 
template<typename T , uint32_t TSize>
constexpr Vector< T, TSizekanzi::gfx::transform (const Vector< T, TSize > &v, const Matrix< T, TSize > &mat)
 
template<typename T , uint32_t TSize>
constexpr Vector< T, TSizekanzi::gfx::transformDirection (const Vector< T, TSize > &v, const Matrix< T, TSize+1 > &mat)
 
template<typename T , uint32_t TSize>
constexpr Vector< T, TSizekanzi::gfx::transformPosition (const Vector< T, TSize > &v, const Matrix< T, TSize+1 > &mat)
 
template<typename T , uint32_t TSize, uint32_t TNewSize = TSize - 1>
constexpr Vector< T, TNewSizekanzi::gfx::truncate (const Vector< T, TSize > &v)
 
template<typename T , uint32_t TSize>
constexpr T kanzi::gfx::width (const Box< T, TSize > &b)
 

Variables

struct kanzi::gfx::MaxBoxT kanzi::gfx::MaxBox
 
struct kanzi::gfx::MaxVectorT kanzi::gfx::MaxVector