neoGFX
Cross-platform C++ app/game engine
numerical.hpp File Reference
#include <neogfx/neogfx.hpp>
#include <type_traits>
#include <stdexcept>
#include <array>
#include <algorithm>
#include <ostream>
#include <optional>
#include <boost/math/constants/constants.hpp>
#include <neolib/vecarray.hpp>
#include <neogfx/core/swizzle.hpp>
#include <neogfx/core/swizzle_array.hpp>

Go to the source code of this file.

Classes

struct  neogfx::math::column_vector
 
struct  neogfx::math::row_vector
 
class  neogfx::math::basic_vector< T, Size, Type, IsScalar >
 
class  neogfx::math::basic_vector< T, _Size, Type, true >
 
struct  neogfx::math::basic_vector< T, _Size, Type, true >::rebind< Size2 >
 
class  neogfx::math::basic_vector< T, _Size, Type, false >
 
struct  neogfx::math::basic_vector< T, _Size, Type, false >::rebind< Size2 >
 
class  neogfx::math::basic_matrix< T, Rows, Columns >
 
struct  neogfx::math::basic_matrix< T, Rows, Columns >::rebind< T2 >
 
struct  neogfx::math::aabb
 
struct  neogfx::math::aabb_2d
 

Namespaces

 neogfx
 
 neogfx::math
 
 neogfx::math::constants
 

Typedefs

typedef double neogfx::math::scalar
 
typedef double neogfx::math::angle
 
typedef basic_vector< double, 1 > neogfx::math::vector1
 
typedef basic_vector< double, 2 > neogfx::math::vector2
 
typedef basic_vector< double, 3 > neogfx::math::vector3
 
typedef basic_vector< double, 4 > neogfx::math::vector4
 
typedef vector1 neogfx::math::vec1
 
typedef vector2 neogfx::math::vec2
 
typedef vector3 neogfx::math::vec3
 
typedef vector4 neogfx::math::vec4
 
typedef vec1 neogfx::math::col_vec1
 
typedef vec2 neogfx::math::col_vec2
 
typedef vec3 neogfx::math::col_vec3
 
typedef vec4 neogfx::math::col_vec4
 
typedef basic_vector< double, 1, row_vector > neogfx::math::row_vec1
 
typedef basic_vector< double, 2, row_vector > neogfx::math::row_vec2
 
typedef basic_vector< double, 3, row_vector > neogfx::math::row_vec3
 
typedef basic_vector< double, 4, row_vector > neogfx::math::row_vec4
 
typedef std::optional< vector1 > neogfx::math::optional_vector1
 
typedef std::optional< vector2 > neogfx::math::optional_vector2
 
typedef std::optional< vector3 > neogfx::math::optional_vector3
 
typedef std::optional< vector4 > neogfx::math::optional_vector4
 
typedef std::optional< vec1 > neogfx::math::optional_vec1
 
typedef std::optional< vec2 > neogfx::math::optional_vec2
 
typedef std::optional< vec3 > neogfx::math::optional_vec3
 
typedef std::optional< vec4 > neogfx::math::optional_vec4
 
typedef std::optional< col_vec1 > neogfx::math::optional_col_vec1
 
typedef std::optional< col_vec2 > neogfx::math::optional_col_vec2
 
typedef std::optional< col_vec3 > neogfx::math::optional_col_vec3
 
typedef std::optional< col_vec4 > neogfx::math::optional_col_vec4
 
typedef std::optional< row_vec1 > neogfx::math::optional_row_vec1
 
typedef std::optional< row_vec2 > neogfx::math::optional_row_vec2
 
typedef std::optional< row_vec3 > neogfx::math::optional_row_vec3
 
typedef std::optional< row_vec4 > neogfx::math::optional_row_vec4
 
typedef std::vector< vec2 > neogfx::math::vec2_list
 
typedef std::vector< vec3 > neogfx::math::vec3_list
 
typedef std::optional< vec2_list > neogfx::math::optional_vec2_list
 
typedef std::optional< vec3_list > neogfx::math::optional_vec3_list
 
