Updated doxygen documentation

This commit is contained in:
Christophe Riccio
2011-12-07 14:50:15 +00:00
parent a3b5034d4e
commit f18ad6bf2e
389 changed files with 27429 additions and 14460 deletions

View File

@@ -38,7 +38,7 @@
namespace glm{
namespace detail
{
class thalf;
class half;
#if(defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) // C99 detected, 64 bit types available
typedef int64_t sint64;
@@ -242,7 +242,7 @@ namespace detail
}; \
}
GLM_DETAIL_IS_FLOAT(detail::thalf);
GLM_DETAIL_IS_FLOAT(detail::half);
GLM_DETAIL_IS_FLOAT(float);
GLM_DETAIL_IS_FLOAT(double);
GLM_DETAIL_IS_FLOAT(long double);
@@ -346,7 +346,7 @@ namespace detail
typedef unsigned int uint32;
typedef detail::uint64 uint64;
typedef detail::thalf float16;
typedef detail::half float16;
typedef float float32;
typedef double float64;

View File

@@ -25,7 +25,7 @@
/// @date 2008-03-08 / 2010-01-26
/// @author Christophe Riccio
///
/// @see - <a href="http://www.opengl.org/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.2</a>
/// @see <a href="http://www.opengl.org/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.2</a>
///
/// @defgroup core_func_common Common functions
/// @ingroup core
@@ -357,10 +357,10 @@ namespace glm
/// @tparam genType Single-precision floating-point scalar or vector types.
/// @tparam genIType Signed integer scalar or vector types.
///
/// @see - <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/intBitsToFloat.xml">GLSL intBitsToFloat man page</a>
/// @see - <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3</a>
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/intBitsToFloat.xml">GLSL intBitsToFloat man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3</a>
///
/// @todo - Clarify this declaration, we don't need to actually specify the return type
/// @todo Clarify this declaration, we don't need to actually specify the return type
template <typename genType, typename genIType>
genType intBitsToFloat(genIType const & value);

View File

@@ -98,9 +98,9 @@ namespace detail
// floor
template <>
GLM_FUNC_QUALIFIER detail::thalf floor<detail::thalf>(detail::thalf const & x)
GLM_FUNC_QUALIFIER detail::half floor<detail::half>(detail::half const & x)
{
return detail::thalf(::std::floor(float(x)));
return detail::half(::std::floor(float(x)));
}
template <typename genType>

View File

@@ -35,7 +35,7 @@
namespace glm
{
#ifdef GLM_USE_HALF_SCALAR
typedef detail::thalf lowp_float_t;
typedef detail::half lowp_float_t;
#else//GLM_USE_HALF_SCALAR
typedef float lowp_float_t;
#endif//GLM_USE_HALF_SCALAR

View File

@@ -41,28 +41,28 @@ namespace detail
/// 16-bit floating point type.
/// @ingroup gtc_half_float
class thalf
class half
{
public:
// Constructors
GLM_FUNC_DECL thalf();
GLM_FUNC_DECL thalf(thalf const & s);
GLM_FUNC_DECL half();
GLM_FUNC_DECL half(half const & s);
template <typename U>
GLM_FUNC_DECL explicit thalf(U const & s);
GLM_FUNC_DECL explicit half(U const & s);
// Cast
template <typename U>
GLM_FUNC_DECL operator U() const;
// Unary updatable operators
GLM_FUNC_DECL thalf& operator= (thalf const & s);
GLM_FUNC_DECL thalf& operator+=(thalf const & s);
GLM_FUNC_DECL thalf& operator-=(thalf const & s);
GLM_FUNC_DECL thalf& operator*=(thalf const & s);
GLM_FUNC_DECL thalf& operator/=(thalf const & s);
GLM_FUNC_DECL thalf& operator++();
GLM_FUNC_DECL thalf& operator--();
GLM_FUNC_DECL half& operator= (half const & s);
GLM_FUNC_DECL half& operator+=(half const & s);
GLM_FUNC_DECL half& operator-=(half const & s);
GLM_FUNC_DECL half& operator*=(half const & s);
GLM_FUNC_DECL half& operator/=(half const & s);
GLM_FUNC_DECL half& operator++();
GLM_FUNC_DECL half& operator--();
GLM_FUNC_DECL float toFloat() const{return toFloat32(data);}
@@ -72,44 +72,44 @@ namespace detail
hdata data;
};
thalf operator+ (thalf const & s1, thalf const & s2);
half operator+ (half const & s1, half const & s2);
thalf operator- (thalf const & s1, thalf const & s2);
half operator- (half const & s1, half const & s2);
thalf operator* (thalf const & s1, thalf const & s2);
half operator* (half const & s1, half const & s2);
thalf operator/ (thalf const & s1, thalf const & s2);
half operator/ (half const & s1, half const & s2);
// Unary constant operators
thalf operator- (thalf const & s);
half operator- (half const & s);
thalf operator-- (thalf const & s, int);
half operator-- (half const & s, int);
thalf operator++ (thalf const & s, int);
half operator++ (half const & s, int);
bool operator==(
detail::thalf const & x,
detail::thalf const & y);
detail::half const & x,
detail::half const & y);
bool operator!=(
detail::thalf const & x,
detail::thalf const & y);
detail::half const & x,
detail::half const & y);
bool operator<(
detail::thalf const & x,
detail::thalf const & y);
detail::half const & x,
detail::half const & y);
bool operator<=(
detail::thalf const & x,
detail::thalf const & y);
detail::half const & x,
detail::half const & y);
bool operator>(
detail::thalf const & x,
detail::thalf const & y);
detail::half const & x,
detail::half const & y);
bool operator>=(
detail::thalf const & x,
detail::thalf const & y);
detail::half const & x,
detail::half const & y);
}//namespace detail
}//namespace glm

View File

