Merge branch '0.9.3' of ssh://ogl-math.git.sourceforge.net/gitroot/ogl-math/ogl-math into 0.9.3
This commit is contained in:
@@ -38,7 +38,7 @@
|
||||
namespace glm{
|
||||
namespace detail
|
||||
{
|
||||
class thalf;
|
||||
class half;
|
||||
|
||||
#if(defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) // C99 detected, 64 bit types available
|
||||
typedef int64_t sint64;
|
||||
@@ -242,7 +242,7 @@ namespace detail
|
||||
}; \
|
||||
}
|
||||
|
||||
GLM_DETAIL_IS_FLOAT(detail::thalf);
|
||||
GLM_DETAIL_IS_FLOAT(detail::half);
|
||||
GLM_DETAIL_IS_FLOAT(float);
|
||||
GLM_DETAIL_IS_FLOAT(double);
|
||||
GLM_DETAIL_IS_FLOAT(long double);
|
||||
@@ -346,7 +346,7 @@ namespace detail
|
||||
typedef unsigned int uint32;
|
||||
typedef detail::uint64 uint64;
|
||||
|
||||
typedef detail::thalf float16;
|
||||
typedef detail::half float16;
|
||||
typedef float float32;
|
||||
typedef double float64;
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
/// @date 2008-03-08 / 2010-01-26
|
||||
/// @author Christophe Riccio
|
||||
///
|
||||
/// @see - <a href="http://www.opengl.org/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.2</a>
|
||||
/// @see <a href="http://www.opengl.org/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.2</a>
|
||||
///
|
||||
/// @defgroup core_func_common Common functions
|
||||
/// @ingroup core
|
||||
@@ -357,10 +357,10 @@ namespace glm
|
||||
/// @tparam genType Single-precision floating-point scalar or vector types.
|
||||
/// @tparam genIType Signed integer scalar or vector types.
|
||||
///
|
||||
/// @see - <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/intBitsToFloat.xml">GLSL intBitsToFloat man page</a>
|
||||
/// @see - <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3</a>
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/intBitsToFloat.xml">GLSL intBitsToFloat man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3</a>
|
||||
///
|
||||
/// @todo - Clarify this declaration, we don't need to actually specify the return type
|
||||
/// @todo Clarify this declaration, we don't need to actually specify the return type
|
||||
template <typename genType, typename genIType>
|
||||
genType intBitsToFloat(genIType const & value);
|
||||
|
||||
|
||||
@@ -98,9 +98,9 @@ namespace detail
|
||||
|
||||
// floor
|
||||
template <>
|
||||
GLM_FUNC_QUALIFIER detail::thalf floor<detail::thalf>(detail::thalf const & x)
|
||||
GLM_FUNC_QUALIFIER detail::half floor<detail::half>(detail::half const & x)
|
||||
{
|
||||
return detail::thalf(::std::floor(float(x)));
|
||||
return detail::half(::std::floor(float(x)));
|
||||
}
|
||||
|
||||
template <typename genType>
|
||||
@@ -146,6 +146,7 @@ namespace detail
|
||||
return genType(int(x + genType(int(x) % 2)));
|
||||
}
|
||||
*/
|
||||
|
||||
// roundEven
|
||||
template <typename genType>
|
||||
GLM_FUNC_QUALIFIER genType roundEven(genType const & x)
|
||||
@@ -157,11 +158,25 @@ namespace detail
|
||||
genType FractionalPart = fract(x);
|
||||
|
||||
if(FractionalPart > genType(0.5) || FractionalPart < genType(0.5))
|
||||
{
|
||||
return round(x);
|
||||
else if(!(Integer % 2))
|
||||
}
|
||||
else if((Integer % 2) == 0)
|
||||
{
|
||||
return IntegerPart;
|
||||
}
|
||||
else if(x <= genType(0)) // Work around...
|
||||
{
|
||||
return IntegerPart - 1;
|
||||
}
|
||||
else
|
||||
return IntegerPart + mix(genType(-1), genType(1), x >= genType(0));
|
||||
{
|
||||
return IntegerPart + 1;
|
||||
}
|
||||
//else // Bug on MinGW 4.5.2
|
||||
//{
|
||||
// return mix(IntegerPart + genType(-1), IntegerPart + genType(1), x <= genType(0));
|
||||
//}
|
||||
}
|
||||
|
||||
VECTORIZE_VEC(roundEven)
|
||||
@@ -521,7 +536,7 @@ namespace detail
|
||||
(
|
||||
genType const & x,
|
||||
genType const & y,
|
||||
bool a
|
||||
bool const & a
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(detail::type<genType>::is_float, "'mix' only accept floating-point inputs");
|
||||
|
||||
@@ -164,6 +164,8 @@
|
||||
#define GLM_COMPILER_CUDA31 0x10000020
|
||||
#define GLM_COMPILER_CUDA32 0x10000030
|
||||
#define GLM_COMPILER_CUDA40 0x10000040
|
||||
#define GLM_COMPILER_CUDA41 0x10000050
|
||||
#define GLM_COMPILER_CUDA42 0x10000060
|
||||
|
||||
// Clang
|
||||
#define GLM_COMPILER_CLANG 0x20000000
|
||||
@@ -171,17 +173,53 @@
|
||||
#define GLM_COMPILER_CLANG27 0x20000020
|
||||
#define GLM_COMPILER_CLANG28 0x20000030
|
||||
#define GLM_COMPILER_CLANG29 0x20000040
|
||||
#define GLM_COMPILER_CLANG30 0x20000050
|
||||
#define GLM_COMPILER_CLANG31 0x20000060
|
||||
#define GLM_COMPILER_CLANG32 0x20000070
|
||||
#define GLM_COMPILER_CLANG33 0x20000080
|
||||
|
||||
// LLVM GCC
|
||||
#define GLM_COMPILER_LLVM_GCC 0x40000000
|
||||
|
||||
// Intel
|
||||
#define GLM_COMPILER_INTEL 0x80000000
|
||||
#define GLM_COMPILER_INTEL9 0x80000010
|
||||
#define GLM_COMPILER_INTEL10_0 0x80000020
|
||||
#define GLM_COMPILER_INTEL10_1 0x80000030
|
||||
#define GLM_COMPILER_INTEL11_0 0x80000040
|
||||
#define GLM_COMPILER_INTEL11_1 0x80000050
|
||||
#define GLM_COMPILER_INTEL12_0 0x80000060
|
||||
#define GLM_COMPILER_INTEL12_1 0x80000070
|
||||
#define GLM_COMPILER_INTEL13_0 0x80000080
|
||||
|
||||
// Build model
|
||||
#define GLM_MODEL_32 0x00000010
|
||||
#define GLM_MODEL_64 0x00000020
|
||||
|
||||
// Force generic C++ compiler
|
||||
#ifdef GLM_FORCE_COMPILER_UNKNOWN
|
||||
# define GLM_COMPILER GLM_COMPILER_UNKNOWN
|
||||
# define GLM_COMPILER GLM_COMPILER_UNKNOWN
|
||||
|
||||
#elif defined(__INTEL_COMPILER)
|
||||
# if __INTEL_COMPILER == 900
|
||||
# define GLM_COMPILER GLM_COMPILER_INTEL9
|
||||
# elif __INTEL_COMPILER == 1000
|
||||
# define GLM_COMPILER GLM_COMPILER_INTEL10_0
|
||||
# elif __INTEL_COMPILER == 1010
|
||||
# define GLM_COMPILER GLM_COMPILER_INTEL10_1
|
||||
# elif __INTEL_COMPILER == 1100
|
||||
# define GLM_COMPILER GLM_COMPILER_INTEL11_0
|
||||
# elif __INTEL_COMPILER == 1110
|
||||
# define GLM_COMPILER GLM_COMPILER_INTEL11_1
|
||||
# elif __INTEL_COMPILER == 1200
|
||||
# define GLM_COMPILER GLM_COMPILER_INTEL12_0
|
||||
# elif __INTEL_COMPILER == 1210
|
||||
# define GLM_COMPILER GLM_COMPILER_INTEL12_1
|
||||
# elif __INTEL_COMPILER == 1300
|
||||
# define GLM_COMPILER GLM_COMPILER_INTEL13_0
|
||||
# else
|
||||
# define GLM_COMPILER GLM_COMPILER_INTEL
|
||||
# endif
|
||||
|
||||
// CUDA
|
||||
#elif defined(__CUDACC__)
|
||||
@@ -197,6 +235,10 @@
|
||||
# define GLM_COMPILER GLM_COMPILER_CUDA32
|
||||
# elif CUDA_VERSION == 4000
|
||||
# define GLM_COMPILER GLM_COMPILER_CUDA40
|
||||
# elif CUDA_VERSION == 4010
|
||||
# define GLM_COMPILER GLM_COMPILER_CUDA41
|
||||
# elif CUDA_VERSION == 4020
|
||||
# define GLM_COMPILER GLM_COMPILER_CUDA42
|
||||
# else
|
||||
# define GLM_COMPILER GLM_COMPILER_CUDA
|
||||
# endif
|
||||
@@ -228,7 +270,29 @@
|
||||
# define GLM_COMPILER GLM_COMPILER_VC
|
||||
# endif//_MSC_VER
|
||||
|
||||
// G++
|
||||
// Clang
|
||||
#elif defined(__clang__)
|
||||
# if(CLANG_VERSION_MAJOR == 2) && (CLANG_VERSION_MINOR == 6)
|
||||
# define GLM_COMPILER GLM_COMPILER_CLANG26
|
||||
# elif(CLANG_VERSION_MAJOR == 2) && (CLANG_VERSION_MINOR == 7)
|
||||
# define GLM_COMPILER GLM_COMPILER_CLANG27
|
||||
# elif(CLANG_VERSION_MAJOR == 2) && (CLANG_VERSION_MINOR == 8)
|
||||
# define GLM_COMPILER GLM_COMPILER_CLANG28
|
||||
# elif(CLANG_VERSION_MAJOR == 2) && (CLANG_VERSION_MINOR == 9)
|
||||
# define GLM_COMPILER GLM_COMPILER_CLANG29
|
||||
# elif(CLANG_VERSION_MAJOR == 3) && (CLANG_VERSION_MINOR == 0)
|
||||
# define GLM_COMPILER GLM_COMPILER_CLANG30
|
||||
# elif(CLANG_VERSION_MAJOR == 3) && (CLANG_VERSION_MINOR == 1)
|
||||
# define GLM_COMPILER GLM_COMPILER_CLANG31
|
||||
# elif(CLANG_VERSION_MAJOR == 3) && (CLANG_VERSION_MINOR == 2)
|
||||
# define GLM_COMPILER GLM_COMPILER_CLANG32
|
||||
# elif(CLANG_VERSION_MAJOR == 3) && (CLANG_VERSION_MINOR == 3)
|
||||
# define GLM_COMPILER GLM_COMPILER_CLANG33
|
||||
# else
|
||||
# define GLM_COMPILER GLM_COMPILER_CLANG
|
||||
# endif
|
||||
|
||||
// G++
|
||||
#elif defined(__GNUC__)// || defined(__llvm__) || defined(__clang__)
|
||||
# if defined (__llvm__)
|
||||
# define GLM_COMPILER_GCC_EXTRA GLM_COMPILER_GCC_LLVM
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
namespace glm
|
||||
{
|
||||
#ifdef GLM_USE_HALF_SCALAR
|
||||
typedef detail::thalf lowp_float_t;
|
||||
typedef detail::half lowp_float_t;
|
||||
#else//GLM_USE_HALF_SCALAR
|
||||
typedef float lowp_float_t;
|
||||
#endif//GLM_USE_HALF_SCALAR
|
||||
|
||||
@@ -41,28 +41,28 @@ namespace detail
|
||||
|
||||
/// 16-bit floating point type.
|
||||
/// @ingroup gtc_half_float
|
||||
class thalf
|
||||
class half
|
||||
{
|
||||
public:
|
||||
// Constructors
|
||||
GLM_FUNC_DECL thalf();
|
||||
GLM_FUNC_DECL thalf(thalf const & s);
|
||||
GLM_FUNC_DECL half();
|
||||
GLM_FUNC_DECL half(half const & s);
|
||||
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL explicit thalf(U const & s);
|
||||
GLM_FUNC_DECL explicit half(U const & s);
|
||||
|
||||
// Cast
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL operator U() const;
|
||||
|
||||
// Unary updatable operators
|
||||
GLM_FUNC_DECL thalf& operator= (thalf const & s);
|
||||
GLM_FUNC_DECL thalf& operator+=(thalf const & s);
|
||||
GLM_FUNC_DECL thalf& operator-=(thalf const & s);
|
||||
GLM_FUNC_DECL thalf& operator*=(thalf const & s);
|
||||
GLM_FUNC_DECL thalf& operator/=(thalf const & s);
|
||||
GLM_FUNC_DECL thalf& operator++();
|
||||
GLM_FUNC_DECL thalf& operator--();
|
||||
GLM_FUNC_DECL half& operator= (half const & s);
|
||||
GLM_FUNC_DECL half& operator+=(half const & s);
|
||||
GLM_FUNC_DECL half& operator-=(half const & s);
|
||||
GLM_FUNC_DECL half& operator*=(half const & s);
|
||||
GLM_FUNC_DECL half& operator/=(half const & s);
|
||||
GLM_FUNC_DECL half& operator++();
|
||||
GLM_FUNC_DECL half& operator--();
|
||||
|
||||
GLM_FUNC_DECL float toFloat() const{return toFloat32(data);}
|
||||
|
||||
@@ -72,44 +72,44 @@ namespace detail
|
||||
hdata data;
|
||||
};
|
||||
|
||||
thalf operator+ (thalf const & s1, thalf const & s2);
|
||||
half operator+ (half const & s1, half const & s2);
|
||||
|
||||
thalf operator- (thalf const & s1, thalf const & s2);
|
||||
half operator- (half const & s1, half const & s2);
|
||||
|
||||
thalf operator* (thalf const & s1, thalf const & s2);
|
||||
half operator* (half const & s1, half const & s2);
|
||||
|
||||
thalf operator/ (thalf const & s1, thalf const & s2);
|
||||
half operator/ (half const & s1, half const & s2);
|
||||
|
||||
// Unary constant operators
|
||||
thalf operator- (thalf const & s);
|
||||
half operator- (half const & s);
|
||||
|
||||
thalf operator-- (thalf const & s, int);
|
||||
half operator-- (half const & s, int);
|
||||
|
||||
thalf operator++ (thalf const & s, int);
|
||||
half operator++ (half const & s, int);
|
||||
|
||||
bool operator==(
|
||||
detail::thalf const & x,
|
||||
detail::thalf const & y);
|
||||
detail::half const & x,
|
||||
detail::half const & y);
|
||||
|
||||
bool operator!=(
|
||||
detail::thalf const & x,
|
||||
detail::thalf const & y);
|
||||
detail::half const & x,
|
||||
detail::half const & y);
|
||||
|
||||
bool operator<(
|
||||
detail::thalf const & x,
|
||||
detail::thalf const & y);
|
||||
detail::half const & x,
|
||||
detail::half const & y);
|
||||
|
||||
bool operator<=(
|
||||
detail::thalf const & x,
|
||||
detail::thalf const & y);
|
||||
detail::half const & x,
|
||||
detail::half const & y);
|
||||
|
||||
bool operator>(
|
||||
detail::thalf const & x,
|
||||
detail::thalf const & y);
|
||||
detail::half const & x,
|
||||
detail::half const & y);
|
||||
|
||||
bool operator>=(
|
||||
detail::thalf const & x,
|
||||
detail::thalf const & y);
|
||||
detail::half const & x,
|
||||
detail::half const & y);
|
||||
|
||||
}//namespace detail
|
||||
}//namespace glm
|
||||
|
||||
@@ -256,64 +256,64 @@ namespace detail
|
||||
}
|
||||
}
|
||||
|
||||
GLM_FUNC_QUALIFIER thalf::thalf() :
|
||||
GLM_FUNC_QUALIFIER half::half() :
|
||||
data(0)
|
||||
{}
|
||||
|
||||
GLM_FUNC_QUALIFIER thalf::thalf(thalf const & s) :
|
||||
GLM_FUNC_QUALIFIER half::half(half const & s) :
|
||||
data(s.data)
|
||||
{}
|
||||
|
||||
template <typename U>
|
||||
GLM_FUNC_QUALIFIER thalf::thalf(U const & s) :
|
||||
GLM_FUNC_QUALIFIER half::half(U const & s) :
|
||||
data(toFloat16(float(s)))
|
||||
{}
|
||||
|
||||
template <typename U>
|
||||
GLM_FUNC_QUALIFIER thalf::operator U() const
|
||||
GLM_FUNC_QUALIFIER half::operator U() const
|
||||
{
|
||||
return static_cast<U>(toFloat32(this->data));
|
||||
}
|
||||
|
||||
// Unary updatable operators
|
||||
GLM_FUNC_QUALIFIER thalf& thalf::operator= (thalf const & s)
|
||||
GLM_FUNC_QUALIFIER half& half::operator= (half const & s)
|
||||
{
|
||||
data = s.data;
|
||||
return *this;
|
||||
}
|
||||
|
||||
GLM_FUNC_QUALIFIER thalf& thalf::operator+=(thalf const & s)
|
||||
GLM_FUNC_QUALIFIER half& half::operator+=(half const & s)
|
||||
{
|
||||
data = toFloat16(toFloat32(data) + toFloat32(s.data));
|
||||
return *this;
|
||||
}
|
||||
|
||||
GLM_FUNC_QUALIFIER thalf& thalf::operator-=(thalf const & s)
|
||||
GLM_FUNC_QUALIFIER half& half::operator-=(half const & s)
|
||||
{
|
||||
data = toFloat16(toFloat32(data) - toFloat32(s.data));
|
||||
return *this;
|
||||
}
|
||||
|
||||
GLM_FUNC_QUALIFIER thalf& thalf::operator*=(thalf const & s)
|
||||
GLM_FUNC_QUALIFIER half& half::operator*=(half const & s)
|
||||
{
|
||||
data = toFloat16(toFloat32(data) * toFloat32(s.data));
|
||||
return *this;
|
||||
}
|
||||
|
||||
GLM_FUNC_QUALIFIER thalf& thalf::operator/=(thalf const & s)
|
||||
GLM_FUNC_QUALIFIER half& half::operator/=(half const & s)
|
||||
{
|
||||
data = toFloat16(toFloat32(data) / toFloat32(s.data));
|
||||
return *this;
|
||||
}
|
||||
|
||||
GLM_FUNC_QUALIFIER thalf& thalf::operator++()
|
||||
GLM_FUNC_QUALIFIER half& half::operator++()
|
||||
{
|
||||
float Casted = toFloat32(data);
|
||||
this->data = toFloat16(++Casted);
|
||||
return *this;
|
||||
}
|
||||
|
||||
GLM_FUNC_QUALIFIER thalf& thalf::operator--()
|
||||
GLM_FUNC_QUALIFIER half& half::operator--()
|
||||
{
|
||||
float Casted = toFloat32(data);
|
||||
this->data = toFloat16(--Casted);
|
||||
@@ -323,46 +323,46 @@ namespace detail
|
||||
//////////////////////////////////////
|
||||
// Binary arithmetic operators
|
||||
|
||||
GLM_FUNC_QUALIFIER detail::thalf operator+ (detail::thalf const & s1, detail::thalf const & s2)
|
||||
GLM_FUNC_QUALIFIER detail::half operator+ (detail::half const & s1, detail::half const & s2)
|
||||
{
|
||||
return detail::thalf(float(s1) + float(s2));
|
||||
return detail::half(float(s1) + float(s2));
|
||||
}
|
||||
|
||||
GLM_FUNC_QUALIFIER detail::thalf operator- (detail::thalf const & s1, detail::thalf const & s2)
|
||||
GLM_FUNC_QUALIFIER detail::half operator- (detail::half const & s1, detail::half const & s2)
|
||||
{
|
||||
return detail::thalf(float(s1) - float(s2));
|
||||
return detail::half(float(s1) - float(s2));
|
||||
}
|
||||
|
||||
GLM_FUNC_QUALIFIER detail::thalf operator* (detail::thalf const & s1, detail::thalf const & s2)
|
||||
GLM_FUNC_QUALIFIER detail::half operator* (detail::half const & s1, detail::half const & s2)
|
||||
{
|
||||
return detail::thalf(float(s1) * float(s2));
|
||||
return detail::half(float(s1) * float(s2));
|
||||
}
|
||||
|
||||
GLM_FUNC_QUALIFIER detail::thalf operator/ (detail::thalf const & s1, detail::thalf const & s2)
|
||||
GLM_FUNC_QUALIFIER detail::half operator/ (detail::half const & s1, detail::half const & s2)
|
||||
{
|
||||
return detail::thalf(float(s1) / float(s2));
|
||||
return detail::half(float(s1) / float(s2));
|
||||
}
|
||||
|
||||
// Unary constant operators
|
||||
GLM_FUNC_QUALIFIER detail::thalf operator- (detail::thalf const & s)
|
||||
GLM_FUNC_QUALIFIER detail::half operator- (detail::half const & s)
|
||||
{
|
||||
return detail::thalf(-float(s));
|
||||
return detail::half(-float(s));
|
||||
}
|
||||
|
||||
GLM_FUNC_QUALIFIER detail::thalf operator-- (detail::thalf const & s, int)
|
||||
GLM_FUNC_QUALIFIER detail::half operator-- (detail::half const & s, int)
|
||||
{
|
||||
return detail::thalf(float(s) - 1.0f);
|
||||
return detail::half(float(s) - 1.0f);
|
||||
}
|
||||
|
||||
GLM_FUNC_QUALIFIER detail::thalf operator++ (detail::thalf const & s, int)
|
||||
GLM_FUNC_QUALIFIER detail::half operator++ (detail::half const & s, int)
|
||||
{
|
||||
return detail::thalf(float(s) + 1.0f);
|
||||
return detail::half(float(s) + 1.0f);
|
||||
}
|
||||
|
||||
GLM_FUNC_QUALIFIER bool operator==
|
||||
(
|
||||
detail::thalf const & x,
|
||||
detail::thalf const & y
|
||||
detail::half const & x,
|
||||
detail::half const & y
|
||||
)
|
||||
{
|
||||
return x._data() == y._data();
|
||||
@@ -370,8 +370,8 @@ namespace detail
|
||||
|
||||
GLM_FUNC_QUALIFIER bool operator!=
|
||||
(
|
||||
detail::thalf const & x,
|
||||
detail::thalf const & y
|
||||
detail::half const & x,
|
||||
detail::half const & y
|
||||
)
|
||||
{
|
||||
return x._data() != y._data();
|
||||
@@ -379,8 +379,8 @@ namespace detail
|
||||
|
||||
GLM_FUNC_QUALIFIER bool operator<
|
||||
(
|
||||
detail::thalf const & x,
|
||||
detail::thalf const & y
|
||||
detail::half const & x,
|
||||
detail::half const & y
|
||||
)
|
||||
{
|
||||
return float(x) < float(y);
|
||||
@@ -388,8 +388,8 @@ namespace detail
|
||||
|
||||
GLM_FUNC_QUALIFIER bool operator<=
|
||||
(
|
||||
detail::thalf const & x,
|
||||
detail::thalf const & y
|
||||
detail::half const & x,
|
||||
detail::half const & y
|
||||
)
|
||||
{
|
||||
return float(x) <= float(y);
|
||||
@@ -397,8 +397,8 @@ namespace detail
|
||||
|
||||
GLM_FUNC_QUALIFIER bool operator>
|
||||
(
|
||||
detail::thalf const & x,
|
||||
detail::thalf const & y
|
||||
detail::half const & x,
|
||||
detail::half const & y
|
||||
)
|
||||
{
|
||||
return float(x) > float(y);
|
||||
@@ -406,8 +406,8 @@ namespace detail
|
||||
|
||||
GLM_FUNC_QUALIFIER bool operator>=
|
||||
(
|
||||
detail::thalf const & x,
|
||||
detail::thalf const & y
|
||||
detail::half const & x,
|
||||
detail::half const & y
|
||||
)
|
||||
{
|
||||
return float(x) >= float(y);
|
||||
|
||||
@@ -84,6 +84,7 @@
|
||||
#include <climits>
|
||||
#include <cfloat>
|
||||
#include <limits>
|
||||
#include <cstdio>
|
||||
//#include <type_traits>
|
||||
#include "core/setup.hpp"
|
||||
|
||||
|
||||
@@ -49,49 +49,49 @@ namespace detail
|
||||
{
|
||||
#if(!GLM_SUPPORT_ANONYMOUS_UNION_OF_STRUCTURE())
|
||||
template <>
|
||||
struct tvec2<thalf>
|
||||
struct tvec2<half>
|
||||
{
|
||||
enum ctor{null};
|
||||
typedef thalf value_type;
|
||||
typedef half value_type;
|
||||
typedef std::size_t size_type;
|
||||
|
||||
GLM_FUNC_DECL size_type length() const;
|
||||
static GLM_FUNC_DECL size_type value_size();
|
||||
|
||||
typedef tvec2<thalf> type;
|
||||
typedef tvec2<half> type;
|
||||
typedef tvec2<bool> bool_type;
|
||||
|
||||
//////////////////////////////////////
|
||||
// Data
|
||||
|
||||
thalf x, y;
|
||||
half x, y;
|
||||
|
||||
//////////////////////////////////////
|
||||
// Accesses
|
||||
|
||||
thalf & operator[](size_type i);
|
||||
thalf const & operator[](size_type i) const;
|
||||
half & operator[](size_type i);
|
||||
half const & operator[](size_type i) const;
|
||||
|
||||
//////////////////////////////////////
|
||||
// Implicit basic constructors
|
||||
|
||||
tvec2();
|
||||
tvec2(tvec2<thalf> const & v);
|
||||
tvec2(tvec2<half> const & v);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Explicit basic constructors
|
||||
|
||||
explicit tvec2(ctor);
|
||||
explicit tvec2(
|
||||
thalf const & s);
|
||||
half const & s);
|
||||
explicit tvec2(
|
||||
thalf const & s1,
|
||||
thalf const & s2);
|
||||
half const & s1,
|
||||
half const & s2);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Swizzle constructors
|
||||
|
||||
tvec2(tref2<thalf> const & r);
|
||||
tvec2(tref2<half> const & r);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Convertion scalar constructors
|
||||
@@ -119,73 +119,73 @@ namespace detail
|
||||
//////////////////////////////////////
|
||||
// Unary arithmetic operators
|
||||
|
||||
tvec2<thalf>& operator= (tvec2<thalf> const & v);
|
||||
tvec2<half>& operator= (tvec2<half> const & v);
|
||||
|
||||
tvec2<thalf>& operator+=(thalf const & s);
|
||||
tvec2<thalf>& operator+=(tvec2<thalf> const & v);
|
||||
tvec2<thalf>& operator-=(thalf const & s);
|
||||
tvec2<thalf>& operator-=(tvec2<thalf> const & v);
|
||||
tvec2<thalf>& operator*=(thalf const & s);
|
||||
tvec2<thalf>& operator*=(tvec2<thalf> const & v);
|
||||
tvec2<thalf>& operator/=(thalf const & s);
|
||||
tvec2<thalf>& operator/=(tvec2<thalf> const & v);
|
||||
tvec2<thalf>& operator++();
|
||||
tvec2<thalf>& operator--();
|
||||
tvec2<half>& operator+=(half const & s);
|
||||
tvec2<half>& operator+=(tvec2<half> const & v);
|
||||
tvec2<half>& operator-=(half const & s);
|
||||
tvec2<half>& operator-=(tvec2<half> const & v);
|
||||
tvec2<half>& operator*=(half const & s);
|
||||
tvec2<half>& operator*=(tvec2<half> const & v);
|
||||
tvec2<half>& operator/=(half const & s);
|
||||
tvec2<half>& operator/=(tvec2<half> const & v);
|
||||
tvec2<half>& operator++();
|
||||
tvec2<half>& operator--();
|
||||
|
||||
//////////////////////////////////////
|
||||
// Swizzle operators
|
||||
|
||||
thalf swizzle(comp X) const;
|
||||
tvec2<thalf> swizzle(comp X, comp Y) const;
|
||||
tvec3<thalf> swizzle(comp X, comp Y, comp Z) const;
|
||||
tvec4<thalf> swizzle(comp X, comp Y, comp Z, comp W) const;
|
||||
tref2<thalf> swizzle(comp X, comp Y);
|
||||
half swizzle(comp X) const;
|
||||
tvec2<half> swizzle(comp X, comp Y) const;
|
||||
tvec3<half> swizzle(comp X, comp Y, comp Z) const;
|
||||
tvec4<half> swizzle(comp X, comp Y, comp Z, comp W) const;
|
||||
tref2<half> swizzle(comp X, comp Y);
|
||||
};
|
||||
|
||||
template <>
|
||||
struct tvec3<thalf>
|
||||
struct tvec3<half>
|
||||
{
|
||||
enum ctor{null};
|
||||
typedef thalf value_type;
|
||||
typedef half value_type;
|
||||
typedef std::size_t size_type;
|
||||
GLM_FUNC_DECL size_type length() const;
|
||||
static GLM_FUNC_DECL size_type value_size();
|
||||
|
||||
typedef tvec3<thalf> type;
|
||||
typedef tvec3<half> type;
|
||||
typedef tvec3<bool> bool_type;
|
||||
|
||||
//////////////////////////////////////
|
||||
// Data
|
||||
|
||||
thalf x, y, z;
|
||||
half x, y, z;
|
||||
|
||||
//////////////////////////////////////
|
||||
// Accesses
|
||||
|
||||
thalf & operator[](size_type i);
|
||||
thalf const & operator[](size_type i) const;
|
||||
half & operator[](size_type i);
|
||||
half const & operator[](size_type i) const;
|
||||
|
||||
//////////////////////////////////////
|
||||
// Implicit basic constructors
|
||||
|
||||
tvec3();
|
||||
tvec3(tvec3<thalf> const & v);
|
||||
tvec3(tvec3<half> const & v);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Explicit basic constructors
|
||||
|
||||
explicit tvec3(ctor);
|
||||
explicit tvec3(
|
||||
thalf const & s);
|
||||
half const & s);
|
||||
explicit tvec3(
|
||||
thalf const & s1,
|
||||
thalf const & s2,
|
||||
thalf const & s3);
|
||||
half const & s1,
|
||||
half const & s2,
|
||||
half const & s3);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Swizzle constructors
|
||||
|
||||
tvec3(tref3<thalf> const & r);
|
||||
tvec3(tref3<half> const & r);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Convertion scalar constructors
|
||||
@@ -216,74 +216,74 @@ namespace detail
|
||||
//////////////////////////////////////
|
||||
// Unary arithmetic operators
|
||||
|
||||
tvec3<thalf>& operator= (tvec3<thalf> const & v);
|
||||
tvec3<half>& operator= (tvec3<half> const & v);
|
||||
|
||||
tvec3<thalf>& operator+=(thalf const & s);
|
||||
tvec3<thalf>& operator+=(tvec3<thalf> const & v);
|
||||
tvec3<thalf>& operator-=(thalf const & s);
|
||||
tvec3<thalf>& operator-=(tvec3<thalf> const & v);
|
||||
tvec3<thalf>& operator*=(thalf const & s);
|
||||
tvec3<thalf>& operator*=(tvec3<thalf> const & v);
|
||||
tvec3<thalf>& operator/=(thalf const & s);
|
||||
tvec3<thalf>& operator/=(tvec3<thalf> const & v);
|
||||
tvec3<thalf>& operator++();
|
||||
tvec3<thalf>& operator--();
|
||||
tvec3<half>& operator+=(half const & s);
|
||||
tvec3<half>& operator+=(tvec3<half> const & v);
|
||||
tvec3<half>& operator-=(half const & s);
|
||||
tvec3<half>& operator-=(tvec3<half> const & v);
|
||||
tvec3<half>& operator*=(half const & s);
|
||||
tvec3<half>& operator*=(tvec3<half> const & v);
|
||||
tvec3<half>& operator/=(half const & s);
|
||||
tvec3<half>& operator/=(tvec3<half> const & v);
|
||||
tvec3<half>& operator++();
|
||||
tvec3<half>& operator--();
|
||||
|
||||
//////////////////////////////////////
|
||||
// Swizzle operators
|
||||
|
||||
thalf swizzle(comp X) const;
|
||||
tvec2<thalf> swizzle(comp X, comp Y) const;
|
||||
tvec3<thalf> swizzle(comp X, comp Y, comp Z) const;
|
||||
tvec4<thalf> swizzle(comp X, comp Y, comp Z, comp W) const;
|
||||
tref3<thalf> swizzle(comp X, comp Y, comp Z);
|
||||
half swizzle(comp X) const;
|
||||
tvec2<half> swizzle(comp X, comp Y) const;
|
||||
tvec3<half> swizzle(comp X, comp Y, comp Z) const;
|
||||
tvec4<half> swizzle(comp X, comp Y, comp Z, comp W) const;
|
||||
tref3<half> swizzle(comp X, comp Y, comp Z);
|
||||
};
|
||||
|
||||
template <>
|
||||
struct tvec4<thalf>
|
||||
struct tvec4<half>
|
||||
{
|
||||
enum ctor{null};
|
||||
typedef thalf value_type;
|
||||
typedef half value_type;
|
||||
typedef std::size_t size_type;
|
||||
GLM_FUNC_DECL size_type length() const;
|
||||
static GLM_FUNC_DECL size_type value_size();
|
||||
|
||||
typedef tvec4<thalf> type;
|
||||
typedef tvec4<half> type;
|
||||
typedef tvec4<bool> bool_type;
|
||||
|
||||
//////////////////////////////////////
|
||||
// Data
|
||||
|
||||
thalf x, y, z, w;
|
||||
half x, y, z, w;
|
||||
|
||||
//////////////////////////////////////
|
||||
// Accesses
|
||||
|
||||
thalf & operator[](size_type i);
|
||||
thalf const & operator[](size_type i) const;
|
||||
half & operator[](size_type i);
|
||||
half const & operator[](size_type i) const;
|
||||
|
||||
//////////////////////////////////////
|
||||
// Implicit basic constructors
|
||||
|
||||
tvec4();
|
||||
tvec4(tvec4<thalf> const & v);
|
||||
tvec4(tvec4<half> const & v);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Explicit basic constructors
|
||||
|
||||
explicit tvec4(ctor);
|
||||
explicit tvec4(
|
||||
thalf const & s);
|
||||
half const & s);
|
||||
explicit tvec4(
|
||||
thalf const & s0,
|
||||
thalf const & s1,
|
||||
thalf const & s2,
|
||||
thalf const & s3);
|
||||
half const & s0,
|
||||
half const & s1,
|
||||
half const & s2,
|
||||
half const & s3);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Swizzle constructors
|
||||
|
||||
tvec4(tref4<thalf> const & r);
|
||||
tvec4(tref4<half> const & r);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Convertion scalar constructors
|
||||
@@ -323,27 +323,27 @@ namespace detail
|
||||
//////////////////////////////////////
|
||||
// Unary arithmetic operators
|
||||
|
||||
tvec4<thalf>& operator= (tvec4<thalf> const & v);
|
||||
tvec4<half>& operator= (tvec4<half> const & v);
|
||||
|
||||
tvec4<thalf>& operator+=(thalf const & s);
|
||||
tvec4<thalf>& operator+=(tvec4<thalf> const & v);
|
||||
tvec4<thalf>& operator-=(thalf const & s);
|
||||
tvec4<thalf>& operator-=(tvec4<thalf> const & v);
|
||||
tvec4<thalf>& operator*=(thalf const & s);
|
||||
tvec4<thalf>& operator*=(tvec4<thalf> const & v);
|
||||
tvec4<thalf>& operator/=(thalf const & s);
|
||||
tvec4<thalf>& operator/=(tvec4<thalf> const & v);
|
||||
tvec4<thalf>& operator++();
|
||||
tvec4<thalf>& operator--();
|
||||
tvec4<half>& operator+=(half const & s);
|
||||
tvec4<half>& operator+=(tvec4<half> const & v);
|
||||
tvec4<half>& operator-=(half const & s);
|
||||
tvec4<half>& operator-=(tvec4<half> const & v);
|
||||
tvec4<half>& operator*=(half const & s);
|
||||
tvec4<half>& operator*=(tvec4<half> const & v);
|
||||
tvec4<half>& operator/=(half const & s);
|
||||
tvec4<half>& operator/=(tvec4<half> const & v);
|
||||
tvec4<half>& operator++();
|
||||
tvec4<half>& operator--();
|
||||
|
||||
//////////////////////////////////////
|
||||
// Swizzle operators
|
||||
|
||||
thalf swizzle(comp X) const;
|
||||
tvec2<thalf> swizzle(comp X, comp Y) const;
|
||||
tvec3<thalf> swizzle(comp X, comp Y, comp Z) const;
|
||||
tvec4<thalf> swizzle(comp X, comp Y, comp Z, comp W) const;
|
||||
tref4<thalf> swizzle(comp X, comp Y, comp Z, comp W);
|
||||
half swizzle(comp X) const;
|
||||
tvec2<half> swizzle(comp X, comp Y) const;
|
||||
tvec3<half> swizzle(comp X, comp Y, comp Z) const;
|
||||
tvec4<half> swizzle(comp X, comp Y, comp Z, comp W) const;
|
||||
tref4<half> swizzle(comp X, comp Y, comp Z, comp W);
|
||||
};
|
||||
#endif//(!GLM_SUPPORT_ANONYMOUS_UNION_OF_STRUCTURE())
|
||||
}
|
||||
@@ -353,68 +353,68 @@ namespace detail
|
||||
/// @{
|
||||
|
||||
/// Type for half-precision floating-point numbers.
|
||||
/// From GLM_GTC_half_float extension.
|
||||
typedef detail::thalf half;
|
||||
/// @see gtc_half_float
|
||||
typedef detail::half half;
|
||||
|
||||
/// Vector of 2 half-precision floating-point numbers.
|
||||
/// From GLM_GTC_half_float extension.
|
||||
typedef detail::tvec2<detail::thalf> hvec2;
|
||||
/// @see gtc_half_float
|
||||
typedef detail::tvec2<detail::half> hvec2;
|
||||
|
||||
/// Vector of 3 half-precision floating-point numbers.
|
||||
/// From GLM_GTC_half_float extension.
|
||||
typedef detail::tvec3<detail::thalf> hvec3;
|
||||
/// @see gtc_half_float
|
||||
typedef detail::tvec3<detail::half> hvec3;
|
||||
|
||||
/// Vector of 4 half-precision floating-point numbers.
|
||||
/// From GLM_GTC_half_float extension.
|
||||
typedef detail::tvec4<detail::thalf> hvec4;
|
||||
/// @see gtc_half_float
|
||||
typedef detail::tvec4<detail::half> hvec4;
|
||||
|
||||
/// 2 * 2 matrix of half-precision floating-point numbers.
|
||||
/// From GLM_GTC_half_float extension.
|
||||
typedef detail::tmat2x2<detail::thalf> hmat2;
|
||||
/// @see gtc_half_float
|
||||
typedef detail::tmat2x2<detail::half> hmat2;
|
||||
|
||||
/// 3 * 3 matrix of half-precision floating-point numbers.
|
||||
/// From GLM_GTC_half_float extension.
|
||||
typedef detail::tmat3x3<detail::thalf> hmat3;
|
||||
/// @see gtc_half_float
|
||||
typedef detail::tmat3x3<detail::half> hmat3;
|
||||
|
||||
/// 4 * 4 matrix of half-precision floating-point numbers.
|
||||
/// From GLM_GTC_half_float extension.
|
||||
typedef detail::tmat4x4<detail::thalf> hmat4;
|
||||
/// @see gtc_half_float
|
||||
typedef detail::tmat4x4<detail::half> hmat4;
|
||||
|
||||
/// 2 * 2 matrix of half-precision floating-point numbers.
|
||||
/// From GLM_GTC_half_float extension.
|
||||
typedef detail::tmat2x2<detail::thalf> hmat2x2;
|
||||
/// @see gtc_half_float
|
||||
typedef detail::tmat2x2<detail::half> hmat2x2;
|
||||
|
||||
/// 2 * 3 matrix of half-precision floating-point numbers.
|
||||
/// From GLM_GTC_half_float extension.
|
||||
typedef detail::tmat2x3<detail::thalf> hmat2x3;
|
||||
/// @see gtc_half_float
|
||||
typedef detail::tmat2x3<detail::half> hmat2x3;
|
||||
|
||||
/// 2 * 4 matrix of half-precision floating-point numbers.
|
||||
/// From GLM_GTC_half_float extension.
|
||||
typedef detail::tmat2x4<detail::thalf> hmat2x4;
|
||||
/// @see gtc_half_float
|
||||
typedef detail::tmat2x4<detail::half> hmat2x4;
|
||||
|
||||
/// 3 * 2 matrix of half-precision floating-point numbers.
|
||||
/// From GLM_GTC_half_float extension.
|
||||
typedef detail::tmat3x2<detail::thalf> hmat3x2;
|
||||
/// @see gtc_half_float
|
||||
typedef detail::tmat3x2<detail::half> hmat3x2;
|
||||
|
||||
/// 3 * 3 matrix of half-precision floating-point numbers.
|
||||
/// From GLM_GTC_half_float extension.
|
||||
typedef detail::tmat3x3<detail::thalf> hmat3x3;
|
||||
/// @see gtc_half_float
|
||||
typedef detail::tmat3x3<detail::half> hmat3x3;
|
||||
|
||||
/// 3 * 4 matrix of half-precision floating-point numbers.
|
||||
/// From GLM_GTC_half_float extension.
|
||||
typedef detail::tmat3x4<detail::thalf> hmat3x4;
|
||||
/// @see gtc_half_float
|
||||
typedef detail::tmat3x4<detail::half> hmat3x4;
|
||||
|
||||
/// 4 * 2 matrix of half-precision floating-point numbers.
|
||||
/// From GLM_GTC_half_float extension.
|
||||
typedef detail::tmat4x2<detail::thalf> hmat4x2;
|
||||
/// @see gtc_half_float
|
||||
typedef detail::tmat4x2<detail::half> hmat4x2;
|
||||
|
||||
/// 4 * 3 matrix of half-precision floating-point numbers.
|
||||
/// From GLM_GTC_half_float extension.
|
||||
typedef detail::tmat4x3<detail::thalf> hmat4x3;
|
||||
/// @see gtc_half_float
|
||||
typedef detail::tmat4x3<detail::half> hmat4x3;
|
||||
|
||||
/// 4 * 4 matrix of half-precision floating-point numbers.
|
||||
/// From GLM_GTC_half_float extension.
|
||||
typedef detail::tmat4x4<detail::thalf> hmat4x4;
|
||||
/// @see gtc_half_float
|
||||
typedef detail::tmat4x4<detail::half> hmat4x4;
|
||||
|
||||
/// @}
|
||||
}// namespace glm
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -49,170 +49,454 @@ namespace glm
|
||||
/// @addtogroup gtc_matrix_integer
|
||||
/// @{
|
||||
|
||||
typedef detail::tmat2x2<highp_int> highp_imat2; //!< \brief High-precision signed integer 2x2 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef detail::tmat3x3<highp_int> highp_imat3; //!< \brief High-precision signed integer 3x3 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef detail::tmat4x4<highp_int> highp_imat4; //!< \brief High-precision signed integer 4x4 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
/// High-precision signed integer 2x2 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat2x2<highp_int> highp_imat2;
|
||||
|
||||
typedef detail::tmat2x2<highp_int> highp_imat2x2; //!< \brief High-precision signed integer 2x2 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef detail::tmat2x3<highp_int> highp_imat2x3; //!< \brief High-precision signed integer 2x3 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef detail::tmat2x4<highp_int> highp_imat2x4; //!< \brief High-precision signed integer 2x4 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef detail::tmat3x2<highp_int> highp_imat3x2; //!< \brief High-precision signed integer 3x2 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef detail::tmat3x3<highp_int> highp_imat3x3; //!< \brief High-precision signed integer 3x3 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef detail::tmat3x4<highp_int> highp_imat3x4; //!< \brief High-precision signed integer 3x4 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef detail::tmat4x2<highp_int> highp_imat4x2; //!< \brief High-precision signed integer 4x2 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef detail::tmat4x3<highp_int> highp_imat4x3; //!< \brief High-precision signed integer 4x3 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef detail::tmat4x4<highp_int> highp_imat4x4; //!< \brief High-precision signed integer 4x4 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
/// High-precision signed integer 3x3 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat3x3<highp_int> highp_imat3;
|
||||
|
||||
typedef detail::tmat2x2<mediump_int> mediump_imat2; //!< \brief Medium-precision signed integer 2x2 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef detail::tmat3x3<mediump_int> mediump_imat3; //!< \brief Medium-precision signed integer 3x3 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef detail::tmat4x4<mediump_int> mediump_imat4; //!< \brief Medium-precision signed integer 4x4 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
/// High-precision signed integer 4x4 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat4x4<highp_int> highp_imat4;
|
||||
|
||||
typedef detail::tmat2x2<mediump_int> mediump_imat2x2; //!< \brief Medium-precision signed integer 2x2 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef detail::tmat2x3<mediump_int> mediump_imat2x3; //!< \brief Medium-precision signed integer 2x3 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef detail::tmat2x4<mediump_int> mediump_imat2x4; //!< \brief Medium-precision signed integer 2x4 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef detail::tmat3x2<mediump_int> mediump_imat3x2; //!< \brief Medium-precision signed integer 3x2 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef detail::tmat3x3<mediump_int> mediump_imat3x3; //!< \brief Medium-precision signed integer 3x3 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef detail::tmat3x4<mediump_int> mediump_imat3x4; //!< \brief Medium-precision signed integer 3x4 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef detail::tmat4x2<mediump_int> mediump_imat4x2; //!< \brief Medium-precision signed integer 4x2 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef detail::tmat4x3<mediump_int> mediump_imat4x3; //!< \brief Medium-precision signed integer 4x3 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef detail::tmat4x4<mediump_int> mediump_imat4x4; //!< \brief Medium-precision signed integer 4x4 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
/// High-precision signed integer 2x2 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat2x2<highp_int> highp_imat2x2;
|
||||
|
||||
typedef detail::tmat2x2<lowp_int> lowp_imat2; //!< \brief Low-precision signed integer 2x2 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef detail::tmat3x3<lowp_int> lowp_imat3; //!< \brief Low-precision signed integer 3x3 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef detail::tmat4x4<lowp_int> lowp_imat4; //!< \brief Low-precision signed integer 4x4 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
/// High-precision signed integer 2x3 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat2x3<highp_int> highp_imat2x3;
|
||||
|
||||
typedef detail::tmat2x2<lowp_int> lowp_imat2x2; //!< \brief Low-precision signed integer 2x2 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef detail::tmat2x3<lowp_int> lowp_imat2x3; //!< \brief Low-precision signed integer 2x3 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef detail::tmat2x4<lowp_int> lowp_imat2x4; //!< \brief Low-precision signed integer 2x4 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef detail::tmat3x2<lowp_int> lowp_imat3x2; //!< \brief Low-precision signed integer 3x2 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef detail::tmat3x3<lowp_int> lowp_imat3x3; //!< \brief Low-precision signed integer 3x3 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef detail::tmat3x4<lowp_int> lowp_imat3x4; //!< \brief Low-precision signed integer 3x4 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef detail::tmat4x2<lowp_int> lowp_imat4x2; //!< \brief Low-precision signed integer 4x2 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef detail::tmat4x3<lowp_int> lowp_imat4x3; //!< \brief Low-precision signed integer 4x3 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef detail::tmat4x4<lowp_int> lowp_imat4x4; //!< \brief Low-precision signed integer 4x4 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
/// High-precision signed integer 2x4 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat2x4<highp_int> highp_imat2x4;
|
||||
|
||||
typedef detail::tmat2x2<highp_uint> highp_umat2; //!< \brief High-precision signed integer 2x2 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef detail::tmat3x3<highp_uint> highp_umat3; //!< \brief High-precision signed integer 3x3 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef detail::tmat4x4<highp_uint> highp_umat4; //!< \brief High-precision signed integer 4x4 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
/// High-precision signed integer 3x2 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat3x2<highp_int> highp_imat3x2;
|
||||
|
||||
typedef detail::tmat2x2<highp_uint> highp_umat2x2; //!< \brief High-precision signed integer 2x2 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef detail::tmat2x3<highp_uint> highp_umat2x3; //!< \brief High-precision signed integer 2x3 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef detail::tmat2x4<highp_uint> highp_umat2x4; //!< \brief High-precision signed integer 2x4 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef detail::tmat3x2<highp_uint> highp_umat3x2; //!< \brief High-precision signed integer 3x2 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef detail::tmat3x3<highp_uint> highp_umat3x3; //!< \brief High-precision signed integer 3x3 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef detail::tmat3x4<highp_uint> highp_umat3x4; //!< \brief High-precision signed integer 3x4 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef detail::tmat4x2<highp_uint> highp_umat4x2; //!< \brief High-precision signed integer 4x2 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef detail::tmat4x3<highp_uint> highp_umat4x3; //!< \brief High-precision signed integer 4x3 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef detail::tmat4x4<highp_uint> highp_umat4x4; //!< \brief High-precision signed integer 4x4 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
/// High-precision signed integer 3x3 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat3x3<highp_int> highp_imat3x3;
|
||||
|
||||
typedef detail::tmat2x2<mediump_uint> mediump_umat2; //!< \brief Medium-precision signed integer 2x2 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef detail::tmat3x3<mediump_uint> mediump_umat3; //!< \brief Medium-precision signed integer 3x3 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef detail::tmat4x4<mediump_uint> mediump_umat4; //!< \brief Medium-precision signed integer 4x4 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
/// High-precision signed integer 3x4 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat3x4<highp_int> highp_imat3x4;
|
||||
|
||||
typedef detail::tmat2x2<mediump_uint> mediump_umat2x2; //!< \brief Medium-precision signed integer 2x2 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef detail::tmat2x3<mediump_uint> mediump_umat2x3; //!< \brief Medium-precision signed integer 2x3 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef detail::tmat2x4<mediump_uint> mediump_umat2x4; //!< \brief Medium-precision signed integer 2x4 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef detail::tmat3x2<mediump_uint> mediump_umat3x2; //!< \brief Medium-precision signed integer 3x2 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef detail::tmat3x3<mediump_uint> mediump_umat3x3; //!< \brief Medium-precision signed integer 3x3 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef detail::tmat3x4<mediump_uint> mediump_umat3x4; //!< \brief Medium-precision signed integer 3x4 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef detail::tmat4x2<mediump_uint> mediump_umat4x2; //!< \brief Medium-precision signed integer 4x2 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef detail::tmat4x3<mediump_uint> mediump_umat4x3; //!< \brief Medium-precision signed integer 4x3 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef detail::tmat4x4<mediump_uint> mediump_umat4x4; //!< \brief Medium-precision signed integer 4x4 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
/// High-precision signed integer 4x2 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat4x2<highp_int> highp_imat4x2;
|
||||
|
||||
typedef detail::tmat2x2<lowp_uint> lowp_umat2; //!< \brief Low-precision signed integer 2x2 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef detail::tmat3x3<lowp_uint> lowp_umat3; //!< \brief Low-precision signed integer 3x3 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef detail::tmat4x4<lowp_uint> lowp_umat4; //!< \brief Low-precision signed integer 4x4 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
/// High-precision signed integer 4x3 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat4x3<highp_int> highp_imat4x3;
|
||||
|
||||
typedef detail::tmat2x2<lowp_uint> lowp_umat2x2; //!< \brief Low-precision signed integer 2x2 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef detail::tmat2x3<lowp_uint> lowp_umat2x3; //!< \brief Low-precision signed integer 2x3 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef detail::tmat2x4<lowp_uint> lowp_umat2x4; //!< \brief Low-precision signed integer 2x4 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef detail::tmat3x2<lowp_uint> lowp_umat3x2; //!< \brief Low-precision signed integer 3x2 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef detail::tmat3x3<lowp_uint> lowp_umat3x3; //!< \brief Low-precision signed integer 3x3 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef detail::tmat3x4<lowp_uint> lowp_umat3x4; //!< \brief Low-precision signed integer 3x4 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef detail::tmat4x2<lowp_uint> lowp_umat4x2; //!< \brief Low-precision signed integer 4x2 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef detail::tmat4x3<lowp_uint> lowp_umat4x3; //!< \brief Low-precision signed integer 4x3 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef detail::tmat4x4<lowp_uint> lowp_umat4x4; //!< \brief Low-precision signed integer 4x4 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
/// High-precision signed integer 4x4 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat4x4<highp_int> highp_imat4x4;
|
||||
|
||||
|
||||
/// Medium-precision signed integer 2x2 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat2x2<mediump_int> mediump_imat2;
|
||||
|
||||
/// Medium-precision signed integer 3x3 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat3x3<mediump_int> mediump_imat3;
|
||||
|
||||
/// Medium-precision signed integer 4x4 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat4x4<mediump_int> mediump_imat4;
|
||||
|
||||
|
||||
/// Medium-precision signed integer 2x2 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat2x2<mediump_int> mediump_imat2x2;
|
||||
|
||||
/// Medium-precision signed integer 2x3 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat2x3<mediump_int> mediump_imat2x3;
|
||||
|
||||
/// Medium-precision signed integer 2x4 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat2x4<mediump_int> mediump_imat2x4;
|
||||
|
||||
/// Medium-precision signed integer 3x2 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat3x2<mediump_int> mediump_imat3x2;
|
||||
|
||||
/// Medium-precision signed integer 3x3 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat3x3<mediump_int> mediump_imat3x3;
|
||||
|
||||
/// Medium-precision signed integer 3x4 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat3x4<mediump_int> mediump_imat3x4;
|
||||
|
||||
/// Medium-precision signed integer 4x2 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat4x2<mediump_int> mediump_imat4x2;
|
||||
|
||||
/// Medium-precision signed integer 4x3 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat4x3<mediump_int> mediump_imat4x3;
|
||||
|
||||
/// Medium-precision signed integer 4x4 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat4x4<mediump_int> mediump_imat4x4;
|
||||
|
||||
|
||||
/// Low-precision signed integer 2x2 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat2x2<lowp_int> lowp_imat2;
|
||||
|
||||
/// Low-precision signed integer 3x3 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat3x3<lowp_int> lowp_imat3;
|
||||
|
||||
/// Low-precision signed integer 4x4 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat4x4<lowp_int> lowp_imat4;
|
||||
|
||||
|
||||
/// Low-precision signed integer 2x2 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat2x2<lowp_int> lowp_imat2x2;
|
||||
|
||||
/// Low-precision signed integer 2x3 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat2x3<lowp_int> lowp_imat2x3;
|
||||
|
||||
/// Low-precision signed integer 2x4 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat2x4<lowp_int> lowp_imat2x4;
|
||||
|
||||
/// Low-precision signed integer 3x2 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat3x2<lowp_int> lowp_imat3x2;
|
||||
|
||||
/// Low-precision signed integer 3x3 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat3x3<lowp_int> lowp_imat3x3;
|
||||
|
||||
/// Low-precision signed integer 3x4 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat3x4<lowp_int> lowp_imat3x4;
|
||||
|
||||
/// Low-precision signed integer 4x2 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat4x2<lowp_int> lowp_imat4x2;
|
||||
|
||||
/// Low-precision signed integer 4x3 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat4x3<lowp_int> lowp_imat4x3;
|
||||
|
||||
/// Low-precision signed integer 4x4 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat4x4<lowp_int> lowp_imat4x4;
|
||||
|
||||
|
||||
/// High-precision unsigned integer 2x2 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat2x2<highp_uint> highp_umat2;
|
||||
|
||||
/// High-precision unsigned integer 3x3 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat3x3<highp_uint> highp_umat3;
|
||||
|
||||
/// High-precision unsigned integer 4x4 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat4x4<highp_uint> highp_umat4;
|
||||
|
||||
/// High-precision unsigned integer 2x2 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat2x2<highp_uint> highp_umat2x2;
|
||||
|
||||
/// High-precision unsigned integer 2x3 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat2x3<highp_uint> highp_umat2x3;
|
||||
|
||||
/// High-precision unsigned integer 2x4 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat2x4<highp_uint> highp_umat2x4;
|
||||
|
||||
/// High-precision unsigned integer 3x2 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat3x2<highp_uint> highp_umat3x2;
|
||||
|
||||
/// High-precision unsigned integer 3x3 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat3x3<highp_uint> highp_umat3x3;
|
||||
|
||||
/// High-precision unsigned integer 3x4 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat3x4<highp_uint> highp_umat3x4;
|
||||
|
||||
/// High-precision unsigned integer 4x2 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat4x2<highp_uint> highp_umat4x2;
|
||||
|
||||
/// High-precision unsigned integer 4x3 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat4x3<highp_uint> highp_umat4x3;
|
||||
|
||||
/// High-precision unsigned integer 4x4 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat4x4<highp_uint> highp_umat4x4;
|
||||
|
||||
|
||||
/// Medium-precision unsigned integer 2x2 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat2x2<mediump_uint> mediump_umat2;
|
||||
|
||||
/// Medium-precision unsigned integer 3x3 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat3x3<mediump_uint> mediump_umat3;
|
||||
|
||||
/// Medium-precision unsigned integer 4x4 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat4x4<mediump_uint> mediump_umat4;
|
||||
|
||||
|
||||
/// Medium-precision unsigned integer 2x2 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat2x2<mediump_uint> mediump_umat2x2;
|
||||
|
||||
/// Medium-precision unsigned integer 2x3 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat2x3<mediump_uint> mediump_umat2x3;
|
||||
|
||||
/// Medium-precision unsigned integer 2x4 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat2x4<mediump_uint> mediump_umat2x4;
|
||||
|
||||
/// Medium-precision unsigned integer 3x2 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat3x2<mediump_uint> mediump_umat3x2;
|
||||
|
||||
/// Medium-precision unsigned integer 3x3 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat3x3<mediump_uint> mediump_umat3x3;
|
||||
|
||||
/// Medium-precision unsigned integer 3x4 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat3x4<mediump_uint> mediump_umat3x4;
|
||||
|
||||
/// Medium-precision unsigned integer 4x2 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat4x2<mediump_uint> mediump_umat4x2;
|
||||
|
||||
/// Medium-precision unsigned integer 4x3 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat4x3<mediump_uint> mediump_umat4x3;
|
||||
|
||||
/// Medium-precision unsigned integer 4x4 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat4x4<mediump_uint> mediump_umat4x4;
|
||||
|
||||
|
||||
/// Low-precision unsigned integer 2x2 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat2x2<lowp_uint> lowp_umat2;
|
||||
|
||||
/// Low-precision unsigned integer 3x3 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat3x3<lowp_uint> lowp_umat3;
|
||||
|
||||
/// Low-precision unsigned integer 4x4 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat4x4<lowp_uint> lowp_umat4;
|
||||
|
||||
|
||||
/// Low-precision unsigned integer 2x2 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat2x2<lowp_uint> lowp_umat2x2;
|
||||
|
||||
/// Low-precision unsigned integer 2x3 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat2x3<lowp_uint> lowp_umat2x3;
|
||||
|
||||
/// Low-precision unsigned integer 2x4 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat2x4<lowp_uint> lowp_umat2x4;
|
||||
|
||||
/// Low-precision unsigned integer 3x2 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat3x2<lowp_uint> lowp_umat3x2;
|
||||
|
||||
/// Low-precision unsigned integer 3x3 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat3x3<lowp_uint> lowp_umat3x3;
|
||||
|
||||
/// Low-precision unsigned integer 3x4 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat3x4<lowp_uint> lowp_umat3x4;
|
||||
|
||||
/// Low-precision unsigned integer 4x2 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat4x2<lowp_uint> lowp_umat4x2;
|
||||
|
||||
/// Low-precision unsigned integer 4x3 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat4x3<lowp_uint> lowp_umat4x3;
|
||||
|
||||
/// Low-precision unsigned integer 4x4 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef detail::tmat4x4<lowp_uint> lowp_umat4x4;
|
||||
|
||||
#if(defined(GLM_PRECISION_HIGHP_INT))
|
||||
typedef highp_imat2 imat2; //!< \brief Signed integer 2x2 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef highp_imat3 imat3; //!< \brief Signed integer 3x3 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef highp_imat4 imat4; //!< \brief Signed integer 4x4 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef highp_imat2x2 imat2x2; //!< \brief Signed integer 2x2 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef highp_imat2x3 imat2x3; //!< \brief Signed integer 2x3 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef highp_imat2x4 imat2x4; //!< \brief Signed integer 2x4 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef highp_imat3x2 imat3x2; //!< \brief Signed integer 3x2 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef highp_imat3x3 imat3x3; //!< \brief Signed integer 3x3 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef highp_imat3x4 imat3x4; //!< \brief Signed integer 3x4 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef highp_imat4x2 imat4x2; //!< \brief Signed integer 4x2 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef highp_imat4x3 imat4x3; //!< \brief Signed integer 4x3 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef highp_imat4x4 imat4x4; //!< \brief Signed integer 4x4 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef highp_imat2 imat2;
|
||||
typedef highp_imat3 imat3;
|
||||
typedef highp_imat4 imat4;
|
||||
typedef highp_imat2x2 imat2x2;
|
||||
typedef highp_imat2x3 imat2x3;
|
||||
typedef highp_imat2x4 imat2x4;
|
||||
typedef highp_imat3x2 imat3x2;
|
||||
typedef highp_imat3x3 imat3x3;
|
||||
typedef highp_imat3x4 imat3x4;
|
||||
typedef highp_imat4x2 imat4x2;
|
||||
typedef highp_imat4x3 imat4x3;
|
||||
typedef highp_imat4x4 imat4x4;
|
||||
#elif(defined(GLM_PRECISION_LOWP_INT))
|
||||
typedef lowp_imat2 imat2; //!< \brief Signed integer 2x2 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef lowp_imat3 imat3; //!< \brief Signed integer 3x3 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef lowp_imat4 imat4; //!< \brief Signed integer 4x4 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef lowp_imat2x2 imat2x2; //!< \brief Signed integer 2x2 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef lowp_imat2x3 imat2x3; //!< \brief Signed integer 2x3 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef lowp_imat2x4 imat2x4; //!< \brief Signed integer 2x4 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef lowp_imat3x2 imat3x2; //!< \brief Signed integer 3x2 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef lowp_imat3x3 imat3x3; //!< \brief Signed integer 3x3 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef lowp_imat3x4 imat3x4; //!< \brief Signed integer 3x4 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef lowp_imat4x2 imat4x2; //!< \brief Signed integer 4x2 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef lowp_imat4x3 imat4x3; //!< \brief Signed integer 4x3 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef lowp_imat4x4 imat4x4; //!< \brief Signed integer 4x4 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef lowp_imat2 imat2;
|
||||
typedef lowp_imat3 imat3;
|
||||
typedef lowp_imat4 imat4;
|
||||
typedef lowp_imat2x2 imat2x2;
|
||||
typedef lowp_imat2x3 imat2x3;
|
||||
typedef lowp_imat2x4 imat2x4;
|
||||
typedef lowp_imat3x2 imat3x2;
|
||||
typedef lowp_imat3x3 imat3x3;
|
||||
typedef lowp_imat3x4 imat3x4;
|
||||
typedef lowp_imat4x2 imat4x2;
|
||||
typedef lowp_imat4x3 imat4x3;
|
||||
typedef lowp_imat4x4 imat4x4;
|
||||
#else //if(defined(GLM_PRECISION_MEDIUMP_INT))
|
||||
typedef mediump_imat2 imat2; //!< \brief Signed integer 2x2 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef mediump_imat3 imat3; //!< \brief Signed integer 3x3 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef mediump_imat4 imat4; //!< \brief Signed integer 4x4 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef mediump_imat2x2 imat2x2; //!< \brief Signed integer 2x2 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef mediump_imat2x3 imat2x3; //!< \brief Signed integer 2x3 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef mediump_imat2x4 imat2x4; //!< \brief Signed integer 2x4 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef mediump_imat3x2 imat3x2; //!< \brief Signed integer 3x2 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef mediump_imat3x3 imat3x3; //!< \brief Signed integer 3x3 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef mediump_imat3x4 imat3x4; //!< \brief Signed integer 3x4 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef mediump_imat4x2 imat4x2; //!< \brief Signed integer 4x2 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef mediump_imat4x3 imat4x3; //!< \brief Signed integer 4x3 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef mediump_imat4x4 imat4x4; //!< \brief Signed integer 4x4 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
|
||||
/// Signed integer 2x2 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef mediump_imat2 imat2;
|
||||
|
||||
/// Signed integer 3x3 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef mediump_imat3 imat3;
|
||||
|
||||
/// Signed integer 4x4 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef mediump_imat4 imat4;
|
||||
|
||||
/// Signed integer 2x2 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef mediump_imat2x2 imat2x2;
|
||||
|
||||
/// Signed integer 2x3 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef mediump_imat2x3 imat2x3;
|
||||
|
||||
/// Signed integer 2x4 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef mediump_imat2x4 imat2x4;
|
||||
|
||||
/// Signed integer 3x2 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef mediump_imat3x2 imat3x2;
|
||||
|
||||
/// Signed integer 3x3 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef mediump_imat3x3 imat3x3;
|
||||
|
||||
/// Signed integer 3x4 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef mediump_imat3x4 imat3x4;
|
||||
|
||||
/// Signed integer 4x2 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef mediump_imat4x2 imat4x2;
|
||||
|
||||
/// Signed integer 4x3 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef mediump_imat4x3 imat4x3;
|
||||
|
||||
/// Signed integer 4x4 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef mediump_imat4x4 imat4x4;
|
||||
#endif//GLM_PRECISION
|
||||
|
||||
#if(defined(GLM_PRECISION_HIGHP_UINT))
|
||||
typedef highp_umat2 umat2; //!< \brief Unsigned integer 2x2 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef highp_umat3 umat3; //!< \brief Unsigned integer 3x3 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef highp_umat4 umat4; //!< \brief Unsigned integer 4x4 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef highp_umat2x2 umat2x2; //!< \brief Unsigned integer 2x2 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef highp_umat2x3 umat2x3; //!< \brief Unsigned integer 2x3 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef highp_umat2x4 umat2x4; //!< \brief Unsigned integer 2x4 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef highp_umat3x2 umat3x2; //!< \brief Unsigned integer 3x2 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef highp_umat3x3 umat3x3; //!< \brief Unsigned integer 3x3 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef highp_umat3x4 umat3x4; //!< \brief Unsigned integer 3x4 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef highp_umat4x2 umat4x2; //!< \brief Unsigned integer 4x2 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef highp_umat4x3 umat4x3; //!< \brief Unsigned integer 4x3 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef highp_umat4x4 umat4x4; //!< \brief Unsigned integer 4x4 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef highp_umat2 umat2;
|
||||
typedef highp_umat3 umat3;
|
||||
typedef highp_umat4 umat4;
|
||||
typedef highp_umat2x2 umat2x2;
|
||||
typedef highp_umat2x3 umat2x3;
|
||||
typedef highp_umat2x4 umat2x4;
|
||||
typedef highp_umat3x2 umat3x2;
|
||||
typedef highp_umat3x3 umat3x3;
|
||||
typedef highp_umat3x4 umat3x4;
|
||||
typedef highp_umat4x2 umat4x2;
|
||||
typedef highp_umat4x3 umat4x3;
|
||||
typedef highp_umat4x4 umat4x4;
|
||||
#elif(defined(GLM_PRECISION_LOWP_UINT))
|
||||
typedef lowp_umat2 umat2; //!< \brief Unsigned integer 2x2 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef lowp_umat3 umat3; //!< \brief Unsigned integer 3x3 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef lowp_umat4 umat4; //!< \brief Unsigned integer 4x4 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef lowp_umat2x2 umat2x2; //!< \brief Unsigned integer 2x2 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef lowp_umat2x3 umat2x3; //!< \brief Unsigned integer 2x3 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef lowp_umat2x4 umat2x4; //!< \brief Unsigned integer 2x4 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef lowp_umat3x2 umat3x2; //!< \brief Unsigned integer 3x2 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef lowp_umat3x3 umat3x3; //!< \brief Unsigned integer 3x3 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef lowp_umat3x4 umat3x4; //!< \brief Unsigned integer 3x4 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef lowp_umat4x2 umat4x2; //!< \brief Unsigned integer 4x2 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef lowp_umat4x3 umat4x3; //!< \brief Unsigned integer 4x3 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef lowp_umat4x4 umat4x4; //!< \brief Unsigned integer 4x4 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef lowp_umat2 umat2;
|
||||
typedef lowp_umat3 umat3;
|
||||
typedef lowp_umat4 umat4;
|
||||
typedef lowp_umat2x2 umat2x2;
|
||||
typedef lowp_umat2x3 umat2x3;
|
||||
typedef lowp_umat2x4 umat2x4;
|
||||
typedef lowp_umat3x2 umat3x2;
|
||||
typedef lowp_umat3x3 umat3x3;
|
||||
typedef lowp_umat3x4 umat3x4;
|
||||
typedef lowp_umat4x2 umat4x2;
|
||||
typedef lowp_umat4x3 umat4x3;
|
||||
typedef lowp_umat4x4 umat4x4;
|
||||
#else //if(defined(GLM_PRECISION_MEDIUMP_UINT))
|
||||
typedef mediump_umat2 umat2; //!< \brief Unsigned integer 2x2 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef mediump_umat3 umat3; //!< \brief Unsigned integer 3x3 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef mediump_umat4 umat4; //!< \brief Unsigned integer 4x4 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef mediump_umat2x2 umat2x2; //!< \brief Unsigned integer 2x2 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef mediump_umat2x3 umat2x3; //!< \brief Unsigned integer 2x3 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef mediump_umat2x4 umat2x4; //!< \brief Unsigned integer 2x4 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef mediump_umat3x2 umat3x2; //!< \brief Unsigned integer 3x2 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef mediump_umat3x3 umat3x3; //!< \brief Unsigned integer 3x3 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef mediump_umat3x4 umat3x4; //!< \brief Unsigned integer 3x4 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef mediump_umat4x2 umat4x2; //!< \brief Unsigned integer 4x2 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef mediump_umat4x3 umat4x3; //!< \brief Unsigned integer 4x3 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef mediump_umat4x4 umat4x4; //!< \brief Unsigned integer 4x4 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
/// Unsigned integer 2x2 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef mediump_umat2 umat2;
|
||||
|
||||
/// Unsigned integer 3x3 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef mediump_umat3 umat3;
|
||||
|
||||
/// Unsigned integer 4x4 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef mediump_umat4 umat4;
|
||||
|
||||
/// Unsigned integer 2x2 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef mediump_umat2x2 umat2x2;
|
||||
|
||||
/// Unsigned integer 2x3 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef mediump_umat2x3 umat2x3;
|
||||
|
||||
/// Unsigned integer 2x4 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef mediump_umat2x4 umat2x4;
|
||||
|
||||
/// Unsigned integer 3x2 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef mediump_umat3x2 umat3x2;
|
||||
|
||||
/// Unsigned integer 3x3 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef mediump_umat3x3 umat3x3;
|
||||
|
||||
/// Unsigned integer 3x4 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef mediump_umat3x4 umat3x4;
|
||||
|
||||
/// Unsigned integer 4x2 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef mediump_umat4x2 umat4x2;
|
||||
|
||||
/// Unsigned integer 4x3 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef mediump_umat4x3 umat4x3;
|
||||
|
||||
/// Unsigned integer 4x4 matrix.
|
||||
/// @see - gtc_matrix_integer
|
||||
typedef mediump_umat4x4 umat4x4;
|
||||
#endif//GLM_PRECISION
|
||||
|
||||
/// @}
|
||||
|
||||
@@ -152,21 +152,21 @@ namespace detail
|
||||
|
||||
/// Returns the length of the quaternion.
|
||||
///
|
||||
/// @see - gtc_quaternion
|
||||
/// @see gtc_quaternion
|
||||
template <typename T>
|
||||
T length(
|
||||
detail::tquat<T> const & q);
|
||||
|
||||
/// Returns the normalized quaternion.
|
||||
///
|
||||
/// @see - gtc_quaternion
|
||||
/// @see gtc_quaternion
|
||||
template <typename T>
|
||||
detail::tquat<T> normalize(
|
||||
detail::tquat<T> const & q);
|
||||
|
||||
/// Returns dot product of q1 and q2, i.e., q1[0] * q2[0] + q1[1] * q2[1] + ...
|
||||
///
|
||||
/// @see - gtc_quaternion
|
||||
/// @see gtc_quaternion
|
||||
template <typename T>
|
||||
T dot(
|
||||
detail::tquat<T> const & q1,
|
||||
@@ -174,7 +174,7 @@ namespace detail
|
||||
|
||||
/// Returns a SLERP interpolated quaternion of x and y according a.
|
||||
///
|
||||
/// @see - gtc_quaternion
|
||||
/// @see gtc_quaternion
|
||||
template <typename T>
|
||||
detail::tquat<T> mix(
|
||||
detail::tquat<T> const & x,
|
||||
@@ -183,21 +183,21 @@ namespace detail
|
||||
|
||||
/// Returns the q conjugate.
|
||||
///
|
||||
/// @see - gtc_quaternion
|
||||
/// @see gtc_quaternion
|
||||
template <typename T>
|
||||
detail::tquat<T> conjugate(
|
||||
detail::tquat<T> const & q);
|
||||
|
||||
/// Returns the q inverse.
|
||||
///
|
||||
/// @see - gtc_quaternion
|
||||
/// @see gtc_quaternion
|
||||
template <typename T>
|
||||
detail::tquat<T> inverse(
|
||||
detail::tquat<T> const & q);
|
||||
|
||||
/// Rotates a quaternion from an vector of 3 components axis and an angle expressed in degrees.
|
||||
///
|
||||
/// @see - gtc_quaternion
|
||||
/// @see gtc_quaternion
|
||||
template <typename T>
|
||||
detail::tquat<T> rotate(
|
||||
detail::tquat<T> const & q,
|
||||
@@ -206,65 +206,65 @@ namespace detail
|
||||
|
||||
/// Converts a quaternion to a 3 * 3 matrix.
|
||||
///
|
||||
/// @see - gtc_quaternion
|
||||
/// @see gtc_quaternion
|
||||
template <typename T>
|
||||
detail::tmat3x3<T> mat3_cast(
|
||||
detail::tquat<T> const & x);
|
||||
|
||||
/// Converts a quaternion to a 4 * 4 matrix.
|
||||
///
|
||||
/// @see - gtc_quaternion
|
||||
/// @see gtc_quaternion
|
||||
template <typename T>
|
||||
detail::tmat4x4<T> mat4_cast(
|
||||
detail::tquat<T> const & x);
|
||||
|
||||
/// Converts a 3 * 3 matrix to a quaternion.
|
||||
///
|
||||
/// @see - gtc_quaternion
|
||||
/// @see gtc_quaternion
|
||||
template <typename T>
|
||||
detail::tquat<T> quat_cast(
|
||||
detail::tmat3x3<T> const & x);
|
||||
|
||||
/// Converts a 4 * 4 matrix to a quaternion.
|
||||
///
|
||||
/// @see - gtc_quaternion
|
||||
/// @see gtc_quaternion
|
||||
template <typename T>
|
||||
detail::tquat<T> quat_cast(
|
||||
detail::tmat4x4<T> const & x);
|
||||
|
||||
/// Quaternion of floating-point numbers.
|
||||
///
|
||||
/// @see - gtc_quaternion
|
||||
/// @see gtc_quaternion
|
||||
typedef detail::tquat<float> quat;
|
||||
|
||||
/// Quaternion of half-precision floating-point numbers.
|
||||
///
|
||||
/// @see - gtc_quaternion
|
||||
typedef detail::tquat<detail::thalf> hquat;
|
||||
/// @see gtc_quaternion
|
||||
typedef detail::tquat<detail::half> hquat;
|
||||
|
||||
/// Quaternion of single-precision floating-point numbers.
|
||||
///
|
||||
/// @see - gtc_quaternion
|
||||
/// @see gtc_quaternion
|
||||
typedef detail::tquat<float> fquat;
|
||||
|
||||
/// Quaternion of double-precision floating-point numbers.
|
||||
///
|
||||
/// @see - gtc_quaternion
|
||||
/// @see gtc_quaternion
|
||||
typedef detail::tquat<double> dquat;
|
||||
|
||||
/// Quaternion of low precision floating-point numbers.
|
||||
///
|
||||
/// @see - gtc_quaternion
|
||||
/// @see gtc_quaternion
|
||||
typedef detail::tquat<lowp_float> lowp_quat;
|
||||
|
||||
/// Quaternion of medium precision floating-point numbers.
|
||||
///
|
||||
/// @see - gtc_quaternion
|
||||
/// @see gtc_quaternion
|
||||
typedef detail::tquat<mediump_float> mediump_quat;
|
||||
|
||||
/// Quaternion of high precision floating-point numbers.
|
||||
///
|
||||
/// @see - gtc_quaternion
|
||||
/// @see gtc_quaternion
|
||||
typedef detail::tquat<highp_float> highp_quat;
|
||||
|
||||
/// @}
|
||||
|
||||
@@ -19,12 +19,12 @@
|
||||
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
/// THE SOFTWARE.
|
||||
///
|
||||
///
|
||||
/// @ref gtc_type_precision
|
||||
/// @file glm/gtc/type_precision.hpp
|
||||
/// @date 2009-06-04 / 2011-06-05
|
||||
/// @date 2009-06-04 / 2011-12-07
|
||||
/// @author Christophe Riccio
|
||||
///
|
||||
///
|
||||
/// @see core (dependence)
|
||||
/// @see gtc_half_float (dependence)
|
||||
/// @see gtc_quaternion (dependence)
|
||||
@@ -60,186 +60,606 @@ namespace glm
|
||||
/// @addtogroup gtc_type_precision
|
||||
/// @{
|
||||
|
||||
typedef detail::int8 int8; //!< \brief 8bit signed integer. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::int16 int16; //!< \brief 16bit signed integer. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::int32 int32; //!< \brief 32bit signed integer. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::int64 int64; //!< \brief 64bit signed integer. (from GLM_GTC_type_precision extension)
|
||||
/// 8 bit signed integer type.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::int8 int8;
|
||||
|
||||
/// 16 bit signed integer type.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::int16 int16;
|
||||
|
||||
typedef detail::int8 int8_t; //!< \brief 8bit signed integer. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::int16 int16_t; //!< \brief 16bit signed integer. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::int32 int32_t; //!< \brief 32bit signed integer. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::int64 int64_t; //!< \brief 64bit signed integer. (from GLM_GTC_type_precision extension)
|
||||
/// 32 bit signed integer type.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::int32 int32;
|
||||
|
||||
typedef int8 i8; //!< \brief 8bit signed integer. (from GLM_GTC_type_precision extension)
|
||||
typedef int16 i16; //!< \brief 16bit signed integer. (from GLM_GTC_type_precision extension)
|
||||
typedef int32 i32; //!< \brief 32bit signed integer. (from GLM_GTC_type_precision extension)
|
||||
typedef int64 i64; //!< \brief 64bit signed integer. (from GLM_GTC_type_precision extension)
|
||||
/// 64 bit signed integer type.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::int64 int64;
|
||||
|
||||
typedef detail::tvec1<i8> i8vec1; //!< \brief 8bit signed integer scalar. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tvec2<i8> i8vec2; //!< \brief 8bit signed integer vector of 2 components. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tvec3<i8> i8vec3; //!< \brief 8bit signed integer vector of 3 components. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tvec4<i8> i8vec4; //!< \brief 8bit signed integer vector of 4 components. (from GLM_GTC_type_precision extension)
|
||||
|
||||
typedef detail::tvec1<i16> i16vec1; //!< \brief 16bit signed integer scalar. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tvec2<i16> i16vec2; //!< \brief 16bit signed integer vector of 2 components. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tvec3<i16> i16vec3; //!< \brief 16bit signed integer vector of 3 components. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tvec4<i16> i16vec4; //!< \brief 16bit signed integer vector of 4 components. (from GLM_GTC_type_precision extension)
|
||||
/// 8 bit signed integer type.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::int8 int8_t;
|
||||
|
||||
/// 16 bit signed integer type.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::int16 int16_t;
|
||||
|
||||
typedef detail::tvec1<i32> i32vec1; //!< \brief 32bit signed integer scalar. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tvec2<i32> i32vec2; //!< \brief 32bit signed integer vector of 2 components. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tvec3<i32> i32vec3; //!< \brief 32bit signed integer vector of 3 components. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tvec4<i32> i32vec4; //!< \brief 32bit signed integer vector of 4 components. (from GLM_GTC_type_precision extension)
|
||||
/// 32 bit signed integer type.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::int32 int32_t;
|
||||
|
||||
/// 64 bit signed integer type.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::int64 int64_t;
|
||||
|
||||
|
||||
/// 8 bit signed integer type.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::int8 i8;
|
||||
|
||||
/// 16 bit signed integer type.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::int16 i16;
|
||||
|
||||
/// 32 bit signed integer type.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::int32 i32;
|
||||
|
||||
/// 64 bit signed integer type.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::int64 i64;
|
||||
|
||||
|
||||
/// 8 bit signed integer scalar type.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tvec1<i8> i8vec1;
|
||||
|
||||
/// 8 bit signed integer vector of 2 components type.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tvec2<i8> i8vec2;
|
||||
|
||||
/// 8 bit signed integer vector of 3 components type.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tvec3<i8> i8vec3;
|
||||
|
||||
/// 8 bit signed integer vector of 4 components type.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tvec4<i8> i8vec4;
|
||||
|
||||
|
||||
/// 16 bit signed integer scalar type.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tvec1<i16> i16vec1;
|
||||
|
||||
/// 16 bit signed integer vector of 2 components type.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tvec2<i16> i16vec2;
|
||||
|
||||
/// 16 bit signed integer vector of 3 components type.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tvec3<i16> i16vec3;
|
||||
|
||||
/// 16 bit signed integer vector of 4 components type.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tvec4<i16> i16vec4;
|
||||
|
||||
|
||||
/// 32 bit signed integer scalar type.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tvec1<i32> i32vec1;
|
||||
|
||||
/// 32 bit signed integer vector of 2 components type.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tvec2<i32> i32vec2;
|
||||
|
||||
/// 32 bit signed integer vector of 3 components type.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tvec3<i32> i32vec3;
|
||||
|
||||
/// 32 bit signed integer vector of 4 components type.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tvec4<i32> i32vec4;
|
||||
|
||||
|
||||
/// 64 bit signed integer scalar type.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tvec1<i64> i64vec1;
|
||||
|
||||
/// 64 bit signed integer vector of 2 components type.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tvec2<i64> i64vec2;
|
||||
|
||||
/// 64 bit signed integer vector of 3 components type.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tvec3<i64> i64vec3;
|
||||
|
||||
/// 64 bit signed integer vector of 4 components type.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tvec4<i64> i64vec4;
|
||||
|
||||
typedef detail::tvec1<i64> i64vec1; //!< \brief 32bit signed integer scalar. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tvec2<i64> i64vec2; //!< \brief 64bit signed integer vector of 2 components. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tvec3<i64> i64vec3; //!< \brief 64bit signed integer vector of 3 components. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tvec4<i64> i64vec4; //!< \brief 64bit signed integer vector of 4 components. (from GLM_GTC_type_precision extension)
|
||||
|
||||
/////////////////////////////
|
||||
// Unsigned int vector types
|
||||
|
||||
typedef detail::uint8 uint8; //!< \brief 8bit unsigned integer. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::uint16 uint16; //!< \brief 16bit unsigned integer. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::uint32 uint32; //!< \brief 32bit unsigned integer. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::uint64 uint64; //!< \brief 64bit unsigned integer. (from GLM_GTC_type_precision extension)
|
||||
/// 8 bit unsigned integer type.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::uint8 uint8;
|
||||
|
||||
/// 16 bit unsigned integer type.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::uint16 uint16;
|
||||
|
||||
typedef detail::uint8 uint8_t; //!< \brief 8bit unsigned integer. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::uint16 uint16_t; //!< \brief 16bit unsigned integer. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::uint32 uint32_t; //!< \brief 32bit unsigned integer. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::uint64 uint64_t; //!< \brief 64bit unsigned integer. (from GLM_GTC_type_precision extension)
|
||||
/// 32 bit unsigned integer type.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::uint32 uint32;
|
||||
|
||||
typedef uint8 u8; //!< \brief 8bit unsigned integer. (from GLM_GTC_type_precision extension)
|
||||
typedef uint16 u16; //!< \brief 16bit unsigned integer. (from GLM_GTC_type_precision extension)
|
||||
typedef uint32 u32; //!< \brief 32bit unsigned integer. (from GLM_GTC_type_precision extension)
|
||||
typedef uint64 u64; //!< \brief 64bit unsigned integer. (from GLM_GTC_type_precision extension)
|
||||
/// 64 bit unsigned integer type.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::uint64 uint64;
|
||||
|
||||
typedef detail::tvec1<u8> u8vec1; //!< \brief 8bit unsigned integer scalar. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tvec2<u8> u8vec2; //!< \brief 8bit unsigned integer vector of 2 components. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tvec3<u8> u8vec3; //!< \brief 8bit unsigned integer vector of 3 components. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tvec4<u8> u8vec4; //!< \brief 8bit unsigned integer vector of 4 components. (from GLM_GTC_type_precision extension)
|
||||
|
||||
typedef detail::tvec1<u16> u16vec1; //!< \brief 16bit unsigned integer scalar. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tvec2<u16> u16vec2; //!< \brief 16bit unsigned integer vector of 2 components. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tvec3<u16> u16vec3; //!< \brief 16bit unsigned integer vector of 3 components. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tvec4<u16> u16vec4; //!< \brief 16bit unsigned integer vector of 4 components. (from GLM_GTC_type_precision extension)
|
||||
/// 8 bit unsigned integer type.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::uint8 uint8_t;
|
||||
|
||||
/// 16 bit unsigned integer type.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::uint16 uint16_t;
|
||||
|
||||
typedef detail::tvec1<u32> u32vec1; //!< \brief 32bit unsigned integer scalar. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tvec2<u32> u32vec2; //!< \brief 32bit unsigned integer vector of 2 components. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tvec3<u32> u32vec3; //!< \brief 32bit unsigned integer vector of 3 components. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tvec4<u32> u32vec4; //!< \brief 32bit unsigned integer vector of 4 components. (from GLM_GTC_type_precision extension)
|
||||
/// 32 bit unsigned integer type.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::uint32 uint32_t;
|
||||
|
||||
/// 64 bit unsigned integer type.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::uint64 uint64_t;
|
||||
|
||||
|
||||
/// 8 bit unsigned integer type.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::uint8 u8;
|
||||
|
||||
/// 16 bit unsigned integer type.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::uint16 u16;
|
||||
|
||||
/// 32 bit unsigned integer type.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::uint32 u32;
|
||||
|
||||
/// 64 bit unsigned integer type.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::uint64 u64;
|
||||
|
||||
|
||||
/// 8 bit unsigned integer scalar type.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tvec1<u8> u8vec1;
|
||||
|
||||
/// 8 bit unsigned integer vector of 2 components type.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tvec2<u8> u8vec2;
|
||||
|
||||
/// 8 bit unsigned integer vector of 3 components type.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tvec3<u8> u8vec3;
|
||||
|
||||
/// 8 bit unsigned integer vector of 4 components type.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tvec4<u8> u8vec4;
|
||||
|
||||
|
||||
/// 16 bit unsigned integer scalar type.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tvec1<u16> u16vec1;
|
||||
|
||||
/// 16 bit unsigned integer vector of 2 components type.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tvec2<u16> u16vec2;
|
||||
|
||||
/// 16 bit unsigned integer vector of 3 components type.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tvec3<u16> u16vec3;
|
||||
|
||||
/// 16 bit unsigned integer vector of 4 components type.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tvec4<u16> u16vec4;
|
||||
|
||||
|
||||
/// 32 bit unsigned integer scalar type.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tvec1<u32> u32vec1;
|
||||
|
||||
/// 32 bit unsigned integer vector of 2 components type.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tvec2<u32> u32vec2;
|
||||
|
||||
/// 32 bit unsigned integer vector of 3 components type.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tvec3<u32> u32vec3;
|
||||
|
||||
/// 32 bit unsigned integer vector of 4 components type.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tvec4<u32> u32vec4;
|
||||
|
||||
|
||||
/// 64 bit unsigned integer scalar type.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tvec1<u64> u64vec1;
|
||||
|
||||
/// 64 bit unsigned integer vector of 2 components type.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tvec2<u64> u64vec2;
|
||||
|
||||
/// 64 bit unsigned integer vector of 3 components type.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tvec3<u64> u64vec3;
|
||||
|
||||
/// 64 bit unsigned integer vector of 4 components type.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tvec4<u64> u64vec4;
|
||||
|
||||
typedef detail::tvec1<u64> u64vec1; //!< \brief 64bit unsigned integer scalar. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tvec2<u64> u64vec2; //!< \brief 64bit unsigned integer vector of 2 components. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tvec3<u64> u64vec3; //!< \brief 64bit unsigned integer vector of 3 components. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tvec4<u64> u64vec4; //!< \brief 64bit unsigned integer vector of 4 components. (from GLM_GTC_type_precision extension)
|
||||
|
||||
//////////////////////
|
||||
// Float vector types
|
||||
|
||||
typedef detail::float16 float16; //!< \brief Half-precision floating-point scalar. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::float32 float32; //!< \brief Single-precision floating-point scalar. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::float64 float64; //!< \brief Double-precision floating-point scalar. (from GLM_GTC_type_precision extension)
|
||||
/// 16 bit half-precision floating-point scalar.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::float16 float16;
|
||||
|
||||
typedef detail::float16 float16_t; //!< \brief Half-precision floating-point scalar. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::float32 float32_t; //!< \brief Single-precision floating-point scalar. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::float64 float64_t; //!< \brief Double-precision floating-point scalar. (from GLM_GTC_type_precision extension)
|
||||
/// 32 bit single-precision floating-point scalar.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::float32 float32;
|
||||
|
||||
typedef float16 f16; //!< \brief Half-precision floating-point scalar. (from GLM_GTC_type_precision extension)
|
||||
typedef float32 f32; //!< \brief Single-precision floating-point scalar. (from GLM_GTC_type_precision extension)
|
||||
typedef float64 f64; //!< \brief Double-precision floating-point scalar. (from GLM_GTC_type_precision extension)
|
||||
/// 64 bit double-precision floating-point scalar.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::float64 float64;
|
||||
|
||||
typedef detail::tvec2<float> fvec2; //!< Vector of 2 single-precision floating-point numbers. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tvec3<float> fvec3; //!< Vector of 3 single-precision floating-point numbers. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tvec4<float> fvec4; //!< Vector of 4 single-precision floating-point numbers. (from GLM_GTC_type_precision extension)
|
||||
|
||||
typedef detail::tvec1<f16> f16vec1; //!< \brief Half-precision floating-point scalar. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tvec2<f16> f16vec2; //!< \brief Half-precision floating-point vector of 2 components. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tvec3<f16> f16vec3; //!< \brief Half-precision floating-point vector of 3 components. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tvec4<f16> f16vec4; //!< \brief Half-precision floating-point vector of 4 components. (from GLM_GTC_type_precision extension)
|
||||
/// 16 bit half-precision floating-point scalar.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::float16 float16_t;
|
||||
|
||||
typedef detail::tvec1<f32> f32vec1; //!< \brief Single-precision floating-point scalar. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tvec2<f32> f32vec2; //!< \brief Single-precision floating-point vector of 2 components. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tvec3<f32> f32vec3; //!< \brief Single-precision floating-point vector of 3 components. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tvec4<f32> f32vec4; //!< \brief Single-precision floating-point vector of 4 components. (from GLM_GTC_type_precision extension)
|
||||
/// 32 bit single-precision floating-point scalar.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::float32 float32_t;
|
||||
|
||||
/// 64 bit double-precision floating-point scalar.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::float64 float64_t;
|
||||
|
||||
|
||||
/// 16 bit half-precision floating-point scalar.
|
||||
/// @see gtc_type_precision
|
||||
typedef float16 f16;
|
||||
|
||||
/// 32 bit single-precision floating-point scalar.
|
||||
/// @see gtc_type_precision
|
||||
typedef float32 f32;
|
||||
|
||||
/// 64 bit double-precision floating-point scalar.
|
||||
/// @see gtc_type_precision
|
||||
typedef float64 f64;
|
||||
|
||||
|
||||
/// Single-precision floating-point vector of 1 component.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tvec1<float> fvec1;
|
||||
|
||||
/// Single-precision floating-point vector of 2 components.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tvec2<float> fvec2;
|
||||
|
||||
/// Single-precision floating-point vector of 3 components.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tvec3<float> fvec3;
|
||||
|
||||
/// Single-precision floating-point vector of 4 components.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tvec4<float> fvec4;
|
||||
|
||||
|
||||
/// Half-precision floating-point vector of 1 component.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tvec1<f16> f16vec1;
|
||||
|
||||
/// Half-precision floating-point vector of 2 components.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tvec2<f16> f16vec2;
|
||||
|
||||
/// Half-precision floating-point vector of 3 components.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tvec3<f16> f16vec3;
|
||||
|
||||
/// Half-precision floating-point vector of 4 components.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tvec4<f16> f16vec4;
|
||||
|
||||
|
||||
/// Single-precision floating-point vector of 1 component.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tvec1<f32> f32vec1;
|
||||
|
||||
/// Single-precision floating-point vector of 2 components.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tvec2<f32> f32vec2;
|
||||
|
||||
/// Single-precision floating-point vector of 3 components.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tvec3<f32> f32vec3;
|
||||
|
||||
/// Single-precision floating-point vector of 4 components.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tvec4<f32> f32vec4;
|
||||
|
||||
|
||||
/// Double-precision floating-point vector of 1 component.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tvec1<f64> f64vec1;
|
||||
|
||||
/// Double-precision floating-point vector of 2 components.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tvec2<f64> f64vec2;
|
||||
|
||||
/// Double-precision floating-point vector of 3 components.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tvec3<f64> f64vec3;
|
||||
|
||||
/// Double-precision floating-point vector of 4 components.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tvec4<f64> f64vec4;
|
||||
|
||||
typedef detail::tvec1<f64> f64vec1; //!< \brief Single-precision floating-point scalar. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tvec2<f64> f64vec2; //!< \brief Double-precision floating-point vector of 2 components. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tvec3<f64> f64vec3; //!< \brief Double-precision floating-point vector of 3 components. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tvec4<f64> f64vec4; //!< \brief Double-precision floating-point vector of 4 components. (from GLM_GTC_type_precision extension)
|
||||
|
||||
//////////////////////
|
||||
// Float matrix types
|
||||
|
||||
//typedef f32 fmat1; //!< \brief Single-precision floating-point scalar. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat2x2<f32> fmat2; //!< \brief Single-precision floating-point 2x2 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat3x3<f32> fmat3; //!< \brief Single-precision floating-point 3x3 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat4x4<f32> fmat4; //!< \brief Single-precision floating-point 4x4 matrix. (from GLM_GTC_type_precision extension)
|
||||
/// Single-precision floating-point 1x1 matrix.
|
||||
/// @see gtc_type_precision
|
||||
//typedef detail::tmat1x1<f32> fmat1;
|
||||
|
||||
//typedef f32 fmat1x1; //!< \brief Single-precision floating-point scalar. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat2x2<f32> fmat2x2; //!< \brief Single-precision floating-point 2x2 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat2x3<f32> fmat2x3; //!< \brief Single-precision floating-point 2x3 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat2x4<f32> fmat2x4; //!< \brief Single-precision floating-point 2x4 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat3x2<f32> fmat3x2; //!< \brief Single-precision floating-point 3x2 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat3x3<f32> fmat3x3; //!< \brief Single-precision floating-point 3x3 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat3x4<f32> fmat3x4; //!< \brief Single-precision floating-point 3x4 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat4x2<f32> fmat4x2; //!< \brief Single-precision floating-point 4x2 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat4x3<f32> fmat4x3; //!< \brief Single-precision floating-point 4x3 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat4x4<f32> fmat4x4; //!< \brief Single-precision floating-point 4x4 matrix. (from GLM_GTC_type_precision extension)
|
||||
/// Single-precision floating-point 2x2 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat2x2<f32> fmat2;
|
||||
|
||||
//typedef f16 f16mat1; //!< \brief Half-precision floating-point scalar. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat2x2<f16> f16mat2; //!< \brief Half-precision floating-point 2x2 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat3x3<f16> f16mat3; //!< \brief Half-precision floating-point 3x3 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat4x4<f16> f16mat4; //!< \brief Half-precision floating-point 4x4 matrix. (from GLM_GTC_type_precision extension)
|
||||
/// Single-precision floating-point 3x3 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat3x3<f32> fmat3;
|
||||
|
||||
//typedef f16 f16mat1x1; //!< \brief Half-precision floating-point scalar. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat2x2<f16> f16mat2x2; //!< \brief Half-precision floating-point 2x2 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat2x3<f16> f16mat2x3; //!< \brief Half-precision floating-point 2x3 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat2x4<f16> f16mat2x4; //!< \brief Half-precision floating-point 2x4 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat3x2<f16> f16mat3x2; //!< \brief Half-precision floating-point 3x2 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat3x3<f16> f16mat3x3; //!< \brief Half-precision floating-point 3x3 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat3x4<f16> f16mat3x4; //!< \brief Half-precision floating-point 3x4 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat4x2<f16> f16mat4x2; //!< \brief Half-precision floating-point 4x2 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat4x3<f16> f16mat4x3; //!< \brief Half-precision floating-point 4x3 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat4x4<f16> f16mat4x4; //!< \brief Half-precision floating-point 4x4 matrix. (from GLM_GTC_type_precision extension)
|
||||
/// Single-precision floating-point 4x4 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat4x4<f32> fmat4;
|
||||
|
||||
//typedef f32 f32mat1; //!< \brief Single-precision floating-point scalar. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat2x2<f32> f32mat2; //!< \brief Single-precision floating-point 2x2 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat3x3<f32> f32mat3; //!< \brief Single-precision floating-point 3x3 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat4x4<f32> f32mat4; //!< \brief Single-precision floating-point 4x4 matrix. (from GLM_GTC_type_precision extension)
|
||||
|
||||
//typedef f32 f32mat1x1; //!< \brief Single-precision floating-point scalar. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat2x2<f32> f32mat2x2; //!< \brief Single-precision floating-point 2x2 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat2x3<f32> f32mat2x3; //!< \brief Single-precision floating-point 2x3 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat2x4<f32> f32mat2x4; //!< \brief Single-precision floating-point 2x4 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat3x2<f32> f32mat3x2; //!< \brief Single-precision floating-point 3x2 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat3x3<f32> f32mat3x3; //!< \brief Single-precision floating-point 3x3 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat3x4<f32> f32mat3x4; //!< \brief Single-precision floating-point 3x4 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat4x2<f32> f32mat4x2; //!< \brief Single-precision floating-point 4x2 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat4x3<f32> f32mat4x3; //!< \brief Single-precision floating-point 4x3 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat4x4<f32> f32mat4x4; //!< \brief Single-precision floating-point 4x4 matrix. (from GLM_GTC_type_precision extension)
|
||||
/// Single-precision floating-point 1x1 matrix.
|
||||
/// @see gtc_type_precision
|
||||
//typedef f32 fmat1x1;
|
||||
|
||||
//typedef f64 f64mat1; //!< \brief Double-precision floating-point scalar. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat2x2<f64> f64mat2; //!< \brief Double-precision floating-point 2x2 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat3x3<f64> f64mat3; //!< \brief Double-precision floating-point 3x3 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat4x4<f64> f64mat4; //!< \brief Double-precision floating-point 4x4 matrix. (from GLM_GTC_type_precision extension)
|
||||
/// Single-precision floating-point 2x2 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat2x2<f32> fmat2x2;
|
||||
|
||||
/// Single-precision floating-point 2x3 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat2x3<f32> fmat2x3;
|
||||
|
||||
/// Single-precision floating-point 2x4 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat2x4<f32> fmat2x4;
|
||||
|
||||
/// Single-precision floating-point 3x2 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat3x2<f32> fmat3x2;
|
||||
|
||||
/// Single-precision floating-point 3x3 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat3x3<f32> fmat3x3;
|
||||
|
||||
/// Single-precision floating-point 3x4 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat3x4<f32> fmat3x4;
|
||||
|
||||
/// Single-precision floating-point 4x2 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat4x2<f32> fmat4x2;
|
||||
|
||||
/// Single-precision floating-point 4x3 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat4x3<f32> fmat4x3;
|
||||
|
||||
/// Single-precision floating-point 4x4 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat4x4<f32> fmat4x4;
|
||||
|
||||
|
||||
/// Half-precision floating-point 1x1 matrix.
|
||||
/// @see gtc_type_precision
|
||||
//typedef detail::tmat1x1<f16> f16mat1;
|
||||
|
||||
/// Half-precision floating-point 2x2 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat2x2<f16> f16mat2;
|
||||
|
||||
/// Half-precision floating-point 3x3 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat3x3<f16> f16mat3;
|
||||
|
||||
/// Half-precision floating-point 4x4 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat4x4<f16> f16mat4;
|
||||
|
||||
|
||||
/// Half-precision floating-point 1x1 matrix.
|
||||
/// @see gtc_type_precision
|
||||
//typedef f16 f16mat1x1;
|
||||
|
||||
/// Half-precision floating-point 2x2 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat2x2<f16> f16mat2x2;
|
||||
|
||||
/// Half-precision floating-point 2x3 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat2x3<f16> f16mat2x3;
|
||||
|
||||
/// Half-precision floating-point 2x4 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat2x4<f16> f16mat2x4;
|
||||
|
||||
/// Half-precision floating-point 3x2 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat3x2<f16> f16mat3x2;
|
||||
|
||||
/// Half-precision floating-point 3x3 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat3x3<f16> f16mat3x3;
|
||||
|
||||
/// Half-precision floating-point 3x4 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat3x4<f16> f16mat3x4;
|
||||
|
||||
/// Half-precision floating-point 4x2 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat4x2<f16> f16mat4x2;
|
||||
|
||||
/// Half-precision floating-point 4x3 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat4x3<f16> f16mat4x3;
|
||||
|
||||
/// Half-precision floating-point 4x4 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat4x4<f16> f16mat4x4;
|
||||
|
||||
|
||||
/// Single-precision floating-point 1x1 matrix.
|
||||
/// @see gtc_type_precision
|
||||
//typedef detail::tmat1x1<f32> f32mat1;
|
||||
|
||||
/// Single-precision floating-point 2x2 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat2x2<f32> f32mat2;
|
||||
|
||||
/// Single-precision floating-point 3x3 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat3x3<f32> f32mat3;
|
||||
|
||||
/// Single-precision floating-point 4x4 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat4x4<f32> f32mat4;
|
||||
|
||||
|
||||
/// Single-precision floating-point 1x1 matrix.
|
||||
/// @see gtc_type_precision
|
||||
//typedef f32 f32mat1x1;
|
||||
|
||||
/// Single-precision floating-point 2x2 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat2x2<f32> f32mat2x2;
|
||||
|
||||
/// Single-precision floating-point 2x3 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat2x3<f32> f32mat2x3;
|
||||
|
||||
/// Single-precision floating-point 2x4 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat2x4<f32> f32mat2x4;
|
||||
|
||||
/// Single-precision floating-point 3x2 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat3x2<f32> f32mat3x2;
|
||||
|
||||
/// Single-precision floating-point 3x3 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat3x3<f32> f32mat3x3;
|
||||
|
||||
/// Single-precision floating-point 3x4 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat3x4<f32> f32mat3x4;
|
||||
|
||||
/// Single-precision floating-point 4x2 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat4x2<f32> f32mat4x2;
|
||||
|
||||
/// Single-precision floating-point 4x3 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat4x3<f32> f32mat4x3;
|
||||
|
||||
/// Single-precision floating-point 4x4 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat4x4<f32> f32mat4x4;
|
||||
|
||||
|
||||
/// Double-precision floating-point 1x1 matrix.
|
||||
/// @see gtc_type_precision
|
||||
//typedef detail::tmat1x1<f64> f64mat1;
|
||||
|
||||
/// Double-precision floating-point 2x2 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat2x2<f64> f64mat2;
|
||||
|
||||
/// Double-precision floating-point 3x3 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat3x3<f64> f64mat3;
|
||||
|
||||
/// Double-precision floating-point 4x4 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat4x4<f64> f64mat4;
|
||||
|
||||
|
||||
/// Double-precision floating-point 1x1 matrix.
|
||||
/// @see gtc_type_precision
|
||||
//typedef f64 f64mat1x1;
|
||||
|
||||
/// Double-precision floating-point 2x2 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat2x2<f64> f64mat2x2;
|
||||
|
||||
/// Double-precision floating-point 2x3 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat2x3<f64> f64mat2x3;
|
||||
|
||||
/// Double-precision floating-point 2x4 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat2x4<f64> f64mat2x4;
|
||||
|
||||
/// Double-precision floating-point 3x2 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat3x2<f64> f64mat3x2;
|
||||
|
||||
/// Double-precision floating-point 3x3 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat3x3<f64> f64mat3x3;
|
||||
|
||||
/// Double-precision floating-point 3x4 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat3x4<f64> f64mat3x4;
|
||||
|
||||
/// Double-precision floating-point 4x2 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat4x2<f64> f64mat4x2;
|
||||
|
||||
/// Double-precision floating-point 4x3 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat4x3<f64> f64mat4x3;
|
||||
|
||||
/// Double-precision floating-point 4x4 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat4x4<f64> f64mat4x4;
|
||||
|
||||
//typedef f64 f64mat1x1; //!< \brief Double-precision floating-point scalar. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat2x2<f64> f64mat2x2; //!< \brief Double-precision floating-point 2x2 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat2x3<f64> f64mat2x3; //!< \brief Double-precision floating-point 2x3 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat2x4<f64> f64mat2x4; //!< \brief Double-precision floating-point 2x4 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat3x2<f64> f64mat3x2; //!< \brief Double-precision floating-point 3x2 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat3x3<f64> f64mat3x3; //!< \brief Double-precision floating-point 3x3 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat3x4<f64> f64mat3x4; //!< \brief Double-precision floating-point 3x4 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat4x2<f64> f64mat4x2; //!< \brief Double-precision floating-point 4x2 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat4x3<f64> f64mat4x3; //!< \brief Double-precision floating-point 4x3 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat4x4<f64> f64mat4x4; //!< \brief Double-precision floating-point 4x4 matrix. (from GLM_GTC_type_precision extension)
|
||||
|
||||
//////////////////////////
|
||||
// Float quaternion types
|
||||
// Quaternion types
|
||||
|
||||
typedef detail::tquat<f16> f16quat; //!< \brief Half-precision floating-point quaternion. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tquat<f32> f32quat; //!< \brief Single-precision floating-point quaternion. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tquat<f64> f64quat; //!< \brief Double-precision floating-point quaternion. (from GLM_GTC_type_precision extension)
|
||||
/// Half-precision floating-point quaternion.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tquat<f16> f16quat;
|
||||
|
||||
/// Single-precision floating-point quaternion.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tquat<f32> f32quat;
|
||||
|
||||
/// Double-precision floating-point quaternion.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tquat<f64> f64quat;
|
||||
|
||||
/// @}
|
||||
}//namespace glm
|
||||
|
||||
@@ -50,20 +50,23 @@ namespace glm
|
||||
/// @addtogroup gtx_associated_min_max
|
||||
/// @{
|
||||
|
||||
//! \brief Min comparison between 2 variables
|
||||
/// Min comparison between 2 variables
|
||||
/// @see gtx_associated_min_max
|
||||
template<typename genTypeT, typename genTypeU>
|
||||
genTypeU associatedMin(
|
||||
const genTypeT& x, const genTypeU& a,
|
||||
const genTypeT& y, const genTypeU& b);
|
||||
|
||||
//! \brief Min comparison between 3 variables
|
||||
/// Min comparison between 3 variables
|
||||
/// @see gtx_associated_min_max
|
||||
template<typename genTypeT, typename genTypeU>
|
||||
genTypeU associatedMin(
|
||||
const genTypeT& x, const genTypeU& a,
|
||||
const genTypeT& y, const genTypeU& b,
|
||||
const genTypeT& z, const genTypeU& c);
|
||||
|
||||
//! \brief Min comparison between 4 variables
|
||||
/// Min comparison between 4 variables
|
||||
/// @see gtx_associated_min_max
|
||||
template<typename genTypeT, typename genTypeU>
|
||||
genTypeU associatedMin(
|
||||
const genTypeT& x, const genTypeU& a,
|
||||
@@ -71,20 +74,23 @@ namespace glm
|
||||
const genTypeT& z, const genTypeU& c,
|
||||
const genTypeT& w, const genTypeU& d);
|
||||
|
||||
//! \brief Max comparison between 2 variables
|
||||
/// Max comparison between 2 variables
|
||||
/// @see gtx_associated_min_max
|
||||
template<typename genTypeT, typename genTypeU>
|
||||
genTypeU associatedMax(
|
||||
const genTypeT& x, const genTypeU& a,
|
||||
const genTypeT& y, const genTypeU& b);
|
||||
|
||||
//! \brief Max comparison between 3 variables
|
||||
/// Max comparison between 3 variables
|
||||
/// @see gtx_associated_min_max
|
||||
template<typename genTypeT, typename genTypeU>
|
||||
genTypeU associatedMax(
|
||||
const genTypeT& x, const genTypeU& a,
|
||||
const genTypeT& y, const genTypeU& b,
|
||||
const genTypeT& z, const genTypeU& c);
|
||||
|
||||
//! \brief Max comparison between 4 variables
|
||||
/// Max comparison between 4 variables
|
||||
/// @see gtx_associated_min_max
|
||||
template<typename genTypeT, typename genTypeU>
|
||||
genTypeU associatedMax(
|
||||
const genTypeT& x, const genTypeU& a,
|
||||
|
||||
@@ -53,13 +53,13 @@ namespace glm
|
||||
/// @{
|
||||
|
||||
/// Build a mask of 'count' bits
|
||||
/// From GLM_GTX_bit extension.
|
||||
/// @see gtx_bit
|
||||
template <typename genIType>
|
||||
genIType mask(genIType const & count);
|
||||
|
||||
/// Component wise extraction of bit fields.
|
||||
/// genType and genIType could be a scalar or a vector.
|
||||
/// From GLM_GTX_bit extension.
|
||||
/// @see gtx_bit
|
||||
template <typename genIUType, typename sizeType>
|
||||
genIUType extractField(
|
||||
genIUType const & v,
|
||||
@@ -67,57 +67,57 @@ namespace glm
|
||||
sizeType const & count);
|
||||
|
||||
//! Find the lowest bit set to 1 in a integer variable.
|
||||
//! From GLM_GTX_bit extension.
|
||||
/// @see gtx_bit
|
||||
template <typename genType>
|
||||
int lowestBit(genType const & value);
|
||||
|
||||
//! Find the highest bit set to 1 in a integer variable.
|
||||
//! From GLM_GTX_bit extension.
|
||||
/// @see gtx_bit
|
||||
template <typename genType>
|
||||
int highestBit(genType const & value);
|
||||
|
||||
//! Find the highest bit set to 1 in a integer variable and return its value.
|
||||
//! From GLM_GTX_bit extension.
|
||||
/// @see gtx_bit
|
||||
template <typename genType>
|
||||
genType highestBitValue(genType const & value);
|
||||
|
||||
//! Return true if the value is a power of two number.
|
||||
//! From GLM_GTX_bit extension.
|
||||
/// @see gtx_bit
|
||||
template <typename genType>
|
||||
bool isPowerOfTwo(genType const & value);
|
||||
|
||||
//! Return the power of two number which value is just higher the input value.
|
||||
//! From GLM_GTX_bit extension.
|
||||
/// @see gtx_bit
|
||||
template <typename genType>
|
||||
genType powerOfTwoAbove(genType const & value);
|
||||
|
||||
//! Return the power of two number which value is just lower the input value.
|
||||
//! From GLM_GTX_bit extension.
|
||||
/// @see gtx_bit
|
||||
template <typename genType>
|
||||
genType powerOfTwoBelow(genType const & value);
|
||||
|
||||
//! Return the power of two number which value is the closet to the input value.
|
||||
//! From GLM_GTX_bit extension.
|
||||
/// @see gtx_bit
|
||||
template <typename genType>
|
||||
genType powerOfTwoNearest(genType const & value);
|
||||
|
||||
//! Revert all bits of any integer based type.
|
||||
//! From GLM_GTX_bit extension.
|
||||
/// @see gtx_bit
|
||||
template <typename genType>
|
||||
genType bitRevert(genType const & value);
|
||||
|
||||
//! Rotate all bits to the right.
|
||||
//! From GLM_GTX_bit extension.
|
||||
/// @see gtx_bit
|
||||
template <typename genType>
|
||||
genType bitRotateRight(genType const & In, std::size_t Shift);
|
||||
|
||||
//! Rotate all bits to the left.
|
||||
//! From GLM_GTX_bit extension.
|
||||
/// @see gtx_bit
|
||||
template <typename genType>
|
||||
genType bitRotateLeft(genType const & In, std::size_t Shift);
|
||||
|
||||
//! Set to 1 a range of bits.
|
||||
//! From GLM_GTX_bit extension.
|
||||
/// @see gtx_bit
|
||||
template <typename genIUType>
|
||||
genIUType fillBitfieldWithOne(
|
||||
genIUType const & Value,
|
||||
@@ -125,7 +125,7 @@ namespace glm
|
||||
int const & ToBit);
|
||||
|
||||
//! Set to 0 a range of bits.
|
||||
//! From GLM_GTX_bit extension.
|
||||
/// @see gtx_bit
|
||||
template <typename genIUType>
|
||||
genIUType fillBitfieldWithZero(
|
||||
genIUType const & Value,
|
||||
|
||||
@@ -51,7 +51,7 @@ namespace glm
|
||||
/// @{
|
||||
|
||||
/// Find the point on a straight line which is the closet of a point.
|
||||
/// From GLM_GTX_closest_point extension.
|
||||
/// @see gtx_closest_point
|
||||
template <typename T>
|
||||
detail::tvec3<T> closestPointOnLine(
|
||||
detail::tvec3<T> const & point,
|
||||
|
||||
@@ -53,11 +53,11 @@ namespace glm
|
||||
/// @{
|
||||
|
||||
//! Conversion of a floating value into a 8bit unsigned int value.
|
||||
//! From GLM_GTX_color_cast extension.
|
||||
/// @see gtx_color_cast
|
||||
template <typename valType> uint8 u8channel_cast(valType a);
|
||||
|
||||
//! Conversion of a floating value into a 16bit unsigned int value.
|
||||
//! From GLM_GTX_color_cast extension.
|
||||
/// Conversion of a floating value into a 16bit unsigned int value.
|
||||
/// @see gtx_color_cast
|
||||
template <typename valType> uint16 u16channel_cast(valType a);
|
||||
|
||||
template <typename T> uint32 u32_rgbx_cast(const detail::tvec3<T>& c); //!< \brief Conversion of a 3 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension)
|
||||
|
||||
@@ -462,92 +462,92 @@ namespace glm
|
||||
}
|
||||
|
||||
template <>
|
||||
GLM_FUNC_QUALIFIER detail::thalf f16_channel_cast<uint16>(uint16 color)
|
||||
GLM_FUNC_QUALIFIER detail::half f16_channel_cast<uint16>(uint16 color)
|
||||
{
|
||||
return detail::thalf(static_cast<float>(color >> 0) / static_cast<float>(65535));
|
||||
return detail::half(static_cast<float>(color >> 0) / static_cast<float>(65535));
|
||||
}
|
||||
|
||||
template <>
|
||||
GLM_FUNC_QUALIFIER detail::tvec3<detail::thalf> f16_rgbx_cast<uint64>(uint64 color)
|
||||
GLM_FUNC_QUALIFIER detail::tvec3<detail::half> f16_rgbx_cast<uint64>(uint64 color)
|
||||
{
|
||||
detail::tvec3<detail::thalf> result;
|
||||
result.x = detail::thalf(static_cast<float>((color >> 0) & 0xFFFF) / static_cast<float>(65535));
|
||||
result.y = detail::thalf(static_cast<float>((color >> 16) & 0xFFFF) / static_cast<float>(65535));
|
||||
result.z = detail::thalf(static_cast<float>((color >> 32) & 0xFFFF) / static_cast<float>(65535));
|
||||
detail::tvec3<detail::half> result;
|
||||
result.x = detail::half(static_cast<float>((color >> 0) & 0xFFFF) / static_cast<float>(65535));
|
||||
result.y = detail::half(static_cast<float>((color >> 16) & 0xFFFF) / static_cast<float>(65535));
|
||||
result.z = detail::half(static_cast<float>((color >> 32) & 0xFFFF) / static_cast<float>(65535));
|
||||
return result;
|
||||
}
|
||||
|
||||
template <>
|
||||
GLM_FUNC_QUALIFIER detail::tvec3<detail::thalf> f16_xrgb_cast<uint64>(uint64 color)
|
||||
GLM_FUNC_QUALIFIER detail::tvec3<detail::half> f16_xrgb_cast<uint64>(uint64 color)
|
||||
{
|
||||
detail::tvec3<detail::thalf> result;
|
||||
result.x = detail::thalf(static_cast<float>((color >> 16) & 0xFFFF) / static_cast<float>(65535));
|
||||
result.y = detail::thalf(static_cast<float>((color >> 32) & 0xFFFF) / static_cast<float>(65535));
|
||||
result.z = detail::thalf(static_cast<float>((color >> 48) & 0xFFFF) / static_cast<float>(65535));
|
||||
detail::tvec3<detail::half> result;
|
||||
result.x = detail::half(static_cast<float>((color >> 16) & 0xFFFF) / static_cast<float>(65535));
|
||||
result.y = detail::half(static_cast<float>((color >> 32) & 0xFFFF) / static_cast<float>(65535));
|
||||
result.z = detail::half(static_cast<float>((color >> 48) & 0xFFFF) / static_cast<float>(65535));
|
||||
return result;
|
||||
}
|
||||
|
||||
template <>
|
||||
GLM_FUNC_QUALIFIER detail::tvec3<detail::thalf> f16_bgrx_cast<uint64>(uint64 color)
|
||||
GLM_FUNC_QUALIFIER detail::tvec3<detail::half> f16_bgrx_cast<uint64>(uint64 color)
|
||||
{
|
||||
detail::tvec3<detail::thalf> result;
|
||||
result.x = detail::thalf(static_cast<float>((color >> 32) & 0xFFFF) / static_cast<float>(65535));
|
||||
result.y = detail::thalf(static_cast<float>((color >> 16) & 0xFFFF) / static_cast<float>(65535));
|
||||
result.z = detail::thalf(static_cast<float>((color >> 0) & 0xFFFF) / static_cast<float>(65535));
|
||||
detail::tvec3<detail::half> result;
|
||||
result.x = detail::half(static_cast<float>((color >> 32) & 0xFFFF) / static_cast<float>(65535));
|
||||
result.y = detail::half(static_cast<float>((color >> 16) & 0xFFFF) / static_cast<float>(65535));
|
||||
result.z = detail::half(static_cast<float>((color >> 0) & 0xFFFF) / static_cast<float>(65535));
|
||||
return result;
|
||||
}
|
||||
|
||||
template <>
|
||||
GLM_FUNC_QUALIFIER detail::tvec3<detail::thalf> f16_xbgr_cast<uint64>(uint64 color)
|
||||
GLM_FUNC_QUALIFIER detail::tvec3<detail::half> f16_xbgr_cast<uint64>(uint64 color)
|
||||
{
|
||||
detail::tvec3<detail::thalf> result;
|
||||
result.x = detail::thalf(static_cast<float>((color >> 48) & 0xFFFF) / static_cast<float>(65535));
|
||||
result.y = detail::thalf(static_cast<float>((color >> 32) & 0xFFFF) / static_cast<float>(65535));
|
||||
result.z = detail::thalf(static_cast<float>((color >> 16) & 0xFFFF) / static_cast<float>(65535));
|
||||
detail::tvec3<detail::half> result;
|
||||
result.x = detail::half(static_cast<float>((color >> 48) & 0xFFFF) / static_cast<float>(65535));
|
||||
result.y = detail::half(static_cast<float>((color >> 32) & 0xFFFF) / static_cast<float>(65535));
|
||||
result.z = detail::half(static_cast<float>((color >> 16) & 0xFFFF) / static_cast<float>(65535));
|
||||
return result;
|
||||
}
|
||||
|
||||
template <>
|
||||
GLM_FUNC_QUALIFIER detail::tvec4<detail::thalf> f16_rgba_cast<uint64>(uint64 color)
|
||||
GLM_FUNC_QUALIFIER detail::tvec4<detail::half> f16_rgba_cast<uint64>(uint64 color)
|
||||
{
|
||||
detail::tvec4<detail::thalf> result;
|
||||
result.x = detail::thalf(static_cast<float>((color >> 0) & 0xFFFF) / static_cast<float>(65535));
|
||||
result.y = detail::thalf(static_cast<float>((color >> 16) & 0xFFFF) / static_cast<float>(65535));
|
||||
result.z = detail::thalf(static_cast<float>((color >> 32) & 0xFFFF) / static_cast<float>(65535));
|
||||
result.w = detail::thalf(static_cast<float>((color >> 48) & 0xFFFF) / static_cast<float>(65535));
|
||||
detail::tvec4<detail::half> result;
|
||||
result.x = detail::half(static_cast<float>((color >> 0) & 0xFFFF) / static_cast<float>(65535));
|
||||
result.y = detail::half(static_cast<float>((color >> 16) & 0xFFFF) / static_cast<float>(65535));
|
||||
result.z = detail::half(static_cast<float>((color >> 32) & 0xFFFF) / static_cast<float>(65535));
|
||||
result.w = detail::half(static_cast<float>((color >> 48) & 0xFFFF) / static_cast<float>(65535));
|
||||
return result;
|
||||
}
|
||||
|
||||
template <>
|
||||
GLM_FUNC_QUALIFIER detail::tvec4<detail::thalf> f16_argb_cast<uint64>(uint64 color)
|
||||
GLM_FUNC_QUALIFIER detail::tvec4<detail::half> f16_argb_cast<uint64>(uint64 color)
|
||||
{
|
||||
detail::tvec4<detail::thalf> result;
|
||||
result.x = detail::thalf(static_cast<float>((color >> 16) & 0xFFFF) / static_cast<float>(65535));
|
||||
result.y = detail::thalf(static_cast<float>((color >> 32) & 0xFFFF) / static_cast<float>(65535));
|
||||
result.z = detail::thalf(static_cast<float>((color >> 48) & 0xFFFF) / static_cast<float>(65535));
|
||||
result.w = detail::thalf(static_cast<float>((color >> 0) & 0xFFFF) / static_cast<float>(65535));
|
||||
detail::tvec4<detail::half> result;
|
||||
result.x = detail::half(static_cast<float>((color >> 16) & 0xFFFF) / static_cast<float>(65535));
|
||||
result.y = detail::half(static_cast<float>((color >> 32) & 0xFFFF) / static_cast<float>(65535));
|
||||
result.z = detail::half(static_cast<float>((color >> 48) & 0xFFFF) / static_cast<float>(65535));
|
||||
result.w = detail::half(static_cast<float>((color >> 0) & 0xFFFF) / static_cast<float>(65535));
|
||||
return result;
|
||||
}
|
||||
|
||||
template <>
|
||||
GLM_FUNC_QUALIFIER detail::tvec4<detail::thalf> f16_bgra_cast<uint64>(uint64 color)
|
||||
GLM_FUNC_QUALIFIER detail::tvec4<detail::half> f16_bgra_cast<uint64>(uint64 color)
|
||||
{
|
||||
detail::tvec4<detail::thalf> result;
|
||||
result.x = detail::thalf(static_cast<float>((color >> 32) & 0xFFFF) / static_cast<float>(65535));
|
||||
result.y = detail::thalf(static_cast<float>((color >> 16) & 0xFFFF) / static_cast<float>(65535));
|
||||
result.z = detail::thalf(static_cast<float>((color >> 0) & 0xFFFF) / static_cast<float>(65535));
|
||||
result.w = detail::thalf(static_cast<float>((color >> 48) & 0xFFFF) / static_cast<float>(65535));
|
||||
detail::tvec4<detail::half> result;
|
||||
result.x = detail::half(static_cast<float>((color >> 32) & 0xFFFF) / static_cast<float>(65535));
|
||||
result.y = detail::half(static_cast<float>((color >> 16) & 0xFFFF) / static_cast<float>(65535));
|
||||
result.z = detail::half(static_cast<float>((color >> 0) & 0xFFFF) / static_cast<float>(65535));
|
||||
result.w = detail::half(static_cast<float>((color >> 48) & 0xFFFF) / static_cast<float>(65535));
|
||||
return result;
|
||||
}
|
||||
|
||||
template <>
|
||||
GLM_FUNC_QUALIFIER detail::tvec4<detail::thalf> f16_abgr_cast<uint64>(uint64 color)
|
||||
GLM_FUNC_QUALIFIER detail::tvec4<detail::half> f16_abgr_cast<uint64>(uint64 color)
|
||||
{
|
||||
detail::tvec4<detail::thalf> result;
|
||||
result.x = detail::thalf(static_cast<float>((color >> 48) & 0xFFFF) / static_cast<float>(65535));
|
||||
result.y = detail::thalf(static_cast<float>((color >> 32) & 0xFFFF) / static_cast<float>(65535));
|
||||
result.z = detail::thalf(static_cast<float>((color >> 16) & 0xFFFF) / static_cast<float>(65535));
|
||||
result.w = detail::thalf(static_cast<float>((color >> 0) & 0xFFFF) / static_cast<float>(65535));
|
||||
detail::tvec4<detail::half> result;
|
||||
result.x = detail::half(static_cast<float>((color >> 48) & 0xFFFF) / static_cast<float>(65535));
|
||||
result.y = detail::half(static_cast<float>((color >> 32) & 0xFFFF) / static_cast<float>(65535));
|
||||
result.z = detail::half(static_cast<float>((color >> 16) & 0xFFFF) / static_cast<float>(65535));
|
||||
result.w = detail::half(static_cast<float>((color >> 0) & 0xFFFF) / static_cast<float>(65535));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -50,40 +50,40 @@ namespace glm
|
||||
/// @addtogroup gtx_color_space
|
||||
/// @{
|
||||
|
||||
//! Converts a color from HSV color space to its color in RGB color space.
|
||||
//! From GLM_GTX_color_space extension.
|
||||
/// Converts a color from HSV color space to its color in RGB color space.
|
||||
/// @see gtx_color_space
|
||||
template <typename valType>
|
||||
detail::tvec3<valType> rgbColor(
|
||||
detail::tvec3<valType> const & hsvValue);
|
||||
|
||||
//! Converts a color from RGB color space to its color in HSV color space.
|
||||
//! From GLM_GTX_color_space extension.
|
||||
/// Converts a color from RGB color space to its color in HSV color space.
|
||||
/// @see gtx_color_space
|
||||
template <typename valType>
|
||||
detail::tvec3<valType> hsvColor(
|
||||
detail::tvec3<valType> const & rgbValue);
|
||||
|
||||
//! Build a saturation matrix.
|
||||
//! From GLM_GTX_color_space extension
|
||||
/// Build a saturation matrix.
|
||||
/// @see gtx_color_space
|
||||
template <typename valType>
|
||||
detail::tmat4x4<valType> saturation(
|
||||
valType const s);
|
||||
|
||||
//! Modify the saturation of a color.
|
||||
//! From GLM_GTX_color_space extension.
|
||||
/// Modify the saturation of a color.
|
||||
/// @see gtx_color_space
|
||||
template <typename valType>
|
||||
detail::tvec3<valType> saturation(
|
||||
valType const s,
|
||||
detail::tvec3<valType> const & color);
|
||||
|
||||
//! Modify the saturation of a color.
|
||||
//! From GLM_GTX_color_space extension.
|
||||
/// Modify the saturation of a color.
|
||||
/// @see gtx_color_space
|
||||
template <typename valType>
|
||||
detail::tvec4<valType> saturation(
|
||||
valType const s,
|
||||
detail::tvec4<valType> const & color);
|
||||
|
||||
//! Compute color luminosity associating ratios (0.33, 0.59, 0.11) to RGB canals.
|
||||
//! From GLM_GTX_color_space extension.
|
||||
/// Compute color luminosity associating ratios (0.33, 0.59, 0.11) to RGB canals.
|
||||
/// @see gtx_color_space
|
||||
template <typename valType>
|
||||
valType luminosity(
|
||||
detail::tvec3<valType> const & color);
|
||||
|
||||
@@ -50,28 +50,28 @@ namespace glm
|
||||
/// @addtogroup gtx_color_space_YCoCg
|
||||
/// @{
|
||||
|
||||
//! Convert a color from RGB color space to YCoCg color space.
|
||||
//! From GLM_GTX_color_space_YCoCg extension.
|
||||
/// Convert a color from RGB color space to YCoCg color space.
|
||||
/// @see gtx_color_space_YCoCg
|
||||
template <typename valType>
|
||||
detail::tvec3<valType> rgb2YCoCg(
|
||||
detail::tvec3<valType> const & rgbColor);
|
||||
|
||||
//! Convert a color from YCoCg color space to RGB color space.
|
||||
//! From GLM_GTX_color_space_YCoCg extension.
|
||||
/// Convert a color from YCoCg color space to RGB color space.
|
||||
/// @see gtx_color_space_YCoCg
|
||||
template <typename valType>
|
||||
detail::tvec3<valType> YCoCg2rgb(
|
||||
detail::tvec3<valType> const & YCoCgColor);
|
||||
|
||||
//! Convert a color from RGB color space to YCoCgR color space.
|
||||
//! \see "YCoCg-R: A Color Space with RGB Reversibility and Low Dynamic Range"
|
||||
//! From GLM_GTX_color_space_YCoCg extension.
|
||||
/// Convert a color from RGB color space to YCoCgR color space.
|
||||
/// @see "YCoCg-R: A Color Space with RGB Reversibility and Low Dynamic Range"
|
||||
/// @see gtx_color_space_YCoCg
|
||||
template <typename valType>
|
||||
detail::tvec3<valType> rgb2YCoCgR(
|
||||
detail::tvec3<valType> const & rgbColor);
|
||||
|
||||
//! Convert a color from YCoCgR color space to RGB color space.
|
||||
//! \see "YCoCg-R: A Color Space with RGB Reversibility and Low Dynamic Range"
|
||||
//! From GLM_GTX_color_space_YCoCg extension.
|
||||
/// Convert a color from YCoCgR color space to RGB color space.
|
||||
/// @see "YCoCg-R: A Color Space with RGB Reversibility and Low Dynamic Range"
|
||||
/// @see gtx_color_space_YCoCg
|
||||
template <typename valType>
|
||||
detail::tvec3<valType> YCoCgR2rgb(
|
||||
detail::tvec3<valType> const & YCoCgColor);
|
||||
|
||||
@@ -123,21 +123,21 @@ namespace glm
|
||||
typedef detail::tmat4x3<int> int4x3; //!< \brief integer matrix with 4 x 3 components. (From GLM_GTX_compatibility extension)
|
||||
typedef detail::tmat4x4<int> int4x4; //!< \brief integer matrix with 4 x 4 components. (From GLM_GTX_compatibility extension)
|
||||
|
||||
typedef detail::thalf half1; //!< \brief half-precision floating-point vector with 1 component. (From GLM_GTX_compatibility extension)
|
||||
typedef detail::tvec2<detail::thalf> half2; //!< \brief half-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension)
|
||||
typedef detail::tvec3<detail::thalf> half3; //!< \brief half-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension)
|
||||
typedef detail::tvec4<detail::thalf> half4; //!< \brief half-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension)
|
||||
typedef detail::half half1; //!< \brief half-precision floating-point vector with 1 component. (From GLM_GTX_compatibility extension)
|
||||
typedef detail::tvec2<detail::half> half2; //!< \brief half-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension)
|
||||
typedef detail::tvec3<detail::half> half3; //!< \brief half-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension)
|
||||
typedef detail::tvec4<detail::half> half4; //!< \brief half-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension)
|
||||
|
||||
typedef detail::thalf half1x1; //!< \brief half-precision floating-point matrix with 1 component. (From GLM_GTX_compatibility extension)
|
||||
typedef detail::tmat2x2<detail::thalf> half2x2; //!< \brief half-precision floating-point matrix with 2 x 2 components. (From GLM_GTX_compatibility extension)
|
||||
typedef detail::tmat2x3<detail::thalf> half2x3; //!< \brief half-precision floating-point matrix with 2 x 3 components. (From GLM_GTX_compatibility extension)
|
||||
typedef detail::tmat2x4<detail::thalf> half2x4; //!< \brief half-precision floating-point matrix with 2 x 4 components. (From GLM_GTX_compatibility extension)
|
||||
typedef detail::tmat3x2<detail::thalf> half3x2; //!< \brief half-precision floating-point matrix with 3 x 2 components. (From GLM_GTX_compatibility extension)
|
||||
typedef detail::tmat3x3<detail::thalf> half3x3; //!< \brief half-precision floating-point matrix with 3 x 3 components. (From GLM_GTX_compatibility extension)
|
||||
typedef detail::tmat3x4<detail::thalf> half3x4; //!< \brief half-precision floating-point matrix with 3 x 3 components. (From GLM_GTX_compatibility extension)
|
||||
typedef detail::tmat4x2<detail::thalf> half4x2; //!< \brief half-precision floating-point matrix with 4 x 2 components. (From GLM_GTX_compatibility extension)
|
||||
typedef detail::tmat4x3<detail::thalf> half4x3; //!< \brief half-precision floating-point matrix with 4 x 3 components. (From GLM_GTX_compatibility extension)
|
||||
typedef detail::tmat4x4<detail::thalf> half4x4; //!< \brief half-precision floating-point matrix with 4 x 4 components. (From GLM_GTX_compatibility extension)
|
||||
typedef detail::half half1x1; //!< \brief half-precision floating-point matrix with 1 component. (From GLM_GTX_compatibility extension)
|
||||
typedef detail::tmat2x2<detail::half> half2x2; //!< \brief half-precision floating-point matrix with 2 x 2 components. (From GLM_GTX_compatibility extension)
|
||||
typedef detail::tmat2x3<detail::half> half2x3; //!< \brief half-precision floating-point matrix with 2 x 3 components. (From GLM_GTX_compatibility extension)
|
||||
typedef detail::tmat2x4<detail::half> half2x4; //!< \brief half-precision floating-point matrix with 2 x 4 components. (From GLM_GTX_compatibility extension)
|
||||
typedef detail::tmat3x2<detail::half> half3x2; //!< \brief half-precision floating-point matrix with 3 x 2 components. (From GLM_GTX_compatibility extension)
|
||||
typedef detail::tmat3x3<detail::half> half3x3; //!< \brief half-precision floating-point matrix with 3 x 3 components. (From GLM_GTX_compatibility extension)
|
||||
typedef detail::tmat3x4<detail::half> half3x4; //!< \brief half-precision floating-point matrix with 3 x 3 components. (From GLM_GTX_compatibility extension)
|
||||
typedef detail::tmat4x2<detail::half> half4x2; //!< \brief half-precision floating-point matrix with 4 x 2 components. (From GLM_GTX_compatibility extension)
|
||||
typedef detail::tmat4x3<detail::half> half4x3; //!< \brief half-precision floating-point matrix with 4 x 3 components. (From GLM_GTX_compatibility extension)
|
||||
typedef detail::tmat4x4<detail::half> half4x4; //!< \brief half-precision floating-point matrix with 4 x 4 components. (From GLM_GTX_compatibility extension)
|
||||
|
||||
typedef float float1; //!< \brief single-precision floating-point vector with 1 component. (From GLM_GTX_compatibility extension)
|
||||
typedef detail::tvec2<float> float2; //!< \brief single-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension)
|
||||
|
||||
@@ -50,26 +50,26 @@ namespace glm
|
||||
/// @addtogroup gtx_component_wise
|
||||
/// @{
|
||||
|
||||
//! Add all vector components together.
|
||||
//! From GLM_GTX_component_wise extension.
|
||||
/// Add all vector components together.
|
||||
/// @see gtx_component_wise
|
||||
template <typename genType>
|
||||
typename genType::value_type compAdd(
|
||||
genType const & v);
|
||||
|
||||
//! Multiply all vector components together.
|
||||
//! From GLM_GTX_component_wise extension.
|
||||
/// Multiply all vector components together.
|
||||
/// @see gtx_component_wise
|
||||
template <typename genType>
|
||||
typename genType::value_type compMul(
|
||||
genType const & v);
|
||||
|
||||
//! Find the minimum value between single vector components.
|
||||
//! From GLM_GTX_component_wise extension.
|
||||
/// Find the minimum value between single vector components.
|
||||
/// @see gtx_component_wise
|
||||
template <typename genType>
|
||||
typename genType::value_type compMin(
|
||||
genType const & v);
|
||||
|
||||
//! Find the maximum value between single vector components.
|
||||
//! From GLM_GTX_component_wise extension.
|
||||
/// Find the maximum value between single vector components.
|
||||
/// @see gtx_component_wise
|
||||
template <typename genType>
|
||||
typename genType::value_type compMax(
|
||||
genType const & v);
|
||||
|
||||
@@ -52,126 +52,131 @@ namespace glm
|
||||
/// @addtogroup gtx_constants
|
||||
/// @{
|
||||
|
||||
/// Return the epsilon constant for floating point types.
|
||||
/// @todo Implement epsilon for half-precision floating point type.
|
||||
/// @see gtx_constants
|
||||
template <typename T>
|
||||
GLM_FUNC_QUALIFIER T epsilon()
|
||||
{
|
||||
return std::numeric_limits<T>::epsilon();
|
||||
}
|
||||
T epsilon();
|
||||
|
||||
/// Return 0.
|
||||
/// @see gtx_constants
|
||||
template <typename T>
|
||||
GLM_FUNC_QUALIFIER T pi()
|
||||
{
|
||||
return T(3.14159265358979323846264338327950288);
|
||||
}
|
||||
T zero();
|
||||
|
||||
/// Return 1.
|
||||
/// @see gtx_constants
|
||||
template <typename T>
|
||||
GLM_FUNC_QUALIFIER T root_pi()
|
||||
{
|
||||
return T(1.772453850905516027);
|
||||
}
|
||||
T one();
|
||||
|
||||
/// Return the pi constant.
|
||||
/// @see gtx_constants
|
||||
template <typename T>
|
||||
GLM_FUNC_QUALIFIER T half_pi()
|
||||
{
|
||||
return T(1.57079632679489661923132169163975144);
|
||||
}
|
||||
T pi();
|
||||
|
||||
/// Return square root of pi.
|
||||
/// @see gtx_constants
|
||||
template <typename T>
|
||||
GLM_FUNC_QUALIFIER T quarter_pi()
|
||||
{
|
||||
return T(0.785398163397448309615660845819875721);
|
||||
}
|
||||
T root_pi();
|
||||
|
||||
/// Return pi / 2.
|
||||
/// @see gtx_constants
|
||||
template <typename T>
|
||||
GLM_FUNC_QUALIFIER T one_over_pi()
|
||||
{
|
||||
return T(0.318309886183790671537767526745028724);
|
||||
}
|
||||
T half_pi();
|
||||
|
||||
/// Return pi / 4.
|
||||
/// @see gtx_constants
|
||||
template <typename T>
|
||||
GLM_FUNC_QUALIFIER T two_over_pi()
|
||||
{
|
||||
return T(0.636619772367581343075535053490057448);
|
||||
}
|
||||
T quarter_pi();
|
||||
|
||||
/// Return 1 / pi.
|
||||
/// @see gtx_constants
|
||||
template <typename T>
|
||||
GLM_FUNC_QUALIFIER T two_over_root_pi()
|
||||
{
|
||||
return T(1.12837916709551257389615890312154517);
|
||||
}
|
||||
T one_over_pi();
|
||||
|
||||
/// Return 2 / pi.
|
||||
/// @see gtx_constants
|
||||
template <typename T>
|
||||
GLM_FUNC_QUALIFIER T one_over_root_two()
|
||||
{
|
||||
return T(0.707106781186547524400844362104849039);
|
||||
}
|
||||
T two_over_pi();
|
||||
|
||||
/// Return 2 / sqrt(pi).
|
||||
/// @see gtx_constants
|
||||
template <typename T>
|
||||
GLM_FUNC_QUALIFIER T root_half_pi()
|
||||
{
|
||||
return T(1.253314137315500251);
|
||||
}
|
||||
T two_over_root_pi();
|
||||
|
||||
/// Return 1 / sqrt(2).
|
||||
/// @see gtx_constants
|
||||
template <typename T>
|
||||
GLM_FUNC_QUALIFIER T root_two_pi()
|
||||
{
|
||||
return T(2.506628274631000502);
|
||||
}
|
||||
T one_over_root_two();
|
||||
|
||||
/// Return sqrt(pi / 2).
|
||||
/// @see gtx_constants
|
||||
template <typename T>
|
||||
GLM_FUNC_QUALIFIER T root_ln_four()
|
||||
{
|
||||
return T(1.17741002251547469);
|
||||
}
|
||||
T root_half_pi();
|
||||
|
||||
/// Return sqrt(2 * pi).
|
||||
/// @see gtx_constants
|
||||
template <typename T>
|
||||
GLM_FUNC_QUALIFIER T e()
|
||||
{
|
||||
return T(2.71828182845904523536);
|
||||
}
|
||||
T root_two_pi();
|
||||
|
||||
/// Return sqrt(ln(4)).
|
||||
/// @see gtx_constants
|
||||
template <typename T>
|
||||
GLM_FUNC_QUALIFIER T euler()
|
||||
{
|
||||
return T(0.577215664901532860606);
|
||||
}
|
||||
T root_ln_four();
|
||||
|
||||
/// Return e constant.
|
||||
/// @see gtx_constants
|
||||
template <typename T>
|
||||
GLM_FUNC_QUALIFIER T root_two()
|
||||
{
|
||||
return T(1.41421356237309504880168872420969808);
|
||||
}
|
||||
T e();
|
||||
|
||||
/// Return Euler's constant.
|
||||
/// @see gtx_constants
|
||||
template <typename T>
|
||||
GLM_FUNC_QUALIFIER T ln_two()
|
||||
{
|
||||
return T(0.693147180559945309417232121458176568);
|
||||
}
|
||||
T euler();
|
||||
|
||||
/// Return sqrt(2).
|
||||
/// @see gtx_constants
|
||||
template <typename T>
|
||||
GLM_FUNC_QUALIFIER T ln_ten()
|
||||
{
|
||||
return T(2.30258509299404568401799145468436421);
|
||||
}
|
||||
T root_two();
|
||||
|
||||
/// Return sqrt(3).
|
||||
/// @see gtx_constants
|
||||
template <typename T>
|
||||
GLM_FUNC_QUALIFIER T ln_ln_two()
|
||||
{
|
||||
return T(-0.3665129205816643);
|
||||
}
|
||||
T root_three();
|
||||
|
||||
/// Return sqrt(5).
|
||||
/// @see gtx_constants
|
||||
template <typename T>
|
||||
GLM_FUNC_QUALIFIER T third()
|
||||
{
|
||||
return T(0.333333333333333333);
|
||||
}
|
||||
T root_five();
|
||||
|
||||
/// Return ln(2).
|
||||
/// @see gtx_constants
|
||||
template <typename T>
|
||||
GLM_FUNC_QUALIFIER T twothirds()
|
||||
{
|
||||
return T(0.666666666666666666);
|
||||
}
|
||||
T ln_two();
|
||||
|
||||
/// Return ln(10).
|
||||
/// @see gtx_constants
|
||||
template <typename T>
|
||||
T ln_ten();
|
||||
|
||||
/// Return ln(ln(2)).
|
||||
/// @see gtx_constants
|
||||
template <typename T>
|
||||
T ln_ln_two();
|
||||
|
||||
/// Return 1 / 3.
|
||||
/// @see gtx_constants
|
||||
template <typename T>
|
||||
T third();
|
||||
|
||||
/// Return 2 / 3.
|
||||
/// @see gtx_constants
|
||||
template <typename T>
|
||||
T two_thirds();
|
||||
|
||||
/// Return the golden ratio constant.
|
||||
/// @see gtx_constants
|
||||
template <typename T>
|
||||
T golden_ratio();
|
||||
|
||||
/// @}
|
||||
} //namespace glm
|
||||
|
||||
@@ -25,3 +25,156 @@
|
||||
/// @date 2011-10-14 / 2011-10-14
|
||||
/// @author Christophe Riccio
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
namespace glm
|
||||
{
|
||||
template <typename T>
|
||||
GLM_FUNC_QUALIFIER T epsilon()
|
||||
{
|
||||
return std::numeric_limits<T>::epsilon();
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
GLM_FUNC_QUALIFIER T zero()
|
||||
{
|
||||
return T(0);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
GLM_FUNC_QUALIFIER T one()
|
||||
{
|
||||
return T(1);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
GLM_FUNC_QUALIFIER T pi()
|
||||
{
|
||||
return T(3.14159265358979323846264338327950288);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
GLM_FUNC_QUALIFIER T root_pi()
|
||||
{
|
||||
return T(1.772453850905516027);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
GLM_FUNC_QUALIFIER T half_pi()
|
||||
{
|
||||
return T(1.57079632679489661923132169163975144);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
GLM_FUNC_QUALIFIER T quarter_pi()
|
||||
{
|
||||
return T(0.785398163397448309615660845819875721);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
GLM_FUNC_QUALIFIER T one_over_pi()
|
||||
{
|
||||
return T(0.318309886183790671537767526745028724);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
GLM_FUNC_QUALIFIER T two_over_pi()
|
||||
{
|
||||
return T(0.636619772367581343075535053490057448);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
GLM_FUNC_QUALIFIER T two_over_root_pi()
|
||||
{
|
||||
return T(1.12837916709551257389615890312154517);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
GLM_FUNC_QUALIFIER T one_over_root_two()
|
||||
{
|
||||
return T(0.707106781186547524400844362104849039);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
GLM_FUNC_QUALIFIER T root_half_pi()
|
||||
{
|
||||
return T(1.253314137315500251);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
GLM_FUNC_QUALIFIER T root_two_pi()
|
||||
{
|
||||
return T(2.506628274631000502);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
GLM_FUNC_QUALIFIER T root_ln_four()
|
||||
{
|
||||
return T(1.17741002251547469);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
GLM_FUNC_QUALIFIER T e()
|
||||
{
|
||||
return T(2.71828182845904523536);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
GLM_FUNC_QUALIFIER T euler()
|
||||
{
|
||||
return T(0.577215664901532860606);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
GLM_FUNC_QUALIFIER T root_two()
|
||||
{
|
||||
return T(1.41421356237309504880168872420969808);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
GLM_FUNC_QUALIFIER T root_three()
|
||||
{
|
||||
return T(1.73205080756887729352744634150587236);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
GLM_FUNC_QUALIFIER T root_five()
|
||||
{
|
||||
return T(2.23606797749978969640917366873127623);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
GLM_FUNC_QUALIFIER T ln_two()
|
||||
{
|
||||
return T(0.693147180559945309417232121458176568);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
GLM_FUNC_QUALIFIER T ln_ten()
|
||||
{
|
||||
return T(2.30258509299404568401799145468436421);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
GLM_FUNC_QUALIFIER T ln_ln_two()
|
||||
{
|
||||
return T(-0.3665129205816643);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
GLM_FUNC_QUALIFIER T third()
|
||||
{
|
||||
return T(0.3333333333333333333333333333333333333333);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
GLM_FUNC_QUALIFIER T two_thirds()
|
||||
{
|
||||
return T(0.666666666666666666666666666666666666667);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
GLM_FUNC_QUALIFIER T golden_ratio()
|
||||
{
|
||||
return T(1.61803398874989484820458683436563811);
|
||||
}
|
||||
} //namespace glm
|
||||
|
||||
@@ -54,16 +54,16 @@ namespace glm
|
||||
/// @addtogroup gtx_epsilon
|
||||
/// @{
|
||||
|
||||
//! Returns the component-wise compare of |x - y| < epsilon.
|
||||
//! From GLM_GTX_epsilon extension.
|
||||
/// Returns the component-wise compare of |x - y| < epsilon.
|
||||
/// @see gtx_epsilon
|
||||
template <typename genTypeT, typename genTypeU>
|
||||
bool equalEpsilon(
|
||||
genTypeT const & x,
|
||||
genTypeT const & y,
|
||||
genTypeU const & epsilon);
|
||||
|
||||
//! Returns the component-wise compare of |x - y| >= epsilon.
|
||||
//! From GLM_GTX_epsilon extension.
|
||||
/// Returns the component-wise compare of |x - y| >= epsilon.
|
||||
/// @see gtx_epsilon
|
||||
template <typename genTypeT, typename genTypeU>
|
||||
bool notEqualEpsilon(
|
||||
genTypeT const & x,
|
||||
|
||||
@@ -52,99 +52,99 @@ namespace glm
|
||||
/// @addtogroup gtx_euler_angles
|
||||
/// @{
|
||||
|
||||
//! Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle X.
|
||||
//! From GLM_GTX_euler_angles extension.
|
||||
/// Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle X.
|
||||
/// @see gtx_euler_angles
|
||||
template <typename valType>
|
||||
detail::tmat4x4<valType> eulerAngleX(
|
||||
valType const & angleX);
|
||||
|
||||
//! Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle Y.
|
||||
//! From GLM_GTX_euler_angles extension.
|
||||
/// Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle Y.
|
||||
/// @see gtx_euler_angles
|
||||
template <typename valType>
|
||||
detail::tmat4x4<valType> eulerAngleY(
|
||||
valType const & angleY);
|
||||
|
||||
//! Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle Z.
|
||||
//! From GLM_GTX_euler_angles extension.
|
||||
/// Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle Z.
|
||||
/// @see gtx_euler_angles
|
||||
template <typename valType>
|
||||
detail::tmat4x4<valType> eulerAngleZ(
|
||||
valType const & angleZ);
|
||||
|
||||
//! Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Y).
|
||||
//! From GLM_GTX_euler_angles extension.
|
||||
/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Y).
|
||||
/// @see gtx_euler_angles
|
||||
template <typename valType>
|
||||
detail::tmat4x4<valType> eulerAngleXY(
|
||||
valType const & angleX,
|
||||
valType const & angleY);
|
||||
|
||||
//! Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X).
|
||||
//! From GLM_GTX_euler_angles extension.
|
||||
/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X).
|
||||
/// @see gtx_euler_angles
|
||||
template <typename valType>
|
||||
detail::tmat4x4<valType> eulerAngleYX(
|
||||
valType const & angleY,
|
||||
valType const & angleX);
|
||||
|
||||
//! Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Z).
|
||||
//! From GLM_GTX_euler_angles extension.
|
||||
/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Z).
|
||||
/// @see gtx_euler_angles
|
||||
template <typename valType>
|
||||
detail::tmat4x4<valType> eulerAngleXZ(
|
||||
valType const & angleX,
|
||||
valType const & angleZ);
|
||||
|
||||
//! Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Z * X).
|
||||
//! From GLM_GTX_euler_angles extension.
|
||||
/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Z * X).
|
||||
/// @see gtx_euler_angles
|
||||
template <typename valType>
|
||||
detail::tmat4x4<valType> eulerAngleZX(
|
||||
valType const & angleZ,
|
||||
valType const & angleX);
|
||||
|
||||
//! Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * Z).
|
||||
//! From GLM_GTX_euler_angles extension.
|
||||
/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * Z).
|
||||
/// @see gtx_euler_angles
|
||||
template <typename valType>
|
||||
detail::tmat4x4<valType> eulerAngleYZ(
|
||||
valType const & angleY,
|
||||
valType const & angleZ);
|
||||
|
||||
//! Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Z * Y).
|
||||
//! From GLM_GTX_euler_angles extension.
|
||||
/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Z * Y).
|
||||
/// @see gtx_euler_angles
|
||||
template <typename valType>
|
||||
detail::tmat4x4<valType> eulerAngleZY(
|
||||
valType const & angleZ,
|
||||
valType const & angleY);
|
||||
|
||||
//! Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z).
|
||||
//! From GLM_GTX_euler_angles extension.
|
||||
/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z).
|
||||
/// @see gtx_euler_angles
|
||||
template <typename valType>
|
||||
detail::tmat4x4<valType> eulerAngleYXZ(
|
||||
valType const & yaw,
|
||||
valType const & pitch,
|
||||
valType const & roll);
|
||||
|
||||
//! Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z).
|
||||
//! From GLM_GTX_euler_angles extension.
|
||||
/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z).
|
||||
/// @see gtx_euler_angles
|
||||
template <typename valType>
|
||||
detail::tmat4x4<valType> yawPitchRoll(
|
||||
valType const & yaw,
|
||||
valType const & pitch,
|
||||
valType const & roll);
|
||||
|
||||
//! Creates a 2D 2 * 2 rotation matrix from an euler angle.
|
||||
//! From GLM_GTX_euler_angles extension.
|
||||
/// Creates a 2D 2 * 2 rotation matrix from an euler angle.
|
||||
/// @see gtx_euler_angles
|
||||
template <typename T>
|
||||
detail::tmat2x2<T> orientate2(T const & angle);
|
||||
|
||||
//! Creates a 2D 4 * 4 homogeneous rotation matrix from an euler angle.
|
||||
//! From GLM_GTX_euler_angles extension.
|
||||
/// Creates a 2D 4 * 4 homogeneous rotation matrix from an euler angle.
|
||||
/// @see gtx_euler_angles
|
||||
template <typename T>
|
||||
detail::tmat3x3<T> orientate3(T const & angle);
|
||||
|
||||
//! Creates a 3D 3 * 3 rotation matrix from euler angles (Y * X * Z).
|
||||
//! From GLM_GTX_euler_angles extension.
|
||||
/// Creates a 3D 3 * 3 rotation matrix from euler angles (Y * X * Z).
|
||||
/// @see gtx_euler_angles
|
||||
template <typename T>
|
||||
detail::tmat3x3<T> orientate3(detail::tvec3<T> const & angles);
|
||||
|
||||
//! Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z).
|
||||
//! From GLM_GTX_euler_angles extension.
|
||||
/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z).
|
||||
/// @see gtx_euler_angles
|
||||
template <typename T>
|
||||
detail::tmat4x4<T> orientate4(detail::tvec3<T> const & angles);
|
||||
|
||||
|
||||
@@ -50,8 +50,8 @@ namespace glm
|
||||
/// @addtogroup gtx_extend
|
||||
/// @{
|
||||
|
||||
//! Extends of Length the Origin position using the (Source - Origin) direction.
|
||||
//! From GLM_GTX_extend extension.
|
||||
/// Extends of Length the Origin position using the (Source - Origin) direction.
|
||||
/// @see gtx_extend
|
||||
template <typename genType>
|
||||
genType extend(
|
||||
genType const & Origin,
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
/// THE SOFTWARE.
|
||||
///
|
||||
/// @ref gtx_associated_min_max
|
||||
/// @file glm/gtx/associated_min_max.hpp
|
||||
/// @ref gtx_extented_min_max
|
||||
/// @file glm/gtx/extented_min_max.hpp
|
||||
/// @date 2007-03-14 / 2011-06-07
|
||||
/// @author Christophe Riccio
|
||||
///
|
||||
@@ -31,7 +31,7 @@
|
||||
/// @defgroup gtx_extented_min_max GLM_GTX_extented_min_max: Extended min max
|
||||
/// @ingroup gtx
|
||||
///
|
||||
/// @brief Min and max functions for 3 to 4 parameters.
|
||||
/// Min and max functions for 3 to 4 parameters.
|
||||
///
|
||||
/// <glm/gtx/extented_min_max.hpp> need to be included to use these functionalities.
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -52,16 +52,16 @@ namespace glm
|
||||
/// @addtogroup gtx_extented_min_max
|
||||
/// @{
|
||||
|
||||
//< Return the minimum component-wise values of 3 inputs
|
||||
//< From GLM_GTX_extented_min_max extension
|
||||
/// Return the minimum component-wise values of 3 inputs
|
||||
/// @see gtx_extented_min_max
|
||||
template <typename T>
|
||||
T min(
|
||||
T const & x,
|
||||
T const & y,
|
||||
T const & z);
|
||||
|
||||
//< Return the minimum component-wise values of 3 inputs
|
||||
//< From GLM_GTX_extented_min_max extension
|
||||
/// Return the minimum component-wise values of 3 inputs
|
||||
/// @see gtx_extented_min_max
|
||||
template
|
||||
<
|
||||
typename T,
|
||||
@@ -72,8 +72,8 @@ namespace glm
|
||||
typename C<T>::value_type const & y,
|
||||
typename C<T>::value_type const & z);
|
||||
|
||||
//< Return the minimum component-wise values of 3 inputs
|
||||
//< From GLM_GTX_extented_min_max extension
|
||||
/// Return the minimum component-wise values of 3 inputs
|
||||
/// @see gtx_extented_min_max
|
||||
template
|
||||
<
|
||||
typename T,
|
||||
@@ -84,8 +84,8 @@ namespace glm
|
||||
C<T> const & y,
|
||||
C<T> const & z);
|
||||
|
||||
//< Return the minimum component-wise values of 4 inputs
|
||||
//< From GLM_GTX_extented_min_max extension
|
||||
/// Return the minimum component-wise values of 4 inputs
|
||||
/// @see gtx_extented_min_max
|
||||
template <typename T>
|
||||
T min(
|
||||
T const & x,
|
||||
@@ -93,8 +93,8 @@ namespace glm
|
||||
T const & z,
|
||||
T const & w);
|
||||
|
||||
//< Return the minimum component-wise values of 4 inputs
|
||||
//< From GLM_GTX_extented_min_max extension
|
||||
/// Return the minimum component-wise values of 4 inputs
|
||||
/// @see gtx_extented_min_max
|
||||
template
|
||||
<
|
||||
typename T,
|
||||
@@ -106,8 +106,8 @@ namespace glm
|
||||
typename C<T>::value_type const & z,
|
||||
typename C<T>::value_type const & w);
|
||||
|
||||
//< Return the minimum component-wise values of 4 inputs
|
||||
//< From GLM_GTX_extented_min_max extension
|
||||
/// Return the minimum component-wise values of 4 inputs
|
||||
/// @see gtx_extented_min_max
|
||||
template
|
||||
<
|
||||
typename T,
|
||||
@@ -119,16 +119,16 @@ namespace glm
|
||||
C<T> const & z,
|
||||
C<T> const & w);
|
||||
|
||||
//< Return the maximum component-wise values of 3 inputs
|
||||
//< From GLM_GTX_extented_min_max extension
|
||||
/// Return the maximum component-wise values of 3 inputs
|
||||
/// @see gtx_extented_min_max
|
||||
template <typename T>
|
||||
T max(
|
||||
T const & x,
|
||||
T const & y,
|
||||
T const & z);
|
||||
|
||||
//< Return the maximum component-wise values of 3 inputs
|
||||
//< From GLM_GTX_extented_min_max extension
|
||||
/// Return the maximum component-wise values of 3 inputs
|
||||
/// @see gtx_extented_min_max
|
||||
template
|
||||
<
|
||||
typename T,
|
||||
@@ -139,8 +139,8 @@ namespace glm
|
||||
typename C<T>::value_type const & y,
|
||||
typename C<T>::value_type const & z);
|
||||
|
||||
//< Return the maximum component-wise values of 3 inputs
|
||||
//< From GLM_GTX_extented_min_max extension
|
||||
/// Return the maximum component-wise values of 3 inputs
|
||||
/// @see gtx_extented_min_max
|
||||
template
|
||||
<
|
||||
typename T,
|
||||
@@ -151,8 +151,8 @@ namespace glm
|
||||
C<T> const & y,
|
||||
C<T> const & z);
|
||||
|
||||
//< Return the maximum component-wise values of 4 inputs
|
||||
//< From GLM_GTX_extented_min_max extension
|
||||
/// Return the maximum component-wise values of 4 inputs
|
||||
/// @see gtx_extented_min_max
|
||||
template <typename T>
|
||||
T max(
|
||||
T const & x,
|
||||
@@ -160,8 +160,8 @@ namespace glm
|
||||
T const & z,
|
||||
T const & w);
|
||||
|
||||
//< Return the maximum component-wise values of 4 inputs
|
||||
//< From GLM_GTX_extented_min_max extension
|
||||
/// Return the maximum component-wise values of 4 inputs
|
||||
/// @see gtx_extented_min_max
|
||||
template
|
||||
<
|
||||
typename T,
|
||||
@@ -173,8 +173,8 @@ namespace glm
|
||||
typename C<T>::value_type const & z,
|
||||
typename C<T>::value_type const & w);
|
||||
|
||||
//< Return the maximum component-wise values of 4 inputs
|
||||
//< From GLM_GTX_extented_min_max extension
|
||||
/// Return the maximum component-wise values of 4 inputs
|
||||
/// @see gtx_extented_min_max
|
||||
template
|
||||
<
|
||||
typename T,
|
||||
|
||||
@@ -52,42 +52,42 @@ namespace glm
|
||||
/// @addtogroup gtx_fast_exponential
|
||||
/// @{
|
||||
|
||||
//! Faster than the common pow function but less accurate.
|
||||
//! From GLM_GTX_fast_exponential extension.
|
||||
/// Faster than the common pow function but less accurate.
|
||||
/// @see gtx_fast_exponential
|
||||
template <typename genType>
|
||||
genType fastPow(
|
||||
genType const & x,
|
||||
genType const & y);
|
||||
|
||||
//! Faster than the common pow function but less accurate.
|
||||
//! From GLM_GTX_fast_exponential extension.
|
||||
/// Faster than the common pow function but less accurate.
|
||||
/// @see gtx_fast_exponential
|
||||
template <typename genTypeT, typename genTypeU>
|
||||
genTypeT fastPow(
|
||||
genTypeT const & x,
|
||||
genTypeU const & y);
|
||||
|
||||
//! Faster than the common exp function but less accurate.
|
||||
//! From GLM_GTX_fast_exponential extension.
|
||||
/// Faster than the common exp function but less accurate.
|
||||
/// @see gtx_fast_exponential
|
||||
template <typename T>
|
||||
T fastExp(const T& x);
|
||||
|
||||
//! Faster than the common log function but less accurate.
|
||||
//! From GLM_GTX_fast_exponential extension.
|
||||
/// Faster than the common log function but less accurate.
|
||||
/// @see gtx_fast_exponential
|
||||
template <typename T>
|
||||
T fastLog(const T& x);
|
||||
|
||||
//! Faster than the common exp2 function but less accurate.
|
||||
//! From GLM_GTX_fast_exponential extension.
|
||||
/// Faster than the common exp2 function but less accurate.
|
||||
/// @see gtx_fast_exponential
|
||||
template <typename T>
|
||||
T fastExp2(const T& x);
|
||||
|
||||
//! Faster than the common log2 function but less accurate.
|
||||
//! From GLM_GTX_fast_exponential extension.
|
||||
/// Faster than the common log2 function but less accurate.
|
||||
/// @see gtx_fast_exponential
|
||||
template <typename T>
|
||||
T fastLog2(const T& x);
|
||||
|
||||
//! Faster than the common ln function but less accurate.
|
||||
//! From GLM_GTX_fast_exponential extension.
|
||||
/// Faster than the common ln function but less accurate.
|
||||
/// @see gtx_fast_exponential
|
||||
template <typename T>
|
||||
T fastLn(const T& x);
|
||||
|
||||
|
||||
@@ -58,13 +58,13 @@ namespace glm
|
||||
)
|
||||
{
|
||||
bool result = true;
|
||||
for(typename genType::value_type i = typename genType::value_type(0); result && i < genType::col_size(); ++i)
|
||||
for(typename genType::size_type i = typename genType::size_type(0); result && i < genType::col_size(); ++i)
|
||||
{
|
||||
for(typename genType::value_type j = typename genType::value_type(0); result && j < i ; ++j)
|
||||
for(typename genType::size_type j = typename genType::size_type(0); result && j < i ; ++j)
|
||||
result = abs(m[i][j]) <= epsilon;
|
||||
if(result)
|
||||
result = abs(m[i][i] - typename genType::value_type(1)) <= epsilon;
|
||||
for(typename genType::value_type j = i + typename genType::value_type(1); result && j < genType::row_size(); ++j)
|
||||
for(typename genType::size_type j = i + typename genType::size_type(1); result && j < genType::row_size(); ++j)
|
||||
result = abs(m[i][j]) <= epsilon;
|
||||
}
|
||||
return result;
|
||||
|
||||
@@ -29,17 +29,17 @@ namespace glm
|
||||
}
|
||||
|
||||
template <>
|
||||
GLM_FUNC_QUALIFIER detail::thalf higherMultiple
|
||||
GLM_FUNC_QUALIFIER detail::half higherMultiple
|
||||
(
|
||||
detail::thalf const & SourceH,
|
||||
detail::thalf const & MultipleH
|
||||
detail::half const & SourceH,
|
||||
detail::half const & MultipleH
|
||||
)
|
||||
{
|
||||
float Source = SourceH.toFloat();
|
||||
float Multiple = MultipleH.toFloat();
|
||||
|
||||
int Tmp = int(float(Source)) % int(Multiple);
|
||||
return detail::thalf(Tmp ? Source + Multiple - float(Tmp) : Source);
|
||||
return detail::half(Tmp ? Source + Multiple - float(Tmp) : Source);
|
||||
}
|
||||
|
||||
template <>
|
||||
@@ -81,17 +81,17 @@ namespace glm
|
||||
}
|
||||
|
||||
template <>
|
||||
GLM_FUNC_QUALIFIER detail::thalf lowerMultiple
|
||||
GLM_FUNC_QUALIFIER detail::half lowerMultiple
|
||||
(
|
||||
detail::thalf const & SourceH,
|
||||
detail::thalf const & MultipleH
|
||||
detail::half const & SourceH,
|
||||
detail::half const & MultipleH
|
||||
)
|
||||
{
|
||||
float Source = SourceH.toFloat();
|
||||
float Multiple = MultipleH.toFloat();
|
||||
|
||||
int Tmp = int(float(Source)) % int(float(Multiple));
|
||||
return detail::thalf(Tmp ? Source - float(Tmp) : Source);
|
||||
return detail::half(Tmp ? Source - float(Tmp) : Source);
|
||||
}
|
||||
|
||||
template <>
|
||||
|
||||
@@ -105,11 +105,11 @@ GLM_FUNC_QUALIFIER double compRand1()
|
||||
return double(std::rand()) / double(RAND_MAX);
|
||||
}
|
||||
|
||||
GLM_FUNC_QUALIFIER detail::thalf compRand1(
|
||||
detail::thalf Min,
|
||||
detail::thalf Max)
|
||||
GLM_FUNC_QUALIFIER detail::half compRand1(
|
||||
detail::half Min,
|
||||
detail::half Max)
|
||||
{
|
||||
return compRand1<detail::thalf>() * (Max - Min) + Min;
|
||||
return compRand1<detail::half>() * (Max - Min) + Min;
|
||||
}
|
||||
|
||||
GLM_FUNC_QUALIFIER float compRand1(
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace detail
|
||||
////////////////////////////////
|
||||
// Scalars
|
||||
|
||||
GLM_FUNC_QUALIFIER std::string to_string(detail::thalf const & x)
|
||||
GLM_FUNC_QUALIFIER std::string to_string(detail::half const & x)
|
||||
{
|
||||
return detail::format("half(%2.4f)", float(x));
|
||||
}
|
||||
@@ -108,7 +108,7 @@ namespace detail
|
||||
template <>
|
||||
GLM_FUNC_QUALIFIER std::string to_string
|
||||
(
|
||||
detail::tvec2<detail::thalf> const & v
|
||||
detail::tvec2<detail::half> const & v
|
||||
)
|
||||
{
|
||||
return detail::format("hvec2(%2.4f, %2.4f)", v.x.toFloat(), v.y.toFloat());
|
||||
@@ -117,7 +117,7 @@ namespace detail
|
||||
template <>
|
||||
GLM_FUNC_QUALIFIER std::string to_string
|
||||
(
|
||||
detail::tvec3<detail::thalf> const & v
|
||||
detail::tvec3<detail::half> const & v
|
||||
)
|
||||
{
|
||||
return detail::format("hvec3(%2.4f, %2.4f, %2.4f)", v.x.toFloat(), v.y.toFloat(), v.z.toFloat());
|
||||
@@ -126,7 +126,7 @@ namespace detail
|
||||
template <>
|
||||
GLM_FUNC_QUALIFIER std::string to_string
|
||||
(
|
||||
detail::tvec4<detail::thalf> const & v
|
||||
detail::tvec4<detail::half> const & v
|
||||
)
|
||||
{
|
||||
return detail::format("hvec4(%2.4f, %2.4f, %2.4f, %2.4f)", v.x.toFloat(), v.y.toFloat(), v.z.toFloat(), v.w.toFloat());
|
||||
@@ -258,7 +258,7 @@ namespace detail
|
||||
template <>
|
||||
GLM_FUNC_QUALIFIER std::string to_string
|
||||
(
|
||||
detail::tmat2x2<detail::thalf> const & m
|
||||
detail::tmat2x2<detail::half> const & m
|
||||
)
|
||||
{
|
||||
return detail::format("hmat2x2((%f, %f), (%f, %f))",
|
||||
@@ -269,7 +269,7 @@ namespace detail
|
||||
template <>
|
||||
GLM_FUNC_QUALIFIER std::string to_string
|
||||
(
|
||||
detail::tmat2x3<detail::thalf> const & x
|
||||
detail::tmat2x3<detail::half> const & x
|
||||
)
|
||||
{
|
||||
return detail::format("hmat2x3((%f, %f, %f), (%f, %f, %f))",
|
||||
@@ -280,7 +280,7 @@ namespace detail
|
||||
template <>
|
||||
GLM_FUNC_QUALIFIER std::string to_string
|
||||
(
|
||||
detail::tmat2x4<detail::thalf> const & x
|
||||
detail::tmat2x4<detail::half> const & x
|
||||
)
|
||||
{
|
||||
return detail::format("hmat2x4((%f, %f, %f, %f), (%f, %f, %f, %f))",
|
||||
@@ -291,7 +291,7 @@ namespace detail
|
||||
template <>
|
||||
GLM_FUNC_QUALIFIER std::string to_string
|
||||
(
|
||||
detail::tmat3x2<detail::thalf> const & x
|
||||
detail::tmat3x2<detail::half> const & x
|
||||
)
|
||||
{
|
||||
return detail::format("hmat3x2((%f, %f), (%f, %f), (%f, %f))",
|
||||
@@ -303,7 +303,7 @@ namespace detail
|
||||
template <>
|
||||
GLM_FUNC_QUALIFIER std::string to_string
|
||||
(
|
||||
detail::tmat3x3<detail::thalf> const & x
|
||||
detail::tmat3x3<detail::half> const & x
|
||||
)
|
||||
{
|
||||
return detail::format("hmat3x3((%f, %f, %f), (%f, %f, %f), (%f, %f, %f))",
|
||||
@@ -315,7 +315,7 @@ namespace detail
|
||||
template <>
|
||||
GLM_FUNC_QUALIFIER std::string to_string
|
||||
(
|
||||
detail::tmat3x4<detail::thalf> const & x
|
||||
detail::tmat3x4<detail::half> const & x
|
||||
)
|
||||
{
|
||||
return detail::format("hmat3x4((%f, %f, %f, %f), (%f, %f, %f, %f), (%f, %f, %f, %f))",
|
||||
@@ -327,7 +327,7 @@ namespace detail
|
||||
template <>
|
||||
GLM_FUNC_QUALIFIER std::string to_string
|
||||
(
|
||||
detail::tmat4x2<detail::thalf> const & x
|
||||
detail::tmat4x2<detail::half> const & x
|
||||
)
|
||||
{
|
||||
return detail::format("hmat4x2((%f, %f), (%f, %f), (%f, %f), (%f, %f))",
|
||||
@@ -340,7 +340,7 @@ namespace detail
|
||||
template <>
|
||||
GLM_FUNC_QUALIFIER std::string to_string
|
||||
(
|
||||
detail::tmat4x3<detail::thalf> const & x
|
||||
detail::tmat4x3<detail::half> const & x
|
||||
)
|
||||
{
|
||||
return detail::format("hmat4x3((%f, %f, %f), (%f, %f, %f), (%f, %f, %f), (%f, %f, %f))",
|
||||
@@ -353,7 +353,7 @@ namespace detail
|
||||
template <>
|
||||
GLM_FUNC_QUALIFIER std::string to_string
|
||||
(
|
||||
detail::tmat4x4<detail::thalf> const & x
|
||||
detail::tmat4x4<detail::half> const & x
|
||||
)
|
||||
{
|
||||
return detail::format("hmat4x4((%f, %f, %f, %f), (%f, %f, %f, %f), (%f, %f, %f, %f), (%f, %f, %f, %f))",
|
||||
|
||||
@@ -60,14 +60,6 @@ namespace glm
|
||||
genType const & v1,
|
||||
typename genType::value_type const & epsilon/* = std::numeric_limits<typename genType::value_type>::epsilon()*/);
|
||||
|
||||
//! Check whether two vectors are opposites.
|
||||
//! From GLM_GTX_vector_query extensions.
|
||||
template <typename genType>
|
||||
bool areOpposite(
|
||||
genType const & v0,
|
||||
genType const & v1,
|
||||
typename genType::value_type const & epsilon/* = std::numeric_limits<typename genType::value_type>::epsilon()*/);
|
||||
|
||||
//! Check whether two vectors are orthogonals.
|
||||
//! From GLM_GTX_vector_query extensions.
|
||||
template <typename genType>
|
||||
@@ -112,14 +104,6 @@ namespace glm
|
||||
genType const & v1,
|
||||
typename genType::value_type const & epsilon/* = std::numeric_limits<typename genType::value_type>::epsilon()*/);
|
||||
|
||||
//! Check whether two vectors are similar.
|
||||
//! From GLM_GTX_vector_query extensions.
|
||||
template <typename genType>
|
||||
bool areSimilar(
|
||||
genType const & v0,
|
||||
genType const & v1,
|
||||
typename genType::value_type const & epsilon/* = std::numeric_limits<typename genType::value_type>::epsilon()*/);
|
||||
|
||||
/// @}
|
||||
}// namespace glm
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace glm
|
||||
(
|
||||
detail::tvec2<T> const & v0,
|
||||
detail::tvec2<T> const & v1,
|
||||
T const & epsilon
|
||||
typename detail::tvec2<T>::value_type const & epsilon
|
||||
)
|
||||
{
|
||||
return length(cross(detail::tvec3<T>(v0, T(0)), detail::tvec3<T>(v1, T(0)))) < epsilon;
|
||||
@@ -30,7 +30,7 @@ namespace glm
|
||||
(
|
||||
detail::tvec3<T> const & v0,
|
||||
detail::tvec3<T> const & v1,
|
||||
T const & epsilon
|
||||
typename detail::tvec3<T>::value_type const & epsilon
|
||||
)
|
||||
{
|
||||
return length(cross(v0, v1)) < epsilon;
|
||||
@@ -41,24 +41,12 @@ namespace glm
|
||||
(
|
||||
detail::tvec4<T> const & v0,
|
||||
detail::tvec4<T> const & v1,
|
||||
T const & epsilon
|
||||
typename detail::tvec4<T>::value_type const & epsilon
|
||||
)
|
||||
{
|
||||
return length(cross(detail::tvec3<T>(v0), detail::tvec3<T>(v1))) < epsilon;
|
||||
}
|
||||
|
||||
template <typename genType>
|
||||
GLM_FUNC_QUALIFIER bool areOpposite
|
||||
(
|
||||
genType const & v0,
|
||||
genType const & v1,
|
||||
typename genType::value_type const & epsilon
|
||||
)
|
||||
{
|
||||
assert(isNormalized(v0) && isNormalized(v1));
|
||||
return((typename genType::value_type(1) + dot(v0, v1)) <= epsilon);
|
||||
}
|
||||
|
||||
template <typename genType>
|
||||
GLM_FUNC_QUALIFIER bool areOrthogonal
|
||||
(
|
||||
@@ -173,17 +161,4 @@ namespace glm
|
||||
return isNormalized(v0, epsilon) && isNormalized(v1, epsilon) && (abs(dot(v0, v1)) <= epsilon);
|
||||
}
|
||||
|
||||
template <typename genType>
|
||||
GLM_FUNC_QUALIFIER bool areSimilar
|
||||
(
|
||||
genType const & v0,
|
||||
genType const & v1,
|
||||
typename genType::value_type const & epsilon
|
||||
)
|
||||
{
|
||||
bool similar = true;
|
||||
for(typename genType::size_type i = 0; similar && i < genType::value_size(); i++)
|
||||
similar = (abs(v0[i] - v1[i]) <= epsilon);
|
||||
return similar;
|
||||
}
|
||||
}//namespace glm
|
||||
|
||||
Reference in New Issue
Block a user