typedef vec2_list neogfx::math::vertices_2d
 
typedef vec3_list neogfx::math::vertices
 
typedef optional_vec2_list neogfx::math::optional_vertices_2d_t
 
typedef optional_vec3_list neogfx::math::optional_vertices_t
 
typedef basic_vector< float, 1 > neogfx::math::vector1f
 
typedef basic_vector< float, 2 > neogfx::math::vector2f
 
typedef basic_vector< float, 3 > neogfx::math::vector3f
 
typedef basic_vector< float, 4 > neogfx::math::vector4f
 
typedef vector1f neogfx::math::vec1f
 
typedef vector2f neogfx::math::vec2f
 
typedef vector3f neogfx::math::vec3f
 
typedef vector4f neogfx::math::vec4f
 
typedef basic_vector< int32_t, 1 > neogfx::math::vector1i32
 
typedef basic_vector< int32_t, 2 > neogfx::math::vector2i32
 
typedef basic_vector< int32_t, 3 > neogfx::math::vector3i32
 
typedef basic_vector< int32_t, 4 > neogfx::math::vector4i32
 
typedef vector1i32 neogfx::math::vec1i32
 
typedef vector2i32 neogfx::math::vec2i32
 
typedef vector3i32 neogfx::math::vec3i32
 
typedef vector4i32 neogfx::math::vec4i32
 
typedef basic_vector< uint32_t, 1 > neogfx::math::vector1u32
 
typedef basic_vector< uint32_t, 2 > neogfx::math::vector2u32
 
typedef basic_vector< uint32_t, 3 > neogfx::math::vector3u32
 
typedef basic_vector< uint32_t, 4 > neogfx::math::vector4u32
 
typedef vector1u32 neogfx::math::vec1u32
 
typedef vector2u32 neogfx::math::vec2u32
 
typedef vector3u32 neogfx::math::vec3u32
 
typedef vector4u32 neogfx::math::vec4u32
 
template<std::size_t VertexCount>
using neogfx::math::vec3_array = neolib::vecarray< vec3, VertexCount, VertexCount, neolib::check< neolib::vecarray_overflow >, std::allocator< vec3 > >
 
template<std::size_t VertexCount>
using neogfx::math::vec2_array = neolib::vecarray< vec2, VertexCount, VertexCount, neolib::check< neolib::vecarray_overflow >, std::allocator< vec2 > >
 
typedef std::array< vec3, 3 > neogfx::math::triangle
 
typedef std::array< vec3, 4 > neogfx::math::quad
 
typedef std::array< vec2, 3 > neogfx::math::triangle_2d
 
typedef std::array< vec2, 4 > neogfx::math::quad_2d
 
typedef basic_matrix< double, 1, 1 > neogfx::math::matrix11
 
typedef basic_matrix< double, 2, 2 > neogfx::math::matrix22
 
typedef basic_matrix< double, 2, 1 > neogfx::math::matrix21
 
typedef basic_matrix< double, 1, 2 > neogfx::math::matrix12
 
typedef basic_matrix< double, 3, 3 > neogfx::math::matrix33
 
typedef basic_matrix< double, 3, 1 > neogfx::math::matrix31
 
typedef basic_matrix< double, 3, 2 > neogfx::math::matrix32
 
typedef basic_matrix< double, 1, 3 > neogfx::math::matrix13
 
typedef basic_matrix< double, 2, 3 > neogfx::math::matrix23
 
typedef basic_matrix< double, 4, 4 > neogfx::math::matrix44
 
typedef basic_matrix< double, 4, 1 > neogfx::math::matrix41
 
typedef basic_matrix< double, 4, 2 > neogfx::math::matrix42
 
typedef basic_matrix< double, 4, 3 > neogfx::math::matrix43
 
typedef basic_matrix< double, 1, 4 > neogfx::math::matrix14
 
typedef basic_matrix< double, 2, 4 > neogfx::math::matrix24
 
typedef basic_matrix< double, 3, 4 > neogfx::math::matrix34
 
