Initial build with half types removed
This commit is contained in:
@@ -95,12 +95,6 @@ namespace detail
|
||||
VECTORIZE_VEC(sign)
|
||||
|
||||
// floor
|
||||
template <>
|
||||
GLM_FUNC_QUALIFIER detail::half floor<detail::half>(detail::half const & x)
|
||||
{
|
||||
return detail::half(::std::floor(float(x)));
|
||||
}
|
||||
|
||||
template <typename genType>
|
||||
GLM_FUNC_QUALIFIER genType floor(genType const & x)
|
||||
{
|
||||
|
||||
@@ -34,20 +34,11 @@
|
||||
namespace glm{
|
||||
namespace detail
|
||||
{
|
||||
class half;
|
||||
|
||||
typedef half float16;
|
||||
typedef float float32;
|
||||
typedef double float64;
|
||||
}//namespace detail
|
||||
|
||||
typedef detail::half half;
|
||||
|
||||
#ifdef GLM_USE_HALF_SCALAR
|
||||
typedef detail::half lowp_float_t;
|
||||
#else//GLM_USE_HALF_SCALAR
|
||||
typedef float lowp_float_t;
|
||||
#endif//GLM_USE_HALF_SCALAR
|
||||
typedef float mediump_float_t;
|
||||
typedef double highp_float_t;
|
||||
|
||||
@@ -87,7 +78,6 @@ namespace detail
|
||||
# error "GLM error: multiple default precision requested for floating-point types"
|
||||
#endif
|
||||
|
||||
typedef half float16;
|
||||
typedef float float32;
|
||||
typedef double float64;
|
||||
|
||||
@@ -121,17 +111,10 @@ namespace detail
|
||||
|
||||
////////////////////
|
||||
// Mark half to be flaot
|
||||
GLM_DETAIL_IS_FLOAT(half);
|
||||
GLM_DETAIL_IS_FLOAT(float);
|
||||
GLM_DETAIL_IS_FLOAT(double);
|
||||
GLM_DETAIL_IS_FLOAT(long double);
|
||||
|
||||
template <>
|
||||
struct float_or_int_trait<float16>
|
||||
{
|
||||
enum{ID = float_or_int_value::GLM_FLOAT};
|
||||
};
|
||||
|
||||
template <>
|
||||
struct float_or_int_trait<float32>
|
||||
{
|
||||
|
||||
@@ -39,101 +39,11 @@ namespace detail
|
||||
GLM_FUNC_DECL float toFloat32(hdata value);
|
||||
GLM_FUNC_DECL hdata toFloat16(float const & value);
|
||||
|
||||
class half
|
||||
{
|
||||
public:
|
||||
// Constructors
|
||||
GLM_FUNC_DECL half();
|
||||
GLM_FUNC_DECL half(half const & s);
|
||||
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL explicit half(U const & s);
|
||||
|
||||
// Cast
|
||||
//template <typename U>
|
||||
//GLM_FUNC_DECL operator U() const;
|
||||
GLM_FUNC_DECL operator float() const;
|
||||
|
||||
// Unary updatable operators
|
||||
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);}
|
||||
|
||||
GLM_FUNC_DECL hdata _data() const{return data;}
|
||||
|
||||
private:
|
||||
hdata data;
|
||||
};
|
||||
|
||||
GLM_FUNC_DECL half operator+ (half const & s1, half const & s2);
|
||||
|
||||
GLM_FUNC_DECL half operator- (half const & s1, half const & s2);
|
||||
|
||||
GLM_FUNC_DECL half operator* (half const & s1, half const & s2);
|
||||
|
||||
GLM_FUNC_DECL half operator/ (half const & s1, half const & s2);
|
||||
|
||||
// Unary constant operators
|
||||
GLM_FUNC_DECL half operator- (half const & s);
|
||||
|
||||
GLM_FUNC_DECL half operator-- (half const & s, int);
|
||||
|
||||
GLM_FUNC_DECL half operator++ (half const & s, int);
|
||||
|
||||
GLM_FUNC_DECL bool operator==(
|
||||
detail::half const & x,
|
||||
detail::half const & y);
|
||||
|
||||
GLM_FUNC_DECL bool operator!=(
|
||||
detail::half const & x,
|
||||
detail::half const & y);
|
||||
|
||||
GLM_FUNC_DECL bool operator<(
|
||||
detail::half const & x,
|
||||
detail::half const & y);
|
||||
|
||||
GLM_FUNC_DECL bool operator<=(
|
||||
detail::half const & x,
|
||||
detail::half const & y);
|
||||
|
||||
GLM_FUNC_DECL bool operator>(
|
||||
detail::half const & x,
|
||||
detail::half const & y);
|
||||
|
||||
GLM_FUNC_DECL bool operator>=(
|
||||
detail::half const & x,
|
||||
detail::half const & y);
|
||||
|
||||
}//namespace detail
|
||||
|
||||
/// Low half-precision floating-point numbers.
|
||||
typedef detail::half lowp_half;
|
||||
|
||||
/// Medium half-precision floating-point numbers.
|
||||
typedef detail::half mediump_half;
|
||||
|
||||
/// High half-precision floating-point numbers.
|
||||
typedef detail::half highp_half;
|
||||
|
||||
#if(defined(GLM_PRECISION_HIGHP_HALF) && !defined(GLM_PRECISION_MEDIUMP_HALF) && !defined(GLM_PRECISION_LOWP_HALF))
|
||||
typedef highp_half half_t;
|
||||
#elif(!defined(GLM_PRECISION_HIGHP_HALF) && defined(GLM_PRECISION_MEDIUMP_HALF) && !defined(GLM_PRECISION_LOWP_HALF))
|
||||
typedef mediump_half half_t;
|
||||
#elif(!defined(GLM_PRECISION_HIGHP_HALF) && !defined(GLM_PRECISION_MEDIUMP_HALF) && defined(GLM_PRECISION_LOWP_HALF))
|
||||
typedef lowp_half half_t;
|
||||
#elif(!defined(GLM_PRECISION_HIGHP_HALF) && !defined(GLM_PRECISION_MEDIUMP_HALF) && !defined(GLM_PRECISION_LOWP_HALF))
|
||||
/// Default half-precision floating-point numbers.
|
||||
typedef highp_half half_t;
|
||||
#else
|
||||
# error "GLM error: Multiple default precisions requested for half-precision floating-point types"
|
||||
#endif
|
||||
|
||||
/// half-precision floating-point numbers.
|
||||
//typedef detail::hdata half;
|
||||
|
||||
}//namespace glm
|
||||
|
||||
#include "type_half.inl"
|
||||
|
||||
@@ -252,168 +252,5 @@ namespace detail
|
||||
}
|
||||
}
|
||||
|
||||
GLM_FUNC_QUALIFIER half::half() :
|
||||
data(0)
|
||||
{}
|
||||
|
||||
GLM_FUNC_QUALIFIER half::half(half const & s) :
|
||||
data(s.data)
|
||||
{}
|
||||
|
||||
template <typename U>
|
||||
GLM_FUNC_QUALIFIER half::half(U const & s) :
|
||||
data(toFloat16(float(s)))
|
||||
{}
|
||||
/*
|
||||
template <typename U>
|
||||
GLM_FUNC_QUALIFIER half::operator U() const
|
||||
{
|
||||
return static_cast<U>(toFloat32(this->data));
|
||||
}
|
||||
*/
|
||||
|
||||
GLM_FUNC_QUALIFIER half::operator float() const
|
||||
{
|
||||
return toFloat32(this->data);
|
||||
}
|
||||
|
||||
// Unary updatable operators
|
||||
GLM_FUNC_QUALIFIER half& half::operator= (half const & s)
|
||||
{
|
||||
data = s.data;
|
||||
return *this;
|
||||
}
|
||||
|
||||
GLM_FUNC_QUALIFIER half& half::operator+=(half const & s)
|
||||
{
|
||||
data = toFloat16(toFloat32(data) + toFloat32(s.data));
|
||||
return *this;
|
||||
}
|
||||
|
||||
GLM_FUNC_QUALIFIER half& half::operator-=(half const & s)
|
||||
{
|
||||
data = toFloat16(toFloat32(data) - toFloat32(s.data));
|
||||
return *this;
|
||||
}
|
||||
|
||||
GLM_FUNC_QUALIFIER half& half::operator*=(half const & s)
|
||||
{
|
||||
data = toFloat16(toFloat32(data) * toFloat32(s.data));
|
||||
return *this;
|
||||
}
|
||||
|
||||
GLM_FUNC_QUALIFIER half& half::operator/=(half const & s)
|
||||
{
|
||||
data = toFloat16(toFloat32(data) / toFloat32(s.data));
|
||||
return *this;
|
||||
}
|
||||
|
||||
GLM_FUNC_QUALIFIER half& half::operator++()
|
||||
{
|
||||
float Casted = toFloat32(data);
|
||||
this->data = toFloat16(++Casted);
|
||||
return *this;
|
||||
}
|
||||
|
||||
GLM_FUNC_QUALIFIER half& half::operator--()
|
||||
{
|
||||
float Casted = toFloat32(data);
|
||||
this->data = toFloat16(--Casted);
|
||||
return *this;
|
||||
}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Binary arithmetic operators
|
||||
|
||||
GLM_FUNC_QUALIFIER detail::half operator+ (detail::half const & s1, detail::half const & s2)
|
||||
{
|
||||
return detail::half(float(s1) + float(s2));
|
||||
}
|
||||
|
||||
GLM_FUNC_QUALIFIER detail::half operator- (detail::half const & s1, detail::half const & s2)
|
||||
{
|
||||
return detail::half(float(s1) - float(s2));
|
||||
}
|
||||
|
||||
GLM_FUNC_QUALIFIER detail::half operator* (detail::half const & s1, detail::half const & s2)
|
||||
{
|
||||
return detail::half(float(s1) * float(s2));
|
||||
}
|
||||
|
||||
GLM_FUNC_QUALIFIER detail::half operator/ (detail::half const & s1, detail::half const & s2)
|
||||
{
|
||||
return detail::half(float(s1) / float(s2));
|
||||
}
|
||||
|
||||
// Unary constant operators
|
||||
GLM_FUNC_QUALIFIER detail::half operator- (detail::half const & s)
|
||||
{
|
||||
return detail::half(-float(s));
|
||||
}
|
||||
|
||||
GLM_FUNC_QUALIFIER detail::half operator-- (detail::half const & s, int)
|
||||
{
|
||||
return detail::half(float(s) - 1.0f);
|
||||
}
|
||||
|
||||
GLM_FUNC_QUALIFIER detail::half operator++ (detail::half const & s, int)
|
||||
{
|
||||
return detail::half(float(s) + 1.0f);
|
||||
}
|
||||
|
||||
GLM_FUNC_QUALIFIER bool operator==
|
||||
(
|
||||
detail::half const & x,
|
||||
detail::half const & y
|
||||
)
|
||||
{
|
||||
return x._data() == y._data();
|
||||
}
|
||||
|
||||
GLM_FUNC_QUALIFIER bool operator!=
|
||||
(
|
||||
detail::half const & x,
|
||||
detail::half const & y
|
||||
)
|
||||
{
|
||||
return x._data() != y._data();
|
||||
}
|
||||
|
||||
GLM_FUNC_QUALIFIER bool operator<
|
||||
(
|
||||
detail::half const & x,
|
||||
detail::half const & y
|
||||
)
|
||||
{
|
||||
return float(x) < float(y);
|
||||
}
|
||||
|
||||
GLM_FUNC_QUALIFIER bool operator<=
|
||||
(
|
||||
detail::half const & x,
|
||||
detail::half const & y
|
||||
)
|
||||
{
|
||||
return float(x) <= float(y);
|
||||
}
|
||||
|
||||
GLM_FUNC_QUALIFIER bool operator>
|
||||
(
|
||||
detail::half const & x,
|
||||
detail::half const & y
|
||||
)
|
||||
{
|
||||
return float(x) > float(y);
|
||||
}
|
||||
|
||||
GLM_FUNC_QUALIFIER bool operator>=
|
||||
(
|
||||
detail::half const & x,
|
||||
detail::half const & y
|
||||
)
|
||||
{
|
||||
return float(x) >= float(y);
|
||||
}
|
||||
|
||||
}//namespace detail
|
||||
}//namespace glm
|
||||
|
||||
483
glm/fwd.hpp
483
glm/fwd.hpp
@@ -46,33 +46,7 @@ namespace detail
|
||||
|
||||
template <typename T, precision P> struct tquat;
|
||||
}//namespace detail
|
||||
|
||||
/// Quaternion of low half-precision floating-point numbers.
|
||||
///
|
||||
/// @see gtc_quaternion
|
||||
typedef detail::tquat<half, lowp> lowp_hquat;
|
||||
|
||||
/// Quaternion of medium half-precision floating-point numbers.
|
||||
///
|
||||
/// @see gtc_quaternion
|
||||
typedef detail::tquat<half, mediump> mediump_hquat;
|
||||
|
||||
/// Quaternion of high half-precision floating-point numbers.
|
||||
///
|
||||
/// @see gtc_quaternion
|
||||
typedef detail::tquat<half, highp> highp_hquat;
|
||||
|
||||
#if(defined(GLM_PRECISION_HIGHP_HALF) && !defined(GLM_PRECISION_MEDIUMP_HALF) && !defined(GLM_PRECISION_LOWP_HALF))
|
||||
typedef highp_hquat hquat;
|
||||
#elif(!defined(GLM_PRECISION_HIGHP_HALF) && defined(GLM_PRECISION_MEDIUMP_HALF) && !defined(GLM_PRECISION_LOWP_HALF))
|
||||
typedef mediump_hquat hquat;
|
||||
#elif(!defined(GLM_PRECISION_HIGHP_HALF) && !defined(GLM_PRECISION_MEDIUMP_HALF) && defined(GLM_PRECISION_LOWP_HALF))
|
||||
typedef lowp_hquat hquat;
|
||||
#elif(!defined(GLM_PRECISION_HIGHP_HALF) && !defined(GLM_PRECISION_MEDIUMP_HALF) && !defined(GLM_PRECISION_LOWP_HALF))
|
||||
/// Default half-precision floating-point numbers.
|
||||
typedef highp_hquat hquat;
|
||||
#endif
|
||||
|
||||
|
||||
/// Quaternion of low single-precision floating-point numbers.
|
||||
///
|
||||
@@ -1356,10 +1330,6 @@ namespace glm
|
||||
//////////////////////
|
||||
// Float vector types
|
||||
|
||||
/// Low 16 bit half-precision floating-point scalar.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::float16 lowp_float16;
|
||||
|
||||
/// Low 32 bit single-precision floating-point scalar.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::float32 lowp_float32;
|
||||
@@ -1368,10 +1338,6 @@ namespace glm
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::float64 lowp_float64;
|
||||
|
||||
/// Low 16 bit half-precision floating-point scalar.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::float16 lowp_float16_t;
|
||||
|
||||
/// Low 32 bit single-precision floating-point scalar.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::float32 lowp_float32_t;
|
||||
@@ -1380,10 +1346,6 @@ namespace glm
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::float64 lowp_float64_t;
|
||||
|
||||
/// Low 16 bit half-precision floating-point scalar.
|
||||
/// @see gtc_type_precision
|
||||
typedef float16 lowp_f16;
|
||||
|
||||
/// Low 32 bit single-precision floating-point scalar.
|
||||
/// @see gtc_type_precision
|
||||
typedef float32 lowp_f32;
|
||||
@@ -1391,10 +1353,6 @@ namespace glm
|
||||
/// Low 64 bit double-precision floating-point scalar.
|
||||
/// @see gtc_type_precision
|
||||
typedef float64 lowp_f64;
|
||||
|
||||
/// Low 16 bit half-precision floating-point scalar.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::float16 lowp_float16;
|
||||
|
||||
/// Low 32 bit single-precision floating-point scalar.
|
||||
/// @see gtc_type_precision
|
||||
@@ -1403,11 +1361,7 @@ namespace glm
|
||||
/// Low 64 bit double-precision floating-point scalar.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::float64 lowp_float64;
|
||||
|
||||
/// Low 16 bit half-precision floating-point scalar.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::float16 lowp_float16_t;
|
||||
|
||||
|
||||
/// Low 32 bit single-precision floating-point scalar.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::float32 lowp_float32_t;
|
||||
@@ -1416,10 +1370,6 @@ namespace glm
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::float64 lowp_float64_t;
|
||||
|
||||
/// Low 16 bit half-precision floating-point scalar.
|
||||
/// @see gtc_type_precision
|
||||
typedef float16 lowp_f16;
|
||||
|
||||
/// Low 32 bit single-precision floating-point scalar.
|
||||
/// @see gtc_type_precision
|
||||
typedef float32 lowp_f32;
|
||||
@@ -1429,11 +1379,6 @@ namespace glm
|
||||
typedef float64 lowp_f64;
|
||||
|
||||
|
||||
|
||||
/// Low 16 bit half-precision floating-point scalar.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::float16 lowp_float16;
|
||||
|
||||
/// Low 32 bit single-precision floating-point scalar.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::float32 lowp_float32;
|
||||
@@ -1441,11 +1386,7 @@ namespace glm
|
||||
/// Low 64 bit double-precision floating-point scalar.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::float64 lowp_float64;
|
||||
|
||||
/// Low 16 bit half-precision floating-point scalar.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::float16 lowp_float16_t;
|
||||
|
||||
|
||||
/// Low 32 bit single-precision floating-point scalar.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::float32 lowp_float32_t;
|
||||
@@ -1453,11 +1394,7 @@ namespace glm
|
||||
/// Low 64 bit double-precision floating-point scalar.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::float64 lowp_float64_t;
|
||||
|
||||
/// Low 16 bit half-precision floating-point scalar.
|
||||
/// @see gtc_type_precision
|
||||
typedef float16 lowp_f16;
|
||||
|
||||
|
||||
/// Low 32 bit single-precision floating-point scalar.
|
||||
/// @see gtc_type_precision
|
||||
typedef float32 lowp_f32;
|
||||
@@ -1467,10 +1404,6 @@ namespace glm
|
||||
typedef float64 lowp_f64;
|
||||
|
||||
|
||||
/// Medium 16 bit half-precision floating-point scalar.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::float16 mediump_float16;
|
||||
|
||||
/// Medium 32 bit single-precision floating-point scalar.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::float32 mediump_float32;
|
||||
@@ -1478,11 +1411,7 @@ namespace glm
|
||||
/// Medium 64 bit double-precision floating-point scalar.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::float64 mediump_float64;
|
||||
|
||||
/// Medium 16 bit half-precision floating-point scalar.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::float16 mediump_float16_t;
|
||||
|
||||
|
||||
/// Medium 32 bit single-precision floating-point scalar.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::float32 mediump_float32_t;
|
||||
@@ -1491,10 +1420,6 @@ namespace glm
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::float64 mediump_float64_t;
|
||||
|
||||
/// Medium 16 bit half-precision floating-point scalar.
|
||||
/// @see gtc_type_precision
|
||||
typedef float16 mediump_f16;
|
||||
|
||||
/// Medium 32 bit single-precision floating-point scalar.
|
||||
/// @see gtc_type_precision
|
||||
typedef float32 mediump_f32;
|
||||
@@ -1503,10 +1428,6 @@ namespace glm
|
||||
/// @see gtc_type_precision
|
||||
typedef float64 mediump_f64;
|
||||
|
||||
|
||||
/// High 16 bit half-precision floating-point scalar.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::float16 highp_float16;
|
||||
|
||||
/// High 32 bit single-precision floating-point scalar.
|
||||
/// @see gtc_type_precision
|
||||
@@ -1516,10 +1437,6 @@ namespace glm
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::float64 highp_float64;
|
||||
|
||||
/// High 16 bit half-precision floating-point scalar.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::float16 highp_float16_t;
|
||||
|
||||
/// High 32 bit single-precision floating-point scalar.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::float32 highp_float32_t;
|
||||
@@ -1528,10 +1445,6 @@ namespace glm
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::float64 highp_float64_t;
|
||||
|
||||
/// High 16 bit half-precision floating-point scalar.
|
||||
/// @see gtc_type_precision
|
||||
typedef float16 highp_f16;
|
||||
|
||||
/// High 32 bit single-precision floating-point scalar.
|
||||
/// @see gtc_type_precision
|
||||
typedef float32 highp_f32;
|
||||
@@ -1542,10 +1455,6 @@ namespace glm
|
||||
|
||||
|
||||
#if(defined(GLM_PRECISION_LOWP_FLOAT))
|
||||
/// Default 16 bit half-precision floating-point scalar.
|
||||
/// @see gtc_type_precision
|
||||
typedef lowp_float16 float16;
|
||||
|
||||
/// Default 32 bit single-precision floating-point scalar.
|
||||
/// @see gtc_type_precision
|
||||
typedef lowp_float32 float32;
|
||||
@@ -1554,10 +1463,6 @@ namespace glm
|
||||
/// @see gtc_type_precision
|
||||
typedef lowp_float64 float64;
|
||||
|
||||
/// Default 16 bit half-precision floating-point scalar.
|
||||
/// @see gtc_type_precision
|
||||
typedef lowp_float16 float16_t;
|
||||
|
||||
/// Default 32 bit single-precision floating-point scalar.
|
||||
/// @see gtc_type_precision
|
||||
typedef lowp_float32_t float32_t;
|
||||
@@ -1566,10 +1471,6 @@ namespace glm
|
||||
/// @see gtc_type_precision
|
||||
typedef lowp_float64_t float64_t;
|
||||
|
||||
/// Default 16 bit half-precision floating-point scalar.
|
||||
/// @see gtc_type_precision
|
||||
typedef lowp_f16 f16;
|
||||
|
||||
/// Default 32 bit single-precision floating-point scalar.
|
||||
/// @see gtc_type_precision
|
||||
typedef lowp_f32 f32;
|
||||
@@ -1579,9 +1480,6 @@ namespace glm
|
||||
typedef lowp_f64 f64;
|
||||
|
||||
#elif(defined(GLM_PRECISION_MEDIUMP_FLOAT))
|
||||
/// Default 16 bit half-precision floating-point scalar.
|
||||
/// @see gtc_type_precision
|
||||
typedef mediump_float16 float16;
|
||||
|
||||
/// Default 32 bit single-precision floating-point scalar.
|
||||
/// @see gtc_type_precision
|
||||
@@ -1591,10 +1489,6 @@ namespace glm
|
||||
/// @see gtc_type_precision
|
||||
typedef mediump_float64 float64;
|
||||
|
||||
/// Default 16 bit half-precision floating-point scalar.
|
||||
/// @see gtc_type_precision
|
||||
typedef mediump_float16 float16_t;
|
||||
|
||||
/// Default 32 bit single-precision floating-point scalar.
|
||||
/// @see gtc_type_precision
|
||||
typedef mediump_float32 float32_t;
|
||||
@@ -1603,10 +1497,6 @@ namespace glm
|
||||
/// @see gtc_type_precision
|
||||
typedef mediump_float64 float64_t;
|
||||
|
||||
/// Default 16 bit half-precision floating-point scalar.
|
||||
/// @see gtc_type_precision
|
||||
typedef mediump_float16 f16;
|
||||
|
||||
/// Default 32 bit single-precision floating-point scalar.
|
||||
/// @see gtc_type_precision
|
||||
typedef mediump_float32 f32;
|
||||
@@ -1616,9 +1506,6 @@ namespace glm
|
||||
typedef mediump_float64 f64;
|
||||
|
||||
#else//(defined(GLM_PRECISION_HIGHP_FLOAT))
|
||||
/// Default 16 bit half-precision floating-point scalar.
|
||||
/// @see gtc_type_precision
|
||||
typedef highp_float16 float16;
|
||||
|
||||
/// Default 32 bit single-precision floating-point scalar.
|
||||
/// @see gtc_type_precision
|
||||
@@ -1628,10 +1515,6 @@ namespace glm
|
||||
/// @see gtc_type_precision
|
||||
typedef highp_float64 float64;
|
||||
|
||||
/// Default 16 bit half-precision floating-point scalar.
|
||||
/// @see gtc_type_precision
|
||||
typedef highp_float16_t float16_t;
|
||||
|
||||
/// Default 32 bit single-precision floating-point scalar.
|
||||
/// @see gtc_type_precision
|
||||
typedef highp_float32_t float32_t;
|
||||
@@ -1640,10 +1523,6 @@ namespace glm
|
||||
/// @see gtc_type_precision
|
||||
typedef highp_float64_t float64_t;
|
||||
|
||||
/// Default 16 bit half-precision floating-point scalar.
|
||||
/// @see gtc_type_precision
|
||||
typedef highp_float16_t f16;
|
||||
|
||||
/// Default 32 bit single-precision floating-point scalar.
|
||||
/// @see gtc_type_precision
|
||||
typedef highp_float32_t f32;
|
||||
@@ -1755,57 +1634,6 @@ namespace glm
|
||||
typedef detail::tvec4<float, highp> highp_fvec4;
|
||||
|
||||
|
||||
|
||||
/// Low half-precision floating-point vector of 1 component.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tvec1<f16, lowp> lowp_f16vec1;
|
||||
|
||||
/// Low half-precision floating-point vector of 2 components.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tvec2<f16, lowp> lowp_f16vec2;
|
||||
|
||||
/// Low half-precision floating-point vector of 3 components.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tvec3<f16, lowp> lowp_f16vec3;
|
||||
|
||||
/// Low half-precision floating-point vector of 4 components.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tvec4<f16, lowp> lowp_f16vec4;
|
||||
|
||||
/// Medium half-precision floating-point vector of 1 component.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tvec1<f16, mediump> mediump_f16vec1;
|
||||
|
||||
/// Medium half-precision floating-point vector of 2 components.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tvec2<f16, mediump> mediump_f16vec2;
|
||||
|
||||
/// Medium half-precision floating-point vector of 3 components.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tvec3<f16, mediump> mediump_f16vec3;
|
||||
|
||||
/// Medium half-precision floating-point vector of 4 components.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tvec4<f16, mediump> mediump_f16vec4;
|
||||
|
||||
/// High half-precision floating-point vector of 1 component.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tvec1<f16, highp> highp_f16vec1;
|
||||
|
||||
/// High half-precision floating-point vector of 2 components.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tvec2<f16, highp> highp_f16vec2;
|
||||
|
||||
/// High half-precision floating-point vector of 3 components.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tvec3<f16, highp> highp_f16vec3;
|
||||
|
||||
/// High half-precision floating-point vector of 4 components.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tvec4<f16, highp> highp_f16vec4;
|
||||
|
||||
|
||||
|
||||
/// Low single-precision floating-point vector of 1 component.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tvec1<f32, lowp> lowp_f32vec1;
|
||||
@@ -1853,9 +1681,8 @@ namespace glm
|
||||
/// High single-precision floating-point vector of 4 components.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tvec4<f32, highp> highp_f32vec4;
|
||||
|
||||
|
||||
|
||||
|
||||
/// Low double-precision floating-point vector of 1 component.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tvec1<f64, lowp> lowp_f64vec1;
|
||||
@@ -1904,9 +1731,9 @@ namespace glm
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tvec4<f64, highp> highp_f64vec4;
|
||||
|
||||
|
||||
//////////////////////
|
||||
// Float matrix types
|
||||
|
||||
|
||||
/// Low single-precision floating-point 1x1 matrix.
|
||||
/// @see gtc_type_precision
|
||||
@@ -2079,181 +1906,6 @@ namespace glm
|
||||
/// @see gtc_type_precision
|
||||
typedef highp_fmat4x4 highp_fmat4;
|
||||
|
||||
|
||||
|
||||
|
||||
/// Low half-precision floating-point 1x1 matrix.
|
||||
/// @see gtc_type_precision
|
||||
//typedef lowp_f16 lowp_f16mat1x1;
|
||||
|
||||
/// Low half-precision floating-point 2x2 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat2x2<f16, lowp> lowp_f16mat2x2;
|
||||
|
||||
/// Low half-precision floating-point 2x3 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat2x3<f16, lowp> lowp_f16mat2x3;
|
||||
|
||||
/// Low half-precision floating-point 2x4 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat2x4<f16, lowp> lowp_f16mat2x4;
|
||||
|
||||
/// Low half-precision floating-point 3x2 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat3x2<f16, lowp> lowp_f16mat3x2;
|
||||
|
||||
/// Low half-precision floating-point 3x3 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat3x3<f16, lowp> lowp_f16mat3x3;
|
||||
|
||||
/// Low half-precision floating-point 3x4 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat3x4<f16, lowp> lowp_f16mat3x4;
|
||||
|
||||
/// Low half-precision floating-point 4x2 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat4x2<f16, lowp> lowp_f16mat4x2;
|
||||
|
||||
/// Low half-precision floating-point 4x3 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat4x3<f16, lowp> lowp_f16mat4x3;
|
||||
|
||||
/// Low half-precision floating-point 4x4 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat4x4<f16, lowp> lowp_f16mat4x4;
|
||||
|
||||
/// Low half-precision floating-point 1x1 matrix.
|
||||
/// @see gtc_type_precision
|
||||
//typedef lowp_f16mat1x1 lowp_f16mat1;
|
||||
|
||||
/// Low half-precision floating-point 2x2 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef lowp_f16mat2x2 lowp_f16mat2;
|
||||
|
||||
/// Low half-precision floating-point 3x3 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef lowp_f16mat3x3 lowp_f16mat3;
|
||||
|
||||
/// Low half-precision floating-point 4x4 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef lowp_f16mat4x4 lowp_f16mat4;
|
||||
|
||||
|
||||
/// Medium half-precision floating-point 1x1 matrix.
|
||||
/// @see gtc_type_precision
|
||||
//typedef mediump_f16 mediump_f16mat1x1;
|
||||
|
||||
/// Medium half-precision floating-point 2x2 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat2x2<f16, mediump> mediump_f16mat2x2;
|
||||
|
||||
/// Medium half-precision floating-point 2x3 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat2x3<f16, mediump> mediump_f16mat2x3;
|
||||
|
||||
/// Medium half-precision floating-point 2x4 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat2x4<f16, mediump> mediump_f16mat2x4;
|
||||
|
||||
/// Medium half-precision floating-point 3x2 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat3x2<f16, mediump> mediump_f16mat3x2;
|
||||
|
||||
/// Medium half-precision floating-point 3x3 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat3x3<f16, mediump> mediump_f16mat3x3;
|
||||
|
||||
/// Medium half-precision floating-point 3x4 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat3x4<f16, mediump> mediump_f16mat3x4;
|
||||
|
||||
/// Medium half-precision floating-point 4x2 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat4x2<f16, mediump> mediump_f16mat4x2;
|
||||
|
||||
/// Medium half-precision floating-point 4x3 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat4x3<f16, mediump> mediump_f16mat4x3;
|
||||
|
||||
/// Medium half-precision floating-point 4x4 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat4x4<f16, mediump> mediump_f16mat4x4;
|
||||
|
||||
/// Medium half-precision floating-point 1x1 matrix.
|
||||
/// @see gtc_type_precision
|
||||
//typedef mediump_f16mat1x1 mediump_f16mat1;
|
||||
|
||||
/// Medium half-precision floating-point 2x2 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef mediump_f16mat2x2 mediump_f16mat2;
|
||||
|
||||
/// Medium half-precision floating-point 3x3 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef mediump_f16mat3x3 mediump_f16mat3;
|
||||
|
||||
/// Medium half-precision floating-point 4x4 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef mediump_f16mat4x4 mediump_f16mat4;
|
||||
|
||||
|
||||
|
||||
/// High half-precision floating-point 1x1 matrix.
|
||||
/// @see gtc_type_precision
|
||||
//typedef highp_f16 highp_f16mat1x1;
|
||||
|
||||
/// High half-precision floating-point 2x2 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat2x2<f16, highp> highp_f16mat2x2;
|
||||
|
||||
/// High half-precision floating-point 2x3 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat2x3<f16, highp> highp_f16mat2x3;
|
||||
|
||||
/// High half-precision floating-point 2x4 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat2x4<f16, highp> highp_f16mat2x4;
|
||||
|
||||
/// High half-precision floating-point 3x2 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat3x2<f16, highp> highp_f16mat3x2;
|
||||
|
||||
/// High half-precision floating-point 3x3 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat3x3<f16, highp> highp_f16mat3x3;
|
||||
|
||||
/// High half-precision floating-point 3x4 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat3x4<f16, highp> highp_f16mat3x4;
|
||||
|
||||
/// High half-precision floating-point 4x2 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat4x2<f16, highp> highp_f16mat4x2;
|
||||
|
||||
/// High half-precision floating-point 4x3 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat4x3<f16, highp> highp_f16mat4x3;
|
||||
|
||||
/// High half-precision floating-point 4x4 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat4x4<f16, highp> highp_f16mat4x4;
|
||||
|
||||
/// High half-precision floating-point 1x1 matrix.
|
||||
/// @see gtc_type_precision
|
||||
//typedef highp_f16mat1x1 highp_f16mat1;
|
||||
|
||||
/// High half-precision floating-point 2x2 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef highp_f16mat2x2 highp_f16mat2;
|
||||
|
||||
/// High half-precision floating-point 3x3 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef highp_f16mat3x3 highp_f16mat3;
|
||||
|
||||
/// High half-precision floating-point 4x4 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef highp_f16mat4x4 highp_f16mat4;
|
||||
|
||||
|
||||
|
||||
/// Low single-precision floating-point 1x1 matrix.
|
||||
/// @see gtc_type_precision
|
||||
@@ -2544,8 +2196,6 @@ namespace glm
|
||||
/// @see gtc_type_precision
|
||||
typedef mediump_f64mat4x4 mediump_f64mat4;
|
||||
|
||||
|
||||
|
||||
/// High double-precision floating-point 1x1 matrix.
|
||||
/// @see gtc_type_precision
|
||||
//typedef f64 highp_f64mat1x1;
|
||||
@@ -2602,15 +2252,9 @@ namespace glm
|
||||
/// @see gtc_type_precision
|
||||
typedef highp_f64mat4x4 highp_f64mat4;
|
||||
|
||||
|
||||
|
||||
//////////////////////////
|
||||
// Quaternion types
|
||||
|
||||
/// Low half-precision floating-point quaternion.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tquat<f16, lowp> lowp_f16quat;
|
||||
|
||||
/// Low single-precision floating-point quaternion.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tquat<f32, lowp> lowp_f32quat;
|
||||
@@ -2619,10 +2263,6 @@ namespace glm
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tquat<f64, lowp> lowp_f64quat;
|
||||
|
||||
/// Medium half-precision floating-point quaternion.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tquat<f16, mediump> mediump_f16quat;
|
||||
|
||||
/// Medium single-precision floating-point quaternion.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tquat<f32, mediump> mediump_f32quat;
|
||||
@@ -2631,10 +2271,6 @@ namespace glm
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tquat<f64, mediump> mediump_f64quat;
|
||||
|
||||
/// High half-precision floating-point quaternion.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tquat<f16, highp> highp_f16quat;
|
||||
|
||||
/// High single-precision floating-point quaternion.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tquat<f32, highp> highp_f32quat;
|
||||
@@ -2643,113 +2279,6 @@ namespace glm
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tquat<f64, highp> highp_f64quat;
|
||||
|
||||
|
||||
#if(defined(GLM_PRECISION_LOWP_HALF))
|
||||
typedef lowp_f16vec1 f16vec1;
|
||||
typedef lowp_f16vec2 f16vec2;
|
||||
typedef lowp_f16vec3 f16vec3;
|
||||
typedef lowp_f16vec4 f16vec4;
|
||||
typedef lowp_f16mat2 f16mat2;
|
||||
typedef lowp_f16mat3 f16mat3;
|
||||
typedef lowp_f16mat4 f16mat4;
|
||||
typedef lowp_f16mat2x2 f16mat2x2;
|
||||
typedef lowp_f16mat3x2 f16mat3x2;
|
||||
typedef lowp_f16mat4x2 f16mat4x2;
|
||||
typedef lowp_f16mat2x3 f16mat2x3;
|
||||
typedef lowp_f16mat3x3 f16mat3x3;
|
||||
typedef lowp_f16mat4x3 f16mat4x3;
|
||||
typedef lowp_f16mat2x4 f16mat2x4;
|
||||
typedef lowp_f16mat3x4 f16mat3x4;
|
||||
typedef lowp_f16mat4x4 f16mat4x4;
|
||||
typedef lowp_f16quat f16quat;
|
||||
#elif(defined(GLM_PRECISION_MEDIUMP_HALF))
|
||||
typedef mediump_f16vec1 f16vec1;
|
||||
typedef mediump_f16vec2 f16vec2;
|
||||
typedef mediump_f16vec3 f16vec3;
|
||||
typedef mediump_f16vec4 f16vec4;
|
||||
typedef mediump_f16mat2 f16mat2;
|
||||
typedef mediump_f16mat3 f16mat3;
|
||||
typedef mediump_f16mat4 f16mat4;
|
||||
typedef mediump_f16mat2x2 f16mat2x2;
|
||||
typedef mediump_f16mat3x2 f16mat3x2;
|
||||
typedef mediump_f16mat4x2 f16mat4x2;
|
||||
typedef mediump_f16mat2x3 f16mat2x3;
|
||||
typedef mediump_f16mat3x3 f16mat3x3;
|
||||
typedef mediump_f16mat4x3 f16mat4x3;
|
||||
typedef mediump_f16mat2x4 f16mat2x4;
|
||||
typedef mediump_f16mat3x4 f16mat3x4;
|
||||
typedef mediump_f16mat4x4 f16mat4x4;
|
||||
typedef mediump_f16quat f16quat;
|
||||
#else//if(defined(GLM_PRECISION_HIGHP_HALF))
|
||||
/// Default half-precision floating-point vector of 1 components.
|
||||
/// @see gtc_type_precision
|
||||
typedef highp_f16vec1 f16vec1;
|
||||
|
||||
/// Default half-precision floating-point vector of 2 components.
|
||||
/// @see gtc_type_precision
|
||||
typedef highp_f16vec2 f16vec2;
|
||||
|
||||
/// Default half-precision floating-point vector of 3 components.
|
||||
/// @see gtc_type_precision
|
||||
typedef highp_f16vec3 f16vec3;
|
||||
|
||||
/// Default half-precision floating-point vector of 4 components.
|
||||
/// @see gtc_type_precision
|
||||
typedef highp_f16vec4 f16vec4;
|
||||
|
||||
/// Default half-precision floating-point 2x2 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef highp_f16mat2x2 f16mat2x2;
|
||||
|
||||
/// Default half-precision floating-point 2x3 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef highp_f16mat2x3 f16mat2x3;
|
||||
|
||||
/// Default half-precision floating-point 2x4 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef highp_f16mat2x4 f16mat2x4;
|
||||
|
||||
/// Default half-precision floating-point 3x2 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef highp_f16mat3x2 f16mat3x2;
|
||||
|
||||
/// Default half-precision floating-point 3x3 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef highp_f16mat3x3 f16mat3x3;
|
||||
|
||||
/// Default half-precision floating-point 3x4 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef highp_f16mat3x4 f16mat3x4;
|
||||
|
||||
/// Default half-precision floating-point 4x2 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef highp_f16mat4x2 f16mat4x2;
|
||||
|
||||
/// Default half-precision floating-point 4x3 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef highp_f16mat4x3 f16mat4x3;
|
||||
|
||||
/// Default half-precision floating-point 4x4 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef highp_f16mat4x4 f16mat4x4;
|
||||
|
||||
/// Default half-precision floating-point 2x2 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef f16mat2x2 f16mat2;
|
||||
|
||||
/// Default half-precision floating-point 3x3 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef f16mat3x3 f16mat3;
|
||||
|
||||
/// Default half-precision floating-point 4x4 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef f16mat4x4 f16mat4;
|
||||
|
||||
/// Default half-precision floating-point quaternion.
|
||||
/// @see gtc_type_precision
|
||||
typedef highp_f16quat f16quat;
|
||||
#endif
|
||||
|
||||
|
||||
#if(defined(GLM_PRECISION_LOWP_FLOAT))
|
||||
typedef lowp_f32vec1 fvec1;
|
||||
|
||||
42
glm/glm.cpp
42
glm/glm.cpp
@@ -80,7 +80,6 @@ template struct tvec2<int8, lowp>;
|
||||
template struct tvec2<int16, lowp>;
|
||||
template struct tvec2<int32, lowp>;
|
||||
template struct tvec2<int64, lowp>;
|
||||
template struct tvec2<float16, lowp>;
|
||||
template struct tvec2<float32, lowp>;
|
||||
template struct tvec2<float64, lowp>;
|
||||
|
||||
@@ -92,7 +91,6 @@ template struct tvec2<int8, mediump>;
|
||||
template struct tvec2<int16, mediump>;
|
||||
template struct tvec2<int32, mediump>;
|
||||
template struct tvec2<int64, mediump>;
|
||||
template struct tvec2<float16, mediump>;
|
||||
template struct tvec2<float32, mediump>;
|
||||
template struct tvec2<float64, mediump>;
|
||||
|
||||
@@ -104,7 +102,6 @@ template struct tvec2<int8, highp>;
|
||||
template struct tvec2<int16, highp>;
|
||||
template struct tvec2<int32, highp>;
|
||||
template struct tvec2<int64, highp>;
|
||||
template struct tvec2<float16, highp>;
|
||||
template struct tvec2<float32, highp>;
|
||||
template struct tvec2<float64, highp>;
|
||||
|
||||
@@ -117,7 +114,6 @@ template struct tvec3<int8, lowp>;
|
||||
template struct tvec3<int16, lowp>;
|
||||
template struct tvec3<int32, lowp>;
|
||||
template struct tvec3<int64, lowp>;
|
||||
template struct tvec3<float16, lowp>;
|
||||
template struct tvec3<float32, lowp>;
|
||||
template struct tvec3<float64, lowp>;
|
||||
|
||||
@@ -129,7 +125,6 @@ template struct tvec3<int8, mediump>;
|
||||
template struct tvec3<int16, mediump>;
|
||||
template struct tvec3<int32, mediump>;
|
||||
template struct tvec3<int64, mediump>;
|
||||
template struct tvec3<float16, mediump>;
|
||||
template struct tvec3<float32, mediump>;
|
||||
template struct tvec3<float64, mediump>;
|
||||
|
||||
@@ -141,7 +136,6 @@ template struct tvec3<int8, highp>;
|
||||
template struct tvec3<int16, highp>;
|
||||
template struct tvec3<int32, highp>;
|
||||
template struct tvec3<int64, highp>;
|
||||
template struct tvec3<float16, highp>;
|
||||
template struct tvec3<float32, highp>;
|
||||
template struct tvec3<float64, highp>;
|
||||
|
||||
@@ -154,7 +148,6 @@ template struct tvec4<int8, lowp>;
|
||||
template struct tvec4<int16, lowp>;
|
||||
template struct tvec4<int32, lowp>;
|
||||
template struct tvec4<int64, lowp>;
|
||||
template struct tvec4<float16, lowp>;
|
||||
template struct tvec4<float32, lowp>;
|
||||
template struct tvec4<float64, lowp>;
|
||||
|
||||
@@ -166,7 +159,6 @@ template struct tvec4<int8, mediump>;
|
||||
template struct tvec4<int16, mediump>;
|
||||
template struct tvec4<int32, mediump>;
|
||||
template struct tvec4<int64, mediump>;
|
||||
template struct tvec4<float16, mediump>;
|
||||
template struct tvec4<float32, mediump>;
|
||||
template struct tvec4<float64, mediump>;
|
||||
|
||||
@@ -178,150 +170,116 @@ template struct tvec4<int8, highp>;
|
||||
template struct tvec4<int16, highp>;
|
||||
template struct tvec4<int32, highp>;
|
||||
template struct tvec4<int64, highp>;
|
||||
template struct tvec4<float16, highp>;
|
||||
template struct tvec4<float32, highp>;
|
||||
template struct tvec4<float64, highp>;
|
||||
|
||||
// tmat2x2 type explicit instantiation
|
||||
template struct tmat2x2<float16, lowp>;
|
||||
template struct tmat2x2<float32, lowp>;
|
||||
template struct tmat2x2<float64, lowp>;
|
||||
|
||||
template struct tmat2x2<float16, mediump>;
|
||||
template struct tmat2x2<float32, mediump>;
|
||||
template struct tmat2x2<float64, mediump>;
|
||||
|
||||
template struct tmat2x2<float16, highp>;
|
||||
template struct tmat2x2<float32, highp>;
|
||||
template struct tmat2x2<float64, highp>;
|
||||
|
||||
// tmat2x3 type explicit instantiation
|
||||
template struct tmat2x3<float16, lowp>;
|
||||
template struct tmat2x3<float32, lowp>;
|
||||
template struct tmat2x3<float64, lowp>;
|
||||
|
||||
template struct tmat2x3<float16, mediump>;
|
||||
template struct tmat2x3<float32, mediump>;
|
||||
template struct tmat2x3<float64, mediump>;
|
||||
|
||||
template struct tmat2x3<float16, highp>;
|
||||
template struct tmat2x3<float32, highp>;
|
||||
template struct tmat2x3<float64, highp>;
|
||||
|
||||
// tmat2x4 type explicit instantiation
|
||||
template struct tmat2x4<float16, lowp>;
|
||||
template struct tmat2x4<float32, lowp>;
|
||||
template struct tmat2x4<float64, lowp>;
|
||||
|
||||
template struct tmat2x4<float16, mediump>;
|
||||
template struct tmat2x4<float32, mediump>;
|
||||
template struct tmat2x4<float64, mediump>;
|
||||
|
||||
template struct tmat2x4<float16, highp>;
|
||||
template struct tmat2x4<float32, highp>;
|
||||
template struct tmat2x4<float64, highp>;
|
||||
|
||||
// tmat3x2 type explicit instantiation
|
||||
template struct tmat3x2<float16, lowp>;
|
||||
template struct tmat3x2<float32, lowp>;
|
||||
template struct tmat3x2<float64, lowp>;
|
||||
|
||||
template struct tmat3x2<float16, mediump>;
|
||||
template struct tmat3x2<float32, mediump>;
|
||||
template struct tmat3x2<float64, mediump>;
|
||||
|
||||
template struct tmat3x2<float16, highp>;
|
||||
template struct tmat3x2<float32, highp>;
|
||||
template struct tmat3x2<float64, highp>;
|
||||
|
||||
// tmat3x3 type explicit instantiation
|
||||
template struct tmat3x3<float16, lowp>;
|
||||
template struct tmat3x3<float32, lowp>;
|
||||
template struct tmat3x3<float64, lowp>;
|
||||
|
||||
template struct tmat3x3<float16, mediump>;
|
||||
template struct tmat3x3<float32, mediump>;
|
||||
template struct tmat3x3<float64, mediump>;
|
||||
|
||||
template struct tmat3x3<float16, highp>;
|
||||
template struct tmat3x3<float32, highp>;
|
||||
template struct tmat3x3<float64, highp>;
|
||||
|
||||
// tmat3x4 type explicit instantiation
|
||||
template struct tmat3x4<float16, lowp>;
|
||||
template struct tmat3x4<float32, lowp>;
|
||||
template struct tmat3x4<float64, lowp>;
|
||||
|
||||
template struct tmat3x4<float16, mediump>;
|
||||
template struct tmat3x4<float32, mediump>;
|
||||
template struct tmat3x4<float64, mediump>;
|
||||
|
||||
template struct tmat3x4<float16, highp>;
|
||||
template struct tmat3x4<float32, highp>;
|
||||
template struct tmat3x4<float64, highp>;
|
||||
|
||||
// tmat4x2 type explicit instantiation
|
||||
template struct tmat4x2<float16, lowp>;
|
||||
template struct tmat4x2<float32, lowp>;
|
||||
template struct tmat4x2<float64, lowp>;
|
||||
|
||||
template struct tmat4x2<float16, mediump>;
|
||||
template struct tmat4x2<float32, mediump>;
|
||||
template struct tmat4x2<float64, mediump>;
|
||||
|
||||
template struct tmat4x2<float16, highp>;
|
||||
template struct tmat4x2<float32, highp>;
|
||||
template struct tmat4x2<float64, highp>;
|
||||
|
||||
// tmat4x3 type explicit instantiation
|
||||
template struct tmat4x3<float16, lowp>;
|
||||
template struct tmat4x3<float32, lowp>;
|
||||
template struct tmat4x3<float64, lowp>;
|
||||
|
||||
template struct tmat4x3<float16, mediump>;
|
||||
template struct tmat4x3<float32, mediump>;
|
||||
template struct tmat4x3<float64, mediump>;
|
||||
|
||||
template struct tmat4x3<float16, highp>;
|
||||
template struct tmat4x3<float32, highp>;
|
||||
template struct tmat4x3<float64, highp>;
|
||||
|
||||
// tmat4x4 type explicit instantiation
|
||||
template struct tmat4x4<float16, lowp>;
|
||||
template struct tmat4x4<float32, lowp>;
|
||||
template struct tmat4x4<float64, lowp>;
|
||||
|
||||
template struct tmat4x4<float16, mediump>;
|
||||
template struct tmat4x4<float32, mediump>;
|
||||
template struct tmat4x4<float64, mediump>;
|
||||
|
||||
template struct tmat4x4<float16, highp>;
|
||||
template struct tmat4x4<float32, highp>;
|
||||
template struct tmat4x4<float64, highp>;
|
||||
|
||||
// tquat type explicit instantiation
|
||||
template struct tquat<float16, lowp>;
|
||||
template struct tquat<float32, lowp>;
|
||||
template struct tquat<float64, lowp>;
|
||||
|
||||
template struct tquat<float16, mediump>;
|
||||
template struct tquat<float32, mediump>;
|
||||
template struct tquat<float64, mediump>;
|
||||
|
||||
template struct tquat<float16, highp>;
|
||||
template struct tquat<float32, highp>;
|
||||
template struct tquat<float64, highp>;
|
||||
|
||||
//tdualquat type explicit instantiation
|
||||
template struct tdualquat<float16, lowp>;
|
||||
template struct tdualquat<float32, lowp>;
|
||||
template struct tdualquat<float64, lowp>;
|
||||
|
||||
template struct tdualquat<float16, mediump>;
|
||||
template struct tdualquat<float32, mediump>;
|
||||
template struct tdualquat<float64, mediump>;
|
||||
|
||||
template struct tdualquat<float16, highp>;
|
||||
template struct tdualquat<float32, highp>;
|
||||
template struct tdualquat<float64, highp>;
|
||||
|
||||
|
||||
@@ -41,7 +41,6 @@
|
||||
|
||||
// Dependency:
|
||||
#include "../glm.hpp"
|
||||
#include "../gtc/half_float.hpp"
|
||||
|
||||
#if(defined(GLM_MESSAGES) && !defined(glm_ext))
|
||||
# pragma message("GLM: GLM_GTC_constants extension included")
|
||||
|
||||
@@ -34,12 +34,6 @@ namespace glm
|
||||
return std::numeric_limits<genType>::epsilon();
|
||||
}
|
||||
|
||||
template <>
|
||||
GLM_FUNC_QUALIFIER half epsilon()
|
||||
{
|
||||
return half(1.19209290e-007);
|
||||
}
|
||||
|
||||
template <typename genType>
|
||||
GLM_FUNC_QUALIFIER genType zero()
|
||||
{
|
||||
|
||||
@@ -42,7 +42,6 @@
|
||||
|
||||
// Dependency:
|
||||
#include "../glm.hpp"
|
||||
#include "../gtc/half_float.hpp"
|
||||
#include "../gtc/quaternion.hpp"
|
||||
|
||||
#if(defined(GLM_MESSAGES) && !defined(glm_ext))
|
||||
|
||||
@@ -28,16 +28,6 @@
|
||||
|
||||
namespace glm
|
||||
{
|
||||
GLM_FUNC_QUALIFIER bool epsilonEqual
|
||||
(
|
||||
glm::half const & x,
|
||||
glm::half const & y,
|
||||
glm::half const & epsilon
|
||||
)
|
||||
{
|
||||
return abs(x - y) < epsilon;
|
||||
}
|
||||
|
||||
GLM_FUNC_QUALIFIER bool epsilonEqual
|
||||
(
|
||||
float const & x,
|
||||
@@ -58,16 +48,6 @@ namespace glm
|
||||
return abs(x - y) < epsilon;
|
||||
}
|
||||
|
||||
GLM_FUNC_QUALIFIER bool epsilonNotEqual
|
||||
(
|
||||
glm::half const & x,
|
||||
glm::half const & y,
|
||||
glm::half const & epsilon
|
||||
)
|
||||
{
|
||||
return abs(x - y) >= epsilon;
|
||||
}
|
||||
|
||||
GLM_FUNC_QUALIFIER bool epsilonNotEqual
|
||||
(
|
||||
float const & x,
|
||||
|
||||
@@ -1,685 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
/// OpenGL Mathematics (glm.g-truc.net)
|
||||
///
|
||||
/// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
|
||||
/// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
/// of this software and associated documentation files (the "Software"), to deal
|
||||
/// in the Software without restriction, including without limitation the rights
|
||||
/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
/// copies of the Software, and to permit persons to whom the Software is
|
||||
/// furnished to do so, subject to the following conditions:
|
||||
///
|
||||
/// The above copyright notice and this permission notice shall be included in
|
||||
/// all copies or substantial portions of the Software.
|
||||
///
|
||||
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
/// 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_half_float
|
||||
/// @file glm/gtc/half_float.hpp
|
||||
/// @date 2009-04-29 / 2012-11-06
|
||||
/// @author Christophe Riccio
|
||||
///
|
||||
/// @see core (dependence)
|
||||
///
|
||||
/// @defgroup gtc_half_float GLM_GTC_half_float
|
||||
/// @ingroup gtc
|
||||
///
|
||||
/// Defines the half-precision floating-point type, along with various typedefs for vectors and matrices.
|
||||
/// <glm/gtc/half_float.hpp> need to be included to use these functionalities.
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef GLM_GTC_half_float
|
||||
#define GLM_GTC_half_float GLM_VERSION
|
||||
|
||||
// Dependency:
|
||||
#include "../glm.hpp"
|
||||
|
||||
#if(defined(GLM_MESSAGES) && !defined(glm_ext))
|
||||
# pragma message("GLM: GLM_GTC_half_float extension included")
|
||||
#endif
|
||||
|
||||
namespace glm{
|
||||
namespace detail
|
||||
{
|
||||
#if(GLM_COMPONENT == GLM_COMPONENT_CXX98)
|
||||
template <precision P>
|
||||
struct tvec2<half, P>
|
||||
{
|
||||
enum ctor{_null};
|
||||
typedef half value_type;
|
||||
typedef std::size_t size_type;
|
||||
|
||||
GLM_FUNC_DECL size_type length() const;
|
||||
|
||||
typedef tvec2<half, P> type;
|
||||
typedef tvec2<bool, P> bool_type;
|
||||
|
||||
//////////////////////////////////////
|
||||
// Data
|
||||
|
||||
half x, y;
|
||||
|
||||
//////////////////////////////////////
|
||||
// Accesses
|
||||
|
||||
GLM_FUNC_DECL half & operator[](size_type i);
|
||||
GLM_FUNC_DECL half const & operator[](size_type i) const;
|
||||
|
||||
//////////////////////////////////////
|
||||
// Implicit basic constructors
|
||||
|
||||
GLM_FUNC_DECL tvec2();
|
||||
GLM_FUNC_DECL tvec2(tvec2<half, P> const & v);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Explicit basic constructors
|
||||
|
||||
GLM_FUNC_DECL explicit tvec2(ctor){}
|
||||
GLM_FUNC_DECL explicit tvec2(
|
||||
half const & s);
|
||||
GLM_FUNC_DECL explicit tvec2(
|
||||
half const & s1,
|
||||
half const & s2);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Swizzle constructors
|
||||
|
||||
GLM_FUNC_DECL tvec2(tref2<half, P> const & r);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Convertion scalar constructors
|
||||
|
||||
//! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL explicit tvec2(U const & x);
|
||||
//! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
template <typename U, typename V>
|
||||
GLM_FUNC_DECL explicit tvec2(U const & x, V const & y);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Convertion vector constructors
|
||||
|
||||
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
template <typename U, precision Q>
|
||||
GLM_FUNC_DECL explicit tvec2(tvec2<U, Q> const & v);
|
||||
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
template <typename U, precision Q>
|
||||
GLM_FUNC_DECL explicit tvec2(tvec3<U, Q> const & v);
|
||||
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
template <typename U, precision Q>
|
||||
GLM_FUNC_DECL explicit tvec2(tvec4<U, Q> const & v);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Unary arithmetic operators
|
||||
|
||||
GLM_FUNC_DECL tvec2<half, P>& operator= (tvec2<half, P> const & v);
|
||||
|
||||
GLM_FUNC_DECL tvec2<half, P>& operator+=(half const & s);
|
||||
GLM_FUNC_DECL tvec2<half, P>& operator+=(tvec2<half, P> const & v);
|
||||
GLM_FUNC_DECL tvec2<half, P>& operator-=(half const & s);
|
||||
GLM_FUNC_DECL tvec2<half, P>& operator-=(tvec2<half, P> const & v);
|
||||
GLM_FUNC_DECL tvec2<half, P>& operator*=(half const & s);
|
||||
GLM_FUNC_DECL tvec2<half, P>& operator*=(tvec2<half, P> const & v);
|
||||
GLM_FUNC_DECL tvec2<half, P>& operator/=(half const & s);
|
||||
GLM_FUNC_DECL tvec2<half, P>& operator/=(tvec2<half, P> const & v);
|
||||
GLM_FUNC_DECL tvec2<half, P>& operator++();
|
||||
GLM_FUNC_DECL tvec2<half, P>& operator--();
|
||||
|
||||
//////////////////////////////////////
|
||||
// Swizzle operators
|
||||
|
||||
GLM_FUNC_DECL half swizzle(comp X) const;
|
||||
GLM_FUNC_DECL tvec2<half, P> swizzle(comp X, comp Y) const;
|
||||
GLM_FUNC_DECL tvec3<half, P> swizzle(comp X, comp Y, comp Z) const;
|
||||
GLM_FUNC_DECL tvec4<half, P> swizzle(comp X, comp Y, comp Z, comp W) const;
|
||||
GLM_FUNC_DECL tref2<half, P> swizzle(comp X, comp Y);
|
||||
};
|
||||
|
||||
template <precision P>
|
||||
struct tvec3<half, P>
|
||||
{
|
||||
enum ctor{_null};
|
||||
typedef half value_type;
|
||||
typedef std::size_t size_type;
|
||||
GLM_FUNC_DECL size_type length() const;
|
||||
|
||||
typedef tvec3<half, P> type;
|
||||
typedef tvec3<bool, P> bool_type;
|
||||
|
||||
//////////////////////////////////////
|
||||
// Data
|
||||
|
||||
half x, y, z;
|
||||
|
||||
//////////////////////////////////////
|
||||
// Accesses
|
||||
|
||||
GLM_FUNC_DECL half & operator[](size_type i);
|
||||
GLM_FUNC_DECL half const & operator[](size_type i) const;
|
||||
|
||||
//////////////////////////////////////
|
||||
// Implicit basic constructors
|
||||
|
||||
GLM_FUNC_DECL tvec3();
|
||||
GLM_FUNC_DECL tvec3(tvec3<half, P> const & v);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Explicit basic constructors
|
||||
|
||||
GLM_FUNC_DECL explicit tvec3(ctor){}
|
||||
GLM_FUNC_DECL explicit tvec3(
|
||||
half const & s);
|
||||
GLM_FUNC_DECL explicit tvec3(
|
||||
half const & s1,
|
||||
half const & s2,
|
||||
half const & s3);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Swizzle constructors
|
||||
|
||||
GLM_FUNC_DECL tvec3(tref3<half, P> const & r);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Convertion scalar constructors
|
||||
|
||||
//! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL explicit tvec3(U const & x);
|
||||
|
||||
//! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
template <typename U, typename V, typename W>
|
||||
GLM_FUNC_DECL explicit tvec3(U const & x, V const & y, W const & z);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Convertion vector constructors
|
||||
|
||||
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
template <typename A, typename B, precision Q>
|
||||
GLM_FUNC_DECL explicit tvec3(tvec2<A, Q> const & v, B const & s);
|
||||
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
template <typename A, typename B, precision Q>
|
||||
GLM_FUNC_DECL explicit tvec3(A const & s, tvec2<B, Q> const & v);
|
||||
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
template <typename U, precision Q>
|
||||
GLM_FUNC_DECL explicit tvec3(tvec3<U, Q> const & v);
|
||||
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
template <typename U, precision Q>
|
||||
GLM_FUNC_DECL explicit tvec3(tvec4<U, Q> const & v);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Unary arithmetic operators
|
||||
|
||||
GLM_FUNC_DECL tvec3<half, P>& operator= (tvec3<half, P> const & v);
|
||||
|
||||
GLM_FUNC_DECL tvec3<half, P>& operator+=(half const & s);
|
||||
GLM_FUNC_DECL tvec3<half, P>& operator+=(tvec3<half, P> const & v);
|
||||
GLM_FUNC_DECL tvec3<half, P>& operator-=(half const & s);
|
||||
GLM_FUNC_DECL tvec3<half, P>& operator-=(tvec3<half, P> const & v);
|
||||
GLM_FUNC_DECL tvec3<half, P>& operator*=(half const & s);
|
||||
GLM_FUNC_DECL tvec3<half, P>& operator*=(tvec3<half, P> const & v);
|
||||
GLM_FUNC_DECL tvec3<half, P>& operator/=(half const & s);
|
||||
GLM_FUNC_DECL tvec3<half, P>& operator/=(tvec3<half, P> const & v);
|
||||
GLM_FUNC_DECL tvec3<half, P>& operator++();
|
||||
GLM_FUNC_DECL tvec3<half, P>& operator--();
|
||||
|
||||
//////////////////////////////////////
|
||||
// Swizzle operators
|
||||
|
||||
GLM_FUNC_DECL half swizzle(comp X) const;
|
||||
GLM_FUNC_DECL tvec2<half, P> swizzle(comp X, comp Y) const;
|
||||
GLM_FUNC_DECL tvec3<half, P> swizzle(comp X, comp Y, comp Z) const;
|
||||
GLM_FUNC_DECL tvec4<half, P> swizzle(comp X, comp Y, comp Z, comp W) const;
|
||||
GLM_FUNC_DECL tref3<half, P> swizzle(comp X, comp Y, comp Z);
|
||||
};
|
||||
|
||||
template <precision P>
|
||||
struct tvec4<half, P>
|
||||
{
|
||||
enum ctor{_null};
|
||||
typedef half value_type;
|
||||
typedef std::size_t size_type;
|
||||
GLM_FUNC_DECL size_type length() const;
|
||||
|
||||
typedef tvec4<half, P> type;
|
||||
typedef tvec4<bool, P> bool_type;
|
||||
|
||||
//////////////////////////////////////
|
||||
// Data
|
||||
|
||||
half x, y, z, w;
|
||||
|
||||
//////////////////////////////////////
|
||||
// Accesses
|
||||
|
||||
GLM_FUNC_DECL half & operator[](size_type i);
|
||||
GLM_FUNC_DECL half const & operator[](size_type i) const;
|
||||
|
||||
//////////////////////////////////////
|
||||
// Implicit basic constructors
|
||||
|
||||
GLM_FUNC_DECL tvec4();
|
||||
GLM_FUNC_DECL tvec4(tvec4<half, P> const & v);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Explicit basic constructors
|
||||
|
||||
|
||||
GLM_FUNC_DECL explicit tvec4(ctor){}
|
||||
GLM_FUNC_DECL explicit tvec4(
|
||||
half const & s);
|
||||
GLM_FUNC_DECL explicit tvec4(
|
||||
half const & s0,
|
||||
half const & s1,
|
||||
half const & s2,
|
||||
half const & s3);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Swizzle constructors
|
||||
|
||||
GLM_FUNC_DECL tvec4(tref4<half, P> const & r);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Convertion scalar constructors
|
||||
|
||||
//! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL explicit tvec4(U const & x);
|
||||
//! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
template <typename A, typename B, typename C, typename D>
|
||||
GLM_FUNC_DECL explicit tvec4(A const & x, B const & y, C const & z, D const & w);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Convertion vector constructors
|
||||
|
||||
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
template <typename A, typename B, typename C, precision Q>
|
||||
GLM_FUNC_DECL explicit tvec4(tvec2<A, Q> const & v, B const & s1, C const & s2);
|
||||
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
template <typename A, typename B, typename C, precision Q>
|
||||
GLM_FUNC_DECL explicit tvec4(A const & s1, tvec2<B, Q> const & v, C const & s2);
|
||||
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
template <typename A, typename B, typename C, precision Q>
|
||||
GLM_FUNC_DECL explicit tvec4(A const & s1, B const & s2, tvec2<C, Q> const & v);
|
||||
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
template <typename A, typename B, precision Q>
|
||||
GLM_FUNC_DECL explicit tvec4(tvec3<A, Q> const & v, B const & s);
|
||||
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
template <typename A, typename B, precision Q>
|
||||
GLM_FUNC_DECL explicit tvec4(A const & s, tvec3<B, Q> const & v);
|
||||
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
template <typename A, typename B, precision Q>
|
||||
GLM_FUNC_DECL explicit tvec4(tvec2<A, Q> const & v1, tvec2<B, Q> const & v2);
|
||||
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
template <typename U, precision Q>
|
||||
GLM_FUNC_DECL explicit tvec4(tvec4<U, Q> const & v);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Unary arithmetic operators
|
||||
|
||||
GLM_FUNC_DECL tvec4<half, P>& operator= (tvec4<half, P> const & v);
|
||||
|
||||
GLM_FUNC_DECL tvec4<half, P>& operator+=(half const & s);
|
||||
GLM_FUNC_DECL tvec4<half, P>& operator+=(tvec4<half, P> const & v);
|
||||
GLM_FUNC_DECL tvec4<half, P>& operator-=(half const & s);
|
||||
GLM_FUNC_DECL tvec4<half, P>& operator-=(tvec4<half, P> const & v);
|
||||
GLM_FUNC_DECL tvec4<half, P>& operator*=(half const & s);
|
||||
GLM_FUNC_DECL tvec4<half, P>& operator*=(tvec4<half, P> const & v);
|
||||
GLM_FUNC_DECL tvec4<half, P>& operator/=(half const & s);
|
||||
GLM_FUNC_DECL tvec4<half, P>& operator/=(tvec4<half, P> const & v);
|
||||
GLM_FUNC_DECL tvec4<half, P>& operator++();
|
||||
GLM_FUNC_DECL tvec4<half, P>& operator--();
|
||||
|
||||
//////////////////////////////////////
|
||||
// Swizzle operators
|
||||
|
||||
GLM_FUNC_DECL half swizzle(comp X) const;
|
||||
GLM_FUNC_DECL tvec2<half, P> swizzle(comp X, comp Y) const;
|
||||
GLM_FUNC_DECL tvec3<half, P> swizzle(comp X, comp Y, comp Z) const;
|
||||
GLM_FUNC_DECL tvec4<half, P> swizzle(comp X, comp Y, comp Z, comp W) const;
|
||||
GLM_FUNC_DECL tref4<half, P> swizzle(comp X, comp Y, comp Z, comp W);
|
||||
};
|
||||
#endif//(GLM_COMPONENT == GLM_COMPONENT_CXX98)
|
||||
}
|
||||
//namespace detail
|
||||
|
||||
/// @addtogroup gtc_half_float
|
||||
/// @{
|
||||
|
||||
//////////////////////////////////////////////
|
||||
// High half precision floating-point numbers.
|
||||
|
||||
/// Vector of 2 high half-precision floating-point numbers.
|
||||
/// @see gtc_half_float
|
||||
typedef detail::tvec2<half_t, highp> highp_hvec2;
|
||||
|
||||
/// Vector of 3 high half-precision floating-point numbers.
|
||||
/// @see gtc_half_float
|
||||
typedef detail::tvec3<half_t, highp> highp_hvec3;
|
||||
|
||||
/// Vector of 4 high half-precision floating-point numbers.
|
||||
/// @see gtc_half_float
|
||||
typedef detail::tvec4<half_t, highp> highp_hvec4;
|
||||
|
||||
/// 2 * 2 matrix of high half-precision floating-point numbers.
|
||||
/// @see gtc_half_float
|
||||
typedef detail::tmat2x2<half_t, highp> highp_hmat2;
|
||||
|
||||
/// 3 * 3 matrix of high half-precision floating-point numbers.
|
||||
/// @see gtc_half_float
|
||||
typedef detail::tmat3x3<half_t, highp> highp_hmat3;
|
||||
|
||||
/// 4 * 4 matrix of high half-precision floating-point numbers.
|
||||
/// @see gtc_half_float
|
||||
typedef detail::tmat4x4<half_t, highp> highp_hmat4;
|
||||
|
||||
/// 2 * 2 matrix of high half-precision floating-point numbers.
|
||||
/// @see gtc_half_float
|
||||
typedef detail::tmat2x2<half_t, highp> highp_hmat2x2;
|
||||
|
||||
/// 2 * 3 matrix of high half-precision floating-point numbers.
|
||||
/// @see gtc_half_float
|
||||
typedef detail::tmat2x3<half_t, highp> highp_hmat2x3;
|
||||
|
||||
/// 2 * 4 matrix of high half-precision floating-point numbers.
|
||||
/// @see gtc_half_float
|
||||
typedef detail::tmat2x4<half_t, highp> highp_hmat2x4;
|
||||
|
||||
/// 3 * 2 matrix of high half-precision floating-point numbers.
|
||||
/// @see gtc_half_float
|
||||
typedef detail::tmat3x2<half_t, highp> highp_hmat3x2;
|
||||
|
||||
/// 3 * 3 matrix of high half-precision floating-point numbers.
|
||||
/// @see gtc_half_float
|
||||
typedef detail::tmat3x3<half_t, highp> highp_hmat3x3;
|
||||
|
||||
/// 3 * 4 matrix of high half-precision floating-point numbers.
|
||||
/// @see gtc_half_float
|
||||
typedef detail::tmat3x4<half_t, highp> highp_hmat3x4;
|
||||
|
||||
/// 4 * 2 matrix of high half-precision floating-point numbers.
|
||||
/// @see gtc_half_float
|
||||
typedef detail::tmat4x2<half_t, highp> highp_hmat4x2;
|
||||
|
||||
/// 4 * 3 matrix of high half-precision floating-point numbers.
|
||||
/// @see gtc_half_float
|
||||
typedef detail::tmat4x3<half_t, highp> highp_hmat4x3;
|
||||
|
||||
/// 4 * 4 matrix of high half-precision floating-point numbers.
|
||||
/// @see gtc_half_float
|
||||
typedef detail::tmat4x4<half_t, highp> highp_hmat4x4;
|
||||
|
||||
//////////////////////////////////////////////
|
||||
// Medium half precision floating-point numbers.
|
||||
|
||||
/// Vector of 2 medium half-precision floating-point numbers.
|
||||
/// @see gtc_half_float
|
||||
typedef detail::tvec2<half_t, mediump> mediump_hvec2;
|
||||
|
||||
/// Vector of 3 medium half-precision floating-point numbers.
|
||||
/// @see gtc_half_float
|
||||
typedef detail::tvec3<half_t, mediump> mediump_hvec3;
|
||||
|
||||
/// Vector of 4 medium half-precision floating-point numbers.
|
||||
/// @see gtc_half_float
|
||||
typedef detail::tvec4<half_t, mediump> mediump_hvec4;
|
||||
|
||||
/// 2 * 2 matrix of medium half-precision floating-point numbers.
|
||||
/// @see gtc_half_float
|
||||
typedef detail::tmat2x2<half_t, mediump> mediump_hmat2;
|
||||
|
||||
/// 3 * 3 matrix of medium half-precision floating-point numbers.
|
||||
/// @see gtc_half_float
|
||||
typedef detail::tmat3x3<half_t, mediump> mediump_hmat3;
|
||||
|
||||
/// 4 * 4 matrix of medium half-precision floating-point numbers.
|
||||
/// @see gtc_half_float
|
||||
typedef detail::tmat4x4<half_t, mediump> mediump_hmat4;
|
||||
|
||||
/// 2 * 2 matrix of medium half-precision floating-point numbers.
|
||||
/// @see gtc_half_float
|
||||
typedef detail::tmat2x2<half_t, mediump> mediump_hmat2x2;
|
||||
|
||||
/// 2 * 3 matrix of medium half-precision floating-point numbers.
|
||||
/// @see gtc_half_float
|
||||
typedef detail::tmat2x3<half_t, mediump> mediump_hmat2x3;
|
||||
|
||||
/// 2 * 4 matrix of medium half-precision floating-point numbers.
|
||||
/// @see gtc_half_float
|
||||
typedef detail::tmat2x4<half_t, mediump> mediump_hmat2x4;
|
||||
|
||||
/// 3 * 2 matrix of medium half-precision floating-point numbers.
|
||||
/// @see gtc_half_float
|
||||
typedef detail::tmat3x2<half_t, mediump> mediump_hmat3x2;
|
||||
|
||||
/// 3 * 3 matrix of medium half-precision floating-point numbers.
|
||||
/// @see gtc_half_float
|
||||
typedef detail::tmat3x3<half_t, mediump> mediump_hmat3x3;
|
||||
|
||||
/// 3 * 4 matrix of medium half-precision floating-point numbers.
|
||||
/// @see gtc_half_float
|
||||
typedef detail::tmat3x4<half_t, mediump> mediump_hmat3x4;
|
||||
|
||||
/// 4 * 2 matrix of medium half-precision floating-point numbers.
|
||||
/// @see gtc_half_float
|
||||
typedef detail::tmat4x2<half_t, mediump> mediump_hmat4x2;
|
||||
|
||||
/// 4 * 3 matrix of medium half-precision floating-point numbers.
|
||||
/// @see gtc_half_float
|
||||
typedef detail::tmat4x3<half_t, mediump> mediump_hmat4x3;
|
||||
|
||||
/// 4 * 4 matrix of medium half-precision floating-point numbers.
|
||||
/// @see gtc_half_float
|
||||
typedef detail::tmat4x4<half_t, mediump> mediump_hmat4x4;
|
||||
|
||||
|
||||
//////////////////////////////////////////////
|
||||
// Low half precision floating-point numbers.
|
||||
|
||||
/// Vector of 2 low half-precision floating-point numbers.
|
||||
/// @see gtc_half_float
|
||||
typedef detail::tvec2<half_t, lowp> lowp_hvec2;
|
||||
|
||||
/// Vector of 3 low half-precision floating-point numbers.
|
||||
/// @see gtc_half_float
|
||||
typedef detail::tvec3<half_t, lowp> lowp_hvec3;
|
||||
|
||||
/// Vector of 4 low half-precision floating-point numbers.
|
||||
/// @see gtc_half_float
|
||||
typedef detail::tvec4<half_t, lowp> lowp_hvec4;
|
||||
|
||||
/// 2 * 2 matrix of low half-precision floating-point numbers.
|
||||
/// @see gtc_half_float
|
||||
typedef detail::tmat2x2<half_t, lowp> lowp_hmat2;
|
||||
|
||||
/// 3 * 3 matrix of low half-precision floating-point numbers.
|
||||
/// @see gtc_half_float
|
||||
typedef detail::tmat3x3<half_t, lowp> lowp_hmat3;
|
||||
|
||||
/// 4 * 4 matrix of low half-precision floating-point numbers.
|
||||
/// @see gtc_half_float
|
||||
typedef detail::tmat4x4<half_t, lowp> lowp_hmat4;
|
||||
|
||||
/// 2 * 2 matrix of low half-precision floating-point numbers.
|
||||
/// @see gtc_half_float
|
||||
typedef detail::tmat2x2<half_t, lowp> lowp_hmat2x2;
|
||||
|
||||
/// 2 * 3 matrix of low half-precision floating-point numbers.
|
||||
/// @see gtc_half_float
|
||||
typedef detail::tmat2x3<half_t, lowp> lowp_hmat2x3;
|
||||
|
||||
/// 2 * 4 matrix of low half-precision floating-point numbers.
|
||||
/// @see gtc_half_float
|
||||
typedef detail::tmat2x4<half_t, lowp> lowp_hmat2x4;
|
||||
|
||||
/// 3 * 2 matrix of low half-precision floating-point numbers.
|
||||
/// @see gtc_half_float
|
||||
typedef detail::tmat3x2<half_t, lowp> lowp_hmat3x2;
|
||||
|
||||
/// 3 * 3 matrix of low half-precision floating-point numbers.
|
||||
/// @see gtc_half_float
|
||||
typedef detail::tmat3x3<half_t, lowp> lowp_hmat3x3;
|
||||
|
||||
/// 3 * 4 matrix of low half-precision floating-point numbers.
|
||||
/// @see gtc_half_float
|
||||
typedef detail::tmat3x4<half_t, lowp> lowp_hmat3x4;
|
||||
|
||||
/// 4 * 2 matrix of low half-precision floating-point numbers.
|
||||
/// @see gtc_half_float
|
||||
typedef detail::tmat4x2<half_t, lowp> lowp_hmat4x2;
|
||||
|
||||
/// 4 * 3 matrix of low half-precision floating-point numbers.
|
||||
/// @see gtc_half_float
|
||||
typedef detail::tmat4x3<half_t, lowp> lowp_hmat4x3;
|
||||
|
||||
/// 4 * 4 matrix of low half-precision floating-point numbers.
|
||||
/// @see gtc_half_float
|
||||
typedef detail::tmat4x4<half_t, lowp> lowp_hmat4x4;
|
||||
|
||||
|
||||
//////////////////////////////////////////////
|
||||
// Default half precision floating-point numbers.
|
||||
|
||||
/// Type for default half-precision floating-point numbers.
|
||||
/// @see gtc_half_float
|
||||
typedef half_t half;
|
||||
|
||||
|
||||
#if(!defined(GLM_PRECISION_HIGHP_HALF) && !defined(GLM_PRECISION_MEDIUMP_HALF) && defined(GLM_PRECISION_LOWP_HALF))
|
||||
typedef lowp_hvec2 hvec2;
|
||||
typedef lowp_hvec3 hvec3;
|
||||
typedef lowp_hvec4 hvec4;
|
||||
typedef lowp_hmat2 hmat2;
|
||||
typedef lowp_hmat3 hmat3;
|
||||
typedef lowp_hmat4 hmat4;
|
||||
typedef lowp_hmat2x2 hmat2x2;
|
||||
typedef lowp_hmat2x3 hmat2x3;
|
||||
typedef lowp_hmat2x4 hmat2x4;
|
||||
typedef lowp_hmat3x2 hmat3x2;
|
||||
typedef lowp_hmat3x3 hmat3x3;
|
||||
typedef lowp_hmat3x4 hmat3x4;
|
||||
typedef lowp_hmat4x2 hmat4x2;
|
||||
typedef lowp_hmat4x3 hmat4x3;
|
||||
typedef lowp_hmat4x4 hmat4x4;
|
||||
#elif(!defined(GLM_PRECISION_HIGHP_HALF) && defined(GLM_PRECISION_MEDIUMP_HALF) && !defined(GLM_PRECISION_LOWP_HALF))
|
||||
typedef mediump_hvec2 hvec2;
|
||||
typedef mediump_hvec3 hvec3;
|
||||
typedef mediump_hvec4 hvec4;
|
||||
typedef mediump_hmat2 hmat2;
|
||||
typedef mediump_hmat3 hmat3;
|
||||
typedef mediump_hmat4 hmat4;
|
||||
typedef mediump_hmat2x2 hmat2x2;
|
||||
typedef mediump_hmat2x3 hmat2x3;
|
||||
typedef mediump_hmat2x4 hmat2x4;
|
||||
typedef mediump_hmat3x2 hmat3x2;
|
||||
typedef mediump_hmat3x3 hmat3x3;
|
||||
typedef mediump_hmat3x4 hmat3x4;
|
||||
typedef mediump_hmat4x2 hmat4x2;
|
||||
typedef mediump_hmat4x3 hmat4x3;
|
||||
typedef mediump_hmat4x4 hmat4x4;
|
||||
#else //(!defined(GLM_PRECISION_HIGHP_HALF) && !defined(GLM_PRECISION_MEDIUMP_HALF) && !defined(GLM_PRECISION_LOWP_HALF))
|
||||
//////////////////////////////////////////////
|
||||
// Default half precision floating-point numbers.
|
||||
|
||||
/// Vector of 2 default half-precision floating-point numbers.
|
||||
/// @see gtc_half_float
|
||||
typedef highp_hvec2 hvec2;
|
||||
|
||||
/// Vector of 3 default half-precision floating-point numbers.
|
||||
/// @see gtc_half_float
|
||||
typedef highp_hvec3 hvec3;
|
||||
|
||||
/// Vector of 4 default half-precision floating-point numbers.
|
||||
/// @see gtc_half_float
|
||||
typedef highp_hvec4 hvec4;
|
||||
|
||||
/// 2 * 2 matrix of default half-precision floating-point numbers.
|
||||
/// @see gtc_half_float
|
||||
typedef highp_hmat2x2 hmat2;
|
||||
|
||||
/// 3 * 3 matrix of default half-precision floating-point numbers.
|
||||
/// @see gtc_half_float
|
||||
typedef highp_hmat3x3 hmat3;
|
||||
|
||||
/// 4 * 4 matrix of default half-precision floating-point numbers.
|
||||
/// @see gtc_half_float
|
||||
typedef highp_hmat4x4 hmat4;
|
||||
|
||||
/// 2 * 2 matrix of default half-precision floating-point numbers.
|
||||
/// @see gtc_half_float
|
||||
typedef highp_hmat2x2 hmat2x2;
|
||||
|
||||
/// 2 * 3 matrix of default half-precision floating-point numbers.
|
||||
/// @see gtc_half_float
|
||||
typedef highp_hmat2x3 hmat2x3;
|
||||
|
||||
/// 2 * 4 matrix of default half-precision floating-point numbers.
|
||||
/// @see gtc_half_float
|
||||
typedef highp_hmat2x4 hmat2x4;
|
||||
|
||||
/// 3 * 2 matrix of default half-precision floating-point numbers.
|
||||
/// @see gtc_half_float
|
||||
typedef highp_hmat3x2 hmat3x2;
|
||||
|
||||
/// 3 * 3 matrix of default half-precision floating-point numbers.
|
||||
/// @see gtc_half_float
|
||||
typedef highp_hmat3x3 hmat3x3;
|
||||
|
||||
/// 3 * 4 matrix of default half-precision floating-point numbers.
|
||||
/// @see gtc_half_float
|
||||
typedef highp_hmat3x4 hmat3x4;
|
||||
|
||||
/// 4 * 2 matrix of default half-precision floating-point numbers.
|
||||
/// @see gtc_half_float
|
||||
typedef highp_hmat4x2 hmat4x2;
|
||||
|
||||
/// 4 * 3 matrix of default half-precision floating-point numbers.
|
||||
/// @see gtc_half_float
|
||||
typedef highp_hmat4x3 hmat4x3;
|
||||
|
||||
/// 4 * 4 matrix of default half-precision floating-point numbers.
|
||||
/// @see gtc_half_float
|
||||
typedef highp_hmat4x4 hmat4x4;
|
||||
#endif//GLM_PRECISION
|
||||
|
||||
/// Returns the absolute value of a half-precision floating-point value
|
||||
/// @see gtc_half_float
|
||||
GLM_FUNC_DECL half abs(half const & x);
|
||||
|
||||
/// Returns the absolute value of a half-precision floating-point two dimensional vector
|
||||
/// @see gtc_half_float
|
||||
GLM_FUNC_DECL hvec2 abs(hvec2 const & x);
|
||||
|
||||
/// Returns the absolute value of a half-precision floating-point three dimensional vector
|
||||
/// @see gtc_half_float
|
||||
GLM_FUNC_DECL hvec3 abs(hvec3 const & x);
|
||||
|
||||
/// Returns the absolute value of a half-precision floating-point four dimensional vector
|
||||
/// @see gtc_half_float
|
||||
GLM_FUNC_DECL hvec4 abs(hvec4 const & x);
|
||||
|
||||
/// Selects which vector each returned component comes
|
||||
/// from. For a component of <a> that is false, the
|
||||
/// corresponding component of x is returned. For a
|
||||
/// component of a that is true, the corresponding
|
||||
/// component of y is returned. Components of x and y that
|
||||
/// are not selected are allowed to be invalid floating point
|
||||
/// values and will have no effect on the results. Thus, this
|
||||
/// provides different functionality than
|
||||
/// genType mix(genType x, genType y, genType(a))
|
||||
/// where a is a Boolean vector.
|
||||
///
|
||||
/// @see gtc_half_float
|
||||
GLM_FUNC_DECL half mix(half const & x, half const & y, bool const & a);
|
||||
|
||||
/// @}
|
||||
}// namespace glm
|
||||
|
||||
#include "half_float.inl"
|
||||
|
||||
#endif//GLM_GTC_half_float
|
||||
File diff suppressed because it is too large
Load Diff
@@ -42,7 +42,6 @@
|
||||
|
||||
// Dependency:
|
||||
#include "../glm.hpp"
|
||||
#include "../gtc/half_float.hpp"
|
||||
#include "../gtc/constants.hpp"
|
||||
|
||||
#if(defined(GLM_MESSAGES) && !defined(glm_ext))
|
||||
|
||||
@@ -42,7 +42,6 @@
|
||||
|
||||
// Dependency:
|
||||
#include "../glm.hpp"
|
||||
#include "../gtc/half_float.hpp"
|
||||
|
||||
#if(defined(GLM_MESSAGES) && !defined(glm_ext))
|
||||
# pragma message("GLM: GLM_GTC_random extension included")
|
||||
|
||||
@@ -44,12 +44,6 @@ namespace detail
|
||||
}
|
||||
*/
|
||||
};
|
||||
|
||||
template <>
|
||||
GLM_FUNC_QUALIFIER half compute_linearRand::operator()<half> (half const & Min, half const & Max) const
|
||||
{
|
||||
return half(float(std::rand()) / float(RAND_MAX) * (float(Max) - float(Min)) + float(Min));
|
||||
}
|
||||
|
||||
template <>
|
||||
GLM_FUNC_QUALIFIER float compute_linearRand::operator()<float> (float const & Min, float const & Max) const
|
||||
|
||||
@@ -101,9 +101,6 @@ namespace glm
|
||||
GLM_FUNC_QUALIFIER TYPE& swizzle(detail::tvec##SIZE<TYPE, defaultp> & v) \
|
||||
{return v[x];}
|
||||
|
||||
static_swizzle1_ref(detail::float16, 2)
|
||||
static_swizzle1_ref(detail::float16, 3)
|
||||
static_swizzle1_ref(detail::float16, 4)
|
||||
static_swizzle1_ref(detail::float32, 2)
|
||||
static_swizzle1_ref(detail::float32, 3)
|
||||
static_swizzle1_ref(detail::float32, 4)
|
||||
@@ -172,9 +169,6 @@ namespace glm
|
||||
{return detail::tvec4<TYPE, defaultp>(v[x], v[y], v[z], v[w]);}
|
||||
|
||||
|
||||
static_swizzle2_const(glm::f16, 2)
|
||||
static_swizzle2_const(glm::f16, 3)
|
||||
static_swizzle2_const(glm::f16, 4)
|
||||
static_swizzle2_const(glm::f32, 2)
|
||||
static_swizzle2_const(glm::f32, 3)
|
||||
static_swizzle2_const(glm::f32, 4)
|
||||
@@ -208,9 +202,6 @@ namespace glm
|
||||
static_swizzle2_const(glm::u64, 3)
|
||||
static_swizzle2_const(glm::u64, 4)
|
||||
|
||||
static_swizzle3_const(glm::f16, 2)
|
||||
static_swizzle3_const(glm::f16, 3)
|
||||
static_swizzle3_const(glm::f16, 4)
|
||||
static_swizzle3_const(glm::f32, 2)
|
||||
static_swizzle3_const(glm::f32, 3)
|
||||
static_swizzle3_const(glm::f32, 4)
|
||||
@@ -244,9 +235,6 @@ namespace glm
|
||||
static_swizzle3_const(glm::u64, 3)
|
||||
static_swizzle3_const(glm::u64, 4)
|
||||
|
||||
static_swizzle4_const(glm::f16, 2)
|
||||
static_swizzle4_const(glm::f16, 3)
|
||||
static_swizzle4_const(glm::f16, 4)
|
||||
static_swizzle4_const(glm::f32, 2)
|
||||
static_swizzle4_const(glm::f32, 3)
|
||||
static_swizzle4_const(glm::f32, 4)
|
||||
@@ -298,9 +286,6 @@ namespace glm
|
||||
detail::tvec##SIZE<TYPE, defaultp> & v) \
|
||||
{return glm::detail::tref4<TYPE, defaultp>(v[x], v[y], v[z], v[w]);}
|
||||
|
||||
static_swizzle2_ref(glm::f16, 2)
|
||||
static_swizzle2_ref(glm::f16, 3)
|
||||
static_swizzle2_ref(glm::f16, 4)
|
||||
static_swizzle2_ref(glm::f32, 2)
|
||||
static_swizzle2_ref(glm::f32, 3)
|
||||
static_swizzle2_ref(glm::f32, 4)
|
||||
@@ -334,8 +319,6 @@ namespace glm
|
||||
static_swizzle2_ref(glm::u64, 3)
|
||||
static_swizzle2_ref(glm::u64, 4)
|
||||
|
||||
static_swizzle3_ref(glm::f16, 3)
|
||||
static_swizzle3_ref(glm::f16, 4)
|
||||
static_swizzle3_ref(glm::f32, 3)
|
||||
static_swizzle3_ref(glm::f32, 4)
|
||||
static_swizzle3_ref(glm::f64, 3)
|
||||
@@ -359,7 +342,6 @@ namespace glm
|
||||
static_swizzle3_ref(glm::u64, 3)
|
||||
static_swizzle3_ref(glm::u64, 4)
|
||||
|
||||
static_swizzle4_ref(glm::f16, 4)
|
||||
static_swizzle4_ref(glm::f32, 4)
|
||||
static_swizzle4_ref(glm::f64, 4)
|
||||
|
||||
|
||||
@@ -45,13 +45,12 @@
|
||||
|
||||
// Dependency:
|
||||
#include "../glm.hpp"
|
||||
#include "../gtc/half_float.hpp"
|
||||
#include "../gtc/quaternion.hpp"
|
||||
|
||||
#if(defined(GLM_MESSAGES) && !defined(glm_ext))
|
||||
# pragma message("GLM: GLM_GTC_type_precision extension included")
|
||||
#endif
|
||||
/*
|
||||
|
||||
namespace glm
|
||||
{
|
||||
///////////////////////////
|
||||
@@ -590,10 +589,6 @@ namespace glm
|
||||
//////////////////////
|
||||
// Float vector types
|
||||
|
||||
/// 16 bit half-precision floating-point scalar.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::float16 float16;
|
||||
|
||||
/// 32 bit single-precision floating-point scalar.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::float32 float32;
|
||||
@@ -603,10 +598,6 @@ namespace glm
|
||||
typedef detail::float64 float64;
|
||||
|
||||
|
||||
/// 16 bit half-precision floating-point scalar.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::float16 float16_t;
|
||||
|
||||
/// 32 bit single-precision floating-point scalar.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::float32 float32_t;
|
||||
@@ -616,10 +607,6 @@ namespace glm
|
||||
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;
|
||||
@@ -645,23 +632,6 @@ namespace glm
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tvec4<float, defaultp> fvec4;
|
||||
|
||||
|
||||
/// Half-precision floating-point vector of 1 component.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tvec1<f16, defaultp> f16vec1;
|
||||
|
||||
/// Half-precision floating-point vector of 2 components.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tvec2<f16, defaultp> f16vec2;
|
||||
|
||||
/// Half-precision floating-point vector of 3 components.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tvec3<f16, defaultp> f16vec3;
|
||||
|
||||
/// Half-precision floating-point vector of 4 components.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tvec4<f16, defaultp> f16vec4;
|
||||
|
||||
|
||||
/// Single-precision floating-point vector of 1 component.
|
||||
/// @see gtc_type_precision
|
||||
@@ -758,64 +728,6 @@ namespace glm
|
||||
typedef detail::tmat4x4<f32, defaultp> fmat4x4;
|
||||
|
||||
|
||||
/// Half-precision floating-point 1x1 matrix.
|
||||
/// @see gtc_type_precision
|
||||
//typedef detail::tmat1x1<f16, defaultp> f16mat1;
|
||||
|
||||
/// Half-precision floating-point 2x2 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat2x2<f16, defaultp> f16mat2;
|
||||
|
||||
/// Half-precision floating-point 3x3 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat3x3<f16, defaultp> f16mat3;
|
||||
|
||||
/// Half-precision floating-point 4x4 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat4x4<f16, defaultp> 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, defaultp> f16mat2x2;
|
||||
|
||||
/// Half-precision floating-point 2x3 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat2x3<f16, defaultp> f16mat2x3;
|
||||
|
||||
/// Half-precision floating-point 2x4 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat2x4<f16, defaultp> f16mat2x4;
|
||||
|
||||
/// Half-precision floating-point 3x2 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat3x2<f16, defaultp> f16mat3x2;
|
||||
|
||||
/// Half-precision floating-point 3x3 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat3x3<f16, defaultp> f16mat3x3;
|
||||
|
||||
/// Half-precision floating-point 3x4 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat3x4<f16, defaultp> f16mat3x4;
|
||||
|
||||
/// Half-precision floating-point 4x2 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat4x2<f16, defaultp> f16mat4x2;
|
||||
|
||||
/// Half-precision floating-point 4x3 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat4x3<f16, defaultp> f16mat4x3;
|
||||
|
||||
/// Half-precision floating-point 4x4 matrix.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tmat4x4<f16, defaultp> f16mat4x4;
|
||||
|
||||
|
||||
/// Single-precision floating-point 1x1 matrix.
|
||||
/// @see gtc_type_precision
|
||||
//typedef detail::tmat1x1<f32, defaultp> f32mat1;
|
||||
@@ -935,10 +847,6 @@ namespace glm
|
||||
//////////////////////////
|
||||
// Quaternion types
|
||||
|
||||
/// Half-precision floating-point quaternion.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tquat<f16, defaultp> f16quat;
|
||||
|
||||
/// Single-precision floating-point quaternion.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::tquat<f32, defaultp> f32quat;
|
||||
@@ -949,7 +857,7 @@ namespace glm
|
||||
|
||||
/// @}
|
||||
}//namespace glm
|
||||
*/
|
||||
|
||||
#include "type_precision.inl"
|
||||
|
||||
#endif//GLM_GTC_type_precision
|
||||
|
||||
@@ -61,7 +61,6 @@
|
||||
|
||||
// Dependency:
|
||||
#include "../glm.hpp"
|
||||
#include "../gtc/half_float.hpp"
|
||||
#include "../gtc/quaternion.hpp"
|
||||
#include <cstring>
|
||||
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
/// @author Christophe Riccio
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <cstring>
|
||||
|
||||
namespace glm
|
||||
{
|
||||
/// @addtogroup gtc_type_ptr
|
||||
@@ -286,22 +288,11 @@ namespace glm
|
||||
|
||||
//! Return the address to the data of the matrix input.
|
||||
/// @see gtc_type_ptr
|
||||
template<typename T>
|
||||
GLM_FUNC_QUALIFIER T * value_ptr(detail::tmat4x3<T> & mat)
|
||||
template<typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER T * value_ptr(detail::tmat4x3<T, P> & mat)
|
||||
{
|
||||
return &(mat[0].x);
|
||||
}
|
||||
|
||||
/// Return the constant address to the data of the quaternion input.
|
||||
/// @see gtc_type_ptr
|
||||
template<typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER T * value_ptr
|
||||
(
|
||||
detail::tquat<T, P> & q
|
||||
)
|
||||
{
|
||||
return &(q[0]);
|
||||
}
|
||||
|
||||
//! Return the constant address to the data of the input parameter.
|
||||
/// @see gtc_type_ptr
|
||||
@@ -316,10 +307,10 @@ namespace glm
|
||||
|
||||
//! Return the address to the data of the quaternion input.
|
||||
/// @see gtc_type_ptr
|
||||
template<typename T>
|
||||
template<typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER T * value_ptr
|
||||
(
|
||||
detail::tquat<T> & q
|
||||
detail::tquat<T, P> & q
|
||||
)
|
||||
{
|
||||
return &(q[0]);
|
||||
|
||||
@@ -41,7 +41,6 @@
|
||||
|
||||
// Dependency:
|
||||
#include "../glm.hpp"
|
||||
#include "../gtc/half_float.hpp"
|
||||
|
||||
#if(defined(GLM_MESSAGES) && !defined(glm_ext))
|
||||
# pragma message("GLM: GLM_GTX_bit extension included")
|
||||
|
||||
@@ -20,19 +20,6 @@ namespace glm
|
||||
|
||||
VECTORIZE_VEC(mask)
|
||||
|
||||
// extractField
|
||||
template <typename genIType>
|
||||
GLM_FUNC_QUALIFIER genIType extractField
|
||||
(
|
||||
half const & value,
|
||||
genIType const & first,
|
||||
genIType const & count
|
||||
)
|
||||
{
|
||||
assert(first + count < sizeof(half));
|
||||
return (value._data() << first) >> ((sizeof(half) << 3) - count);
|
||||
}
|
||||
|
||||
template <typename genIType>
|
||||
GLM_FUNC_QUALIFIER genIType extractField
|
||||
(
|
||||
|
||||
@@ -43,7 +43,6 @@
|
||||
|
||||
// Dependency:
|
||||
#include "../glm.hpp"
|
||||
#include "../gtc/half_float.hpp"
|
||||
#include "../gtc/constants.hpp"
|
||||
#include "../gtc/quaternion.hpp"
|
||||
|
||||
@@ -202,22 +201,6 @@ namespace detail
|
||||
detail::tdualquat<T, P> dualquat_cast(
|
||||
detail::tmat3x4<T, P> const & x);
|
||||
|
||||
|
||||
/// Dual-quaternion of low half-precision floating-point numbers.
|
||||
///
|
||||
/// @see gtc_dual_quaternion
|
||||
typedef detail::tdualquat<half, lowp> lowp_hdualquat;
|
||||
|
||||
/// Dual-quaternion of medium half-precision floating-point numbers.
|
||||
///
|
||||
/// @see gtc_dual_quaternion
|
||||
typedef detail::tdualquat<half, mediump> mediump_hdualquat;
|
||||
|
||||
/// Dual-quaternion of high half-precision floating-point numbers.
|
||||
///
|
||||
/// @see gtc_dual_quaternion
|
||||
typedef detail::tdualquat<half, highp> highp_hdualquat;
|
||||
|
||||
|
||||
/// Dual-quaternion of low single-precision floating-point numbers.
|
||||
///
|
||||
@@ -290,22 +273,6 @@ namespace detail
|
||||
# error "GLM error: multiple default precision requested for single-precision floating-point types"
|
||||
#endif
|
||||
|
||||
|
||||
#if(!defined(GLM_PRECISION_HIGHP_HALF) && !defined(GLM_PRECISION_MEDIUMP_HALF) && !defined(GLM_PRECISION_LOWP_HALF))
|
||||
/// Dual-quaternion of default half-precision floating-point numbers.
|
||||
///
|
||||
/// @see gtc_dual_quaternion
|
||||
typedef highp_hdualquat hdualquat;
|
||||
#elif(defined(GLM_PRECISION_HIGHP_HALF) && !defined(GLM_PRECISION_MEDIUMP_HALF) && !defined(GLM_PRECISION_LOWP_HALF))
|
||||
typedef highp_hdualquat hdualquat;
|
||||
#elif(!defined(GLM_PRECISION_HIGHP_HALF) && defined(GLM_PRECISION_MEDIUMP_HALF) && !defined(GLM_PRECISION_LOWP_HALF))
|
||||
typedef mediump_hdualquat hdualquat;
|
||||
#elif(!defined(GLM_PRECISION_HIGHP_HALF) && !defined(GLM_PRECISION_MEDIUMP_HALF) && defined(GLM_PRECISION_LOWP_HALF))
|
||||
typedef lowp_hdualquat hdualquat;
|
||||
#else
|
||||
# error "GLM error: Multiple default precision requested for half-precision floating-point types"
|
||||
#endif
|
||||
|
||||
|
||||
#if(!defined(GLM_PRECISION_HIGHP_DOUBLE) && !defined(GLM_PRECISION_MEDIUMP_DOUBLE) && !defined(GLM_PRECISION_LOWP_DOUBLE))
|
||||
/// Dual-quaternion of default double-precision floating-point numbers.
|
||||
|
||||
@@ -41,7 +41,6 @@
|
||||
|
||||
// Dependency:
|
||||
#include "../glm.hpp"
|
||||
#include "../gtc/half_float.hpp"
|
||||
|
||||
#if(defined(GLM_MESSAGES) && !defined(glm_ext))
|
||||
# pragma message("GLM: GLM_GTX_euler_angles extension included")
|
||||
|
||||
@@ -31,25 +31,6 @@ namespace glm
|
||||
return Source + (-Source % Multiple);
|
||||
}
|
||||
|
||||
template <>
|
||||
GLM_FUNC_QUALIFIER detail::half higherMultiple
|
||||
(
|
||||
detail::half const & SourceH,
|
||||
detail::half const & MultipleH
|
||||
)
|
||||
{
|
||||
float Source = SourceH.toFloat();
|
||||
float Multiple = MultipleH.toFloat();
|
||||
|
||||
if (Source > float(0))
|
||||
{
|
||||
float Tmp = Source - float(1);
|
||||
return detail::half(Tmp + (Multiple - std::fmod(Tmp, Multiple)));
|
||||
}
|
||||
else
|
||||
return detail::half(Source + std::fmod(-Source, Multiple));
|
||||
}
|
||||
|
||||
template <>
|
||||
GLM_FUNC_QUALIFIER float higherMultiple
|
||||
(
|
||||
@@ -103,25 +84,6 @@ namespace glm
|
||||
}
|
||||
}
|
||||
|
||||
template <>
|
||||
GLM_FUNC_QUALIFIER detail::half lowerMultiple
|
||||
(
|
||||
detail::half const & SourceH,
|
||||
detail::half const & MultipleH
|
||||
)
|
||||
{
|
||||
float Source = SourceH.toFloat();
|
||||
float Multiple = MultipleH.toFloat();
|
||||
|
||||
if (Source >= float(0))
|
||||
return detail::half(Source - std::fmod(Source, Multiple));
|
||||
else
|
||||
{
|
||||
float Tmp = Source + float(1);
|
||||
return detail::half(Tmp - std::fmod(Tmp, Multiple) - Multiple);
|
||||
}
|
||||
}
|
||||
|
||||
template <>
|
||||
GLM_FUNC_QUALIFIER float lowerMultiple
|
||||
(
|
||||
|
||||
@@ -65,15 +65,12 @@ namespace gtx
|
||||
//////////////////////
|
||||
// Float vector types
|
||||
|
||||
typedef f16 f16vec1; //!< \brief Half-precision floating-point scalar. (from GLM_GTX_number_precision extension)
|
||||
typedef f32 f32vec1; //!< \brief Single-precision floating-point scalar. (from GLM_GTX_number_precision extension)
|
||||
typedef f64 f64vec1; //!< \brief Single-precision floating-point scalar. (from GLM_GTX_number_precision extension)
|
||||
|
||||
//////////////////////
|
||||
// Float matrix types
|
||||
|
||||
typedef f16 f16mat1; //!< \brief Half-precision floating-point scalar. (from GLM_GTX_number_precision extension)
|
||||
typedef f16 f16mat1x1; //!< \brief Half-precision floating-point scalar. (from GLM_GTX_number_precision extension)
|
||||
typedef f32 f32mat1; //!< \brief Single-precision floating-point scalar. (from GLM_GTX_number_precision extension)
|
||||
typedef f32 f32mat1x1; //!< \brief Single-precision floating-point scalar. (from GLM_GTX_number_precision extension)
|
||||
typedef f64 f64mat1; //!< \brief Double-precision floating-point scalar. (from GLM_GTX_number_precision extension)
|
||||
|
||||
@@ -43,7 +43,6 @@
|
||||
|
||||
// Dependency:
|
||||
#include "../glm.hpp"
|
||||
#include "../gtc/half_float.hpp"
|
||||
#include "../gtx/integer.hpp"
|
||||
#include "../gtx/quaternion.hpp"
|
||||
#include <string>
|
||||
|
||||
@@ -41,11 +41,6 @@ namespace detail
|
||||
////////////////////////////////
|
||||
// Scalars
|
||||
|
||||
GLM_FUNC_QUALIFIER std::string to_string(half const & x)
|
||||
{
|
||||
return detail::format("half(%2.4f)", float(x));
|
||||
}
|
||||
|
||||
GLM_FUNC_QUALIFIER std::string to_string(float x)
|
||||
{
|
||||
return detail::format("float(%f)", x);
|
||||
@@ -105,36 +100,6 @@ namespace detail
|
||||
v.w ? detail::True : detail::False);
|
||||
}
|
||||
|
||||
////////////////////////////////
|
||||
// Half vectors
|
||||
|
||||
template <precision P>
|
||||
GLM_FUNC_QUALIFIER std::string to_string
|
||||
(
|
||||
detail::tvec2<half, P> const & v
|
||||
)
|
||||
{
|
||||
return detail::format("hvec2(%2.4f, %2.4f)", v.x.toFloat(), v.y.toFloat());
|
||||
}
|
||||
|
||||
template <precision P>
|
||||
GLM_FUNC_QUALIFIER std::string to_string
|
||||
(
|
||||
detail::tvec3<half, P> const & v
|
||||
)
|
||||
{
|
||||
return detail::format("hvec3(%2.4f, %2.4f, %2.4f)", v.x.toFloat(), v.y.toFloat(), v.z.toFloat());
|
||||
}
|
||||
|
||||
template <precision P>
|
||||
GLM_FUNC_QUALIFIER std::string to_string
|
||||
(
|
||||
detail::tvec4<half, P> 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());
|
||||
}
|
||||
|
||||
////////////////////////////////
|
||||
// Float vectors
|
||||
|
||||
@@ -255,117 +220,6 @@ namespace detail
|
||||
return detail::format("uvec4(%d, %d, %d, %d)", v.x, v.y, v.z, v.w);
|
||||
}
|
||||
|
||||
////////////////////////////////
|
||||
// Half matrices
|
||||
|
||||
template <precision P>
|
||||
GLM_FUNC_QUALIFIER std::string to_string
|
||||
(
|
||||
detail::tmat2x2<half, P> const & m
|
||||
)
|
||||
{
|
||||
return detail::format("hmat2x2((%f, %f), (%f, %f))",
|
||||
m[0][0].toFloat(), m[0][1].toFloat(),
|
||||
m[1][0].toFloat(), m[1][1].toFloat());
|
||||
}
|
||||
|
||||
template <precision P>
|
||||
GLM_FUNC_QUALIFIER std::string to_string
|
||||
(
|
||||
detail::tmat2x3<half, P> const & x
|
||||
)
|
||||
{
|
||||
return detail::format("hmat2x3((%f, %f, %f), (%f, %f, %f))",
|
||||
x[0][0].toFloat(), x[0][1].toFloat(), x[0][2].toFloat(),
|
||||
x[1][0].toFloat(), x[1][1].toFloat(), x[1][2].toFloat());
|
||||
}
|
||||
|
||||
template <precision P>
|
||||
GLM_FUNC_QUALIFIER std::string to_string
|
||||
(
|
||||
detail::tmat2x4<half, P> const & x
|
||||
)
|
||||
{
|
||||
return detail::format("hmat2x4((%f, %f, %f, %f), (%f, %f, %f, %f))",
|
||||
x[0][0].toFloat(), x[0][1].toFloat(), x[0][2].toFloat(), x[0][3].toFloat(),
|
||||
x[1][0].toFloat(), x[1][1].toFloat(), x[1][2].toFloat(), x[1][3].toFloat());
|
||||
}
|
||||
|
||||
template <precision P>
|
||||
GLM_FUNC_QUALIFIER std::string to_string
|
||||
(
|
||||
detail::tmat3x2<half, P> const & x
|
||||
)
|
||||
{
|
||||
return detail::format("hmat3x2((%f, %f), (%f, %f), (%f, %f))",
|
||||
x[0][0].toFloat(), x[0][1].toFloat(),
|
||||
x[1][0].toFloat(), x[1][1].toFloat(),
|
||||
x[2][0].toFloat(), x[2][1].toFloat());
|
||||
}
|
||||
|
||||
template <precision P>
|
||||
GLM_FUNC_QUALIFIER std::string to_string
|
||||
(
|
||||
detail::tmat3x3<half, P> const & x
|
||||
)
|
||||
{
|
||||
return detail::format("hmat3x3((%f, %f, %f), (%f, %f, %f), (%f, %f, %f))",
|
||||
x[0][0].toFloat(), x[0][1].toFloat(), x[0][2].toFloat(),
|
||||
x[1][0].toFloat(), x[1][1].toFloat(), x[1][2].toFloat(),
|
||||
x[2][0].toFloat(), x[2][1].toFloat(), x[2][2].toFloat());
|
||||
}
|
||||
|
||||
template <precision P>
|
||||
GLM_FUNC_QUALIFIER std::string to_string
|
||||
(
|
||||
detail::tmat3x4<half, P> const & x
|
||||
)
|
||||
{
|
||||
return detail::format("hmat3x4((%f, %f, %f, %f), (%f, %f, %f, %f), (%f, %f, %f, %f))",
|
||||
x[0][0].toFloat(), x[0][1].toFloat(), x[0][2].toFloat(), x[0][3].toFloat(),
|
||||
x[1][0].toFloat(), x[1][1].toFloat(), x[1][2].toFloat(), x[1][3].toFloat(),
|
||||
x[2][0].toFloat(), x[2][1].toFloat(), x[2][2].toFloat(), x[2][3].toFloat());
|
||||
}
|
||||
|
||||
template <precision P>
|
||||
GLM_FUNC_QUALIFIER std::string to_string
|
||||
(
|
||||
detail::tmat4x2<half, P> const & x
|
||||
)
|
||||
{
|
||||
return detail::format("hmat4x2((%f, %f), (%f, %f), (%f, %f), (%f, %f))",
|
||||
x[0][0].toFloat(), x[0][1].toFloat(),
|
||||
x[1][0].toFloat(), x[1][1].toFloat(),
|
||||
x[2][0].toFloat(), x[2][1].toFloat(),
|
||||
x[3][0].toFloat(), x[3][1].toFloat());
|
||||
}
|
||||
|
||||
template <precision P>
|
||||
GLM_FUNC_QUALIFIER std::string to_string
|
||||
(
|
||||
detail::tmat4x3<half, P> const & x
|
||||
)
|
||||
{
|
||||
return detail::format("hmat4x3((%f, %f, %f), (%f, %f, %f), (%f, %f, %f), (%f, %f, %f))",
|
||||
x[0][0].toFloat(), x[0][1].toFloat(), x[0][2].toFloat(),
|
||||
x[1][0].toFloat(), x[1][1].toFloat(), x[1][2].toFloat(),
|
||||
x[2][0].toFloat(), x[2][1].toFloat(), x[2][2].toFloat(),
|
||||
x[3][0].toFloat(), x[3][1].toFloat(), x[3][2].toFloat());
|
||||
}
|
||||
|
||||
template <precision P>
|
||||
GLM_FUNC_QUALIFIER std::string to_string
|
||||
(
|
||||
detail::tmat4x4<half, P> const & x
|
||||
)
|
||||
{
|
||||
return detail::format("hmat4x4((%f, %f, %f, %f), (%f, %f, %f, %f), (%f, %f, %f, %f), (%f, %f, %f, %f))",
|
||||
x[0][0].toFloat(), x[0][1].toFloat(), x[0][2].toFloat(), x[0][3].toFloat(),
|
||||
x[1][0].toFloat(), x[1][1].toFloat(), x[1][2].toFloat(), x[1][3].toFloat(),
|
||||
x[2][0].toFloat(), x[2][1].toFloat(), x[2][2].toFloat(), x[2][3].toFloat(),
|
||||
x[3][0].toFloat(), x[3][1].toFloat(), x[3][2].toFloat(), x[3][3].toFloat());
|
||||
}
|
||||
|
||||
////////////////////////////////
|
||||
// Float matrices
|
||||
|
||||
|
||||
Reference in New Issue
Block a user