@@ -256,64 +256,64 @@ namespace detail
}
}
GLM_FUNC_QUALIFIER thalf::thalf() :
GLM_FUNC_QUALIFIER half::half() :
data(0)
{}
GLM_FUNC_QUALIFIER thalf::thalf(thalf const & s) :
GLM_FUNC_QUALIFIER half::half(half const & s) :
data(s.data)
{}
template <typename U>
GLM_FUNC_QUALIFIER thalf::thalf(U const & s) :
GLM_FUNC_QUALIFIER half::half(U const & s) :
data(toFloat16(float(s)))
{}
template <typename U>
GLM_FUNC_QUALIFIER thalf::operator U() const
GLM_FUNC_QUALIFIER half::operator U() const
{
return static_cast<U>(toFloat32(this->data));
}
// Unary updatable operators
GLM_FUNC_QUALIFIER thalf& thalf::operator= (thalf const & s)
GLM_FUNC_QUALIFIER half& half::operator= (half const & s)
{
data = s.data;
return *this;
}
GLM_FUNC_QUALIFIER thalf& thalf::operator+=(thalf const & s)
GLM_FUNC_QUALIFIER half& half::operator+=(half const & s)
{
data = toFloat16(toFloat32(data) + toFloat32(s.data));
return *this;
}
GLM_FUNC_QUALIFIER thalf& thalf::operator-=(thalf const & s)
GLM_FUNC_QUALIFIER half& half::operator-=(half const & s)
{
data = toFloat16(toFloat32(data) - toFloat32(s.data));
return *this;
}
GLM_FUNC_QUALIFIER thalf& thalf::operator*=(thalf const & s)
GLM_FUNC_QUALIFIER half& half::operator*=(half const & s)
{
data = toFloat16(toFloat32(data) * toFloat32(s.data));
return *this;
}
GLM_FUNC_QUALIFIER thalf& thalf::operator/=(thalf const & s)
GLM_FUNC_QUALIFIER half& half::operator/=(half const & s)
{
data = toFloat16(toFloat32(data) / toFloat32(s.data));
return *this;
}
GLM_FUNC_QUALIFIER thalf& thalf::operator++()
GLM_FUNC_QUALIFIER half& half::operator++()
{
float Casted = toFloat32(data);
this->data = toFloat16(++Casted);
return *this;
}
GLM_FUNC_QUALIFIER thalf& thalf::operator--()
GLM_FUNC_QUALIFIER half& half::operator--()
{
float Casted = toFloat32(data);
this->data = toFloat16(--Casted);
@@ -323,46 +323,46 @@ namespace detail
//////////////////////////////////////
// Binary arithmetic operators
GLM_FUNC_QUALIFIER detail::thalf operator+ (detail::thalf const & s1, detail::thalf const & s2)
GLM_FUNC_QUALIFIER detail::half operator+ (detail::half const & s1, detail::half const & s2)
{
return detail::thalf(float(s1) + float(s2));
return detail::half(float(s1) + float(s2));
}
GLM_FUNC_QUALIFIER detail::thalf operator- (detail::thalf const & s1, detail::thalf const & s2)
GLM_FUNC_QUALIFIER detail::half operator- (detail::half const & s1, detail::half const & s2)
{
return detail::thalf(float(s1) - float(s2));
return detail::half(float(s1) - float(s2));
}
GLM_FUNC_QUALIFIER detail::thalf operator* (detail::thalf const & s1, detail::thalf const & s2)
GLM_FUNC_QUALIFIER detail::half operator* (detail::half const & s1, detail::half const & s2)
{
return detail::thalf(float(s1) * float(s2));
return detail::half(float(s1) * float(s2));
}
GLM_FUNC_QUALIFIER detail::thalf operator/ (detail::thalf const & s1, detail::thalf const & s2)
GLM_FUNC_QUALIFIER detail::half operator/ (detail::half const & s1, detail::half const & s2)
{
return detail::thalf(float(s1) / float(s2));
return detail::half(float(s1) / float(s2));
}
// Unary constant operators
GLM_FUNC_QUALIFIER detail::thalf operator- (detail::thalf const & s)
GLM_FUNC_QUALIFIER detail::half operator- (detail::half const & s)
{
return detail::thalf(-float(s));
return detail::half(-float(s));
}
GLM_FUNC_QUALIFIER detail::thalf operator-- (detail::thalf const & s, int)
GLM_FUNC_QUALIFIER detail::half operator-- (detail::half const & s, int)
{
return detail::thalf(float(s) - 1.0f);
return detail::half(float(s) - 1.0f);
}
GLM_FUNC_QUALIFIER detail::thalf operator++ (detail::thalf const & s, int)
GLM_FUNC_QUALIFIER detail::half operator++ (detail::half const & s, int)
{
return detail::thalf(float(s) + 1.0f);
return detail::half(float(s) + 1.0f);
}
GLM_FUNC_QUALIFIER bool operator==
(
detail::thalf const & x,
detail::thalf const & y
detail::half const & x,
detail::half const & y
)
{
return x._data() == y._data();
@@ -370,8 +370,8 @@ namespace detail
GLM_FUNC_QUALIFIER bool operator!=
(
detail::thalf const & x,
detail::thalf const & y
detail::half const & x,
detail::half const & y
)
{
return x._data() != y._data();
@@ -379,8 +379,8 @@ namespace detail
GLM_FUNC_QUALIFIER bool operator<
(
detail::thalf const & x,
detail::thalf const & y
detail::half const & x,
detail::half const & y
)
{
return float(x) < float(y);
@@ -388,8 +388,8 @@ namespace detail
GLM_FUNC_QUALIFIER bool operator<=
(
detail::thalf const & x,
detail::thalf const & y
detail::half const & x,
detail::half const & y
)
{
return float(x) <= float(y);
@@ -397,8 +397,8 @@ namespace detail
GLM_FUNC_QUALIFIER bool operator>
(
detail::thalf const & x,
detail::thalf const & y
detail::half const & x,
detail::half const & y
)
{
return float(x) > float(y);
@@ -406,8 +406,8 @@ namespace detail
GLM_FUNC_QUALIFIER bool operator>=
(
detail::thalf const & x,
detail::thalf const & y
detail::half const & x,
detail::half const & y
)
{
return float(x) >= float(y);

View File

@@ -49,49 +49,49 @@ namespace detail
{
#if(!GLM_SUPPORT_ANONYMOUS_UNION_OF_STRUCTURE())
template <>
struct tvec2<thalf>
struct tvec2<half>
{
enum ctor{null};
typedef thalf value_type;
typedef half value_type;
typedef std::size_t size_type;
GLM_FUNC_DECL size_type length() const;
static GLM_FUNC_DECL size_type value_size();
typedef tvec2<thalf> type;
typedef tvec2<half> type;
typedef tvec2<bool> bool_type;
//////////////////////////////////////
// Data
thalf x, y;
half x, y;
//////////////////////////////////////
// Accesses
thalf & operator[](size_type i);
thalf const & operator[](size_type i) const;
half & operator[](size_type i);
half const & operator[](size_type i) const;
//////////////////////////////////////
// Implicit basic constructors
tvec2();
tvec2(tvec2<thalf> const & v);
tvec2(tvec2<half> const & v);
//////////////////////////////////////
// Explicit basic constructors
explicit tvec2(ctor);
explicit tvec2(
thalf const & s);
half const & s);
explicit tvec2(
thalf const & s1,
thalf const & s2);
half const & s1,
half const & s2);
//////////////////////////////////////
// Swizzle constructors
tvec2(tref2<thalf> const & r);
tvec2(tref2<half> const & r);
//////////////////////////////////////
// Convertion scalar constructors
@@ -119,73 +119,73 @@ namespace detail
//////////////////////////////////////
// Unary arithmetic operators
tvec2<thalf>& operator= (tvec2<thalf> const & v);
tvec2<half>& operator= (tvec2<half> const & v);
tvec2<thalf>& operator+=(thalf const & s);
tvec2<thalf>& operator+=(tvec2<thalf> const & v);
tvec2<thalf>& operator-=(thalf const & s);
tvec2<thalf>& operator-=(tvec2<thalf> const & v);
tvec2<thalf>& operator*=(thalf const & s);
tvec2<thalf>& operator*=(tvec2<thalf> const & v);
tvec2<thalf>& operator/=(thalf const & s);
tvec2<thalf>& operator/=(tvec2<thalf> const & v);
tvec2<thalf>& operator++();
tvec2<thalf>& operator--();
tvec2<half>& operator+=(half const & s);
tvec2<half>& operator+=(tvec2<half> const & v);
tvec2<half>& operator-=(half const & s);
tvec2<half>& operator-=(tvec2<half> const & v);
tvec2<half>& operator*=(half const & s);
tvec2<half>& operator*=(tvec2<half> const & v);
tvec2<half>& operator/=(half const & s);
tvec2<half>& operator/=(tvec2<half> const & v);
tvec2<half>& operator++();
tvec2<half>& operator--();
//////////////////////////////////////
// Swizzle operators
thalf swizzle(comp X) const;
tvec2<thalf> swizzle(comp X, comp Y) const;
tvec3<thalf> swizzle(comp X, comp Y, comp Z) const;
tvec4<thalf> swizzle(comp X, comp Y, comp Z, comp W) const;
tref2<thalf> swizzle(comp X, comp Y);
half swizzle(comp X) const;
tvec2<half> swizzle(comp X, comp Y) const;
tvec3<half> swizzle(comp X, comp Y, comp Z) const;
tvec4<half> swizzle(comp X, comp Y, comp Z, comp W) const;
tref2<half> swizzle(comp X, comp Y);
};
template <>
struct tvec3<thalf>
struct tvec3<half>
{
enum ctor{null};
typedef thalf value_type;
typedef half value_type;
typedef std::size_t size_type;
GLM_FUNC_DECL size_type length() const;
static GLM_FUNC_DECL size_type value_size();
typedef tvec3<thalf> type;
typedef tvec3<half> type;
typedef tvec3<bool> bool_type;
//////////////////////////////////////
// Data
thalf x, y, z;
half x, y, z;
//////////////////////////////////////
// Accesses
thalf & operator[](size_type i);
thalf const & operator[](size_type i) const;
half & operator[](size_type i);
half const & operator[](size_type i) const;
//////////////////////////////////////
// Implicit basic constructors
tvec3();
tvec3(tvec3<thalf> const & v);
tvec3(tvec3<half> const & v);
//////////////////////////////////////
// Explicit basic constructors
explicit tvec3(ctor);
explicit tvec3(
thalf const & s);
half const & s);
explicit tvec3(
thalf const & s1,
thalf const & s2,
thalf const & s3);
half const & s1,
half const & s2,
half const & s3);
//////////////////////////////////////
// Swizzle constructors
tvec3(tref3<thalf> const & r);
tvec3(tref3<half> const & r);
//////////////////////////////////////
// Convertion scalar constructors
@@ -216,74 +216,74 @@ namespace detail
//////////////////////////////////////
// Unary arithmetic operators
tvec3<thalf>& operator= (tvec3<thalf> const & v);
tvec3<half>& operator= (tvec3<half> const & v);
tvec3<thalf>& operator+=(thalf const & s);
tvec3<thalf>& operator+=(tvec3<thalf> const & v);
tvec3<thalf>& operator-=(thalf const & s);
tvec3<thalf>& operator-=(tvec3<thalf> const & v);
tvec3<thalf>& operator*=(thalf const & s);
tvec3<thalf>& operator*=(tvec3<thalf> const & v);
tvec3<thalf>& operator/=(thalf const & s);
tvec3<thalf>& operator/=(tvec3<thalf> const & v);
tvec3<thalf>& operator++();
tvec3<thalf>& operator--();
tvec3<half>& operator+=(half const & s);
tvec3<half>& operator+=(tvec3<half> const & v);
tvec3<half>& operator-=(half const & s);
tvec3<half>& operator-=(tvec3<half> const & v);
tvec3<half>& operator*=(half const & s);
tvec3<half>& operator*=(tvec3<half> const & v);
tvec3<half>& operator/=(half const & s);
tvec3<half>& operator/=(tvec3<half> const & v);
tvec3<half>& operator++();
tvec3<half>& operator--();
//////////////////////////////////////
// Swizzle operators
thalf swizzle(comp X) const;
tvec2<thalf> swizzle(comp X, comp Y) const;
tvec3<thalf> swizzle(comp X, comp Y, comp Z) const;
tvec4<thalf> swizzle(comp X, comp Y, comp Z, comp W) const;
tref3<thalf> swizzle(comp X, comp Y, comp Z);
half swizzle(comp X) const;
tvec2<half> swizzle(comp X, comp Y) const;
tvec3<half> swizzle(comp X, comp Y, comp Z) const;
tvec4<half> swizzle(comp X, comp Y, comp Z, comp W) const;
tref3<half> swizzle(comp X, comp Y, comp Z);
};
template <>
struct tvec4<thalf>
struct tvec4<half>
{
enum ctor{null};
typedef thalf value_type;
typedef half value_type;
typedef std::size_t size_type;
GLM_FUNC_DECL size_type length() const;
static GLM_FUNC_DECL size_type value_size();
typedef tvec4<thalf> type;
typedef tvec4<half> type;
typedef tvec4<bool> bool_type;
//////////////////////////////////////
// Data
thalf x, y, z, w;
half x, y, z, w;
//////////////////////////////////////
// Accesses
thalf & operator[](size_type i);
thalf const & operator[](size_type i) const;
half & operator[](size_type i);
half const & operator[](size_type i) const;
//////////////////////////////////////
// Implicit basic constructors
tvec4();
tvec4(tvec4<thalf> const & v);
tvec4(tvec4<half> const & v);
//////////////////////////////////////
// Explicit basic constructors
explicit tvec4(ctor);
explicit tvec4(
thalf const & s);
half const & s);
explicit tvec4(
thalf const & s0,
thalf const & s1,
thalf const & s2,
thalf const & s3);
half const & s0,
half const & s1,
half const & s2,
half const & s3);
//////////////////////////////////////
// Swizzle constructors
tvec4(tref4<thalf> const & r);
tvec4(tref4<half> const & r);
//////////////////////////////////////
// Convertion scalar constructors
@@ -323,27 +323,27 @@ namespace detail
//////////////////////////////////////
// Unary arithmetic operators
tvec4<thalf>& operator= (tvec4<thalf> const & v);
tvec4<half>& operator= (tvec4<half> const & v);
tvec4<thalf>& operator+=(thalf const & s);
tvec4<thalf>& operator+=(tvec4<thalf> const & v);
tvec4<thalf>& operator-=(thalf const & s);
tvec4<thalf>& operator-=(tvec4<thalf> const & v);
tvec4<thalf>& operator*=(thalf const & s);
tvec4<thalf>& operator*=(tvec4<thalf> const & v);
tvec4<thalf>& operator/=(thalf const & s);
tvec4<thalf>& operator/=(tvec4<thalf> const & v);
tvec4<thalf>& operator++();
tvec4<thalf>& operator--();
tvec4<half>& operator+=(half const & s);
tvec4<half>& operator+=(tvec4<half> const & v);
tvec4<half>& operator-=(half const & s);
tvec4<half>& operator-=(tvec4<half> const & v);
tvec4<half>& operator*=(half const & s);
tvec4<half>& operator*=(tvec4<half> const & v);
tvec4<half>& operator/=(half const & s);
tvec4<half>& operator/=(tvec4<half> const & v);
tvec4<half>& operator++();
tvec4<half>& operator--();
//////////////////////////////////////
// Swizzle operators
thalf swizzle(comp X) const;
tvec2<thalf> swizzle(comp X, comp Y) const;
tvec3<thalf> swizzle(comp X, comp Y, comp Z) const;
tvec4<thalf> swizzle(comp X, comp Y, comp Z, comp W) const;
tref4<thalf> swizzle(comp X, comp Y, comp Z, comp W);
half swizzle(comp X) const;
tvec2<half> swizzle(comp X, comp Y) const;
tvec3<half> swizzle(comp X, comp Y, comp Z) const;
tvec4<half> swizzle(comp X, comp Y, comp Z, comp W) const;
tref4<half> swizzle(comp X, comp Y, comp Z, comp W);
};
#endif//(!GLM_SUPPORT_ANONYMOUS_UNION_OF_STRUCTURE())
}
@@ -354,67 +354,67 @@ namespace detail
/// Type for half-precision floating-point numbers.
/// @see gtc_half_float
typedef detail::thalf half;
typedef detail::half half;
/// Vector of 2 half-precision floating-point numbers.
/// @see gtc_half_float
typedef detail::tvec2<detail::thalf> hvec2;
typedef detail::tvec2<detail::half> hvec2;
/// Vector of 3 half-precision floating-point numbers.
/// @see gtc_half_float
typedef detail::tvec3<detail::thalf> hvec3;
typedef detail::tvec3<detail::half> hvec3;
/// Vector of 4 half-precision floating-point numbers.
/// @see gtc_half_float
typedef detail::tvec4<detail::thalf> hvec4;
typedef detail::tvec4<detail::half> hvec4;
/// 2 * 2 matrix of half-precision floating-point numbers.
/// @see gtc_half_float
typedef detail::tmat2x2<detail::thalf> hmat2;
typedef detail::tmat2x2<detail::half> hmat2;
/// 3 * 3 matrix of half-precision floating-point numbers.
/// @see gtc_half_float
typedef detail::tmat3x3<detail::thalf> hmat3;
typedef detail::tmat3x3<detail::half> hmat3;
/// 4 * 4 matrix of half-precision floating-point numbers.
/// @see gtc_half_float
typedef detail::tmat4x4<detail::thalf> hmat4;
typedef detail::tmat4x4<detail::half> hmat4;
/// 2 * 2 matrix of half-precision floating-point numbers.
/// @see gtc_half_float
typedef detail::tmat2x2<detail::thalf> hmat2x2;
typedef detail::tmat2x2<detail::half> hmat2x2;
/// 2 * 3 matrix of half-precision floating-point numbers.
/// @see gtc_half_float
typedef detail::tmat2x3<detail::thalf> hmat2x3;
typedef detail::tmat2x3<detail::half> hmat2x3;
/// 2 * 4 matrix of half-precision floating-point numbers.
/// @see gtc_half_float
typedef detail::tmat2x4<detail::thalf> hmat2x4;
typedef detail::tmat2x4<detail::half> hmat2x4;
/// 3 * 2 matrix of half-precision floating-point numbers.
/// @see gtc_half_float
typedef detail::tmat3x2<detail::thalf> hmat3x2;
typedef detail::tmat3x2<detail::half> hmat3x2;
/// 3 * 3 matrix of half-precision floating-point numbers.
/// @see gtc_half_float
typedef detail::tmat3x3<detail::thalf> hmat3x3;
typedef detail::tmat3x3<detail::half> hmat3x3;
/// 3 * 4 matrix of half-precision floating-point numbers.
/// @see gtc_half_float
typedef detail::tmat3x4<detail::thalf> hmat3x4;
typedef detail::tmat3x4<detail::half> hmat3x4;
/// 4 * 2 matrix of half-precision floating-point numbers.
/// @see gtc_half_float
typedef detail::tmat4x2<detail::thalf> hmat4x2;
typedef detail::tmat4x2<detail::half> hmat4x2;
/// 4 * 3 matrix of half-precision floating-point numbers.
/// @see gtc_half_float
typedef detail::tmat4x3<detail::thalf> hmat4x3;
typedef detail::tmat4x3<detail::half> hmat4x3;
/// 4 * 4 matrix of half-precision floating-point numbers.
/// @see gtc_half_float
typedef detail::tmat4x4<detail::thalf> hmat4x4;
typedef detail::tmat4x4<detail::half> hmat4x4;
/// @}
}// namespace glm