typedef matrix11 neogfx::math::matrix1
 
typedef matrix22 neogfx::math::matrix2
 
typedef matrix33 neogfx::math::matrix3
 
typedef matrix44 neogfx::math::matrix4
 
typedef matrix11 neogfx::math::mat11
 
typedef matrix22 neogfx::math::mat22
 
typedef matrix21 neogfx::math::mat21
 
typedef matrix12 neogfx::math::mat12
 
typedef matrix33 neogfx::math::mat33
 
typedef matrix31 neogfx::math::mat31
 
typedef matrix32 neogfx::math::mat32
 
typedef matrix13 neogfx::math::mat13
 
typedef matrix23 neogfx::math::mat23
 
typedef matrix44 neogfx::math::mat44
 
typedef matrix41 neogfx::math::mat41
 
typedef matrix42 neogfx::math::mat42
 
typedef matrix43 neogfx::math::mat43
 
typedef matrix14 neogfx::math::mat14
 
typedef matrix24 neogfx::math::mat24
 
typedef matrix34 neogfx::math::mat34
 
typedef mat11 neogfx::math::mat1
 
typedef mat22 neogfx::math::mat2
 
typedef mat33 neogfx::math::mat3
 
typedef mat44 neogfx::math::mat4
 
typedef std::optional< matrix11 > neogfx::math::optional_matrix11
 
typedef std::optional< matrix22 > neogfx::math::optional_matrix22
 
typedef std::optional< matrix21 > neogfx::math::optional_matrix21
 
typedef std::optional< matrix12 > neogfx::math::optional_matrix12
 
typedef std::optional< matrix33 > neogfx::math::optional_matrix33
 
typedef std::optional< matrix31 > neogfx::math::optional_matrix31
 
typedef std::optional< matrix32 > neogfx::math::optional_matrix32
 
typedef std::optional< matrix13 > neogfx::math::optional_matrix13
 
typedef std::optional< matrix23 > neogfx::math::optional_matrix23
 
typedef std::optional< matrix44 > neogfx::math::optional_matrix44
 
typedef std::optional< matrix41 > neogfx::math::optional_matrix41
 
typedef std::optional< matrix42 > neogfx::math::optional_matrix42
 
typedef std::optional< matrix43 > neogfx::math::optional_matrix43
 
typedef std::optional< matrix14 > neogfx::math::optional_matrix14
 
typedef std::optional< matrix24 > neogfx::math::optional_matrix24
 
typedef std::optional< matrix34 > neogfx::math::optional_matrix34
 
typedef std::optional< matrix11 > neogfx::math::optional_matrix1
 
typedef std::optional< matrix22 > neogfx::math::optional_matrix2
 
typedef std::optional< matrix33 > neogfx::math::optional_matrix3
 
typedef std::optional< matrix44 > neogfx::math::optional_matrix4
 
typedef std::optional< mat11 > neogfx::math::optional_mat11
 
typedef std::optional< mat22 > neogfx::math::optional_mat22
 
typedef std::optional< mat21 > neogfx::math::optional_mat21
 
typedef std::optional< mat12 > neogfx::math::optional_mat12
 
typedef std::optional< mat33 > neogfx::math::optional_mat33
 
typedef std::optional< mat31 > neogfx::math::optional_mat31
 
typedef std::optional< mat32 > neogfx::math::optional_mat32
 
typedef std::optional< mat13 > neogfx::math::optional_mat13
 
typedef std::optional< mat23 > neogfx::math::optional_mat23
 
typedef std::optional< mat44 > neogfx::math::optional_mat44
 
typedef std::optional< mat41 > neogfx::math::optional_mat41
 
typedef std::optional< mat42 > neogfx::math::optional_mat42
 
typedef std::optional< mat43 > neogfx::math::optional_mat43
 
typedef std::optional< mat14 > neogfx::math::optional_mat14
 
typedef std::optional< mat24 > neogfx::math::optional_mat24
 
typedef std::optional< mat34 > neogfx::math::optional_mat34
 
typedef std::optional< mat11 > neogfx::math::optional_mat1
 
