Improve CUDA coverage to all GTC extensions. Fixed missing constructors #120
This commit is contained in:
parent
29b11937f4
commit
73281f1978
@ -168,7 +168,7 @@ namespace detail
|
||||
// Conversion constructors
|
||||
template <typename T, precision P>
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tmat2x2<T, P>::tmat2x2
|
||||
GLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2
|
||||
(
|
||||
U const & s
|
||||
)
|
||||
@ -180,7 +180,7 @@ namespace detail
|
||||
|
||||
template <typename T, precision P>
|
||||
template <typename X1, typename Y1, typename X2, typename Y2>
|
||||
GLM_FUNC_DECL tmat2x2<T, P>::tmat2x2
|
||||
GLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2
|
||||
(
|
||||
X1 const & x1, Y1 const & y1,
|
||||
X2 const & x2, Y2 const & y2
|
||||
@ -192,7 +192,7 @@ namespace detail
|
||||
|
||||
template <typename T, precision P>
|
||||
template <typename V1, typename V2>
|
||||
GLM_FUNC_DECL tmat2x2<T, P>::tmat2x2
|
||||
GLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2
|
||||
(
|
||||
tvec2<V1, P> const & v1,
|
||||
tvec2<V2, P> const & v2
|
||||
|
@ -167,7 +167,7 @@ namespace detail
|
||||
// Conversion constructors
|
||||
template <typename T, precision P>
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tmat2x3<T, P>::tmat2x3
|
||||
GLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3
|
||||
(
|
||||
U const & s
|
||||
)
|
||||
@ -181,7 +181,7 @@ namespace detail
|
||||
template <
|
||||
typename X1, typename Y1, typename Z1,
|
||||
typename X2, typename Y2, typename Z2>
|
||||
GLM_FUNC_DECL tmat2x3<T, P>::tmat2x3
|
||||
GLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3
|
||||
(
|
||||
X1 const & x1, Y1 const & y1, Z1 const & z1,
|
||||
X2 const & x2, Y2 const & y2, Z2 const & z2
|
||||
@ -193,7 +193,7 @@ namespace detail
|
||||
|
||||
template <typename T, precision P>
|
||||
template <typename V1, typename V2>
|
||||
GLM_FUNC_DECL tmat2x3<T, P>::tmat2x3
|
||||
GLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3
|
||||
(
|
||||
tvec3<V1, P> const & v1,
|
||||
tvec3<V2, P> const & v2
|
||||
|
@ -170,7 +170,7 @@ namespace detail
|
||||
// Conversion constructors
|
||||
template <typename T, precision P>
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tmat2x4<T, P>::tmat2x4
|
||||
GLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4
|
||||
(
|
||||
U const & s
|
||||
)
|
||||
@ -184,7 +184,7 @@ namespace detail
|
||||
template <
|
||||
typename X1, typename Y1, typename Z1, typename W1,
|
||||
typename X2, typename Y2, typename Z2, typename W2>
|
||||
GLM_FUNC_DECL tmat2x4<T, P>::tmat2x4
|
||||
GLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4
|
||||
(
|
||||
X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1,
|
||||
X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2
|
||||
@ -196,7 +196,7 @@ namespace detail
|
||||
|
||||
template <typename T, precision P>
|
||||
template <typename V1, typename V2>
|
||||
GLM_FUNC_DECL tmat2x4<T, P>::tmat2x4
|
||||
GLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4
|
||||
(
|
||||
tvec4<V1, P> const & v1,
|
||||
tvec4<V2, P> const & v2
|
||||
|
@ -177,7 +177,7 @@ namespace detail
|
||||
// Conversion constructors
|
||||
template <typename T, precision P>
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tmat3x2<T, P>::tmat3x2
|
||||
GLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2
|
||||
(
|
||||
U const & s
|
||||
)
|
||||
@ -193,7 +193,7 @@ namespace detail
|
||||
typename X1, typename Y1,
|
||||
typename X2, typename Y2,
|
||||
typename X3, typename Y3>
|
||||
GLM_FUNC_DECL tmat3x2<T, P>::tmat3x2
|
||||
GLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2
|
||||
(
|
||||
X1 const & x1, Y1 const & y1,
|
||||
X2 const & x2, Y2 const & y2,
|
||||
@ -207,7 +207,7 @@ namespace detail
|
||||
|
||||
template <typename T, precision P>
|
||||
template <typename V1, typename V2, typename V3>
|
||||
GLM_FUNC_DECL tmat3x2<T, P>::tmat3x2
|
||||
GLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2
|
||||
(
|
||||
tvec2<V1, P> const & v1,
|
||||
tvec2<V2, P> const & v2,
|
||||
|
@ -180,7 +180,7 @@ namespace detail
|
||||
// Conversion constructors
|
||||
template <typename T, precision P>
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tmat3x3<T, P>::tmat3x3
|
||||
GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3
|
||||
(
|
||||
U const & s
|
||||
)
|
||||
@ -196,7 +196,7 @@ namespace detail
|
||||
typename X1, typename Y1, typename Z1,
|
||||
typename X2, typename Y2, typename Z2,
|
||||
typename X3, typename Y3, typename Z3>
|
||||
GLM_FUNC_DECL tmat3x3<T, P>::tmat3x3
|
||||
GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3
|
||||
(
|
||||
X1 const & x1, Y1 const & y1, Z1 const & z1,
|
||||
X2 const & x2, Y2 const & y2, Z2 const & z2,
|
||||
@ -210,7 +210,7 @@ namespace detail
|
||||
|
||||
template <typename T, precision P>
|
||||
template <typename V1, typename V2, typename V3>
|
||||
GLM_FUNC_DECL tmat3x3<T, P>::tmat3x3
|
||||
GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3
|
||||
(
|
||||
tvec3<V1, P> const & v1,
|
||||
tvec3<V2, P> const & v2,
|
||||
|
@ -153,7 +153,7 @@ namespace detail
|
||||
// Conversion constructors
|
||||
template <typename T, precision P>
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tmat3x4<T, P>::tmat3x4
|
||||
GLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4
|
||||
(
|
||||
U const & s
|
||||
)
|
||||
@ -169,7 +169,7 @@ namespace detail
|
||||
typename X1, typename Y1, typename Z1, typename W1,
|
||||
typename X2, typename Y2, typename Z2, typename W2,
|
||||
typename X3, typename Y3, typename Z3, typename W3>
|
||||
GLM_FUNC_DECL tmat3x4<T, P>::tmat3x4
|
||||
GLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4
|
||||
(
|
||||
X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1,
|
||||
X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2,
|
||||
@ -183,7 +183,7 @@ namespace detail
|
||||
|
||||
template <typename T, precision P>
|
||||
template <typename V1, typename V2, typename V3>
|
||||
GLM_FUNC_DECL tmat3x4<T, P>::tmat3x4
|
||||
GLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4
|
||||
(
|
||||
tvec4<V1, P> const & v1,
|
||||
tvec4<V2, P> const & v2,
|
||||
|
@ -158,7 +158,7 @@ namespace detail
|
||||
// Conversion constructors
|
||||
template <typename T, precision P>
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tmat4x2<T, P>::tmat4x2
|
||||
GLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2
|
||||
(
|
||||
U const & s
|
||||
)
|
||||
@ -176,7 +176,7 @@ namespace detail
|
||||
typename X2, typename Y2,
|
||||
typename X3, typename Y3,
|
||||
typename X4, typename Y4>
|
||||
GLM_FUNC_DECL tmat4x2<T, P>::tmat4x2
|
||||
GLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2
|
||||
(
|
||||
X1 const & x1, Y1 const & y1,
|
||||
X2 const & x2, Y2 const & y2,
|
||||
@ -192,7 +192,7 @@ namespace detail
|
||||
|
||||
template <typename T, precision P>
|
||||
template <typename V1, typename V2, typename V3, typename V4>
|
||||
GLM_FUNC_DECL tmat4x2<T, P>::tmat4x2
|
||||
GLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2
|
||||
(
|
||||
tvec2<V1, P> const & v1,
|
||||
tvec2<V2, P> const & v2,
|
||||
|
@ -183,7 +183,7 @@ namespace detail
|
||||
// Conversion constructors
|
||||
template <typename T, precision P>
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tmat4x3<T, P>::tmat4x3
|
||||
GLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3
|
||||
(
|
||||
U const & s
|
||||
)
|
||||
@ -201,7 +201,7 @@ namespace detail
|
||||
typename X2, typename Y2, typename Z2,
|
||||
typename X3, typename Y3, typename Z3,
|
||||
typename X4, typename Y4, typename Z4>
|
||||
GLM_FUNC_DECL tmat4x3<T, P>::tmat4x3
|
||||
GLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3
|
||||
(
|
||||
X1 const & x1, Y1 const & y1, Z1 const & z1,
|
||||
X2 const & x2, Y2 const & y2, Z2 const & z2,
|
||||
@ -217,7 +217,7 @@ namespace detail
|
||||
|
||||
template <typename T, precision P>
|
||||
template <typename V1, typename V2, typename V3, typename V4>
|
||||
GLM_FUNC_DECL tmat4x3<T, P>::tmat4x3
|
||||
GLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3
|
||||
(
|
||||
tvec3<V1, P> const & v1,
|
||||
tvec3<V2, P> const & v2,
|
||||
|
@ -225,7 +225,7 @@ namespace detail
|
||||
typename X2, typename Y2, typename Z2, typename W2,
|
||||
typename X3, typename Y3, typename Z3, typename W3,
|
||||
typename X4, typename Y4, typename Z4, typename W4>
|
||||
GLM_FUNC_DECL tmat4x4<T, P>::tmat4x4
|
||||
GLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4
|
||||
(
|
||||
X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1,
|
||||
X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2,
|
||||
@ -261,7 +261,7 @@ namespace detail
|
||||
|
||||
template <typename T, precision P>
|
||||
template <typename V1, typename V2, typename V3, typename V4>
|
||||
GLM_FUNC_DECL tmat4x4<T, P>::tmat4x4
|
||||
GLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4
|
||||
(
|
||||
tvec4<V1, P> const & v1,
|
||||
tvec4<V2, P> const & v2,
|
||||
|
@ -79,7 +79,7 @@ namespace glm
|
||||
/// @see - translate(detail::tmat4x4<T, P> const & m, T x, T y, T z)
|
||||
/// @see - translate(detail::tvec3<T, P> const & v)
|
||||
template <typename T, precision P>
|
||||
detail::tmat4x4<T, P> translate(
|
||||
GLM_FUNC_DECL detail::tmat4x4<T, P> translate(
|
||||
detail::tmat4x4<T, P> const & m,
|
||||
detail::tvec3<T, P> const & v);
|
||||
|
||||
@ -95,7 +95,7 @@ namespace glm
|
||||
/// @see - rotate(detail::tmat4x4<T, P> const & m, T angle, T x, T y, T z)
|
||||
/// @see - rotate(T angle, detail::tvec3<T, P> const & v)
|
||||
template <typename T, precision P>
|
||||
detail::tmat4x4<T, P> rotate(
|
||||
GLM_FUNC_DECL detail::tmat4x4<T, P> rotate(
|
||||
detail::tmat4x4<T, P> const & m,
|
||||
T const & angle,
|
||||
detail::tvec3<T, P> const & axis);
|
||||
@ -111,7 +111,7 @@ namespace glm
|
||||
/// @see - scale(detail::tmat4x4<T, P> const & m, T x, T y, T z)
|
||||
/// @see - scale(detail::tvec3<T, P> const & v)
|
||||
template <typename T, precision P>
|
||||
detail::tmat4x4<T, P> scale(
|
||||
GLM_FUNC_DECL detail::tmat4x4<T, P> scale(
|
||||
detail::tmat4x4<T, P> const & m,
|
||||
detail::tvec3<T, P> const & v);
|
||||
|
||||
@ -127,7 +127,7 @@ namespace glm
|
||||
/// @see gtc_matrix_transform
|
||||
/// @see - glm::ortho(T const & left, T const & right, T const & bottom, T const & top)
|
||||
template <typename T>
|
||||
detail::tmat4x4<T, defaultp> ortho(
|
||||
GLM_FUNC_DECL detail::tmat4x4<T, defaultp> ortho(
|
||||
T const & left,
|
||||
T const & right,
|
||||
T const & bottom,
|
||||
@ -145,7 +145,7 @@ namespace glm
|
||||
/// @see gtc_matrix_transform
|
||||
/// @see - glm::ortho(T const & left, T const & right, T const & bottom, T const & top, T const & zNear, T const & zFar)
|
||||
template <typename T>
|
||||
detail::tmat4x4<T, defaultp> ortho(
|
||||
GLM_FUNC_DECL detail::tmat4x4<T, defaultp> ortho(
|
||||
T const & left,
|
||||
T const & right,
|
||||
T const & bottom,
|
||||
@ -162,7 +162,7 @@ namespace glm
|
||||
/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
|
||||
/// @see gtc_matrix_transform
|
||||
template <typename T, precision P>
|
||||
detail::tmat4x4<T, P> frustum(
|
||||
GLM_FUNC_DECL detail::tmat4x4<T, P> frustum(
|
||||
T const & left,
|
||||
T const & right,
|
||||
T const & bottom,
|
||||
@ -179,7 +179,7 @@ namespace glm
|
||||
/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
|
||||
/// @see gtc_matrix_transform
|
||||
template <typename T, precision P>
|
||||
detail::tmat4x4<T, P> perspective(
|
||||
GLM_FUNC_DECL detail::tmat4x4<T, P> perspective(
|
||||
T const & fovy,
|
||||
T const & aspect,
|
||||
T const & near,
|
||||
@ -195,7 +195,7 @@ namespace glm
|
||||
/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
|
||||
/// @see gtc_matrix_transform
|
||||
template <typename T, precision P>
|
||||
detail::tmat4x4<T, P> perspectiveFov(
|
||||
GLM_FUNC_DECL detail::tmat4x4<T, P> perspectiveFov(
|
||||
T const & fov,
|
||||
T const & width,
|
||||
T const & height,
|
||||
@ -210,7 +210,7 @@ namespace glm
|
||||
/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
|
||||
/// @see gtc_matrix_transform
|
||||
template <typename T, precision P>
|
||||
detail::tmat4x4<T, P> infinitePerspective(
|
||||
GLM_FUNC_DECL detail::tmat4x4<T, P> infinitePerspective(
|
||||
T fovy, T aspect, T near);
|
||||
|
||||
/// Creates a matrix for a symmetric perspective-view frustum with far plane at infinite for graphics hardware that doesn't support depth clamping.
|
||||
@ -221,7 +221,7 @@ namespace glm
|
||||
/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
|
||||
/// @see gtc_matrix_transform
|
||||
template <typename T, precision P>
|
||||
detail::tmat4x4<T, P> tweakedInfinitePerspective(
|
||||
GLM_FUNC_DECL detail::tmat4x4<T, P> tweakedInfinitePerspective(
|
||||
T fovy, T aspect, T near);
|
||||
|
||||
/// Map the specified object coordinates (obj.x, obj.y, obj.z) into window coordinates.
|
||||
@ -234,7 +234,7 @@ namespace glm
|
||||
/// @tparam U Currently supported: Floating-point types and integer types.
|
||||
/// @see gtc_matrix_transform
|
||||
template <typename T, typename U, precision P>
|
||||
detail::tvec3<T, P> project(
|
||||
GLM_FUNC_DECL detail::tvec3<T, P> project(
|
||||
detail::tvec3<T, P> const & obj,
|
||||
detail::tmat4x4<T, P> const & model,
|
||||
detail::tmat4x4<T, P> const & proj,
|
||||
@ -250,7 +250,7 @@ namespace glm
|
||||
/// @tparam U Currently supported: Floating-point types and integer types.
|
||||
/// @see gtc_matrix_transform
|
||||
template <typename T, typename U, precision P>
|
||||
detail::tvec3<T, P> unProject(
|
||||
GLM_FUNC_DECL detail::tvec3<T, P> unProject(
|
||||
detail::tvec3<T, P> const & win,
|
||||
detail::tmat4x4<T, P> const & model,
|
||||
detail::tmat4x4<T, P> const & proj,
|
||||
@ -265,7 +265,7 @@ namespace glm
|
||||
/// @tparam U Currently supported: Floating-point types and integer types.
|
||||
/// @see gtc_matrix_transform
|
||||
template <typename T, precision P, typename U>
|
||||
detail::tmat4x4<T, P> pickMatrix(
|
||||
GLM_FUNC_DECL detail::tmat4x4<T, P> pickMatrix(
|
||||
detail::tvec2<T, P> const & center,
|
||||
detail::tvec2<T, P> const & delta,
|
||||
detail::tvec4<U, P> const & viewport);
|
||||
@ -278,7 +278,7 @@ namespace glm
|
||||
/// @see gtc_matrix_transform
|
||||
/// @see - frustum(T const & left, T const & right, T const & bottom, T const & top, T const & nearVal, T const & farVal) frustum(T const & left, T const & right, T const & bottom, T const & top, T const & nearVal, T const & farVal)
|
||||
template <typename T, precision P>
|
||||
detail::tmat4x4<T, P> lookAt(
|
||||
GLM_FUNC_DECL detail::tmat4x4<T, P> lookAt(
|
||||
detail::tvec3<T, P> const & eye,
|
||||
detail::tvec3<T, P> const & center,
|
||||
detail::tvec3<T, P> const & up);
|
||||
|
@ -388,7 +388,7 @@ namespace glm
|
||||
}
|
||||
|
||||
template <typename T, precision P, typename U>
|
||||
detail::tmat4x4<T, P> pickMatrix
|
||||
GLM_FUNC_QUALIFIER detail::tmat4x4<T, P> pickMatrix
|
||||
(
|
||||
detail::tvec2<T, P> const & center,
|
||||
detail::tvec2<T, P> const & delta,
|
||||
|
@ -29,7 +29,7 @@
|
||||
namespace glm{
|
||||
namespace detail
|
||||
{
|
||||
glm::uint16 float2half(glm::uint32 const & f)
|
||||
GLM_FUNC_QUALIFIER glm::uint16 float2half(glm::uint32 const & f)
|
||||
{
|
||||
// 10 bits => EE EEEFFFFF
|
||||
// 11 bits => EEE EEFFFFFF
|
||||
@ -47,7 +47,7 @@ namespace detail
|
||||
((f >> 13) & 0x03ff); // Mantissa
|
||||
}
|
||||
|
||||
glm::uint32 float2packed11(glm::uint32 const & f)
|
||||
GLM_FUNC_QUALIFIER glm::uint32 float2packed11(glm::uint32 const & f)
|
||||
{
|
||||
// 10 bits => EE EEEFFFFF
|
||||
// 11 bits => EEE EEFFFFFF
|
||||
@ -65,7 +65,7 @@ namespace detail
|
||||
((f >> 17) & 0x003f); // Mantissa
|
||||
}
|
||||
|
||||
glm::uint32 packed11ToFloat(glm::uint32 const & p)
|
||||
GLM_FUNC_QUALIFIER glm::uint32 packed11ToFloat(glm::uint32 const & p)
|
||||
{
|
||||
// 10 bits => EE EEEFFFFF
|
||||
// 11 bits => EEE EEFFFFFF
|
||||
@ -83,7 +83,7 @@ namespace detail
|
||||
((p & 0x003f) << 17); // Mantissa
|
||||
}
|
||||
|
||||
glm::uint32 float2packed10(glm::uint32 const & f)
|
||||
GLM_FUNC_QUALIFIER glm::uint32 float2packed10(glm::uint32 const & f)
|
||||
{
|
||||
// 10 bits => EE EEEFFFFF
|
||||
// 11 bits => EEE EEFFFFFF
|
||||
@ -104,7 +104,7 @@ namespace detail
|
||||
((f >> 18) & 0x001f); // Mantissa
|
||||
}
|
||||
|
||||
glm::uint32 packed10ToFloat(glm::uint32 const & p)
|
||||
GLM_FUNC_QUALIFIER glm::uint32 packed10ToFloat(glm::uint32 const & p)
|
||||
{
|
||||
// 10 bits => EE EEEFFFFF
|
||||
// 11 bits => EEE EEFFFFFF
|
||||
@ -125,18 +125,12 @@ namespace detail
|
||||
((p & 0x001f) << 18); // Mantissa
|
||||
}
|
||||
|
||||
glm::uint half2float(glm::uint const & h)
|
||||
GLM_FUNC_QUALIFIER glm::uint half2float(glm::uint const & h)
|
||||
{
|
||||
return ((h & 0x8000) << 16) | ((( h & 0x7c00) + 0x1C000) << 13) | ((h & 0x03FF) << 13);
|
||||
}
|
||||
|
||||
union uif
|
||||
{
|
||||
glm::uint i;
|
||||
float f;
|
||||
};
|
||||
|
||||
glm::uint floatTo11bit(float x)
|
||||
GLM_FUNC_QUALIFIER glm::uint floatTo11bit(float x)
|
||||
{
|
||||
if(x == 0.0f)
|
||||
return 0;
|
||||
@ -145,12 +139,10 @@ namespace detail
|
||||
else if(glm::isinf(x))
|
||||
return 0x1f << 6;
|
||||
|
||||
uif Union;
|
||||
Union.f = x;
|
||||
return float2packed11(Union.i);
|
||||
return float2packed11(reinterpret_cast<uint&>(x));
|
||||
}
|
||||
|
||||
float packed11bitToFloat(glm::uint x)
|
||||
GLM_FUNC_QUALIFIER float packed11bitToFloat(glm::uint x)
|
||||
{
|
||||
if(x == 0)
|
||||
return 0.0f;
|
||||
@ -159,12 +151,11 @@ namespace detail
|
||||
else if(x == (0x1f << 6))
|
||||
return ~0;//Inf
|
||||
|
||||
uif Union;
|
||||
Union.i = packed11ToFloat(x);
|
||||
return Union.f;
|
||||
uint result = packed11ToFloat(x);
|
||||
return reinterpret_cast<float&>(result);
|
||||
}
|
||||
|
||||
glm::uint floatTo10bit(float x)
|
||||
GLM_FUNC_QUALIFIER glm::uint floatTo10bit(float x)
|
||||
{
|
||||
if(x == 0.0f)
|
||||
return 0;
|
||||
@ -173,9 +164,7 @@ namespace detail
|
||||
else if(glm::isinf(x))
|
||||
return 0x1f << 5;
|
||||
|
||||
uif Union;
|
||||
Union.f = x;
|
||||
return float2packed10(Union.i);
|
||||
return float2packed10(reinterpret_cast<uint&>(x));
|
||||
}
|
||||
|
||||
float packed10bitToFloat(glm::uint x)
|
||||
@ -187,9 +176,8 @@ namespace detail
|
||||
else if(x == (0x1f << 5))
|
||||
return ~0;//Inf
|
||||
|
||||
uif Union;
|
||||
Union.i = packed10ToFloat(x);
|
||||
return Union.f;
|
||||
uint result = packed10ToFloat(x);
|
||||
return reinterpret_cast<float&>(result);
|
||||
}
|
||||
|
||||
glm::uint f11_f11_f10(float x, float y, float z)
|
||||
@ -325,19 +313,19 @@ namespace detail
|
||||
-1.0f, 1.0f);
|
||||
}
|
||||
|
||||
GLM_FUNC_DECL uint16 packHalf1x16(float const & v)
|
||||
GLM_FUNC_QUALIFIER uint16 packHalf1x16(float const & v)
|
||||
{
|
||||
int16 Topack = detail::toFloat16(v);
|
||||
return *reinterpret_cast<uint16*>(&Topack);
|
||||
}
|
||||
|
||||
GLM_FUNC_DECL float unpackHalf1x16(uint16 const & v)
|
||||
GLM_FUNC_QUALIFIER float unpackHalf1x16(uint16 const & v)
|
||||
{
|
||||
int16 Unpack(*reinterpret_cast<int16*>(const_cast<uint16*>(&v)));
|
||||
return detail::toFloat32(Unpack);
|
||||
}
|
||||
|
||||
GLM_FUNC_DECL uint64 packHalf4x16(glm::vec4 const & v)
|
||||
GLM_FUNC_QUALIFIER uint64 packHalf4x16(glm::vec4 const & v)
|
||||
{
|
||||
i16vec4 Unpack(
|
||||
detail::toFloat16(v.x),
|
||||
@ -348,7 +336,7 @@ namespace detail
|
||||
return *reinterpret_cast<uint64*>(&Unpack);
|
||||
}
|
||||
|
||||
GLM_FUNC_DECL glm::vec4 unpackHalf4x16(uint64 const & v)
|
||||
GLM_FUNC_QUALIFIER glm::vec4 unpackHalf4x16(uint64 const & v)
|
||||
{
|
||||
i16vec4 Unpack = *reinterpret_cast<i16vec4*>(const_cast<uint64*>(&v));
|
||||
|
||||
|
@ -64,7 +64,7 @@ namespace detail
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR int length() const;
|
||||
|
||||
// Constructors
|
||||
tquat();
|
||||
GLM_FUNC_DECL tquat();
|
||||
template <typename U, precision Q>
|
||||
GLM_FUNC_DECL explicit tquat(
|
||||
tquat<U, Q> const & q);
|
||||
@ -111,51 +111,51 @@ namespace detail
|
||||
};
|
||||
|
||||
template <typename T, precision P>
|
||||
detail::tquat<T, P> operator- (
|
||||
GLM_FUNC_DECL detail::tquat<T, P> operator- (
|
||||
detail::tquat<T, P> const & q);
|
||||
|
||||
template <typename T, precision P>
|
||||
detail::tquat<T, P> operator+ (
|
||||
GLM_FUNC_DECL detail::tquat<T, P> operator+ (
|
||||
detail::tquat<T, P> const & q,
|
||||
detail::tquat<T, P> const & p);
|
||||
|
||||
template <typename T, precision P>
|
||||
detail::tquat<T, P> operator* (
|
||||
GLM_FUNC_DECL detail::tquat<T, P> operator* (
|
||||
detail::tquat<T, P> const & q,
|
||||
detail::tquat<T, P> const & p);
|
||||
|
||||
template <typename T, precision P>
|
||||
detail::tvec3<T, P> operator* (
|
||||
GLM_FUNC_DECL detail::tvec3<T, P> operator* (
|
||||
detail::tquat<T, P> const & q,
|
||||
detail::tvec3<T, P> const & v);
|
||||
|
||||
template <typename T, precision P>
|
||||
detail::tvec3<T, P> operator* (
|
||||
GLM_FUNC_DECL detail::tvec3<T, P> operator* (
|
||||
detail::tvec3<T, P> const & v,
|
||||
detail::tquat<T, P> const & q);
|
||||
|
||||
template <typename T, precision P>
|
||||
detail::tvec4<T, P> operator* (
|
||||
GLM_FUNC_DECL detail::tvec4<T, P> operator* (
|
||||
detail::tquat<T, P> const & q,
|
||||
detail::tvec4<T, P> const & v);
|
||||
|
||||
template <typename T, precision P>
|
||||
detail::tvec4<T, P> operator* (
|
||||
GLM_FUNC_DECL detail::tvec4<T, P> operator* (
|
||||
detail::tvec4<T, P> const & v,
|
||||
detail::tquat<T, P> const & q);
|
||||
|
||||
template <typename T, precision P>
|
||||
detail::tquat<T, P> operator* (
|
||||
GLM_FUNC_DECL detail::tquat<T, P> operator* (
|
||||
detail::tquat<T, P> const & q,
|
||||
T const & s);
|
||||
|
||||
template <typename T, precision P>
|
||||
detail::tquat<T, P> operator* (
|
||||
GLM_FUNC_DECL detail::tquat<T, P> operator* (
|
||||
T const & s,
|
||||
detail::tquat<T, P> const & q);
|
||||
|
||||
template <typename T, precision P>
|
||||
detail::tquat<T, P> operator/ (
|
||||
GLM_FUNC_DECL detail::tquat<T, P> operator/ (
|
||||
detail::tquat<T, P> const & q,
|
||||
T const & s);
|
||||
|
||||
@ -168,21 +168,21 @@ namespace detail
|
||||
///
|
||||
/// @see gtc_quaternion
|
||||
template <typename T, precision P>
|
||||
T length(
|
||||
GLM_FUNC_DECL T length(
|
||||
detail::tquat<T, P> const & q);
|
||||
|
||||
/// Returns the normalized quaternion.
|
||||
///
|
||||
/// @see gtc_quaternion
|
||||
template <typename T, precision P>
|
||||
detail::tquat<T, P> normalize(
|
||||
GLM_FUNC_DECL detail::tquat<T, P> normalize(
|
||||
detail::tquat<T, P> const & q);
|
||||
|
||||
/// Returns dot product of q1 and q2, i.e., q1[0] * q2[0] + q1[1] * q2[1] + ...
|
||||
///
|
||||
/// @see gtc_quaternion
|
||||
template <typename T, precision P>
|
||||
T dot(
|
||||
GLM_FUNC_DECL T dot(
|
||||
detail::tquat<T, P> const & q1,
|
||||
detail::tquat<T, P> const & q2);
|
||||
|
||||
@ -197,7 +197,7 @@ namespace detail
|
||||
/// @see gtc_quaternion
|
||||
/// @see - slerp(detail::tquat<T, P> const & x, detail::tquat<T, P> const & y, T const & a)
|
||||
template <typename T, precision P>
|
||||
detail::tquat<T, P> mix(
|
||||
GLM_FUNC_DECL detail::tquat<T, P> mix(
|
||||
detail::tquat<T, P> const & x,
|
||||
detail::tquat<T, P> const & y,
|
||||
T const & a);
|
||||
@ -211,7 +211,7 @@ namespace detail
|
||||
/// @tparam T Value type used to build the quaternion. Supported: half, float or double.
|
||||
/// @see gtc_quaternion
|
||||
template <typename T, precision P>
|
||||
detail::tquat<T, P> lerp(
|
||||
GLM_FUNC_DECL detail::tquat<T, P> lerp(
|
||||
detail::tquat<T, P> const & x,
|
||||
detail::tquat<T, P> const & y,
|
||||
T const & a);
|
||||
@ -225,7 +225,7 @@ namespace detail
|
||||
/// @tparam T Value type used to build the quaternion. Supported: half, float or double.
|
||||
/// @see gtc_quaternion
|
||||
template <typename T, precision P>
|
||||
detail::tquat<T, P> slerp(
|
||||
GLM_FUNC_DECL detail::tquat<T, P> slerp(
|
||||
detail::tquat<T, P> const & x,
|
||||
detail::tquat<T, P> const & y,
|
||||
T const & a);
|
||||
@ -234,14 +234,14 @@ namespace detail
|
||||
///
|
||||
/// @see gtc_quaternion
|
||||
template <typename T, precision P>
|
||||
detail::tquat<T, P> conjugate(
|
||||
GLM_FUNC_DECL detail::tquat<T, P> conjugate(
|
||||
detail::tquat<T, P> const & q);
|
||||
|
||||
/// Returns the q inverse.
|
||||
///
|
||||
/// @see gtc_quaternion
|
||||
template <typename T, precision P>
|
||||
detail::tquat<T, P> inverse(
|
||||
GLM_FUNC_DECL detail::tquat<T, P> inverse(
|
||||
detail::tquat<T, P> const & q);
|
||||
|
||||
/// Rotates a quaternion from a vector of 3 components axis and an angle.
|
||||
@ -252,7 +252,7 @@ namespace detail
|
||||
///
|
||||
/// @see gtc_quaternion
|
||||
template <typename T, precision P>
|
||||
detail::tquat<T, P> rotate(
|
||||
GLM_FUNC_DECL detail::tquat<T, P> rotate(
|
||||
detail::tquat<T, P> const & q,
|
||||
T const & angle,
|
||||
detail::tvec3<T, P> const & axis);
|
||||
@ -261,66 +261,66 @@ namespace detail
|
||||
///
|
||||
/// @see gtc_quaternion
|
||||
template <typename T, precision P>
|
||||
detail::tvec3<T, P> eulerAngles(
|
||||
GLM_FUNC_DECL detail::tvec3<T, P> eulerAngles(
|
||||
detail::tquat<T, P> const & x);
|
||||
|
||||
/// Returns roll value of euler angles expressed in radians if GLM_FORCE_RADIANS is define or degrees otherwise.
|
||||
///
|
||||
/// @see gtx_quaternion
|
||||
template <typename T, precision P>
|
||||
T roll(detail::tquat<T, P> const & x);
|
||||
GLM_FUNC_DECL T roll(detail::tquat<T, P> const & x);
|
||||
|
||||
/// Returns pitch value of euler angles expressed in radians if GLM_FORCE_RADIANS is define or degrees otherwise.
|
||||
///
|
||||
/// @see gtx_quaternion
|
||||
template <typename T, precision P>
|
||||
T pitch(detail::tquat<T, P> const & x);
|
||||
GLM_FUNC_DECL T pitch(detail::tquat<T, P> const & x);
|
||||
|
||||
/// Returns yaw value of euler angles expressed in radians if GLM_FORCE_RADIANS is define or degrees otherwise.
|
||||
///
|
||||
/// @see gtx_quaternion
|
||||
template <typename T, precision P>
|
||||
T yaw(detail::tquat<T, P> const & x);
|
||||
GLM_FUNC_DECL T yaw(detail::tquat<T, P> const & x);
|
||||
|
||||
/// Converts a quaternion to a 3 * 3 matrix.
|
||||
///
|
||||
/// @see gtc_quaternion
|
||||
template <typename T, precision P>
|
||||
detail::tmat3x3<T, P> mat3_cast(
|
||||
GLM_FUNC_DECL detail::tmat3x3<T, P> mat3_cast(
|
||||
detail::tquat<T, P> const & x);
|
||||
|
||||
/// Converts a quaternion to a 4 * 4 matrix.
|
||||
///
|
||||
/// @see gtc_quaternion
|
||||
template <typename T, precision P>
|
||||
detail::tmat4x4<T, P> mat4_cast(
|
||||
GLM_FUNC_DECL detail::tmat4x4<T, P> mat4_cast(
|
||||
detail::tquat<T, P> const & x);
|
||||
|
||||
/// Converts a 3 * 3 matrix to a quaternion.
|
||||
///
|
||||
/// @see gtc_quaternion
|
||||
template <typename T, precision P>
|
||||
detail::tquat<T, P> quat_cast(
|
||||
GLM_FUNC_DECL detail::tquat<T, P> quat_cast(
|
||||
detail::tmat3x3<T, P> const & x);
|
||||
|
||||
/// Converts a 4 * 4 matrix to a quaternion.
|
||||
///
|
||||
/// @see gtc_quaternion
|
||||
template <typename T, precision P>
|
||||
detail::tquat<T, P> quat_cast(
|
||||
GLM_FUNC_DECL detail::tquat<T, P> quat_cast(
|
||||
detail::tmat4x4<T, P> const & x);
|
||||
|
||||
/// Returns the quaternion rotation angle.
|
||||
///
|
||||
/// @see gtc_quaternion
|
||||
template <typename T, precision P>
|
||||
T angle(detail::tquat<T, P> const & x);
|
||||
GLM_FUNC_DECL T angle(detail::tquat<T, P> const & x);
|
||||
|
||||
/// Returns the q rotation axis.
|
||||
///
|
||||
/// @see gtc_quaternion
|
||||
template <typename T, precision P>
|
||||
detail::tvec3<T, P> axis(
|
||||
GLM_FUNC_DECL detail::tvec3<T, P> axis(
|
||||
detail::tquat<T, P> const & x);
|
||||
|
||||
/// Build a quaternion from an angle and a normalized axis.
|
||||
@ -330,7 +330,7 @@ namespace detail
|
||||
///
|
||||
/// @see gtc_quaternion
|
||||
template <typename T, precision P>
|
||||
detail::tquat<T, P> angleAxis(
|
||||
GLM_FUNC_DECL detail::tquat<T, P> angleAxis(
|
||||
T const & angle,
|
||||
detail::tvec3<T, P> const & axis);
|
||||
|
||||
@ -340,7 +340,7 @@ namespace detail
|
||||
///
|
||||
/// @see gtc_quaternion
|
||||
template <typename quatType>
|
||||
typename quatType::bool_type lessThan(quatType const & x, quatType const & y);
|
||||
GLM_FUNC_DECL typename quatType::bool_type lessThan(quatType const & x, quatType const & y);
|
||||
|
||||
/// Returns the component-wise comparison of result x <= y.
|
||||
///
|
||||
@ -348,7 +348,7 @@ namespace detail
|
||||
///
|
||||
/// @see gtc_quaternion
|
||||
template <typename quatType>
|
||||
typename quatType::bool_type lessThanEqual(quatType const & x, quatType const & y);
|
||||
GLM_FUNC_DECL typename quatType::bool_type lessThanEqual(quatType const & x, quatType const & y);
|
||||
|
||||
/// Returns the component-wise comparison of result x > y.
|
||||
///
|
||||
@ -356,7 +356,7 @@ namespace detail
|
||||
///
|
||||
/// @see gtc_quaternion
|
||||
template <typename quatType>
|
||||
typename quatType::bool_type greaterThan(quatType const & x, quatType const & y);
|
||||
GLM_FUNC_DECL typename quatType::bool_type greaterThan(quatType const & x, quatType const & y);
|
||||
|
||||
/// Returns the component-wise comparison of result x >= y.
|
||||
///
|
||||
@ -364,7 +364,7 @@ namespace detail
|
||||
///
|
||||
/// @see gtc_quaternion
|
||||
template <typename quatType>
|
||||
typename quatType::bool_type greaterThanEqual(quatType const & x, quatType const & y);
|
||||
GLM_FUNC_DECL typename quatType::bool_type greaterThanEqual(quatType const & x, quatType const & y);
|
||||
|
||||
/// Returns the component-wise comparison of result x == y.
|
||||
///
|
||||
@ -372,7 +372,7 @@ namespace detail
|
||||
///
|
||||
/// @see gtc_quaternion
|
||||
template <typename quatType>
|
||||
typename quatType::bool_type equal(quatType const & x, quatType const & y);
|
||||
GLM_FUNC_DECL typename quatType::bool_type equal(quatType const & x, quatType const & y);
|
||||
|
||||
/// Returns the component-wise comparison of result x != y.
|
||||
///
|
||||
@ -380,7 +380,7 @@ namespace detail
|
||||
///
|
||||
/// @see gtc_quaternion
|
||||
template <typename quatType>
|
||||
typename quatType::bool_type notEqual(quatType const & x, quatType const & y);
|
||||
GLM_FUNC_DECL typename quatType::bool_type notEqual(quatType const & x, quatType const & y);
|
||||
|
||||
/// @}
|
||||
} //namespace glm
|
||||
|
@ -59,7 +59,7 @@ namespace glm
|
||||
/// @tparam genType Value type. Currently supported: half (not recommanded), float or double scalars and vectors.
|
||||
/// @see gtc_random
|
||||
template <typename genType>
|
||||
genType linearRand(
|
||||
GLM_FUNC_DECL genType linearRand(
|
||||
genType const & Min,
|
||||
genType const & Max);
|
||||
|
||||
@ -69,7 +69,7 @@ namespace glm
|
||||
/// @param Deviation
|
||||
/// @see gtc_random
|
||||
template <typename genType>
|
||||
genType gaussRand(
|
||||
GLM_FUNC_DECL genType gaussRand(
|
||||
genType const & Mean,
|
||||
genType const & Deviation);
|
||||
|
||||
@ -78,7 +78,7 @@ namespace glm
|
||||
/// @param Radius
|
||||
/// @see gtc_random
|
||||
template <typename T>
|
||||
detail::tvec2<T, defaultp> circularRand(
|
||||
GLM_FUNC_DECL detail::tvec2<T, defaultp> circularRand(
|
||||
T const & Radius);
|
||||
|
||||
/// Generate a random 3D vector which coordinates are regulary distributed on a sphere of a given radius
|
||||
@ -86,7 +86,7 @@ namespace glm
|
||||
/// @param Radius
|
||||
/// @see gtc_random
|
||||
template <typename T>
|
||||
detail::tvec3<T, defaultp> sphericalRand(
|
||||
GLM_FUNC_DECL detail::tvec3<T, defaultp> sphericalRand(
|
||||
T const & Radius);
|
||||
|
||||
/// Generate a random 2D vector which coordinates are regulary distributed within the area of a disk of a given radius
|
||||
@ -94,7 +94,7 @@ namespace glm
|
||||
/// @param Radius
|
||||
/// @see gtc_random
|
||||
template <typename T>
|
||||
detail::tvec2<T, defaultp> diskRand(
|
||||
GLM_FUNC_DECL detail::tvec2<T, defaultp> diskRand(
|
||||
T const & Radius);
|
||||
|
||||
/// Generate a random 3D vector which coordinates are regulary distributed within the volume of a ball of a given radius
|
||||
@ -102,7 +102,7 @@ namespace glm
|
||||
/// @param Radius
|
||||
/// @see gtc_random
|
||||
template <typename T>
|
||||
detail::tvec3<T, defaultp> ballRand(
|
||||
GLM_FUNC_DECL detail::tvec3<T, defaultp> ballRand(
|
||||
T const & Radius);
|
||||
|
||||
/// @}
|
||||
|
@ -55,75 +55,75 @@ namespace glm
|
||||
///
|
||||
/// @see gtc_reciprocal
|
||||
template <typename genType>
|
||||
genType sec(genType const & angle);
|
||||
GLM_FUNC_DECL genType sec(genType const & angle);
|
||||
|
||||
/// Cosecant function.
|
||||
/// hypotenuse / opposite or 1 / sin(x)
|
||||
///
|
||||
/// @see gtc_reciprocal
|
||||
template <typename genType>
|
||||
genType csc(genType const & angle);
|
||||
GLM_FUNC_DECL genType csc(genType const & angle);
|
||||
|
||||
/// Cotangent function.
|
||||
/// adjacent / opposite or 1 / tan(x)
|
||||
///
|
||||
/// @see gtc_reciprocal
|
||||
template <typename genType>
|
||||
genType cot(genType const & angle);
|
||||
GLM_FUNC_DECL genType cot(genType const & angle);
|
||||
|
||||
/// Inverse secant function.
|
||||
///
|
||||
/// @see gtc_reciprocal
|
||||
template <typename genType>
|
||||
genType asec(genType const & x);
|
||||
GLM_FUNC_DECL genType asec(genType const & x);
|
||||
|
||||
/// Inverse cosecant function.
|
||||
///
|
||||
/// @see gtc_reciprocal
|
||||
template <typename genType>
|
||||
genType acsc(genType const & x);
|
||||
GLM_FUNC_DECL genType acsc(genType const & x);
|
||||
|
||||
/// Inverse cotangent function.
|
||||
///
|
||||
/// @see gtc_reciprocal
|
||||
template <typename genType>
|
||||
genType acot(genType const & x);
|
||||
GLM_FUNC_DECL genType acot(genType const & x);
|
||||
|
||||
/// Secant hyperbolic function.
|
||||
///
|
||||
/// @see gtc_reciprocal
|
||||
template <typename genType>
|
||||
genType sech(genType const & angle);
|
||||
GLM_FUNC_DECL genType sech(genType const & angle);
|
||||
|
||||
/// Cosecant hyperbolic function.
|
||||
///
|
||||
/// @see gtc_reciprocal
|
||||
template <typename genType>
|
||||
genType csch(genType const & angle);
|
||||
GLM_FUNC_DECL genType csch(genType const & angle);
|
||||
|
||||
/// Cotangent hyperbolic function.
|
||||
///
|
||||
/// @see gtc_reciprocal
|
||||
template <typename genType>
|
||||
genType coth(genType const & angle);
|
||||
GLM_FUNC_DECL genType coth(genType const & angle);
|
||||
|
||||
/// Inverse secant hyperbolic function.
|
||||
///
|
||||
/// @see gtc_reciprocal
|
||||
template <typename genType>
|
||||
genType asech(genType const & x);
|
||||
GLM_FUNC_DECL genType asech(genType const & x);
|
||||
|
||||
/// Inverse cosecant hyperbolic function.
|
||||
///
|
||||
/// @see gtc_reciprocal
|
||||
template <typename genType>
|
||||
genType acsch(genType const & x);
|
||||
GLM_FUNC_DECL genType acsch(genType const & x);
|
||||
|
||||
/// Inverse cotangent hyperbolic function.
|
||||
///
|
||||
/// @see gtc_reciprocal
|
||||
template <typename genType>
|
||||
genType acoth(genType const & x);
|
||||
GLM_FUNC_DECL genType acoth(genType const & x);
|
||||
|
||||
/// @}
|
||||
}//namespace glm
|
||||
|
@ -76,88 +76,88 @@ namespace glm
|
||||
/// Return the constant address to the data of the input parameter.
|
||||
/// @see gtc_type_ptr
|
||||
template<typename genType>
|
||||
typename genType::value_type const * value_ptr(genType const & vec);
|
||||
GLM_FUNC_DECL typename genType::value_type const * value_ptr(genType const & vec);
|
||||
|
||||
/// Build a vector from a pointer.
|
||||
/// @see gtc_type_ptr
|
||||
template<typename T>
|
||||
detail::tvec2<T, defaultp> make_vec2(T const * const ptr);
|
||||
GLM_FUNC_DECL detail::tvec2<T, defaultp> make_vec2(T const * const ptr);
|
||||
|
||||
/// Build a vector from a pointer.
|
||||
/// @see gtc_type_ptr
|
||||
template<typename T>
|
||||
detail::tvec3<T, defaultp> make_vec3(T const * const ptr);
|
||||
GLM_FUNC_DECL detail::tvec3<T, defaultp> make_vec3(T const * const ptr);
|
||||
|
||||
/// Build a vector from a pointer.
|
||||
/// @see gtc_type_ptr
|
||||
template<typename T>
|
||||
detail::tvec4<T, defaultp> make_vec4(T const * const ptr);
|
||||
GLM_FUNC_DECL detail::tvec4<T, defaultp> make_vec4(T const * const ptr);
|
||||
|
||||
/// Build a matrix from a pointer.
|
||||
/// @see gtc_type_ptr
|
||||
template<typename T>
|
||||
detail::tmat2x2<T, defaultp> make_mat2x2(T const * const ptr);
|
||||
GLM_FUNC_DECL detail::tmat2x2<T, defaultp> make_mat2x2(T const * const ptr);
|
||||
|
||||
/// Build a matrix from a pointer.
|
||||
/// @see gtc_type_ptr
|
||||
template<typename T>
|
||||
detail::tmat2x3<T, defaultp> make_mat2x3(T const * const ptr);
|
||||
GLM_FUNC_DECL detail::tmat2x3<T, defaultp> make_mat2x3(T const * const ptr);
|
||||
|
||||
/// Build a matrix from a pointer.
|
||||
/// @see gtc_type_ptr
|
||||
template<typename T>
|
||||
detail::tmat2x4<T, defaultp> make_mat2x4(T const * const ptr);
|
||||
GLM_FUNC_DECL detail::tmat2x4<T, defaultp> make_mat2x4(T const * const ptr);
|
||||
|
||||
/// Build a matrix from a pointer.
|
||||
/// @see gtc_type_ptr
|
||||
template<typename T>
|
||||
detail::tmat3x2<T, defaultp> make_mat3x2(T const * const ptr);
|
||||
GLM_FUNC_DECL detail::tmat3x2<T, defaultp> make_mat3x2(T const * const ptr);
|
||||
|
||||
/// Build a matrix from a pointer.
|
||||
/// @see gtc_type_ptr
|
||||
template<typename T>
|
||||
detail::tmat3x3<T, defaultp> make_mat3x3(T const * const ptr);
|
||||
GLM_FUNC_DECL detail::tmat3x3<T, defaultp> make_mat3x3(T const * const ptr);
|
||||
|
||||
/// Build a matrix from a pointer.
|
||||
/// @see gtc_type_ptr
|
||||
template<typename T>
|
||||
detail::tmat3x4<T, defaultp> make_mat3x4(T const * const ptr);
|
||||
GLM_FUNC_DECL detail::tmat3x4<T, defaultp> make_mat3x4(T const * const ptr);
|
||||
|
||||
/// Build a matrix from a pointer.
|
||||
/// @see gtc_type_ptr
|
||||
template<typename T>
|
||||
detail::tmat4x2<T, defaultp> make_mat4x2(
|
||||
GLM_FUNC_DECL detail::tmat4x2<T, defaultp> make_mat4x2(
|
||||
T const * const ptr);
|
||||
|
||||
/// Build a matrix from a pointer.
|
||||
/// @see gtc_type_ptr
|
||||
template<typename T>
|
||||
detail::tmat4x3<T, defaultp> make_mat4x3(T const * const ptr);
|
||||
GLM_FUNC_DECL detail::tmat4x3<T, defaultp> make_mat4x3(T const * const ptr);
|
||||
|
||||
/// Build a matrix from a pointer.
|
||||
/// @see gtc_type_ptr
|
||||
template<typename T>
|
||||
detail::tmat4x4<T, defaultp> make_mat4x4(T const * const ptr);
|
||||
GLM_FUNC_DECL detail::tmat4x4<T, defaultp> make_mat4x4(T const * const ptr);
|
||||
|
||||
/// Build a matrix from a pointer.
|
||||
/// @see gtc_type_ptr
|
||||
template<typename T>
|
||||
detail::tmat2x2<T, defaultp> make_mat2(T const * const ptr);
|
||||
GLM_FUNC_DECL detail::tmat2x2<T, defaultp> make_mat2(T const * const ptr);
|
||||
|
||||
/// Build a matrix from a pointer.
|
||||
/// @see gtc_type_ptr
|
||||
template<typename T>
|
||||
detail::tmat3x3<T, defaultp> make_mat3(T const * const ptr);
|
||||
GLM_FUNC_DECL detail::tmat3x3<T, defaultp> make_mat3(T const * const ptr);
|
||||
|
||||
/// Build a matrix from a pointer.
|
||||
/// @see gtc_type_ptr
|
||||
template<typename T>
|
||||
detail::tmat4x4<T, defaultp> make_mat4(T const * const ptr);
|
||||
GLM_FUNC_DECL detail::tmat4x4<T, defaultp> make_mat4(T const * const ptr);
|
||||
|
||||
/// Build a quaternion from a pointer.
|
||||
/// @see gtc_type_ptr
|
||||
template<typename T>
|
||||
detail::tquat<T, defaultp> make_quat(T const * const ptr);
|
||||
GLM_FUNC_DECL detail::tquat<T, defaultp> make_quat(T const * const ptr);
|
||||
|
||||
/// @}
|
||||
}//namespace glm
|
||||
|
@ -54,32 +54,32 @@ namespace glm
|
||||
/// Return the next ULP value(s) after the input value(s).
|
||||
/// @see gtc_ulp
|
||||
template <typename genType>
|
||||
genType next_float(genType const & x);
|
||||
GLM_FUNC_DECL genType next_float(genType const & x);
|
||||
|
||||
/// Return the previous ULP value(s) before the input value(s).
|
||||
/// @see gtc_ulp
|
||||
template <typename genType>
|
||||
genType prev_float(genType const & x);
|
||||
GLM_FUNC_DECL genType prev_float(genType const & x);
|
||||
|
||||
/// Return the value(s) ULP distance after the input value(s).
|
||||
/// @see gtc_ulp
|
||||
template <typename genType>
|
||||
genType next_float(genType const & x, uint const & Distance);
|
||||
GLM_FUNC_DECL genType next_float(genType const & x, uint const & Distance);
|
||||
|
||||
/// Return the value(s) ULP distance before the input value(s).
|
||||
/// @see gtc_ulp
|
||||
template <typename genType>
|
||||
genType prev_float(genType const & x, uint const & Distance);
|
||||
GLM_FUNC_DECL genType prev_float(genType const & x, uint const & Distance);
|
||||
|
||||
/// Return the distance in the number of ULP between 2 scalars.
|
||||
/// @see gtc_ulp
|
||||
template <typename T>
|
||||
uint float_distance(T const & x, T const & y);
|
||||
GLM_FUNC_DECL uint float_distance(T const & x, T const & y);
|
||||
|
||||
/// Return the distance in the number of ULP between 2 vectors.
|
||||
/// @see gtc_ulp
|
||||
template<typename T, template<typename> class vecType>
|
||||
vecType<uint> float_distance(vecType<T> const & x, vecType<T> const & y);
|
||||
GLM_FUNC_DECL vecType<uint> float_distance(vecType<T> const & x, vecType<T> const & y);
|
||||
|
||||
/// @}
|
||||
}// namespace glm
|
||||
|
Loading…
Reference in New Issue
Block a user