File diff suppressed because it is too large Load Diff

View File

@@ -240,7 +240,7 @@ namespace detail
/// Quaternion of half-precision floating-point numbers.
///
/// @see gtc_quaternion
typedef detail::tquat<detail::thalf> hquat;
typedef detail::tquat<detail::half> hquat;
/// Quaternion of single-precision floating-point numbers.
///

View File

@@ -462,92 +462,92 @@ namespace glm
}
template <>
GLM_FUNC_QUALIFIER detail::thalf f16_channel_cast<uint16>(uint16 color)
GLM_FUNC_QUALIFIER detail::half f16_channel_cast<uint16>(uint16 color)
{
return detail::thalf(static_cast<float>(color >> 0) / static_cast<float>(65535));
return detail::half(static_cast<float>(color >> 0) / static_cast<float>(65535));
}
template <>
GLM_FUNC_QUALIFIER detail::tvec3<detail::thalf> f16_rgbx_cast<uint64>(uint64 color)
GLM_FUNC_QUALIFIER detail::tvec3<detail::half> f16_rgbx_cast<uint64>(uint64 color)
{
detail::tvec3<detail::thalf> result;
result.x = detail::thalf(static_cast<float>((color >> 0) & 0xFFFF) / static_cast<float>(65535));
result.y = detail::thalf(static_cast<float>((color >> 16) & 0xFFFF) / static_cast<float>(65535));
result.z = detail::thalf(static_cast<float>((color >> 32) & 0xFFFF) / static_cast<float>(65535));
detail::tvec3<detail::half> result;
result.x = detail::half(static_cast<float>((color >> 0) & 0xFFFF) / static_cast<float>(65535));
result.y = detail::half(static_cast<float>((color >> 16) & 0xFFFF) / static_cast<float>(65535));
result.z = detail::half(static_cast<float>((color >> 32) & 0xFFFF) / static_cast<float>(65535));
return result;
}
template <>
GLM_FUNC_QUALIFIER detail::tvec3<detail::thalf> f16_xrgb_cast<uint64>(uint64 color)
GLM_FUNC_QUALIFIER detail::tvec3<detail::half> f16_xrgb_cast<uint64>(uint64 color)
{
detail::tvec3<detail::thalf> result;
result.x = detail::thalf(static_cast<float>((color >> 16) & 0xFFFF) / static_cast<float>(65535));
result.y = detail::thalf(static_cast<float>((color >> 32) & 0xFFFF) / static_cast<float>(65535));
result.z = detail::thalf(static_cast<float>((color >> 48) & 0xFFFF) / static_cast<float>(65535));
detail::tvec3<detail::half> result;
result.x = detail::half(static_cast<float>((color >> 16) & 0xFFFF) / static_cast<float>(65535));
result.y = detail::half(static_cast<float>((color >> 32) & 0xFFFF) / static_cast<float>(65535));
result.z = detail::half(static_cast<float>((color >> 48) & 0xFFFF) / static_cast<float>(65535));
return result;
}
template <>
GLM_FUNC_QUALIFIER detail::tvec3<detail::thalf> f16_bgrx_cast<uint64>(uint64 color)
GLM_FUNC_QUALIFIER detail::tvec3<detail::half> f16_bgrx_cast<uint64>(uint64 color)
{
detail::tvec3<detail::thalf> result;
result.x = detail::thalf(static_cast<float>((color >> 32) & 0xFFFF) / static_cast<float>(65535));
result.y = detail::thalf(static_cast<float>((color >> 16) & 0xFFFF) / static_cast<float>(65535));
result.z = detail::thalf(static_cast<float>((color >> 0) & 0xFFFF) / static_cast<float>(65535));
detail::tvec3<detail::half> result;
result.x = detail::half(static_cast<float>((color >> 32) & 0xFFFF) / static_cast<float>(65535));
result.y = detail::half(static_cast<float>((color >> 16) & 0xFFFF) / static_cast<float>(65535));
result.z = detail::half(static_cast<float>((color >> 0) & 0xFFFF) / static_cast<float>(65535));
return result;
}
template <>
GLM_FUNC_QUALIFIER detail::tvec3<detail::thalf> f16_xbgr_cast<uint64>(uint64 color)
GLM_FUNC_QUALIFIER detail::tvec3<detail::half> f16_xbgr_cast<uint64>(uint64 color)
{
detail::tvec3<detail::thalf> result;
result.x = detail::thalf(static_cast<float>((color >> 48) & 0xFFFF) / static_cast<float>(65535));
result.y = detail::thalf(static_cast<float>((color >> 32) & 0xFFFF) / static_cast<float>(65535));
result.z = detail::thalf(static_cast<float>((color >> 16) & 0xFFFF) / static_cast<float>(65535));
detail::tvec3<detail::half> result;
result.x = detail::half(static_cast<float>((color >> 48) & 0xFFFF) / static_cast<float>(65535));
result.y = detail::half(static_cast<float>((color >> 32) & 0xFFFF) / static_cast<float>(65535));
result.z = detail::half(static_cast<float>((color >> 16) & 0xFFFF) / static_cast<float>(65535));
return result;
}
template <>
GLM_FUNC_QUALIFIER detail::tvec4<detail::thalf> f16_rgba_cast<uint64>(uint64 color)
GLM_FUNC_QUALIFIER detail::tvec4<detail::half> f16_rgba_cast<uint64>(uint64 color)
{
detail::tvec4<detail::thalf> result;
result.x = detail::thalf(static_cast<float>((color >> 0) & 0xFFFF) / static_cast<float>(65535));
result.y = detail::thalf(static_cast<float>((color >> 16) & 0xFFFF) / static_cast<float>(65535));
result.z = detail::thalf(static_cast<float>((color >> 32) & 0xFFFF) / static_cast<float>(65535));
result.w = detail::thalf(static_cast<float>((color >> 48) & 0xFFFF) / static_cast<float>(65535));
detail::tvec4<detail::half> result;
result.x = detail::half(static_cast<float>((color >> 0) & 0xFFFF) / static_cast<float>(65535));
result.y = detail::half(static_cast<float>((color >> 16) & 0xFFFF) / static_cast<float>(65535));
result.z = detail::half(static_cast<float>((color >> 32) & 0xFFFF) / static_cast<float>(65535));
result.w = detail::half(static_cast<float>((color >> 48) & 0xFFFF) / static_cast<float>(65535));
return result;
}
template <>
GLM_FUNC_QUALIFIER detail::tvec4<detail::thalf> f16_argb_cast<uint64>(uint64 color)
GLM_FUNC_QUALIFIER detail::tvec4<detail::half> f16_argb_cast<uint64>(uint64 color)
{
detail::tvec4<detail::thalf> result;
result.x = detail::thalf(static_cast<float>((color >> 16) & 0xFFFF) / static_cast<float>(65535));
result.y = detail::thalf(static_cast<float>((color >> 32) & 0xFFFF) / static_cast<float>(65535));
result.z = detail::thalf(static_cast<float>((color >> 48) & 0xFFFF) / static_cast<float>(65535));
result.w = detail::thalf(static_cast<float>((color >> 0) & 0xFFFF) / static_cast<float>(65535));
detail::tvec4<detail::half> result;
result.x = detail::half(static_cast<float>((color >> 16) & 0xFFFF) / static_cast<float>(65535));
result.y = detail::half(static_cast<float>((color >> 32) & 0xFFFF) / static_cast<float>(65535));
result.z = detail::half(static_cast<float>((color >> 48) & 0xFFFF) / static_cast<float>(65535));
result.w = detail::half(static_cast<float>((color >> 0) & 0xFFFF) / static_cast<float>(65535));
return result;
}
template <>
GLM_FUNC_QUALIFIER detail::tvec4<detail::thalf> f16_bgra_cast<uint64>(uint64 color)
GLM_FUNC_QUALIFIER detail::tvec4<detail::half> f16_bgra_cast<uint64>(uint64 color)
{
detail::tvec4<detail::thalf> result;
result.x = detail::thalf(static_cast<float>((color >> 32) & 0xFFFF) / static_cast<float>(65535));
result.y = detail::thalf(static_cast<float>((color >> 16) & 0xFFFF) / static_cast<float>(65535));
result.z = detail::thalf(static_cast<float>((color >> 0) & 0xFFFF) / static_cast<float>(65535));
result.w = detail::thalf(static_cast<float>((color >> 48) & 0xFFFF) / static_cast<float>(65535));
detail::tvec4<detail::half> result;
result.x = detail::half(static_cast<float>((color >> 32) & 0xFFFF) / static_cast<float>(65535));
result.y = detail::half(static_cast<float>((color >> 16) & 0xFFFF) / static_cast<float>(65535));
result.z = detail::half(static_cast<float>((color >> 0) & 0xFFFF) / static_cast<float>(65535));
result.w = detail::half(static_cast<float>((color >> 48) & 0xFFFF) / static_cast<float>(65535));
return result;
}
template <>
GLM_FUNC_QUALIFIER detail::tvec4<detail::thalf> f16_abgr_cast<uint64>(uint64 color)
GLM_FUNC_QUALIFIER detail::tvec4<detail::half> f16_abgr_cast<uint64>(uint64 color)
{
detail::tvec4<detail::thalf> result;
result.x = detail::thalf(static_cast<float>((color >> 48) & 0xFFFF) / static_cast<float>(65535));
result.y = detail::thalf(static_cast<float>((color >> 32) & 0xFFFF) / static_cast<float>(65535));
result.z = detail::thalf(static_cast<float>((color >> 16) & 0xFFFF) / static_cast<float>(65535));
result.w = detail::thalf(static_cast<float>((color >> 0) & 0xFFFF) / static_cast<float>(65535));
detail::tvec4<detail::half> result;
result.x = detail::half(static_cast<float>((color >> 48) & 0xFFFF) / static_cast<float>(65535));
result.y = detail::half(static_cast<float>((color >> 32) & 0xFFFF) / static_cast<float>(65535));
result.z = detail::half(static_cast<float>((color >> 16) & 0xFFFF) / static_cast<float>(65535));
result.w = detail::half(static_cast<float>((color >> 0) & 0xFFFF) / static_cast<float>(65535));
return result;
}