typedef std::optional< mat22 > neogfx::math::optional_mat2
 
typedef std::optional< mat33 > neogfx::math::optional_mat3
 
typedef std::optional< mat44 > neogfx::math::optional_mat4
 
typedef basic_matrix< float, 1, 1 > neogfx::math::matrix11f
 
typedef basic_matrix< float, 2, 2 > neogfx::math::matrix22f
 
typedef basic_matrix< float, 2, 1 > neogfx::math::matrix21f
 
typedef basic_matrix< float, 1, 2 > neogfx::math::matrix12f
 
typedef basic_matrix< float, 3, 3 > neogfx::math::matrix33f
 
typedef basic_matrix< float, 3, 1 > neogfx::math::matrix31f
 
typedef basic_matrix< float, 3, 2 > neogfx::math::matrix32f
 
typedef basic_matrix< float, 1, 3 > neogfx::math::matrix13f
 
typedef basic_matrix< float, 2, 3 > neogfx::math::matrix23f
 
typedef basic_matrix< float, 4, 4 > neogfx::math::matrix44f
 
typedef basic_matrix< float, 4, 1 > neogfx::math::matrix41f
 
typedef basic_matrix< float, 4, 2 > neogfx::math::matrix42f
 
typedef basic_matrix< float, 4, 3 > neogfx::math::matrix43f
 
typedef basic_matrix< float, 1, 4 > neogfx::math::matrix14f
 
typedef basic_matrix< float, 2, 4 > neogfx::math::matrix24f
 
typedef basic_matrix< float, 3, 4 > neogfx::math::matrix34f
 
typedef matrix11f neogfx::math::mat11f
 
typedef matrix22f neogfx::math::mat22f
 
typedef matrix21f neogfx::math::mat21f
 
typedef matrix12f neogfx::math::mat12f
 
typedef matrix33f neogfx::math::mat33f
 
typedef matrix31f neogfx::math::mat31f
 
typedef matrix32f neogfx::math::mat32f
 
typedef matrix13f neogfx::math::mat13f
 
typedef matrix23f neogfx::math::mat23f
 
typedef matrix44f neogfx::math::mat44f
 
typedef matrix41f neogfx::math::mat41f
 
typedef matrix42f neogfx::math::mat42f
 
typedef matrix43f neogfx::math::mat43f
 
typedef matrix14f neogfx::math::mat14f
 
typedef matrix24f neogfx::math::mat24f
 
typedef matrix34f neogfx::math::mat34f
 
typedef matrix11f neogfx::math::mat1f
 
typedef matrix22f neogfx::math::mat2f
 
typedef matrix33f neogfx::math::mat3f
 
typedef matrix44f neogfx::math::mat4f
 
typedef std::optional< matrix11f > neogfx::math::optional_matrix11f
 
typedef std::optional< matrix22f > neogfx::math::optional_matrix22f
 
typedef std::optional< matrix21f > neogfx::math::optional_matrix21f
 
typedef std::optional< matrix12f > neogfx::math::optional_matrix12f
 
typedef std::optional< matrix33f > neogfx::math::optional_matrix33f
 
typedef std::optional< matrix31f > neogfx::math::optional_matrix31f
 
typedef std::optional< matrix32f > neogfx::math::optional_matrix32f
 
typedef std::optional< matrix13f > neogfx::math::optional_matrix13f
 
typedef std::optional< matrix23f > neogfx::math::optional_matrix23f
 
typedef std::optional< matrix44f > neogfx::math::optional_matrix44f
 
typedef std::optional< matrix41f > neogfx::math::optional_matrix41f
 
typedef std::optional< matrix42f > neogfx::math::optional_matrix42f
 
typedef std::optional< matrix43f > neogfx::math::optional_matrix43f
 
typedef std::optional< matrix14f > neogfx::math::optional_matrix14f
 
typedef std::optional< matrix24f > neogfx::math::optional_matrix24f
 
typedef std::optional< matrix34f > neogfx::math::optional_matrix34f
 
