Improve CUDA coverage to all GTC extensions. Fixed missing constructors #120

master
Christophe Riccio ago%!(EXTRA string=12 years)
parent 29b11937f4
commit 73281f1978
  1. 6
      glm/core/type_mat2x2.inl
  2. 6
      glm/core/type_mat2x3.inl
  3. 6
      glm/core/type_mat2x4.inl
  4. 6
      glm/core/type_mat3x2.inl
  5. 6
      glm/core/type_mat3x3.inl
  6. 6
      glm/core/type_mat3x4.inl
  7. 6
      glm/core/type_mat4x2.inl
  8. 6
      glm/core/type_mat4x3.inl
  9. 4
      glm/core/type_mat4x4.inl
  10. 28
      glm/gtc/matrix_transform.hpp
  11. 2
      glm/gtc/matrix_transform.inl
  12. 50
      glm/gtc/packing.inl
  13. 74
      glm/gtc/quaternion.hpp
  14. 12
      glm/gtc/random.hpp
  15. 24
      glm/gtc/reciprocal.hpp
  16. 34
      glm/gtc/type_ptr.hpp
  17. 12
      glm/gtc/ulp.hpp

@ -168,7 +168,7 @@ namespace detail
// Conversion constructors // Conversion constructors
template <typename T, precision P> template <typename T, precision P>
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x2<T, P>::tmat2x2 GLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2
( (
U const & s U const & s
) )
@ -180,7 +180,7 @@ namespace detail
template <typename T, precision P> template <typename T, precision P>
template <typename X1, typename Y1, typename X2, typename Y2> 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, X1 const & x1, Y1 const & y1,
X2 const & x2, Y2 const & y2 X2 const & x2, Y2 const & y2
@ -192,7 +192,7 @@ namespace detail
template <typename T, precision P> template <typename T, precision P>
template <typename V1, typename V2> 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<V1, P> const & v1,
tvec2<V2, P> const & v2 tvec2<V2, P> const & v2

@ -167,7 +167,7 @@ namespace detail
// Conversion constructors // Conversion constructors
template <typename T, precision P> template <typename T, precision P>
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x3<T, P>::tmat2x3 GLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3
( (
U const & s U const & s
) )
@ -181,7 +181,7 @@ namespace detail
template < template <
typename X1, typename Y1, typename Z1, typename X1, typename Y1, typename Z1,
typename X2, typename Y2, typename Z2> 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, X1 const & x1, Y1 const & y1, Z1 const & z1,
X2 const & x2, Y2 const & y2, Z2 const & z2 X2 const & x2, Y2 const & y2, Z2 const & z2
@ -193,7 +193,7 @@ namespace detail
template <typename T, precision P> template <typename T, precision P>
template <typename V1, typename V2> 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<V1, P> const & v1,
tvec3<V2, P> const & v2 tvec3<V2, P> const & v2

@ -170,7 +170,7 @@ namespace detail
// Conversion constructors // Conversion constructors
template <typename T, precision P> template <typename T, precision P>
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x4<T, P>::tmat2x4 GLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4
( (
U const & s U const & s
) )
@ -184,7 +184,7 @@ namespace detail
template < template <
typename X1, typename Y1, typename Z1, typename W1, typename X1, typename Y1, typename Z1, typename W1,
typename X2, typename Y2, typename Z2, typename W2> 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, X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1,
X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2 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 T, precision P>
template <typename V1, typename V2> 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<V1, P> const & v1,
tvec4<V2, P> const & v2 tvec4<V2, P> const & v2