View File

@@ -123,21 +123,21 @@ namespace glm
typedef detail::tmat4x3<int> int4x3; //!< \brief integer matrix with 4 x 3 components. (From GLM_GTX_compatibility extension)
typedef detail::tmat4x4<int> int4x4; //!< \brief integer matrix with 4 x 4 components. (From GLM_GTX_compatibility extension)
typedef detail::thalf half1; //!< \brief half-precision floating-point vector with 1 component. (From GLM_GTX_compatibility extension)
typedef detail::tvec2<detail::thalf> half2; //!< \brief half-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension)
typedef detail::tvec3<detail::thalf> half3; //!< \brief half-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension)
typedef detail::tvec4<detail::thalf> half4; //!< \brief half-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension)
typedef detail::half half1; //!< \brief half-precision floating-point vector with 1 component. (From GLM_GTX_compatibility extension)
typedef detail::tvec2<detail::half> half2; //!< \brief half-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension)
typedef detail::tvec3<detail::half> half3; //!< \brief half-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension)
typedef detail::tvec4<detail::half> half4; //!< \brief half-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension)
typedef detail::thalf half1x1; //!< \brief half-precision floating-point matrix with 1 component. (From GLM_GTX_compatibility extension)
typedef detail::tmat2x2<detail::thalf> half2x2; //!< \brief half-precision floating-point matrix with 2 x 2 components. (From GLM_GTX_compatibility extension)
typedef detail::tmat2x3<detail::thalf> half2x3; //!< \brief half-precision floating-point matrix with 2 x 3 components. (From GLM_GTX_compatibility extension)
typedef detail::tmat2x4<detail::thalf> half2x4; //!< \brief half-precision floating-point matrix with 2 x 4 components. (From GLM_GTX_compatibility extension)
typedef detail::tmat3x2<detail::thalf> half3x2; //!< \brief half-precision floating-point matrix with 3 x 2 components. (From GLM_GTX_compatibility extension)
typedef detail::tmat3x3<detail::thalf> half3x3; //!< \brief half-precision floating-point matrix with 3 x 3 components. (From GLM_GTX_compatibility extension)
typedef detail::tmat3x4<detail::thalf> half3x4; //!< \brief half-precision floating-point matrix with 3 x 3 components. (From GLM_GTX_compatibility extension)
typedef detail::tmat4x2<detail::thalf> half4x2; //!< \brief half-precision floating-point matrix with 4 x 2 components. (From GLM_GTX_compatibility extension)
typedef detail::tmat4x3<detail::thalf> half4x3; //!< \brief half-precision floating-point matrix with 4 x 3 components. (From GLM_GTX_compatibility extension)
typedef detail::tmat4x4<detail::thalf> half4x4; //!< \brief half-precision floating-point matrix with 4 x 4 components. (From GLM_GTX_compatibility extension)
typedef detail::half half1x1; //!< \brief half-precision floating-point matrix with 1 component. (From GLM_GTX_compatibility extension)
typedef detail::tmat2x2<detail::half> half2x2; //!< \brief half-precision floating-point matrix with 2 x 2 components. (From GLM_GTX_compatibility extension)
typedef detail::tmat2x3<detail::half> half2x3; //!< \brief half-precision floating-point matrix with 2 x 3 components. (From GLM_GTX_compatibility extension)
typedef detail::tmat2x4<detail::half> half2x4; //!< \brief half-precision floating-point matrix with 2 x 4 components. (From GLM_GTX_compatibility extension)
typedef detail::tmat3x2<detail::half> half3x2; //!< \brief half-precision floating-point matrix with 3 x 2 components. (From GLM_GTX_compatibility extension)
typedef detail::tmat3x3<detail::half> half3x3; //!< \brief half-precision floating-point matrix with 3 x 3 components. (From GLM_GTX_compatibility extension)
typedef detail::tmat3x4<detail::half> half3x4; //!< \brief half-precision floating-point matrix with 3 x 3 components. (From GLM_GTX_compatibility extension)
typedef detail::tmat4x2<detail::half> half4x2; //!< \brief half-precision floating-point matrix with 4 x 2 components. (From GLM_GTX_compatibility extension)
typedef detail::tmat4x3<detail::half> half4x3; //!< \brief half-precision floating-point matrix with 4 x 3 components. (From GLM_GTX_compatibility extension)
typedef detail::tmat4x4<detail::half> half4x4; //!< \brief half-precision floating-point matrix with 4 x 4 components. (From GLM_GTX_compatibility extension)
typedef float float1; //!< \brief single-precision floating-point vector with 1 component. (From GLM_GTX_compatibility extension)
typedef detail::tvec2<float> float2; //!< \brief single-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension)