typedef std::optional< matrix11f > neogfx::math::optional_matrix1f
 
typedef std::optional< matrix22f > neogfx::math::optional_matrix2f
 
typedef std::optional< matrix33f > neogfx::math::optional_matrix3f
 
typedef std::optional< matrix44f > neogfx::math::optional_matrix4f
 
typedef std::optional< mat11f > neogfx::math::optional_mat11f
 
typedef std::optional< mat22f > neogfx::math::optional_mat22f
 
typedef std::optional< mat21f > neogfx::math::optional_mat21f
 
typedef std::optional< mat12f > neogfx::math::optional_mat12f
 
typedef std::optional< mat33f > neogfx::math::optional_mat33f
 
typedef std::optional< mat31f > neogfx::math::optional_mat31f
 
typedef std::optional< mat32f > neogfx::math::optional_mat32f
 
typedef std::optional< mat13f > neogfx::math::optional_mat13f
 
typedef std::optional< mat23f > neogfx::math::optional_mat23f
 
typedef std::optional< mat44f > neogfx::math::optional_mat44f
 
typedef std::optional< mat41f > neogfx::math::optional_mat41f
 
typedef std::optional< mat42f > neogfx::math::optional_mat42f
 
typedef std::optional< mat43f > neogfx::math::optional_mat43f
 
typedef std::optional< mat14f > neogfx::math::optional_mat14f
 
typedef std::optional< mat24f > neogfx::math::optional_mat24f
 
typedef std::optional< mat34f > neogfx::math::optional_mat34f
 
typedef std::optional< mat11f > neogfx::math::optional_mat1f
 
typedef std::optional< mat22f > neogfx::math::optional_mat2f
 
typedef std::optional< mat33f > neogfx::math::optional_mat3f
 
typedef std::optional< mat44f > neogfx::math::optional_mat4f
 
typedef std::optional< aabb > neogfx::math::optional_aabb
 
typedef std::optional< aabb_2d > neogfx::math::optional_aabb_2d
 

Functions

template<typename T , typename SFINAE = std::enable_if_t<std::is_scalar_v<T>, sfinae>>
neogfx::math::lerp (T aX1, T aX2, double aAmount)
 
angle neogfx::math::to_rad (angle aDegrees)
 
angle neogfx::math::to_deg (angle aRadians)
 
template<typename T , uint32_t Size, typename Type >
bool neogfx::math::operator< (const basic_vector< T, Size, Type > &aLhs, const basic_vector< T, Size, Type > &aRhs)
 
template<typename T , uint32_t Size, typename Type >
bool neogfx::math::operator<= (const basic_vector< T, Size, Type > &aLhs, const basic_vector< T, Size, Type > &aRhs)
 
template<typename T , uint32_t Size, typename Type >
bool neogfx::math::operator> (const basic_vector< T, Size, Type > &aLhs, const basic_vector< T, Size, Type > &aRhs)
 
template<typename T , uint32_t Size, typename Type >
bool neogfx::math::operator>= (const basic_vector< T, Size, Type > &aLhs, const basic_vector< T, Size, Type > &aRhs)
 
template<typename T , uint32_t Size, typename Type >
bool neogfx::math::operator== (const basic_vector< T, Size, Type > &aLhs, const basic_vector< T, Size, Type > &aRhs)
 
template<typename T , uint32_t Size, typename Type >
bool neogfx::math::operator!= (const basic_vector< T, Size, Type > &aLhs, const basic_vector< T, Size, Type > &aRhs)
 
template<typename T , uint32_t D, typename Type , bool IsScalar>
basic_vector< T, D, Type, IsScalar > neogfx::math::operator+ (const basic_vector< T, D, Type, IsScalar > &left, const basic_vector< T, D, Type, IsScalar > &right)
 
template<typename T , uint32_t D, typename Type , bool IsScalar>
basic_vector< T, D, Type, IsScalar > neogfx::math::operator- (const basic_vector< T, D, Type, IsScalar > &left, const basic_vector< T, D, Type, IsScalar > &right)
 