@ -177,7 +177,7 @@ namespace detail
// Conversion constructors // Conversion constructors
template <typename T, precision P> template <typename T, precision P>
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x2<T, P>::tmat3x2 GLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2
( (
U const & s U const & s
) )
@ -193,7 +193,7 @@ namespace detail
typename X1, typename Y1, typename X1, typename Y1,
typename X2, typename Y2, typename X2, typename Y2,
typename X3, typename Y3> typename X3, typename Y3>
GLM_FUNC_DECL tmat3x2<T, P>::tmat3x2 GLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2
( (
X1 const & x1, Y1 const & y1, X1 const & x1, Y1 const & y1,
X2 const & x2, Y2 const & y2, X2 const & x2, Y2 const & y2,
@ -207,7 +207,7 @@ namespace detail
template <typename T, precision P> template <typename T, precision P>
template <typename V1, typename V2, typename V3> 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<V1, P> const & v1,
tvec2<V2, P> const & v2, tvec2<V2, P> const & v2,

@ -180,7 +180,7 @@ namespace detail
// Conversion constructors // Conversion constructors
template <typename T, precision P> template <typename T, precision P>
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x3<T, P>::tmat3x3 GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3
( (
U const & s U const & s
) )
@ -196,7 +196,7 @@ namespace detail
typename X1, typename Y1, typename Z1, typename X1, typename Y1, typename Z1,
typename X2, typename Y2, typename Z2, typename X2, typename Y2, typename Z2,
typename X3, typename Y3, typename Z3> 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, X1 const & x1, Y1 const & y1, Z1 const & z1,
X2 const & x2, Y2 const & y2, Z2 const & z2, X2 const & x2, Y2 const & y2, Z2 const & z2,
@ -210,7 +210,7 @@ namespace detail
template <typename T, precision P> template <typename T, precision P>
template <typename V1, typename V2, typename V3> 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<V1, P> const & v1,
tvec3<V2, P> const & v2, tvec3<V2, P> const & v2,

@ -153,7 +153,7 @@ namespace detail
// Conversion constructors // Conversion constructors
template <typename T, precision P> template <typename T, precision P>
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x4<T, P>::tmat3x4 GLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4
( (
U const & s U const & s
) )
@ -169,7 +169,7 @@ namespace detail
typename X1, typename Y1, typename Z1, typename W1, typename X1, typename Y1, typename Z1, typename W1,
typename X2, typename Y2, typename Z2, typename W2, typename X2, typename Y2, typename Z2, typename W2,
typename X3, typename Y3, typename Z3, typename W3> 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, X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1,
X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2, 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 T, precision P>
template <typename V1, typename V2, typename V3> 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<V1, P> const & v1,
tvec4<V2, P> const & v2, tvec4<V2, P> const & v2,

@ -158,7 +158,7 @@ namespace detail
// Conversion constructors // Conversion constructors
template <typename T, precision P> template <typename T, precision P>
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x2<T, P>::tmat4x2 GLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2
( (
U const & s U const & s
) )
@ -176,7 +176,7 @@ namespace detail
typename X2, typename Y2, typename X2, typename Y2,
typename X3, typename Y3, typename X3, typename Y3,
typename X4, typename Y4> typename X4, typename Y4>
GLM_FUNC_DECL tmat4x2<T, P>::tmat4x2 GLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2
( (
X1 const & x1, Y1 const & y1, X1 const & x1, Y1 const & y1,
X2 const & x2, Y2 const & y2, X2 const & x2, Y2 const & y2,
@ -192,7 +192,7 @@ namespace detail
template <typename T, precision P> template <typename T, precision P>
template <typename V1, typename V2, typename V3, typename V4> 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<V1, P> const & v1,
tvec2<V2, P> const & v2, tvec2<V2, P> const & v2,

@ -183,7 +183,7 @@ namespace detail
// Conversion constructors // Conversion constructors
template <typename T, precision P> template <typename T, precision P>
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x3<T, P>::tmat4x3 GLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3
( (
U const & s U const & s
) )
@ -201,7 +201,7 @@ namespace detail
typename X2, typename Y2, typename Z2, typename X2, typename Y2, typename Z2,
typename X3, typename Y3, typename Z3, typename X3, typename Y3, typename Z3,
typename X4, typename Y4, typename Z4> 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, X1 const & x1, Y1 const & y1, Z1 const & z1,
X2 const & x2, Y2 const & y2, Z2 const & z2, X2 const & x2, Y2 const & y2, Z2 const & z2,
@ -217,7 +217,7 @@ namespace detail
template <typename T, precision P> template <typename T, precision P>
template <typename V1, typename V2, typename V3, typename V4> 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<V1, P> const & v1,
tvec3<V2, P> const & v2, tvec3<V2, P> const & v2,

@ -225,7 +225,7 @@ namespace detail
typename X2, typename Y2, typename Z2, typename W2, typename X2, typename Y2, typename Z2, typename W2,
typename X3, typename Y3, typename Z3, typename W3, typename X3, typename Y3, typename Z3, typename W3,
typename X4, typename Y4, typename Z4, typename W4> 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, X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1,
X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2, 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 T, precision P>
template <typename V1, typename V2, typename V3, typename V4> 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<V1, P> const & v1,
tvec4<V2, P> const & v2, 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::tmat4x4<T, P> const & m, T x, T y, T z)
/// @see - translate(detail::tvec3<T, P> const & v) /// @see - translate(detail::tvec3<T, P> const & v)
template <typename T, precision P> 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::tmat4x4<T, P> const & m,
detail::tvec3<T, P> const & v); 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(detail::tmat4x4<T, P> const & m, T angle, T x, T y, T z)
/// @see - rotate(T angle, detail::tvec3<T, P> const & v) /// @see - rotate(T angle, detail::tvec3<T, P> const & v)
template <typename T, precision P> template <typename T, precision P>
detail::tmat4x4<T, P> rotate( GLM_FUNC_DECL detail::tmat4x4<T, P> rotate(
detail::tmat4x4<T, P> const & m, detail::tmat4x4<T, P> const & m,
T const & angle, T const & angle,
detail::tvec3<T, P> const & axis); 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::tmat4x4<T, P> const & m, T x, T y, T z)
/// @see - scale(detail::tvec3<T, P> const & v) /// @see - scale(detail::tvec3<T, P> const & v)
template <typename T, precision P> 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::tmat4x4<T, P> const & m,
detail::tvec3<T, P> const & v); detail::tvec3<T, P> const & v);
@ -127,7 +127,7 @@ namespace glm
/// @see gtc_matrix_transform /// @see gtc_matrix_transform
/// @see - glm::ortho(T const & left, T const & right, T const & bottom, T const & top) /// @see - glm::ortho(T const & left, T const & right, T const & bottom, T const & top)
template <typename T> template <typename T>
detail::tmat4x4<T, defaultp> ortho( GLM_FUNC_DECL detail::tmat4x4<T, defaultp> ortho(
T const & left, T const & left,
T const & right, T const & right,
T const & bottom, T const & bottom,
@ -145,7 +145,7 @@ namespace glm
/// @see gtc_matrix_transform /// @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) /// @see - glm::ortho(T const & left, T const & right, T const & bottom, T const & top, T const & zNear, T const & zFar)
template <typename T> template <typename T>
detail::tmat4x4<T, defaultp> ortho( GLM_FUNC_DECL detail::tmat4x4<T, defaultp> ortho(
T const & left, T const & left,
T const & right, T const & right,
T const & bottom, 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. /// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
/// @see gtc_matrix_transform /// @see gtc_matrix_transform
template <typename T, precision P> template <typename T, precision P>
detail::tmat4x4<T, P> frustum( GLM_FUNC_DECL detail::tmat4x4<T, P> frustum(
T const & left, T const & left,
T const & right, T const & right,
T const & bottom, 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. /// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
/// @see gtc_matrix_transform /// @see gtc_matrix_transform
template <typename T, precision P> template <typename T, precision P>
detail::tmat4x4<T, P> perspective( GLM_FUNC_DECL detail::tmat4x4<T, P> perspective(
T const & fovy, T const & fovy,
T const & aspect, T const & aspect,
T const & near, 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. /// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
/// @see gtc_matrix_transform /// @see gtc_matrix_transform
template <typename T, precision P> template <typename T, precision P>
detail::tmat4x4<T, P> perspectiveFov( GLM_FUNC_DECL detail::tmat4x4<T, P> perspectiveFov(
T const & fov, T const & fov,
T const & width, T const & width,
T const & height, 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. /// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
/// @see gtc_matrix_transform /// @see gtc_matrix_transform
template <typename T, precision P> template <typename T, precision P>
detail::tmat4x4<T, P> infinitePerspective( GLM_FUNC_DECL detail::tmat4x4<T, P> infinitePerspective(
T fovy, T aspect, T near); 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. /// 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. /// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
/// @see gtc_matrix_transform /// @see gtc_matrix_transform
template <typename T, precision P> template <typename T, precision P>
detail::tmat4x4<T, P> tweakedInfinitePerspective( GLM_FUNC_DECL detail::tmat4x4<T, P> tweakedInfinitePerspective(
T fovy, T aspect, T near); T fovy, T aspect, T near);
/// Map the specified object coordinates (obj.x, obj.y, obj.z) into window coordinates. /// 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. /// @tparam U Currently supported: Floating-point types and integer types.
/// @see gtc_matrix_transform /// @see gtc_matrix_transform
template <typename T, typename U, precision P> 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::tvec3<T, P> const & obj,
detail::tmat4x4<T, P> const & model, detail::tmat4x4<T, P> const & model,
detail::tmat4x4<T, P> const & proj, detail::tmat4x4<T, P> const & proj,
@ -250,7 +250,7 @@ namespace glm
/// @tparam U Currently supported: Floating-point types and integer types. /// @tparam U Currently supported: Floating-point types and integer types.
/// @see gtc_matrix_transform /// @see gtc_matrix_transform
template <typename T, typename U, precision P> 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::tvec3<T, P> const & win,
detail::tmat4x4<T, P> const & model, detail::tmat4x4<T, P> const & model,
detail::tmat4x4<T, P> const & proj, detail::tmat4x4<T, P> const & proj,
@ -265,7 +265,7 @@ namespace glm
/// @tparam U Currently supported: Floating-point types and integer types. /// @tparam U Currently supported: Floating-point types and integer types.
/// @see gtc_matrix_transform /// @see gtc_matrix_transform
template <typename T, precision P, typename U> 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 & center,
detail::tvec2<T, P> const & delta, detail::tvec2<T, P> const & delta,
detail::tvec4<U, P> const & viewport); detail::tvec4<U, P> const & viewport);
@ -278,7 +278,7 @@ namespace glm
/// @see gtc_matrix_transform /// @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) /// @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> 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 & eye,
detail::tvec3<T, P> const & center, detail::tvec3<T, P> const & center,
detail::tvec3<T, P> const & up); detail::tvec3<T, P> const & up);

@ -388,7 +388,7 @@ namespace glm
} }
template <typename T, precision P, typename U> 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 & center,
detail::tvec2<T, P> const & delta, detail::tvec2<T, P> const & delta,

@ -29,7 +29,7 @@
namespace glm{ namespace glm{
namespace detail namespace detail
{ {
glm::uint16 float2half(glm::uint32 const & f) GLM_FUNC_QUALIFIER glm::uint16 float2half(glm::uint32 const & f)
{ {
// 10 bits => EE EEEFFFFF // 10 bits => EE EEEFFFFF
// 11 bits => EEE EEFFFFFF // 11 bits => EEE EEFFFFFF
@ -47,7 +47,7 @@ namespace detail
((f >> 13) & 0x03ff); // Mantissa ((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 // 10 bits => EE EEEFFFFF
// 11 bits => EEE EEFFFFFF // 11 bits => EEE EEFFFFFF
@ -65,7 +65,7 @@ namespace detail
((f >> 17) & 0x003f); // Mantissa ((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 // 10 bits => EE EEEFFFFF
// 11 bits => EEE EEFFFFFF // 11 bits => EEE EEFFFFFF
@ -83,7 +83,7 @@ namespace detail
((p & 0x003f) << 17); // Mantissa ((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 // 10 bits => EE EEEFFFFF
// 11 bits => EEE EEFFFFFF // 11 bits => EEE EEFFFFFF
@ -104,7 +104,7 @@ namespace detail
((f >> 18) & 0x001f); // Mantissa ((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 // 10 bits => EE EEEFFFFF
// 11 bits => EEE EEFFFFFF // 11 bits => EEE EEFFFFFF
@ -125,18 +125,12 @@ namespace detail
((p & 0x001f) << 18); // Mantissa ((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); return ((h & 0x8000) << 16) | ((( h & 0x7c00) + 0x1C000) << 13) | ((h & 0x03FF) << 13);
} }
union uif GLM_FUNC_QUALIFIER glm::uint floatTo11bit(float x)
{
glm::uint i;
float f;
};
glm::uint floatTo11bit(float x)
{ {
if(x == 0.0f) if(x == 0.0f)
return 0; return 0;
@ -145,12 +139,10 @@ namespace detail
else if(glm::isinf(x)) else if(glm::isinf(x))
return 0x1f << 6; return 0x1f << 6;
uif Union; return float2packed11(reinterpret_cast<uint&>(x));
Union.f = x;
return float2packed11(Union.i);
} }
float packed11bitToFloat(glm::uint x) GLM_FUNC_QUALIFIER float packed11bitToFloat(glm::uint x)
{ {
if(x == 0) if(x == 0)
return 0.0f; return 0.0f;
@ -159,12 +151,11 @@ namespace detail
else if(x == (0x1f << 6)) else if(x == (0x1f << 6))
return ~0;//Inf return ~0;//Inf
uif Union; uint result = packed11ToFloat(x);
Union.i = packed11ToFloat(x); return reinterpret_cast<float&>(result);
return Union.f;
} }
glm::uint floatTo10bit(float x) GLM_FUNC_QUALIFIER glm::uint floatTo10bit(float x)
{ {
if(x == 0.0f) if(x == 0.0f)
return 0; return 0;
@ -173,9 +164,7 @@ namespace detail
else if(glm::isinf(x)) else if(glm::isinf(x))
return 0x1f << 5; return 0x1f << 5;
uif Union; return float2packed10(reinterpret_cast<uint&>(x));
Union.f = x;
return float2packed10(Union.i);
} }
float packed10bitToFloat(glm::uint x) float packed10bitToFloat(glm::uint x)
@ -187,9 +176,8 @@ namespace detail
else if(x == (0x1f << 5)) else if(x == (0x1f << 5))
return ~0;//Inf return ~0;//Inf
uif Union; uint result = packed10ToFloat(x);
Union.i = packed10ToFloat(x); return reinterpret_cast<float&>(result);
return Union.f;
} }
glm::uint f11_f11_f10(float x, float y, float z) glm::uint f11_f11_f10(float x, float y, float z)
@ -325,19 +313,19 @@ namespace detail
-1.0f, 1.0f); -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); int16 Topack = detail::toFloat16(v);
return *reinterpret_cast<uint16*>(&Topack); 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))); int16 Unpack(*reinterpret_cast<int16*>(const_cast<uint16*>(&v)));
return detail::toFloat32(Unpack); return detail::toFloat32(Unpack);
} }
GLM_FUNC_DECL uint64 packHalf4x16(glm::vec4 const & v) GLM_FUNC_QUALIFIER uint64 packHalf4x16(glm::vec4 const & v)
{ {
i16vec4 Unpack( i16vec4 Unpack(
detail::toFloat16(v.x), detail::toFloat16(v.x),
@ -348,7 +336,7 @@ namespace detail
return *reinterpret_cast<uint64*>(&Unpack); 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)); i16vec4 Unpack = *reinterpret_cast<i16vec4*>(const_cast<uint64*>(&v));

@ -64,7 +64,7 @@ namespace detail
GLM_FUNC_DECL GLM_CONSTEXPR int length() const; GLM_FUNC_DECL GLM_CONSTEXPR int length() const;
// Constructors // Constructors
tquat(); GLM_FUNC_DECL tquat();
template <typename U, precision Q> template <typename U, precision Q>
GLM_FUNC_DECL explicit tquat( GLM_FUNC_DECL explicit tquat(
tquat<U, Q> const & q); tquat<U, Q> const & q);
@ -111,51 +111,51 @@ namespace detail
}; };
template <typename T, precision 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 & q);
template <typename T, precision 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 & q,
detail::tquat<T, P> const & p); detail::tquat<T, P> const & p);
template <typename T, precision 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 & q,
detail::tquat<T, P> const & p); detail::tquat<T, P> const & p);
template <typename T, precision 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::tquat<T, P> const & q,
detail::tvec3<T, P> const & v); detail::tvec3<T, P> const & v);
template <typename T, precision P> 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::tvec3<T, P> const & v,
detail::tquat<T, P> const & q); detail::tquat<T, P> const & q);
template <typename T, precision P> 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::tquat<T, P> const & q,
detail::tvec4<T, P> const & v); detail::tvec4<T, P> const & v);
template <typename T, precision P> 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::tvec4<T, P> const & v,
detail::tquat<T, P> const & q); detail::tquat<T, P> const & q);
template <typename T, precision 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 & q,
T const & s); T const & s);
template <typename T, precision P> template <typename T, precision P>
detail::tquat<T, P> operator* ( GLM_FUNC_DECL detail::tquat<T, P> operator* (
T const & s, T const & s,
detail::tquat<T, P> const & q); detail::tquat<T, P> const & q);
template <typename T, precision 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 & q,
T const & s); T const & s);
@ -168,21 +168,21 @@ namespace detail
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
template <typename T, precision P> template <typename T, precision P>
T length( GLM_FUNC_DECL T length(
detail::tquat<T, P> const & q); detail::tquat<T, P> const & q);
/// Returns the normalized quaternion. /// Returns the normalized quaternion.
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
template <typename T, precision P> template <typename T, precision P>
detail::tquat<T, P> normalize( GLM_FUNC_DECL detail::tquat<T, P> normalize(
detail::tquat<T, P> const & q); detail::tquat<T, P> const & q);
/// Returns dot product of q1 and q2, i.e., q1[0] * q2[0] + q1[1] * q2[1] + ... /// Returns dot product of q1 and q2, i.e., q1[0] * q2[0] + q1[1] * q2[1] + ...
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
template <typename T, precision P> template <typename T, precision P>
T dot( GLM_FUNC_DECL T dot(
detail::tquat<T, P> const & q1, detail::tquat<T, P> const & q1,
detail::tquat<T, P> const & q2); detail::tquat<T, P> const & q2);
@ -197,7 +197,7 @@ namespace detail
/// @see gtc_quaternion /// @see gtc_quaternion
/// @see - slerp(detail::tquat<T, P> const & x, detail::tquat<T, P> const & y, T const & a) /// @see - slerp(detail::tquat<T, P> const & x, detail::tquat<T, P> const & y, T const & a)
template <typename T, precision P> 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 & x,
detail::tquat<T, P> const & y, detail::tquat<T, P> const & y,
T const & a); T const & a);
@ -211,7 +211,7 @@ namespace detail
/// @tparam T Value type used to build the quaternion. Supported: half, float or double. /// @tparam T Value type used to build the quaternion. Supported: half, float or double.
/// @see gtc_quaternion /// @see gtc_quaternion
template <typename T, precision P> 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 & x,
detail::tquat<T, P> const & y, detail::tquat<T, P> const & y,
T const & a); T const & a);
@ -225,7 +225,7 @@ namespace detail
/// @tparam T Value type used to build the quaternion. Supported: half, float or double. /// @tparam T Value type used to build the quaternion. Supported: half, float or double.
/// @see gtc_quaternion /// @see gtc_quaternion
template <typename T, precision P> 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 & x,
detail::tquat<T, P> const & y, detail::tquat<T, P> const & y,
T const & a); T const & a);
@ -234,14 +234,14 @@ namespace detail
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
template <typename T, precision P> template <typename T, precision P>
detail::tquat<T, P> conjugate( GLM_FUNC_DECL detail::tquat<T, P> conjugate(
detail::tquat<T, P> const & q); detail::tquat<T, P> const & q);
/// Returns the q inverse. /// Returns the q inverse.
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
template <typename T, precision P> template <typename T, precision P>
detail::tquat<T, P> inverse( GLM_FUNC_DECL detail::tquat<T, P> inverse(
detail::tquat<T, P> const & q); detail::tquat<T, P> const & q);
/// Rotates a quaternion from a vector of 3 components axis and an angle. /// Rotates a quaternion from a vector of 3 components axis and an angle.
@ -252,7 +252,7 @@ namespace detail
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
template <typename T, precision P> template <typename T, precision P>
detail::tquat<T, P> rotate( GLM_FUNC_DECL detail::tquat<T, P> rotate(
detail::tquat<T, P> const & q, detail::tquat<T, P> const & q,
T const & angle, T const & angle,
detail::tvec3<T, P> const & axis); detail::tvec3<T, P> const & axis);
@ -261,66 +261,66 @@ namespace detail
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
template <typename T, precision P> template <typename T, precision P>
detail::tvec3<T, P> eulerAngles( GLM_FUNC_DECL detail::tvec3<T, P> eulerAngles(
detail::tquat<T, P> const & x); detail::tquat<T, P> const & x);
/// Returns roll value of euler angles expressed in radians if GLM_FORCE_RADIANS is define or degrees otherwise. /// Returns roll value of euler angles expressed in radians if GLM_FORCE_RADIANS is define or degrees otherwise.
/// ///
/// @see gtx_quaternion /// @see gtx_quaternion
template <typename T, precision P> 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. /// Returns pitch value of euler angles expressed in radians if GLM_FORCE_RADIANS is define or degrees otherwise.
/// ///
/// @see gtx_quaternion /// @see gtx_quaternion
template <typename T, precision P> 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. /// Returns yaw value of euler angles expressed in radians if GLM_FORCE_RADIANS is define or degrees otherwise.
/// ///
/// @see gtx_quaternion /// @see gtx_quaternion
template <typename T, precision P> 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. /// Converts a quaternion to a 3 * 3 matrix.
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
template <typename T, precision P> 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); detail::tquat<T, P> const & x);
/// Converts a quaternion to a 4 * 4 matrix. /// Converts a quaternion to a 4 * 4 matrix.
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
template <typename T, precision P> 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); detail::tquat<T, P> const & x);
/// Converts a 3 * 3 matrix to a quaternion. /// Converts a 3 * 3 matrix to a quaternion.
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
template <typename T, precision P> 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); detail::tmat3x3<T, P> const & x);
/// Converts a 4 * 4 matrix to a quaternion. /// Converts a 4 * 4 matrix to a quaternion.
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
template <typename T, precision P> 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); detail::tmat4x4<T, P> const & x);
/// Returns the quaternion rotation angle. /// Returns the quaternion rotation angle.
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
template <typename T, precision P> 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. /// Returns the q rotation axis.
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
template <typename T, precision P> template <typename T, precision P>
detail::tvec3<T, P> axis( GLM_FUNC_DECL detail::tvec3<T, P> axis(
detail::tquat<T, P> const & x); detail::tquat<T, P> const & x);
/// Build a quaternion from an angle and a normalized axis. /// Build a quaternion from an angle and a normalized axis.
@ -330,7 +330,7 @@ namespace detail
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
template <typename T, precision P> template <typename T, precision P>
detail::tquat<T, P> angleAxis( GLM_FUNC_DECL detail::tquat<T, P> angleAxis(
T const & angle, T const & angle,
detail::tvec3<T, P> const & axis); detail::tvec3<T, P> const & axis);
@ -340,7 +340,7 @@ namespace detail
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
template <typename quatType> 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. /// Returns the component-wise comparison of result x <= y.
/// ///
@ -348,7 +348,7 @@ namespace detail
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
template <typename quatType> 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. /// Returns the component-wise comparison of result x > y.
/// ///
@ -356,7 +356,7 @@ namespace detail
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
template <typename quatType> 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. /// Returns the component-wise comparison of result x >= y.
/// ///
@ -364,7 +364,7 @@ namespace detail
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
template <typename quatType> 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. /// Returns the component-wise comparison of result x == y.
/// ///
@ -372,7 +372,7 @@ namespace detail
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
template <typename quatType> 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. /// Returns the component-wise comparison of result x != y.
/// ///
@ -380,7 +380,7 @@ namespace detail
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
template <typename quatType> 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 } //namespace glm