View File

@@ -54,16 +54,16 @@ namespace glm
/// @addtogroup gtx_epsilon
/// @{
//! Returns the component-wise compare of |x - y| < epsilon.
//! From GLM_GTX_epsilon extension.
/// Returns the component-wise compare of |x - y| < epsilon.
/// @see gtx_epsilon
template <typename genTypeT, typename genTypeU>
bool equalEpsilon(
genTypeT const & x,
genTypeT const & y,
genTypeU const & epsilon);
//! Returns the component-wise compare of |x - y| >= epsilon.
//! From GLM_GTX_epsilon extension.
/// Returns the component-wise compare of |x - y| >= epsilon.
/// @see gtx_epsilon
template <typename genTypeT, typename genTypeU>
bool notEqualEpsilon(
genTypeT const & x,

View File

@@ -52,99 +52,99 @@ namespace glm
/// @addtogroup gtx_euler_angles
/// @{
//! Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle X.
//! From GLM_GTX_euler_angles extension.
/// Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle X.
/// @see gtx_euler_angles
template <typename valType>
detail::tmat4x4<valType> eulerAngleX(
valType const & angleX);
//! Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle Y.
//! From GLM_GTX_euler_angles extension.
/// Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle Y.
/// @see gtx_euler_angles
template <typename valType>
detail::tmat4x4<valType> eulerAngleY(
valType const & angleY);
//! Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle Z.
//! From GLM_GTX_euler_angles extension.
/// Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle Z.
/// @see gtx_euler_angles
template <typename valType>
detail::tmat4x4<valType> eulerAngleZ(
valType const & angleZ);
//! Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Y).
//! From GLM_GTX_euler_angles extension.
/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Y).
/// @see gtx_euler_angles
template <typename valType>
detail::tmat4x4<valType> eulerAngleXY(
valType const & angleX,
valType const & angleY);
//! Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X).
//! From GLM_GTX_euler_angles extension.
/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X).
/// @see gtx_euler_angles
template <typename valType>
detail::tmat4x4<valType> eulerAngleYX(
valType const & angleY,
valType const & angleX);
//! Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Z).
//! From GLM_GTX_euler_angles extension.
/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Z).
/// @see gtx_euler_angles
template <typename valType>
detail::tmat4x4<valType> eulerAngleXZ(
valType const & angleX,
valType const & angleZ);
//! Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Z * X).
//! From GLM_GTX_euler_angles extension.
/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Z * X).
/// @see gtx_euler_angles
template <typename valType>
detail::tmat4x4<valType> eulerAngleZX(
valType const & angleZ,
valType const & angleX);
//! Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * Z).
//! From GLM_GTX_euler_angles extension.
/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * Z).
/// @see gtx_euler_angles
template <typename valType>
detail::tmat4x4<valType> eulerAngleYZ(
valType const & angleY,
valType const & angleZ);
//! Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Z * Y).
//! From GLM_GTX_euler_angles extension.
/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Z * Y).
/// @see gtx_euler_angles
template <typename valType>
detail::tmat4x4<valType> eulerAngleZY(
valType const & angleZ,
valType const & angleY);
//! Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z).
//! From GLM_GTX_euler_angles extension.
/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z).
/// @see gtx_euler_angles
template <typename valType>
detail::tmat4x4<valType> eulerAngleYXZ(
valType const & yaw,
valType const & pitch,
valType const & roll);
//! Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z).
//! From GLM_GTX_euler_angles extension.
/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z).
/// @see gtx_euler_angles
template <typename valType>
detail::tmat4x4<valType> yawPitchRoll(
valType const & yaw,
valType const & pitch,
valType const & roll);
//! Creates a 2D 2 * 2 rotation matrix from an euler angle.
//! From GLM_GTX_euler_angles extension.
/// Creates a 2D 2 * 2 rotation matrix from an euler angle.
/// @see gtx_euler_angles
template <typename T>
detail::tmat2x2<T> orientate2(T const & angle);
//! Creates a 2D 4 * 4 homogeneous rotation matrix from an euler angle.
//! From GLM_GTX_euler_angles extension.
/// Creates a 2D 4 * 4 homogeneous rotation matrix from an euler angle.
/// @see gtx_euler_angles
template <typename T>
detail::tmat3x3<T> orientate3(T const & angle);
//! Creates a 3D 3 * 3 rotation matrix from euler angles (Y * X * Z).
//! From GLM_GTX_euler_angles extension.
/// Creates a 3D 3 * 3 rotation matrix from euler angles (Y * X * Z).
/// @see gtx_euler_angles
template <typename T>
detail::tmat3x3<T> orientate3(detail::tvec3<T> const & angles);
//! Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z).
//! From GLM_GTX_euler_angles extension.
/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z).
/// @see gtx_euler_angles
template <typename T>
detail::tmat4x4<T> orientate4(detail::tvec3<T> const & angles);