template<typename T , uint32_t D, typename Type , bool IsScalar>
basic_vector< T, D, Type, IsScalar > neogfx::math::operator+ (const basic_vector< T, D, Type, IsScalar > &left, const T &right)
 
template<typename T , uint32_t D, typename Type , bool IsScalar>
basic_vector< T, D, Type, IsScalar > neogfx::math::operator+ (const T &left, const basic_vector< T, D, Type, IsScalar > &right)
 
template<typename T , uint32_t D, typename Type , bool IsScalar>
basic_vector< T, D, Type, IsScalar > neogfx::math::operator- (const basic_vector< T, D, Type, IsScalar > &left, const T &right)
 
template<typename T , uint32_t D, typename Type , bool IsScalar>
basic_vector< T, D, Type, IsScalar > neogfx::math::operator- (const T &left, const basic_vector< T, D, Type, IsScalar > &right)
 
template<typename T , uint32_t D, typename Type , bool IsScalar>
basic_vector< T, D, Type, IsScalar > neogfx::math::operator* (const basic_vector< T, D, Type, IsScalar > &left, const T &right)
 
template<typename T , uint32_t D, typename Type , bool IsScalar>
basic_vector< T, D, Type, IsScalar > neogfx::math::operator* (const T &left, const basic_vector< T, D, Type, IsScalar > &right)
 
template<typename T , uint32_t D, typename Type , bool IsScalar>
basic_vector< T, D, Type, IsScalar > neogfx::math::operator/ (const basic_vector< T, D, Type, IsScalar > &left, const T &right)
 
template<typename T , uint32_t D, typename Type , bool IsScalar>
basic_vector< T, D, Type, IsScalar > neogfx::math::operator/ (const T &left, const basic_vector< T, D, Type, IsScalar > &right)
 
template<typename T , uint32_t D, typename Type , bool IsScalar>
basic_vector< T, D, Type, IsScalar > neogfx::math::operator% (const basic_vector< T, D, Type, IsScalar > &left, const T &right)
 
template<typename T , uint32_t D, bool IsScalar>
neogfx::math::operator* (const basic_vector< T, D, row_vector, IsScalar > &left, const basic_vector< T, D, column_vector, IsScalar > &right)
 
template<typename T , typename Type , bool IsScalar>
basic_vector< T, 3, Type, IsScalar > neogfx::math::operator+ (const basic_vector< T, 3, Type, IsScalar > &left, const basic_vector< T, 3, Type, IsScalar > &right)
 
template<typename T , typename Type , bool IsScalar>
basic_vector< T, 3, Type, IsScalar > neogfx::math::operator- (const basic_vector< T, 3, Type, IsScalar > &left, const basic_vector< T, 3, Type, IsScalar > &right)
 
template<typename T , typename Type , bool IsScalar>
basic_vector< T, 3, Type, IsScalar > neogfx::math::operator+ (const basic_vector< T, 3, Type, IsScalar > &left, const T &right)
 
template<typename T , typename Type , bool IsScalar>
basic_vector< T, 3, Type, IsScalar > neogfx::math::operator+ (const T &left, const basic_vector< T, 3, Type, IsScalar > &right)
 
template<typename T , typename Type , bool IsScalar>
basic_vector< T, 3, Type, IsScalar > neogfx::math::operator- (const basic_vector< T, 3, Type, IsScalar > &left, const T &right)
 
template<typename T , typename Type , bool IsScalar>
basic_vector< T, 3, Type, IsScalar > neogfx::math::operator- (const T &left, const basic_vector< T, 3, Type, IsScalar > &right)
 
template<typename T , typename Type , bool IsScalar>
basic_vector< T, 3, Type, IsScalar > neogfx::math::operator* (const basic_vector< T, 3, Type, IsScalar > &left, const T &right)
 
template<typename T , typename Type , bool IsScalar>
basic_vector< T, 3, Type, IsScalar > neogfx::math::operator* (const T &left, const basic_vector< T, 3, Type, IsScalar > &right)
 