@ -59,7 +59,7 @@ namespace glm
/// @tparam genType Value type. Currently supported: half (not recommanded), float or double scalars and vectors. /// @tparam genType Value type. Currently supported: half (not recommanded), float or double scalars and vectors.
/// @see gtc_random /// @see gtc_random
template <typename genType> template <typename genType>
genType linearRand( GLM_FUNC_DECL genType linearRand(
genType const & Min, genType const & Min,
genType const & Max); genType const & Max);
@ -69,7 +69,7 @@ namespace glm
/// @param Deviation /// @param Deviation
/// @see gtc_random /// @see gtc_random
template <typename genType> template <typename genType>
genType gaussRand( GLM_FUNC_DECL genType gaussRand(
genType const & Mean, genType const & Mean,
genType const & Deviation); genType const & Deviation);
@ -78,7 +78,7 @@ namespace glm
/// @param Radius /// @param Radius
/// @see gtc_random /// @see gtc_random
template <typename T> template <typename T>
detail::tvec2<T, defaultp> circularRand( GLM_FUNC_DECL detail::tvec2<T, defaultp> circularRand(
T const & Radius); T const & Radius);
/// Generate a random 3D vector which coordinates are regulary distributed on a sphere of a given 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 /// @param Radius
/// @see gtc_random /// @see gtc_random
template <typename T> template <typename T>
detail::tvec3<T, defaultp> sphericalRand( GLM_FUNC_DECL detail::tvec3<T, defaultp> sphericalRand(
T const & Radius); T const & Radius);
/// Generate a random 2D vector which coordinates are regulary distributed within the area of a disk of a given 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 /// @param Radius
/// @see gtc_random /// @see gtc_random
template <typename T> template <typename T>
detail::tvec2<T, defaultp> diskRand( GLM_FUNC_DECL detail::tvec2<T, defaultp> diskRand(
T const & Radius); T const & Radius);
/// Generate a random 3D vector which coordinates are regulary distributed within the volume of a ball of a given 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 /// @param Radius
/// @see gtc_random /// @see gtc_random
template <typename T> template <typename T>
detail::tvec3<T, defaultp> ballRand( GLM_FUNC_DECL detail::tvec3<T, defaultp> ballRand(
T const & Radius); T const & Radius);
/// @} /// @}