View File

@@ -51,7 +51,7 @@ namespace glm
/// @{
/// Extends of Length the Origin position using the (Source - Origin) direction.
/// From GLM_GTX_extend extension.
/// @see gtx_extend
template <typename genType>
genType extend(
genType const & Origin,

View File

@@ -20,8 +20,8 @@
/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
/// THE SOFTWARE.
///
/// @ref gtx_associated_min_max
/// @file glm/gtx/associated_min_max.hpp
/// @ref gtx_extented_min_max
/// @file glm/gtx/extented_min_max.hpp
/// @date 2007-03-14 / 2011-06-07
/// @author Christophe Riccio
///
@@ -31,7 +31,7 @@
/// @defgroup gtx_extented_min_max GLM_GTX_extented_min_max: Extended min max
/// @ingroup gtx
///
/// @brief Min and max functions for 3 to 4 parameters.
/// Min and max functions for 3 to 4 parameters.
///
/// <glm/gtx/extented_min_max.hpp> need to be included to use these functionalities.
///////////////////////////////////////////////////////////////////////////////////
@@ -52,16 +52,16 @@ namespace glm
/// @addtogroup gtx_extented_min_max
/// @{
//< Return the minimum component-wise values of 3 inputs
//< From GLM_GTX_extented_min_max extension
/// Return the minimum component-wise values of 3 inputs
/// @see gtx_extented_min_max
template <typename T>
T min(
T const & x,
T const & y,
T const & z);
//< Return the minimum component-wise values of 3 inputs
//< From GLM_GTX_extented_min_max extension
/// Return the minimum component-wise values of 3 inputs
/// @see gtx_extented_min_max
template
<
typename T,
@@ -72,8 +72,8 @@ namespace glm
typename C<T>::value_type const & y,
typename C<T>::value_type const & z);
//< Return the minimum component-wise values of 3 inputs
//< From GLM_GTX_extented_min_max extension
/// Return the minimum component-wise values of 3 inputs
/// @see gtx_extented_min_max
template
<
typename T,
@@ -84,8 +84,8 @@ namespace glm
C<T> const & y,
C<T> const & z);
//< Return the minimum component-wise values of 4 inputs
//< From GLM_GTX_extented_min_max extension
/// Return the minimum component-wise values of 4 inputs
/// @see gtx_extented_min_max
template <typename T>
T min(
T const & x,
@@ -93,8 +93,8 @@ namespace glm
T const & z,
T const & w);
//< Return the minimum component-wise values of 4 inputs
//< From GLM_GTX_extented_min_max extension
/// Return the minimum component-wise values of 4 inputs
/// @see gtx_extented_min_max
template
<
typename T,
@@ -106,8 +106,8 @@ namespace glm
typename C<T>::value_type const & z,
typename C<T>::value_type const & w);
//< Return the minimum component-wise values of 4 inputs
//< From GLM_GTX_extented_min_max extension
/// Return the minimum component-wise values of 4 inputs
/// @see gtx_extented_min_max
template
<
typename T,
@@ -119,16 +119,16 @@ namespace glm
C<T> const & z,
C<T> const & w);
//< Return the maximum component-wise values of 3 inputs
//< From GLM_GTX_extented_min_max extension
/// Return the maximum component-wise values of 3 inputs
/// @see gtx_extented_min_max
template <typename T>
T max(
T const & x,
T const & y,
T const & z);
//< Return the maximum component-wise values of 3 inputs
//< From GLM_GTX_extented_min_max extension
/// Return the maximum component-wise values of 3 inputs
/// @see gtx_extented_min_max
template
<
typename T,
@@ -139,8 +139,8 @@ namespace glm
typename C<T>::value_type const & y,
typename C<T>::value_type const & z);
//< Return the maximum component-wise values of 3 inputs
//< From GLM_GTX_extented_min_max extension
/// Return the maximum component-wise values of 3 inputs
/// @see gtx_extented_min_max
template
<
typename T,
@@ -151,8 +151,8 @@ namespace glm
C<T> const & y,
C<T> const & z);
//< Return the maximum component-wise values of 4 inputs
//< From GLM_GTX_extented_min_max extension
/// Return the maximum component-wise values of 4 inputs
/// @see gtx_extented_min_max
template <typename T>
T max(
T const & x,
@@ -160,8 +160,8 @@ namespace glm
T const & z,
T const & w);
//< Return the maximum component-wise values of 4 inputs
//< From GLM_GTX_extented_min_max extension
/// Return the maximum component-wise values of 4 inputs
/// @see gtx_extented_min_max
template
<
typename T,
@@ -173,8 +173,8 @@ namespace glm
typename C<T>::value_type const & z,
typename C<T>::value_type const & w);
//< Return the maximum component-wise values of 4 inputs
//< From GLM_GTX_extented_min_max extension
/// Return the maximum component-wise values of 4 inputs
/// @see gtx_extented_min_max
template
<
typename T,