template<typename T , typename Type , bool IsScalar>
basic_vector< T, 3, Type, IsScalar > neogfx::math::operator/ (const basic_vector< T, 3, Type, IsScalar > &left, const T &right)
 
template<typename T , typename Type , bool IsScalar>
basic_vector< T, 3, Type, IsScalar > neogfx::math::operator% (const basic_vector< T, 3, Type, IsScalar > &left, const T &right)
 
template<typename T , bool IsScalar>
neogfx::math::operator* (const basic_vector< T, 3, row_vector, IsScalar > &left, const basic_vector< T, 3, column_vector, IsScalar > &right)
 
template<typename T , typename Type , bool IsScalar>
basic_vector< T, 3, Type, IsScalar > neogfx::math::midpoint (const basic_vector< T, 3, Type, IsScalar > &left, const basic_vector< T, 3, Type, IsScalar > &right)
 
template<typename T , uint32_t Size, typename Type , bool IsScalar>
basic_vector< T, Size, Type, IsScalar > neogfx::math::lerp (const basic_vector< T, Size, Type, IsScalar > &aV1, const basic_vector< T, Size, Type, IsScalar > &aV2, double aAmount)
 
template<typename T , uint32_t Rows, uint32_t Columns>
basic_matrix< T, Rows, Columns > neogfx::math::operator+ (const basic_matrix< T, Rows, Columns > &left, typename basic_matrix< T, Rows, Columns >::value_type right)
 
template<typename T , uint32_t Rows, uint32_t Columns>
basic_matrix< T, Rows, Columns > neogfx::math::operator- (const basic_matrix< T, Rows, Columns > &left, typename basic_matrix< T, Rows, Columns >::value_type right)
 
template<typename T , uint32_t Rows, uint32_t Columns>
basic_matrix< T, Rows, Columns > neogfx::math::operator* (const basic_matrix< T, Rows, Columns > &left, typename basic_matrix< T, Rows, Columns >::value_type right)
 
template<typename T , uint32_t Rows, uint32_t Columns>
basic_matrix< T, Rows, Columns > neogfx::math::operator/ (const basic_matrix< T, Rows, Columns > &left, typename basic_matrix< T, Rows, Columns >::value_type right)
 
template<typename T , uint32_t Rows, uint32_t Columns>
basic_matrix< T, Rows, Columns > neogfx::math::operator+ (scalar left, const basic_matrix< T, Rows, Columns > &right)
 
template<typename T , uint32_t Rows, uint32_t Columns>
basic_matrix< T, Rows, Columns > neogfx::math::operator- (scalar left, const basic_matrix< T, Rows, Columns > &right)
 
template<typename T , uint32_t Rows, uint32_t Columns>
basic_matrix< T, Rows, Columns > neogfx::math::operator* (scalar left, const basic_matrix< T, Rows, Columns > &right)
 
template<typename T , uint32_t Rows, uint32_t Columns>
basic_matrix< T, Rows, Columns > neogfx::math::operator+ (const basic_matrix< T, Rows, Columns > &left, const basic_matrix< T, Rows, Columns > &right)
 
template<typename T , uint32_t Rows, uint32_t Columns>
basic_matrix< T, Rows, Columns > neogfx::math::operator- (const basic_matrix< T, Rows, Columns > &left, const basic_matrix< T, Rows, Columns > &right)
 
template<typename T , uint32_t D1, uint32_t D2>
basic_matrix< T, D1, D1 > neogfx::math::operator* (const basic_matrix< T, D1, D2 > &left, const basic_matrix< T, D2, D1 > &right)
 
template<typename T , uint32_t D, bool IsScalar>
basic_vector< T, D, column_vector, IsScalar > neogfx::math::operator* (const basic_matrix< T, D, D > &left, const basic_vector< T, D, column_vector, IsScalar > &right)
 
template<typename T , uint32_t D, bool IsScalar>
basic_vector< T, D, row_vector, IsScalar > neogfx::math::operator* (const basic_vector< T, D, row_vector, IsScalar > &left, const basic_matrix< T, D, D > &right)
 