@ -55,75 +55,75 @@ namespace glm
/// ///
/// @see gtc_reciprocal /// @see gtc_reciprocal
template <typename genType> template <typename genType>
genType sec(genType const & angle); GLM_FUNC_DECL genType sec(genType const & angle);
/// Cosecant function. /// Cosecant function.
/// hypotenuse / opposite or 1 / sin(x) /// hypotenuse / opposite or 1 / sin(x)
/// ///
/// @see gtc_reciprocal /// @see gtc_reciprocal
template <typename genType> template <typename genType>
genType csc(genType const & angle); GLM_FUNC_DECL genType csc(genType const & angle);
/// Cotangent function. /// Cotangent function.
/// adjacent / opposite or 1 / tan(x) /// adjacent / opposite or 1 / tan(x)
/// ///
/// @see gtc_reciprocal /// @see gtc_reciprocal
template <typename genType> template <typename genType>
genType cot(genType const & angle); GLM_FUNC_DECL genType cot(genType const & angle);
/// Inverse secant function. /// Inverse secant function.
/// ///
/// @see gtc_reciprocal /// @see gtc_reciprocal
template <typename genType> template <typename genType>
genType asec(genType const & x); GLM_FUNC_DECL genType asec(genType const & x);
/// Inverse cosecant function. /// Inverse cosecant function.
/// ///
/// @see gtc_reciprocal /// @see gtc_reciprocal
template <typename genType> template <typename genType>
genType acsc(genType const & x); GLM_FUNC_DECL genType acsc(genType const & x);
/// Inverse cotangent function. /// Inverse cotangent function.
/// ///
/// @see gtc_reciprocal /// @see gtc_reciprocal
template <typename genType> template <typename genType>
genType acot(genType const & x); GLM_FUNC_DECL genType acot(genType const & x);
/// Secant hyperbolic function. /// Secant hyperbolic function.
/// ///
/// @see gtc_reciprocal /// @see gtc_reciprocal
template <typename genType> template <typename genType>
genType sech(genType const & angle); GLM_FUNC_DECL genType sech(genType const & angle);
/// Cosecant hyperbolic function. /// Cosecant hyperbolic function.
/// ///
/// @see gtc_reciprocal /// @see gtc_reciprocal
template <typename genType> template <typename genType>
genType csch(genType const & angle); GLM_FUNC_DECL genType csch(genType const & angle);
/// Cotangent hyperbolic function. /// Cotangent hyperbolic function.
/// ///
/// @see gtc_reciprocal /// @see gtc_reciprocal
template <typename genType> template <typename genType>
genType coth(genType const & angle); GLM_FUNC_DECL genType coth(genType const & angle);
/// Inverse secant hyperbolic function. /// Inverse secant hyperbolic function.
/// ///
/// @see gtc_reciprocal /// @see gtc_reciprocal
template <typename genType> template <typename genType>
genType asech(genType const & x); GLM_FUNC_DECL genType asech(genType const & x);
/// Inverse cosecant hyperbolic function. /// Inverse cosecant hyperbolic function.
/// ///
/// @see gtc_reciprocal /// @see gtc_reciprocal
template <typename genType> template <typename genType>
genType acsch(genType const & x); GLM_FUNC_DECL genType acsch(genType const & x);
/// Inverse cotangent hyperbolic function. /// Inverse cotangent hyperbolic function.
/// ///
/// @see gtc_reciprocal /// @see gtc_reciprocal
template <typename genType> template <typename genType>
genType acoth(genType const & x); GLM_FUNC_DECL genType acoth(genType const & x);
/// @} /// @}
}//namespace glm }//namespace glm