View File

@@ -52,42 +52,42 @@ namespace glm
/// @addtogroup gtx_fast_exponential
/// @{
//! Faster than the common pow function but less accurate.
//! From GLM_GTX_fast_exponential extension.
/// Faster than the common pow function but less accurate.
/// @see gtx_fast_exponential
template <typename genType>
genType fastPow(
genType const & x,
genType const & y);
//! Faster than the common pow function but less accurate.
//! From GLM_GTX_fast_exponential extension.
/// Faster than the common pow function but less accurate.
/// @see gtx_fast_exponential
template <typename genTypeT, typename genTypeU>
genTypeT fastPow(
genTypeT const & x,
genTypeU const & y);
//! Faster than the common exp function but less accurate.
//! From GLM_GTX_fast_exponential extension.
/// Faster than the common exp function but less accurate.
/// @see gtx_fast_exponential
template <typename T>
T fastExp(const T& x);
//! Faster than the common log function but less accurate.
//! From GLM_GTX_fast_exponential extension.
/// Faster than the common log function but less accurate.
/// @see gtx_fast_exponential
template <typename T>
T fastLog(const T& x);
//! Faster than the common exp2 function but less accurate.
//! From GLM_GTX_fast_exponential extension.
/// Faster than the common exp2 function but less accurate.
/// @see gtx_fast_exponential
template <typename T>
T fastExp2(const T& x);
//! Faster than the common log2 function but less accurate.
//! From GLM_GTX_fast_exponential extension.
/// Faster than the common log2 function but less accurate.
/// @see gtx_fast_exponential
template <typename T>
T fastLog2(const T& x);
//! Faster than the common ln function but less accurate.
//! From GLM_GTX_fast_exponential extension.
/// Faster than the common ln function but less accurate.
/// @see gtx_fast_exponential
template <typename T>
T fastLn(const T& x);