template<typename T , uint32_t D, bool IsScalar>
basic_matrix< T, D, D > neogfx::math::operator* (const basic_vector< T, D, column_vector, IsScalar > &left, const basic_vector< T, D, row_vector, IsScalar > &right)
 
template<typename T , uint32_t D>
basic_matrix< T, D, D > neogfx::math::without_translation (const basic_matrix< T, D, D > &matrix)
 
template<typename Elem , typename Traits , typename T , uint32_t Size, typename Type , bool IsScalar>
std::basic_ostream< Elem, Traits > & neogfx::math::operator<< (std::basic_ostream< Elem, Traits > &aStream, const basic_vector< T, Size, Type, IsScalar > &aVector)
 
template<typename Elem , typename Traits , typename T , uint32_t Rows, uint32_t Columns>
std::basic_ostream< Elem, Traits > & neogfx::math::operator<< (std::basic_ostream< Elem, Traits > &aStream, const basic_matrix< T, Rows, Columns > &aMatrix)
 
template<typename Elem , typename Traits , typename T , uint32_t Rows, uint32_t Columns>
std::basic_ostream< Elem, Traits > & neogfx::math::operator<< (std::basic_ostream< Elem, Traits > &aStream, const std::optional< basic_matrix< T, Rows, Columns >> &aMatrix)
 
bool neogfx::math::operator== (const aabb &left, const aabb &right)
 
bool neogfx::math::operator!= (const aabb &left, const aabb &right)
 
bool neogfx::math::operator< (const aabb &left, const aabb &right)
 
aabb neogfx::math::aabb_union (const aabb &left, const aabb &right)
 
scalar neogfx::math::aabb_volume (const aabb &a)
 
bool neogfx::math::aabb_contains (const aabb &outer, const aabb &inner)
 
bool neogfx::math::aabb_contains (const aabb &outer, const vec3 &point)
 
bool neogfx::math::aabb_intersects (const aabb &first, const aabb &second)
 
aabb_2d neogfx::math::to_aabb_2d (const vertices &vertices)
 
bool neogfx::math::operator== (const aabb_2d &left, const aabb_2d &right)
 
bool neogfx::math::operator!= (const aabb_2d &left, const aabb_2d &right)
 
bool neogfx::math::operator< (const aabb_2d &left, const aabb_2d &right)
 
aabb_2d neogfx::math::aabb_union (const aabb_2d &left, const aabb_2d &right)
 
scalar neogfx::math::aabb_volume (const aabb_2d &a)
 
bool neogfx::math::aabb_contains (const aabb_2d &outer, const aabb_2d &inner)
 
bool neogfx::math::aabb_contains (const aabb_2d &outer, const vec2 &point)
 
bool neogfx::math::aabb_intersects (const aabb_2d &first, const aabb_2d &second)
 
template<typename T , bool IsScalar>
basic_vector< T, 3, column_vector, IsScalar > neogfx::math::operator* (const basic_matrix< T, 4, 4 > &left, const basic_vector< T, 3, column_vector, IsScalar > &right)
 
template<typename T , bool IsScalar>
std::vector< basic_vector< T, 3, column_vector, IsScalar > > neogfx::math::operator* (const basic_matrix< T, 4, 4 > &left, const std::vector< basic_vector< T, 3, column_vector, IsScalar >> &right)
 
mat33 neogfx::math::rotation_matrix (const vec3 &axis, scalar angle, scalar epsilon=0.00001)
 
mat33 neogfx::math::rotation_matrix (const vec3 &vectorA, const vec3 &vectorB, scalar epsilon=0.00001)
 
mat33 neogfx::math::rotation_matrix (const vec3 &angles)
 
mat44 neogfx::math::affine_rotation_matrix (const vec3 &angles)
 

Variables

template<typename T >
constexpr T neogfx::math::constants::zero = static_cast<T>(0.0)
 
template<typename T >
constexpr T neogfx::math::constants::one = static_cast<T>(1.0)
 
template<typename T >
constexpr T neogfx::math::constants::two = static_cast<T>(2.0)