@ -76,88 +76,88 @@ namespace glm
/// Return the constant address to the data of the input parameter. /// Return the constant address to the data of the input parameter.
/// @see gtc_type_ptr /// @see gtc_type_ptr
template<typename genType> 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. /// Build a vector from a pointer.
/// @see gtc_type_ptr /// @see gtc_type_ptr
template<typename T> 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. /// Build a vector from a pointer.
/// @see gtc_type_ptr /// @see gtc_type_ptr
template<typename T> 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. /// Build a vector from a pointer.
/// @see gtc_type_ptr /// @see gtc_type_ptr
template<typename T> 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. /// Build a matrix from a pointer.
/// @see gtc_type_ptr /// @see gtc_type_ptr
template<typename T> 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. /// Build a matrix from a pointer.
/// @see gtc_type_ptr /// @see gtc_type_ptr
template<typename T> 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. /// Build a matrix from a pointer.
/// @see gtc_type_ptr /// @see gtc_type_ptr
template<typename T> 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. /// Build a matrix from a pointer.
/// @see gtc_type_ptr /// @see gtc_type_ptr
template<typename T> 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. /// Build a matrix from a pointer.
/// @see gtc_type_ptr /// @see gtc_type_ptr
template<typename T> 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. /// Build a matrix from a pointer.
/// @see gtc_type_ptr /// @see gtc_type_ptr
template<typename T> 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. /// Build a matrix from a pointer.
/// @see gtc_type_ptr /// @see gtc_type_ptr
template<typename T> template<typename T>
detail::tmat4x2<T, defaultp> make_mat4x2( GLM_FUNC_DECL detail::tmat4x2<T, defaultp> make_mat4x2(
T const * const ptr); T const * const ptr);
/// Build a matrix from a pointer. /// Build a matrix from a pointer.
/// @see gtc_type_ptr /// @see gtc_type_ptr
template<typename T> 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. /// Build a matrix from a pointer.
/// @see gtc_type_ptr /// @see gtc_type_ptr
template<typename T> 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. /// Build a matrix from a pointer.
/// @see gtc_type_ptr /// @see gtc_type_ptr
template<typename T> 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. /// Build a matrix from a pointer.
/// @see gtc_type_ptr /// @see gtc_type_ptr
template<typename T> 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. /// Build a matrix from a pointer.
/// @see gtc_type_ptr /// @see gtc_type_ptr
template<typename T> 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. /// Build a quaternion from a pointer.
/// @see gtc_type_ptr /// @see gtc_type_ptr
template<typename T> 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 }//namespace glm

@ -54,32 +54,32 @@ namespace glm
/// Return the next ULP value(s) after the input value(s). /// Return the next ULP value(s) after the input value(s).
/// @see gtc_ulp /// @see gtc_ulp
template <typename genType> 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). /// Return the previous ULP value(s) before the input value(s).
/// @see gtc_ulp /// @see gtc_ulp
template <typename genType> 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). /// Return the value(s) ULP distance after the input value(s).
/// @see gtc_ulp /// @see gtc_ulp
template <typename genType> 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). /// Return the value(s) ULP distance before the input value(s).
/// @see gtc_ulp /// @see gtc_ulp
template <typename genType> 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. /// Return the distance in the number of ULP between 2 scalars.
/// @see gtc_ulp /// @see gtc_ulp
template <typename T> 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. /// Return the distance in the number of ULP between 2 vectors.
/// @see gtc_ulp /// @see gtc_ulp
template<typename T, template<typename> class vecType> 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 }// namespace glm

Loading…
Cancel
Save