View File

@@ -29,17 +29,17 @@ namespace glm
}
template <>
GLM_FUNC_QUALIFIER detail::thalf higherMultiple
GLM_FUNC_QUALIFIER detail::half higherMultiple
(
detail::thalf const & SourceH,
detail::thalf const & MultipleH
detail::half const & SourceH,
detail::half const & MultipleH
)
{
float Source = SourceH.toFloat();
float Multiple = MultipleH.toFloat();
int Tmp = int(float(Source)) % int(Multiple);
return detail::thalf(Tmp ? Source + Multiple - float(Tmp) : Source);
return detail::half(Tmp ? Source + Multiple - float(Tmp) : Source);
}
template <>
@@ -81,17 +81,17 @@ namespace glm
}
template <>
GLM_FUNC_QUALIFIER detail::thalf lowerMultiple
GLM_FUNC_QUALIFIER detail::half lowerMultiple
(
detail::thalf const & SourceH,
detail::thalf const & MultipleH
detail::half const & SourceH,
detail::half const & MultipleH
)
{
float Source = SourceH.toFloat();
float Multiple = MultipleH.toFloat();
int Tmp = int(float(Source)) % int(float(Multiple));
return detail::thalf(Tmp ? Source - float(Tmp) : Source);
return detail::half(Tmp ? Source - float(Tmp) : Source);
}
template <>

View File

@@ -105,11 +105,11 @@ GLM_FUNC_QUALIFIER double compRand1()
return double(std::rand()) / double(RAND_MAX);
}
GLM_FUNC_QUALIFIER detail::thalf compRand1(
detail::thalf Min,
detail::thalf Max)
GLM_FUNC_QUALIFIER detail::half compRand1(
detail::half Min,
detail::half Max)
{
return compRand1<detail::thalf>() * (Max - Min) + Min;
return compRand1<detail::half>() * (Max - Min) + Min;
}
GLM_FUNC_QUALIFIER float compRand1(

View File

@@ -41,7 +41,7 @@ namespace detail
////////////////////////////////
// Scalars
GLM_FUNC_QUALIFIER std::string to_string(detail::thalf const & x)
GLM_FUNC_QUALIFIER std::string to_string(detail::half const & x)
{
return detail::format("half(%2.4f)", float(x));
}
@@ -108,7 +108,7 @@ namespace detail
template <>
GLM_FUNC_QUALIFIER std::string to_string
(
detail::tvec2<detail::thalf> const & v
detail::tvec2<detail::half> const & v
)
{
return detail::format("hvec2(%2.4f, %2.4f)", v.x.toFloat(), v.y.toFloat());
@@ -117,7 +117,7 @@ namespace detail
template <>
GLM_FUNC_QUALIFIER std::string to_string
(
detail::tvec3<detail::thalf> const & v
detail::tvec3<detail::half> const & v
)
{
return detail::format("hvec3(%2.4f, %2.4f, %2.4f)", v.x.toFloat(), v.y.toFloat(), v.z.toFloat());
@@ -126,7 +126,7 @@ namespace detail
template <>
GLM_FUNC_QUALIFIER std::string to_string
(
detail::tvec4<detail::thalf> const & v
detail::tvec4<detail::half> const & v
)
{
return detail::format("hvec4(%2.4f, %2.4f, %2.4f, %2.4f)", v.x.toFloat(), v.y.toFloat(), v.z.toFloat(), v.w.toFloat());
@@ -258,7 +258,7 @@ namespace detail
template <>
GLM_FUNC_QUALIFIER std::string to_string
(
detail::tmat2x2<detail::thalf> const & m
detail::tmat2x2<detail::half> const & m
)
{
return detail::format("hmat2x2((%f, %f), (%f, %f))",
@@ -269,7 +269,7 @@ namespace detail
template <>
GLM_FUNC_QUALIFIER std::string to_string
(
detail::tmat2x3<detail::thalf> const & x
detail::tmat2x3<detail::half> const & x
)
{
return detail::format("hmat2x3((%f, %f, %f), (%f, %f, %f))",
@@ -280,7 +280,7 @@ namespace detail
template <>
GLM_FUNC_QUALIFIER std::string to_string
(
detail::tmat2x4<detail::thalf> const & x
detail::tmat2x4<detail::half> const & x
)
{
return detail::format("hmat2x4((%f, %f, %f, %f), (%f, %f, %f, %f))",
@@ -291,7 +291,7 @@ namespace detail
template <>
GLM_FUNC_QUALIFIER std::string to_string
(
detail::tmat3x2<detail::thalf> const & x
detail::tmat3x2<detail::half> const & x
)
{
return detail::format("hmat3x2((%f, %f), (%f, %f), (%f, %f))",
@@ -303,7 +303,7 @@ namespace detail
template <>
GLM_FUNC_QUALIFIER std::string to_string
(
detail::tmat3x3<detail::thalf> const & x
detail::tmat3x3<detail::half> const & x
)
{
return detail::format("hmat3x3((%f, %f, %f), (%f, %f, %f), (%f, %f, %f))",
@@ -315,7 +315,7 @@ namespace detail
template <>
GLM_FUNC_QUALIFIER std::string to_string
(
detail::tmat3x4<detail::thalf> const & x
detail::tmat3x4<detail::half> const & x
)
{
return detail::format("hmat3x4((%f, %f, %f, %f), (%f, %f, %f, %f), (%f, %f, %f, %f))",
@@ -327,7 +327,7 @@ namespace detail
template <>
GLM_FUNC_QUALIFIER std::string to_string
(
detail::tmat4x2<detail::thalf> const & x
detail::tmat4x2<detail::half> const & x
)
{
return detail::format("hmat4x2((%f, %f), (%f, %f), (%f, %f), (%f, %f))",
@@ -340,7 +340,7 @@ namespace detail
template <>
GLM_FUNC_QUALIFIER std::string to_string
(
detail::tmat4x3<detail::thalf> const & x
detail::tmat4x3<detail::half> const & x
)
{
return detail::format("hmat4x3((%f, %f, %f), (%f, %f, %f), (%f, %f, %f), (%f, %f, %f))",
@@ -353,7 +353,7 @@ namespace detail
template <>
GLM_FUNC_QUALIFIER std::string to_string
(
detail::tmat4x4<detail::thalf> const & x
detail::tmat4x4<detail::half> const & x
)
{
return detail::format("hmat4x4((%f, %f, %f, %f), (%f, %f, %f, %f), (%f, %f, %f, %f), (%f, %f, %f, %f))",