mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-11 13:50:13 +00:00
GLM (tool for opengl) update to 0.9.4.6
This commit is contained in:
parent
9b1eb35472
commit
40b30d43d3
include/gal/opengl/glm
core
_detail.hpp_fixes.hpp_swizzle.hpp_swizzle_func.hpp_vectorize.hppdummy.cppfunc_common.hppfunc_common.inlfunc_exponential.hppfunc_exponential.inlfunc_geometric.hppfunc_geometric.inlfunc_integer.hppfunc_integer.inlfunc_matrix.hppfunc_matrix.inlfunc_noise.hppfunc_noise.inlfunc_packing.hppfunc_packing.inlfunc_trigonometric.hppfunc_trigonometric.inlfunc_vector_relational.hppfunc_vector_relational.inlhint.hppintrinsic_common.hppintrinsic_common.inlintrinsic_exponential.hppintrinsic_exponential.inlintrinsic_geometric.hppintrinsic_geometric.inlintrinsic_matrix.hppintrinsic_matrix.inlintrinsic_trigonometric.hppintrinsic_trigonometric.inlintrinsic_vector_relational.hppintrinsic_vector_relational.inlsetup.hpptype.hpptype_float.hpptype_gentype.hpptype_gentype.inltype_half.hpptype_half.inltype_int.hpptype_mat.hpptype_mat.inltype_mat2x2.hpptype_mat2x2.inltype_mat2x3.hpptype_mat2x3.inltype_mat2x4.hpptype_mat2x4.inltype_mat3x2.hpptype_mat3x2.inltype_mat3x3.hpptype_mat3x3.inltype_mat3x4.hpptype_mat3x4.inltype_mat4x2.hpptype_mat4x2.inltype_mat4x3.hpptype_mat4x3.inltype_mat4x4.hpptype_mat4x4.inltype_size.hpptype_vec.hpptype_vec.inltype_vec1.hpptype_vec1.inltype_vec2.hpptype_vec2.inltype_vec3.hpptype_vec3.inltype_vec4.hpptype_vec4.inl
ext.hppglm.hppgtc
constants.hppconstants.inlepsilon.hppepsilon.inlhalf_float.hpphalf_float.inlmatrix_access.hppmatrix_access.inlmatrix_integer.hppmatrix_inverse.hppmatrix_inverse.inlmatrix_transform.hppmatrix_transform.inlnoise.hppnoise.inlquaternion.hppquaternion.inlrandom.hpprandom.inlreciprocal.hppreciprocal.inlswizzle.hppswizzle.inltype_precision.hpptype_precision.inltype_ptr.hpptype_ptr.inlulp.hppulp.inl
gtx
associated_min_max.hppassociated_min_max.inlbit.hppbit.inlclosest_point.hppclosest_point.inlcolor_cast.hppcolor_cast.inlcolor_space.hppcolor_space.inlcolor_space_YCoCg.hppcolor_space_YCoCg.inlcompatibility.hppcompatibility.inlcomponent_wise.hppcomponent_wise.inlconstants.hppepsilon.hppeuler_angles.hppeuler_angles.inlextend.hppextend.inlextented_min_max.hppextented_min_max.inlfast_exponential.hppfast_exponential.inlfast_square_root.hppfast_square_root.inlfast_trigonometry.hppfast_trigonometry.inlgradient_paint.hppgradient_paint.inlhanded_coordinate_space.hpphanded_coordinate_space.inlinertia.hppinertia.inlint_10_10_10_2.hppint_10_10_10_2.inlinteger.hppinteger.inlintersect.hppintersect.inllog_base.hpplog_base.inlmatrix_cross_product.hppmatrix_cross_product.inlmatrix_interpolation.hppmatrix_interpolation.inlmatrix_major_storage.hppmatrix_major_storage.inlmatrix_operation.hppmatrix_operation.inlmatrix_query.hppmatrix_query.inlmixed_product.hppmixed_product.inlmultiple.hppmultiple.inlnoise.hppnorm.hppnorm.inlnormal.hppnormal.inlnormalize_dot.hppnormalize_dot.inlnumber_precision.hppnumber_precision.inlocl_type.hppocl_type.inloptimum_pow.hppoptimum_pow.inlorthonormalize.hpporthonormalize.inlperpendicular.hppperpendicular.inlpolar_coordinates.hpppolar_coordinates.inlprojection.hppprojection.inlquaternion.hppquaternion.inlrandom.hppraw_data.hppraw_data.inlreciprocal.hpprotate_vector.hpprotate_vector.inlsimd_mat4.hppsimd_mat4.inlsimd_vec4.hppsimd_vec4.inlspline.hppspline.inlstd_based_type.hppstd_based_type.inlstring_cast.hpptransform.hpptransform.inltransform2.hpptransform2.inlulp.hppunsigned_int.hppunsigned_int.inlvec1.hppvec1.inlvector_access.hppvector_access.inlvector_angle.hppvector_angle.inlvector_query.hppvector_query.inlverbose_operator.hppverbose_operator.inlwrap.hppwrap.inl
virtrev
@ -1,7 +1,7 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
/// OpenGL Mathematics (glm.g-truc.net)
|
||||
///
|
||||
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
|
||||
/// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
|
||||
/// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
/// of this software and associated documentation files (the "Software"), to deal
|
||||
/// in the Software without restriction, including without limitation the rights
|
||||
@ -445,7 +445,14 @@ namespace detail
|
||||
# define GLM_RESTRICT __declspec(restrict)
|
||||
# define GLM_RESTRICT_VAR __restrict
|
||||
# define GLM_CONSTEXPR
|
||||
#elif((GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_LLVM_GCC)) && (GLM_COMPILER >= GLM_COMPILER_GCC31))
|
||||
#elif(GLM_COMPILER & GLM_COMPILER_INTEL)
|
||||
# define GLM_DEPRECATED
|
||||
# define GLM_ALIGN(x) __declspec(align(x))
|
||||
# define GLM_ALIGNED_STRUCT(x) __declspec(align(x)) struct
|
||||
# define GLM_RESTRICT
|
||||
# define GLM_RESTRICT_VAR __restrict
|
||||
# define GLM_CONSTEXPR
|
||||
#elif(((GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_LLVM_GCC)) && (GLM_COMPILER >= GLM_COMPILER_GCC31)) || (GLM_COMPILER & GLM_COMPILER_CLANG))
|
||||
# define GLM_DEPRECATED __attribute__((__deprecated__))
|
||||
# define GLM_ALIGN(x) __attribute__((aligned(x)))
|
||||
# define GLM_ALIGNED_STRUCT(x) struct __attribute__((aligned(x)))
|
||||
|
@ -1,7 +1,7 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
/// OpenGL Mathematics (glm.g-truc.net)
|
||||
///
|
||||
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
|
||||
/// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
|
||||
/// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
/// of this software and associated documentation files (the "Software"), to deal
|
||||
/// in the Software without restriction, including without limitation the rights
|
||||
|
@ -1,7 +1,7 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
/// OpenGL Mathematics (glm.g-truc.net)
|
||||
///
|
||||
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
|
||||
/// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
|
||||
/// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
/// of this software and associated documentation files (the "Software"), to deal
|
||||
/// in the Software without restriction, including without limitation the rights
|
||||
@ -60,8 +60,8 @@ namespace detail
|
||||
typedef T value_type;
|
||||
|
||||
protected:
|
||||
value_type& elem (size_t i) { return (reinterpret_cast<value_type*>(_buffer))[i]; }
|
||||
const value_type& elem (size_t i) const { return (reinterpret_cast<const value_type*>(_buffer))[i]; }
|
||||
GLM_FUNC_QUALIFIER value_type& elem (size_t i) { return (reinterpret_cast<value_type*>(_buffer))[i]; }
|
||||
GLM_FUNC_QUALIFIER const value_type& elem (size_t i) const { return (reinterpret_cast<const value_type*>(_buffer))[i]; }
|
||||
|
||||
// Use an opaque buffer to *ensure* the compiler doesn't call a constructor.
|
||||
// The size 1 buffer is assumed to aligned to the actual members so that the
|
||||
@ -77,19 +77,19 @@ namespace detail
|
||||
template <typename T, typename V, int E0, int E1>
|
||||
struct _swizzle_base1<T,V,E0,E1,-1,-2,2> : public _swizzle_base0<T,2>
|
||||
{
|
||||
V operator ()() const { return V(this->elem(E0), this->elem(E1)); }
|
||||
GLM_FUNC_QUALIFIER V operator ()() const { return V(this->elem(E0), this->elem(E1)); }
|
||||
};
|
||||
|
||||
template <typename T, typename V, int E0, int E1, int E2>
|
||||
struct _swizzle_base1<T,V,E0,E1,E2,-1,3> : public _swizzle_base0<T,3>
|
||||
{
|
||||
V operator ()() const { return V(this->elem(E0), this->elem(E1), this->elem(E2)); }
|
||||
GLM_FUNC_QUALIFIER V operator ()() const { return V(this->elem(E0), this->elem(E1), this->elem(E2)); }
|
||||
};
|
||||
|
||||
template <typename T, typename V, int E0, int E1, int E2, int E3>
|
||||
struct _swizzle_base1<T,V,E0,E1,E2,E3,4> : public _swizzle_base0<T,4>
|
||||
{
|
||||
V operator ()() const { return V(this->elem(E0), this->elem(E1), this->elem(E2), this->elem(E3)); }
|
||||
GLM_FUNC_QUALIFIER V operator ()() const { return V(this->elem(E0), this->elem(E1), this->elem(E2), this->elem(E3)); }
|
||||
};
|
||||
|
||||
// Internal class for implementing swizzle operators
|
||||
@ -110,67 +110,73 @@ namespace detail
|
||||
typedef VecType vec_type;
|
||||
typedef ValueType value_type;
|
||||
|
||||
_swizzle_base2& operator= (const ValueType& t)
|
||||
GLM_FUNC_QUALIFIER _swizzle_base2& operator= (const ValueType& t)
|
||||
{
|
||||
for (int i = 0; i < N; ++i)
|
||||
(*this)[i] = t;
|
||||
return *this;
|
||||
}
|
||||
|
||||
_swizzle_base2& operator= (const VecType& that)
|
||||
GLM_FUNC_QUALIFIER _swizzle_base2& operator= (const VecType& that)
|
||||
{
|
||||
struct op {
|
||||
void operator() (value_type& e, value_type& t) { e = t; }
|
||||
GLM_FUNC_QUALIFIER void operator() (value_type& e, value_type& t) { e = t; }
|
||||
};
|
||||
_apply_op(that, op());
|
||||
return *this;
|
||||
}
|
||||
|
||||
void operator -= (const VecType& that)
|
||||
GLM_FUNC_QUALIFIER void operator -= (const VecType& that)
|
||||
{
|
||||
struct op {
|
||||
void operator() (value_type& e, value_type& t) { e -= t; }
|
||||
GLM_FUNC_QUALIFIER void operator() (value_type& e, value_type& t) { e -= t; }
|
||||
};
|
||||
_apply_op(that, op());
|
||||
}
|
||||
|
||||
void operator += (const VecType& that)
|
||||
GLM_FUNC_QUALIFIER void operator += (const VecType& that)
|
||||
{
|
||||
struct op {
|
||||
void operator() (value_type& e, value_type& t) { e += t; }
|
||||
GLM_FUNC_QUALIFIER void operator() (value_type& e, value_type& t) { e += t; }
|
||||
};
|
||||
_apply_op(that, op());
|
||||
}
|
||||
|
||||
void operator *= (const VecType& that)
|
||||
GLM_FUNC_QUALIFIER void operator *= (const VecType& that)
|
||||
{
|
||||
struct op {
|
||||
void operator() (value_type& e, value_type& t) { e *= t; }
|
||||
GLM_FUNC_QUALIFIER void operator() (value_type& e, value_type& t) { e *= t; }
|
||||
};
|
||||
_apply_op(that, op());
|
||||
}
|
||||
|
||||
void operator /= (const VecType& that)
|
||||
GLM_FUNC_QUALIFIER void operator /= (const VecType& that)
|
||||
{
|
||||
struct op {
|
||||
void operator() (value_type& e, value_type& t) { e /= t; }
|
||||
GLM_FUNC_QUALIFIER void operator() (value_type& e, value_type& t) { e /= t; }
|
||||
};
|
||||
_apply_op(that, op());
|
||||
}
|
||||
|
||||
value_type& operator[] (size_t i)
|
||||
GLM_FUNC_QUALIFIER value_type& operator[] (size_t i)
|
||||
{
|
||||
static const int offset_dst[4] = { E0, E1, E2, E3 };
|
||||
#ifndef __CUDA_ARCH__
|
||||
static
|
||||
#endif
|
||||
const int offset_dst[4] = { E0, E1, E2, E3 };
|
||||
return this->elem(offset_dst[i]);
|
||||
}
|
||||
value_type operator[] (size_t i) const
|
||||
GLM_FUNC_QUALIFIER value_type operator[] (size_t i) const
|
||||
{
|
||||
static const int offset_dst[4] = { E0, E1, E2, E3 };
|
||||
#ifndef __CUDA_ARCH__
|
||||
static
|
||||
#endif
|
||||
const int offset_dst[4] = { E0, E1, E2, E3 };
|
||||
return this->elem(offset_dst[i]);
|
||||
}
|
||||
protected:
|
||||
template <typename T>
|
||||
void _apply_op(const VecType& that, T op)
|
||||
GLM_FUNC_QUALIFIER void _apply_op(const VecType& that, T op)
|
||||
{
|
||||
// Make a copy of the data in this == &that.
|
||||
// The copier should optimize out the copy in cases where the function is
|
||||
@ -191,11 +197,14 @@ namespace detail
|
||||
typedef ValueType value_type;
|
||||
|
||||
struct Stub {};
|
||||
_swizzle_base2& operator= (Stub const &) {}
|
||||
GLM_FUNC_QUALIFIER _swizzle_base2& operator= (Stub const &) { return *this; }
|
||||
|
||||
value_type operator[] (size_t i) const
|
||||
GLM_FUNC_QUALIFIER value_type operator[] (size_t i) const
|
||||
{
|
||||
static const int offset_dst[4] = { E0, E1, E2, E3 };
|
||||
#ifndef __CUDA_ARCH__
|
||||
static
|
||||
#endif
|
||||
const int offset_dst[4] = { E0, E1, E2, E3 };
|
||||
return this->elem(offset_dst[i]);
|
||||
}
|
||||
};
|
||||
@ -207,7 +216,7 @@ namespace detail
|
||||
|
||||
using base_type::operator=;
|
||||
|
||||
operator VecType () const { return (*this)(); }
|
||||
GLM_FUNC_QUALIFIER operator VecType () const { return (*this)(); }
|
||||
};
|
||||
|
||||
//
|
||||
@ -223,17 +232,17 @@ namespace detail
|
||||
//
|
||||
#define _GLM_SWIZZLE_VECTOR_BINARY_OPERATOR_IMPLEMENTATION(OPERAND) \
|
||||
_GLM_SWIZZLE_TEMPLATE2 \
|
||||
V operator OPERAND ( const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE2& b) \
|
||||
GLM_FUNC_QUALIFIER V operator OPERAND ( const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE2& b) \
|
||||
{ \
|
||||
return a() OPERAND b(); \
|
||||
} \
|
||||
_GLM_SWIZZLE_TEMPLATE1 \
|
||||
V operator OPERAND ( const _GLM_SWIZZLE_TYPE1& a, const V& b) \
|
||||
GLM_FUNC_QUALIFIER V operator OPERAND ( const _GLM_SWIZZLE_TYPE1& a, const V& b) \
|
||||
{ \
|
||||
return a() OPERAND b; \
|
||||
} \
|
||||
_GLM_SWIZZLE_TEMPLATE1 \
|
||||
V operator OPERAND ( const V& a, const _GLM_SWIZZLE_TYPE1& b) \
|
||||
GLM_FUNC_QUALIFIER V operator OPERAND ( const V& a, const _GLM_SWIZZLE_TYPE1& b) \
|
||||
{ \
|
||||
return a OPERAND b(); \
|
||||
}
|
||||
@ -243,12 +252,12 @@ namespace detail
|
||||
//
|
||||
#define _GLM_SWIZZLE_SCALAR_BINARY_OPERATOR_IMPLEMENTATION(OPERAND) \
|
||||
_GLM_SWIZZLE_TEMPLATE1 \
|
||||
V operator OPERAND ( const _GLM_SWIZZLE_TYPE1& a, const T& b) \
|
||||
GLM_FUNC_QUALIFIER V operator OPERAND ( const _GLM_SWIZZLE_TYPE1& a, const T& b) \
|
||||
{ \
|
||||
return a() OPERAND b; \
|
||||
} \
|
||||
_GLM_SWIZZLE_TEMPLATE1 \
|
||||
V operator OPERAND ( const T& a, const _GLM_SWIZZLE_TYPE1& b) \
|
||||
GLM_FUNC_QUALIFIER V operator OPERAND ( const T& a, const _GLM_SWIZZLE_TYPE1& b) \
|
||||
{ \
|
||||
return a OPERAND b(); \
|
||||
}
|
||||
@ -258,7 +267,7 @@ namespace detail
|
||||
//
|
||||
#define _GLM_SWIZZLE_FUNCTION_1_ARGS(RETURN_TYPE,FUNCTION) \
|
||||
_GLM_SWIZZLE_TEMPLATE1 \
|
||||
typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a) \
|
||||
GLM_FUNC_QUALIFIER typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a) \
|
||||
{ \
|
||||
return FUNCTION(a()); \
|
||||
}
|
||||
@ -268,22 +277,22 @@ namespace detail
|
||||
//
|
||||
#define _GLM_SWIZZLE_FUNCTION_2_ARGS(RETURN_TYPE,FUNCTION) \
|
||||
_GLM_SWIZZLE_TEMPLATE2 \
|
||||
typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE2& b) \
|
||||
GLM_FUNC_QUALIFIER typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE2& b) \
|
||||
{ \
|
||||
return FUNCTION(a(), b()); \
|
||||
} \
|
||||
_GLM_SWIZZLE_TEMPLATE1 \
|
||||
typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE1& b) \
|
||||
GLM_FUNC_QUALIFIER typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE1& b) \
|
||||
{ \
|
||||
return FUNCTION(a(), b()); \
|
||||
} \
|
||||
_GLM_SWIZZLE_TEMPLATE1 \
|
||||
typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const typename V& b) \
|
||||
GLM_FUNC_QUALIFIER typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const typename V& b) \
|
||||
{ \
|
||||
return FUNCTION(a(), b); \
|
||||
} \
|
||||
_GLM_SWIZZLE_TEMPLATE1 \
|
||||
typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const V& a, const _GLM_SWIZZLE_TYPE1& b) \
|
||||
GLM_FUNC_QUALIFIER typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const V& a, const _GLM_SWIZZLE_TYPE1& b) \
|
||||
{ \
|
||||
return FUNCTION(a, b()); \
|
||||
}
|
||||
@ -293,22 +302,22 @@ namespace detail
|
||||
//
|
||||
#define _GLM_SWIZZLE_FUNCTION_2_ARGS_SCALAR(RETURN_TYPE,FUNCTION) \
|
||||
_GLM_SWIZZLE_TEMPLATE2 \
|
||||
typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE2& b, const T& c) \
|
||||
GLM_FUNC_QUALIFIER typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE2& b, const T& c) \
|
||||
{ \
|
||||
return FUNCTION(a(), b(), c); \
|
||||
} \
|
||||
_GLM_SWIZZLE_TEMPLATE1 \
|
||||
typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE1& b, const T& c) \
|
||||
GLM_FUNC_QUALIFIER typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE1& b, const T& c) \
|
||||
{ \
|
||||
return FUNCTION(a(), b(), c); \
|
||||
} \
|
||||
_GLM_SWIZZLE_TEMPLATE1 \
|
||||
typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const typename S0::vec_type& b, const T& c)\
|
||||
GLM_FUNC_QUALIFIER typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const typename S0::vec_type& b, const T& c)\
|
||||
{ \
|
||||
return FUNCTION(a(), b, c); \
|
||||
} \
|
||||
_GLM_SWIZZLE_TEMPLATE1 \
|
||||
typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const typename V& a, const _GLM_SWIZZLE_TYPE1& b, const T& c) \
|
||||
GLM_FUNC_QUALIFIER typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const typename V& a, const _GLM_SWIZZLE_TYPE1& b, const T& c) \
|
||||
{ \
|
||||
return FUNCTION(a, b(), c); \
|
||||
}
|
||||
@ -640,6 +649,22 @@ namespace glm
|
||||
struct { glm::detail::swizzle<4,T,P,0,2,3,1> E0 ## E2 ## E3 ## E1; }; \
|
||||
struct { glm::detail::swizzle<4,T,P,0,2,3,2> E0 ## E2 ## E3 ## E2; }; \
|
||||
struct { glm::detail::swizzle<4,T,P,0,2,3,3> E0 ## E2 ## E3 ## E3; }; \
|
||||
struct { glm::detail::swizzle<4,T,P,0,3,0,0> E0 ## E3 ## E0 ## E0; }; \
|
||||
struct { glm::detail::swizzle<4,T,P,0,3,0,1> E0 ## E3 ## E0 ## E1; }; \
|
||||
struct { glm::detail::swizzle<4,T,P,0,3,0,2> E0 ## E3 ## E0 ## E2; }; \
|
||||
struct { glm::detail::swizzle<4,T,P,0,3,0,3> E0 ## E3 ## E0 ## E3; }; \
|
||||
struct { glm::detail::swizzle<4,T,P,0,3,1,0> E0 ## E3 ## E1 ## E0; }; \
|
||||
struct { glm::detail::swizzle<4,T,P,0,3,1,1> E0 ## E3 ## E1 ## E1; }; \
|
||||
struct { glm::detail::swizzle<4,T,P,0,3,1,2> E0 ## E3 ## E1 ## E2; }; \
|
||||
struct { glm::detail::swizzle<4,T,P,0,3,1,3> E0 ## E3 ## E1 ## E3; }; \
|
||||
struct { glm::detail::swizzle<4,T,P,0,3,2,0> E0 ## E3 ## E2 ## E0; }; \
|
||||
struct { glm::detail::swizzle<4,T,P,0,3,2,1> E0 ## E3 ## E2 ## E1; }; \
|
||||
struct { glm::detail::swizzle<4,T,P,0,3,2,2> E0 ## E3 ## E2 ## E2; }; \
|
||||
struct { glm::detail::swizzle<4,T,P,0,3,2,3> E0 ## E3 ## E2 ## E3; }; \
|
||||
struct { glm::detail::swizzle<4,T,P,0,3,3,0> E0 ## E3 ## E3 ## E0; }; \
|
||||
struct { glm::detail::swizzle<4,T,P,0,3,3,1> E0 ## E3 ## E3 ## E1; }; \
|
||||
struct { glm::detail::swizzle<4,T,P,0,3,3,2> E0 ## E3 ## E3 ## E2; }; \
|
||||
struct { glm::detail::swizzle<4,T,P,0,3,3,3> E0 ## E3 ## E3 ## E3; }; \
|
||||
struct { glm::detail::swizzle<4,T,P,1,0,0,0> E1 ## E0 ## E0 ## E0; }; \
|
||||
struct { glm::detail::swizzle<4,T,P,1,0,0,1> E1 ## E0 ## E0 ## E1; }; \
|
||||
struct { glm::detail::swizzle<4,T,P,1,0,0,2> E1 ## E0 ## E0 ## E2; }; \
|
||||
|
@ -1,7 +1,7 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
/// OpenGL Mathematics (glm.g-truc.net)
|
||||
///
|
||||
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
|
||||
/// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
|
||||
/// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
/// of this software and associated documentation files (the "Software"), to deal
|
||||
/// in the Software without restriction, including without limitation the rights
|
||||
|
@ -1,7 +1,7 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
/// OpenGL Mathematics (glm.g-truc.net)
|
||||
///
|
||||
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
|
||||
/// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
|
||||
/// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
/// of this software and associated documentation files (the "Software"), to deal
|
||||
/// in the Software without restriction, including without limitation the rights
|
||||
|
@ -1,7 +1,7 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
/// OpenGL Mathematics (glm.g-truc.net)
|
||||
///
|
||||
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
|
||||
/// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
|
||||
/// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
/// of this software and associated documentation files (the "Software"), to deal
|
||||
/// in the Software without restriction, including without limitation the rights
|
||||
|
@ -1,7 +1,7 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
/// OpenGL Mathematics (glm.g-truc.net)
|
||||
///
|
||||
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
|
||||
/// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
|
||||
/// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
/// of this software and associated documentation files (the "Software"), to deal
|
||||
/// in the Software without restriction, including without limitation the rights
|
||||
@ -50,7 +50,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/abs.xml">GLSL abs man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
|
||||
template <typename genType>
|
||||
genType abs(genType const & x);
|
||||
GLM_FUNC_DECL genType abs(genType const & x);
|
||||
|
||||
/// Returns 1.0 if x > 0, 0.0 if x == 0, or -1.0 if x < 0.
|
||||
///
|
||||
@ -59,7 +59,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/sign.xml">GLSL sign man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
|
||||
template <typename genType>
|
||||
genType sign(genType const & x);
|
||||
GLM_FUNC_DECL genType sign(genType const & x);
|
||||
|
||||
/// Returns a value equal to the nearest integer that is less then or equal to x.
|
||||
///
|
||||
@ -68,7 +68,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/floor.xml">GLSL floor man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
|
||||
template <typename genType>
|
||||
genType floor(genType const & x);
|
||||
GLM_FUNC_DECL genType floor(genType const & x);
|
||||
|
||||
/// Returns a value equal to the nearest integer to x
|
||||
/// whose absolute value is not larger than the absolute value of x.
|
||||
@ -78,7 +78,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/trunc.xml">GLSL trunc man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
|
||||
template <typename genType>
|
||||
genType trunc(genType const & x);
|
||||
GLM_FUNC_DECL genType trunc(genType const & x);
|
||||
|
||||
/// Returns a value equal to the nearest integer to x.
|
||||
/// The fraction 0.5 will round in a direction chosen by the
|
||||
@ -91,7 +91,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/round.xml">GLSL round man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
|
||||
template <typename genType>
|
||||
genType round(genType const & x);
|
||||
GLM_FUNC_DECL genType round(genType const & x);
|
||||
|
||||
/// Returns a value equal to the nearest integer to x.
|
||||
/// A fractional part of 0.5 will round toward the nearest even
|
||||
@ -103,7 +103,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
|
||||
/// @see <a href="http://developer.amd.com/documentation/articles/pages/New-Round-to-Even-Technique.aspx">New round to even technique</a>
|
||||
template <typename genType>
|
||||
genType roundEven(genType const & x);
|
||||
GLM_FUNC_DECL genType roundEven(genType const & x);
|
||||
|
||||
/// Returns a value equal to the nearest integer
|
||||
/// that is greater than or equal to x.
|
||||
@ -113,7 +113,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/ceil.xml">GLSL ceil man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
|
||||
template <typename genType>
|
||||
genType ceil(genType const & x);
|
||||
GLM_FUNC_DECL genType ceil(genType const & x);
|
||||
|
||||
/// Return x - floor(x).
|
||||
///
|
||||
@ -122,7 +122,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/fract.xml">GLSL fract man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
|
||||
template <typename genType>
|
||||
genType fract(genType const & x);
|
||||
GLM_FUNC_DECL genType fract(genType const & x);
|
||||
|
||||
/// Modulus. Returns x - y * floor(x / y)
|
||||
/// for each component in x using the floating point value y.
|
||||
@ -132,7 +132,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/mod.xml">GLSL mod man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
|
||||
template <typename genType>
|
||||
genType mod(
|
||||
GLM_FUNC_DECL genType mod(
|
||||
genType const & x,
|
||||
genType const & y);
|
||||
|
||||
@ -144,7 +144,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/mod.xml">GLSL mod man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
|
||||
template <typename genType>
|
||||
genType mod(
|
||||
GLM_FUNC_DECL genType mod(
|
||||
genType const & x,
|
||||
typename genType::value_type const & y);
|
||||
|
||||
@ -158,7 +158,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/modf.xml">GLSL modf man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
|
||||
template <typename genType>
|
||||
genType modf(
|
||||
GLM_FUNC_DECL genType modf(
|
||||
genType const & x,
|
||||
genType & i);
|
||||
|
||||
@ -169,12 +169,12 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/min.xml">GLSL min man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
|
||||
template <typename genType>
|
||||
genType min(
|
||||
GLM_FUNC_DECL genType min(
|
||||
genType const & x,
|
||||
genType const & y);
|
||||
|
||||
template <typename genType>
|
||||
genType min(
|
||||
GLM_FUNC_DECL genType min(
|
||||
genType const & x,
|
||||
typename genType::value_type const & y);
|
||||
|
||||
@ -185,12 +185,12 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/max.xml">GLSL max man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
|
||||
template <typename genType>
|
||||
genType max(
|
||||
GLM_FUNC_DECL genType max(
|
||||
genType const & x,
|
||||
genType const & y);
|
||||
|
||||
template <typename genType>
|
||||
genType max(
|
||||
GLM_FUNC_DECL genType max(
|
||||
genType const & x,
|
||||
typename genType::value_type const & y);
|
||||
|
||||
@ -202,33 +202,33 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/clamp.xml">GLSL clamp man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
|
||||
template <typename genType>
|
||||
genType clamp(
|
||||
GLM_FUNC_DECL genType clamp(
|
||||
genType const & x,
|
||||
genType const & minVal,
|
||||
genType const & maxVal);
|
||||
|
||||
template <typename genType>
|
||||
genType clamp(
|
||||
GLM_FUNC_DECL genType clamp(
|
||||
genType const & x,
|
||||
typename genType::value_type const & minVal,
|
||||
typename genType::value_type const & maxVal);
|
||||
|
||||
//! @return If genTypeU is a floating scalar or vector:
|
||||
//! Returns x * (1.0 - a) + y * a, i.e., the linear blend of
|
||||
//! x and y using the floating-point value a.
|
||||
//! The value for a is not restricted to the range [0, 1].
|
||||
//!
|
||||
//! @return If genTypeU is a boolean scalar or vector:
|
||||
//! Selects which vector each returned component comes
|
||||
//! from. For a component of a that is false, the
|
||||
//! corresponding component of x is returned. For a
|
||||
//! component of a that is true, the corresponding
|
||||
//! component of y is returned. Components of x and y that
|
||||
//! are not selected are allowed to be invalid floating point
|
||||
//! values and will have no effect on the results. Thus, this
|
||||
//! provides different functionality than
|
||||
//! genType mix(genType x, genType y, genType(a))
|
||||
//! where a is a Boolean vector.
|
||||
/// If genTypeU is a floating scalar or vector:
|
||||
/// Returns x * (1.0 - a) + y * a, i.e., the linear blend of
|
||||
/// x and y using the floating-point value a.
|
||||
/// The value for a is not restricted to the range [0, 1].
|
||||
///
|
||||
/// If genTypeU is a boolean scalar or vector:
|
||||
/// Selects which vector each returned component comes
|
||||
/// from. For a component of <a> that is false, the
|
||||
/// corresponding component of x is returned. For a
|
||||
/// component of a that is true, the corresponding
|
||||
/// component of y is returned. Components of x and y that
|
||||
/// are not selected are allowed to be invalid floating point
|
||||
/// values and will have no effect on the results. Thus, this
|
||||
/// provides different functionality than
|
||||
/// genType mix(genType x, genType y, genType(a))
|
||||
/// where a is a Boolean vector.
|
||||
///
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/mix.xml">GLSL mix man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
|
||||
@ -256,19 +256,19 @@ namespace glm
|
||||
/// glm::vec4 u = glm::mix(g, h, r); // Interpolations can be perform per component with a vector for the last parameter.
|
||||
/// @endcode
|
||||
template <typename genTypeT, typename genTypeU>
|
||||
genTypeT mix(genTypeT const & x, genTypeT const & y, genTypeU const & a);
|
||||
GLM_FUNC_DECL genTypeT mix(genTypeT const & x, genTypeT const & y, genTypeU const & a);
|
||||
|
||||
//! Returns 0.0 if x < edge, otherwise it returns 1.0.
|
||||
//!
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/step.xml">GLSL step man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
|
||||
template <typename genType>
|
||||
genType step(
|
||||
GLM_FUNC_DECL genType step(
|
||||
genType const & edge,
|
||||
genType const & x);
|
||||
|
||||
template <typename genType>
|
||||
genType step(
|
||||
GLM_FUNC_DECL genType step(
|
||||
typename genType::value_type const & edge,
|
||||
genType const & x);
|
||||
|
||||
@ -278,8 +278,8 @@ namespace glm
|
||||
/// you would want a threshold function with a smooth
|
||||
/// transition. This is equivalent to:
|
||||
/// genType t;
|
||||
/// t = clamp ((x – edge0) / (edge1 – edge0), 0, 1);
|
||||
/// return t * t * (3 – 2 * t);
|
||||
/// t = clamp ((x - edge0) / (edge1 - edge0), 0, 1);
|
||||
/// return t * t * (3 - 2 * t);
|
||||
/// Results are undefined if edge0 >= edge1.
|
||||
///
|
||||
/// @tparam genType Floating-point scalar or vector types.
|
||||
@ -287,13 +287,13 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/smoothstep.xml">GLSL smoothstep man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
|
||||
template <typename genType>
|
||||
genType smoothstep(
|
||||
GLM_FUNC_DECL genType smoothstep(
|
||||
genType const & edge0,
|
||||
genType const & edge1,
|
||||
genType const & x);
|
||||
|
||||
template <typename genType>
|
||||
genType smoothstep(
|
||||
GLM_FUNC_DECL genType smoothstep(
|
||||
typename genType::value_type const & edge0,
|
||||
typename genType::value_type const & edge1,
|
||||
genType const & x);
|
||||
@ -311,7 +311,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/isnan.xml">GLSL isnan man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
|
||||
template <typename genType>
|
||||
typename genType::bool_type isnan(genType const & x);
|
||||
GLM_FUNC_DECL typename genType::bool_type isnan(genType const & x);
|
||||
|
||||
/// Returns true if x holds a positive infinity or negative
|
||||
/// infinity representation in the underlying implementation's
|
||||
@ -324,7 +324,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/isinf.xml">GLSL isinf man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
|
||||
template <typename genType>
|
||||
typename genType::bool_type isinf(genType const & x);
|
||||
GLM_FUNC_DECL typename genType::bool_type isinf(genType const & x);
|
||||
|
||||
/// Returns a signed integer value representing
|
||||
/// the encoding of a floating-point value. The floatingpoint
|
||||
@ -336,7 +336,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/floatBitsToInt.xml">GLSL floatBitsToInt man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
|
||||
template <typename genType, typename genIType>
|
||||
genIType floatBitsToInt(genType const & value);
|
||||
GLM_FUNC_DECL genIType floatBitsToInt(genType const & value);
|
||||
|
||||
/// Returns a unsigned integer value representing
|
||||
/// the encoding of a floating-point value. The floatingpoint
|
||||
@ -348,7 +348,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/floatBitsToUint.xml">GLSL floatBitsToUint man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
|
||||
template <typename genType, typename genUType>
|
||||
genUType floatBitsToUint(genType const & value);
|
||||
GLM_FUNC_DECL genUType floatBitsToUint(genType const & value);
|
||||
|
||||
/// Returns a floating-point value corresponding to a signed
|
||||
/// integer encoding of a floating-point value.
|
||||
@ -364,7 +364,7 @@ namespace glm
|
||||
///
|
||||
/// @todo Clarify this declaration, we don't need to actually specify the return type
|
||||
template <typename genType, typename genIType>
|
||||
genType intBitsToFloat(genIType const & value);
|
||||
GLM_FUNC_DECL genType intBitsToFloat(genIType const & value);
|
||||
|
||||
/// Returns a floating-point value corresponding to a
|
||||
/// unsigned integer encoding of a floating-point value.
|
||||
@ -380,7 +380,7 @@ namespace glm
|
||||
///
|
||||
/// @todo Clarify this declaration, we don't need to actually specify the return type
|
||||
template <typename genType, typename genUType>
|
||||
genType uintBitsToFloat(genUType const & value);
|
||||
GLM_FUNC_DECL genType uintBitsToFloat(genUType const & value);
|
||||
|
||||
/// Computes and returns a * b + c.
|
||||
///
|
||||
@ -389,7 +389,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/fma.xml">GLSL fma man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
|
||||
template <typename genType>
|
||||
genType fma(genType const & a, genType const & b, genType const & c);
|
||||
GLM_FUNC_DECL genType fma(genType const & a, genType const & b, genType const & c);
|
||||
|
||||
/// Splits x into a floating-point significand in the range
|
||||
/// [0.5, 1.0) and an integral exponent of two, such that:
|
||||
@ -406,7 +406,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/frexp.xml">GLSL frexp man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
|
||||
template <typename genType, typename genIType>
|
||||
genType frexp(genType const & x, genIType & exp);
|
||||
GLM_FUNC_DECL genType frexp(genType const & x, genIType & exp);
|
||||
|
||||
/// Builds a floating-point number from x and the
|
||||
/// corresponding integral exponent of two in exp, returning:
|
||||
@ -420,7 +420,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/ldexp.xml">GLSL ldexp man page</a>;
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
|
||||
template <typename genType, typename genIType>
|
||||
genType ldexp(genType const & x, genIType const & exp);
|
||||
GLM_FUNC_DECL genType ldexp(genType const & x, genIType const & exp);
|
||||
|
||||
/// @}
|
||||
}//namespace glm
|
||||
|
@ -1,7 +1,7 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
/// OpenGL Mathematics (glm.g-truc.net)
|
||||
///
|
||||
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
|
||||
/// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
|
||||
/// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
/// of this software and associated documentation files (the "Software"), to deal
|
||||
/// in the Software without restriction, including without limitation the rights
|
||||
@ -36,7 +36,7 @@ namespace detail
|
||||
template <typename genFIType>
|
||||
struct Abs_<genFIType, true>
|
||||
{
|
||||
static genFIType get(genFIType const & x)
|
||||
GLM_FUNC_QUALIFIER static genFIType get(genFIType const & x)
|
||||
{
|
||||
GLM_STATIC_ASSERT(
|
||||
detail::type<genFIType>::is_float ||
|
||||
@ -49,7 +49,7 @@ namespace detail
|
||||
template <typename genFIType>
|
||||
struct Abs_<genFIType, false>
|
||||
{
|
||||
static genFIType get(genFIType const & x)
|
||||
GLM_FUNC_QUALIFIER static genFIType get(genFIType const & x)
|
||||
{
|
||||
GLM_STATIC_ASSERT(
|
||||
detail::type<genFIType>::is_uint, "'abs' only accept floating-point and integer inputs");
|
||||
@ -275,7 +275,7 @@ namespace detail
|
||||
//// Only valid if (INT_MIN <= x-y <= INT_MAX)
|
||||
//// min(x,y)
|
||||
//r = y + ((x - y) & ((x - y) >> (sizeof(int) *
|
||||
//CHAR_BIT – 1)));
|
||||
//CHAR_BIT - 1)));
|
||||
//// max(x,y)
|
||||
//r = x - ((x - y) & ((x - y) >> (sizeof(int) *
|
||||
//CHAR_BIT - 1)));
|
||||
@ -420,93 +420,87 @@ namespace detail
|
||||
}
|
||||
|
||||
// mix
|
||||
template <typename genTypeT, typename genTypeU>
|
||||
GLM_FUNC_QUALIFIER genTypeT mix
|
||||
template <typename genType>
|
||||
GLM_FUNC_QUALIFIER genType mix
|
||||
(
|
||||
genTypeT const & x,
|
||||
genTypeT const & y,
|
||||
genTypeU const & a
|
||||
genType const & x,
|
||||
genType const & y,
|
||||
genType const & a
|
||||
)
|
||||
{
|
||||
// It could be a vector too
|
||||
//GLM_STATIC_ASSERT(
|
||||
// detail::type<genTypeT>::is_float &&
|
||||
// detail::type<genTypeU>::is_float);
|
||||
GLM_STATIC_ASSERT(detail::type<genType>::is_float , "'genType' is not floating-point type");
|
||||
|
||||
//return x + a * (y - x);
|
||||
return genTypeT(genTypeU(x) + a * genTypeU(y - x));
|
||||
return x + a * (y - x);
|
||||
}
|
||||
|
||||
template <typename valTypeA, typename valTypeB>
|
||||
GLM_FUNC_QUALIFIER detail::tvec2<valTypeA> mix
|
||||
template <typename valType>
|
||||
GLM_FUNC_QUALIFIER detail::tvec2<valType> mix
|
||||
(
|
||||
detail::tvec2<valTypeA> const & x,
|
||||
detail::tvec2<valTypeA> const & y,
|
||||
valTypeB const & a
|
||||
detail::tvec2<valType> const & x,
|
||||
detail::tvec2<valType> const & y,
|
||||
valType const & a
|
||||
)
|
||||
{
|
||||
return detail::tvec2<valTypeA>(
|
||||
detail::tvec2<valTypeB>(x) + a * detail::tvec2<valTypeB>(y - x));
|
||||
GLM_STATIC_ASSERT(detail::type<valType>::is_float , "'genType' is not floating-point type");
|
||||
|
||||
return x + a * (y - x);
|
||||
}
|
||||
|
||||
template <typename valTypeA, typename valTypeB>
|
||||
GLM_FUNC_QUALIFIER detail::tvec3<valTypeA> mix
|
||||
template <typename valType>
|
||||
GLM_FUNC_QUALIFIER detail::tvec3<valType> mix
|
||||
(
|
||||
detail::tvec3<valTypeA> const & x,
|
||||
detail::tvec3<valTypeA> const & y,
|
||||
valTypeB const & a
|
||||
detail::tvec3<valType> const & x,
|
||||
detail::tvec3<valType> const & y,
|
||||
valType const & a
|
||||
)
|
||||
{
|
||||
return detail::tvec3<valTypeA>(
|
||||
detail::tvec3<valTypeB>(x) + a * detail::tvec3<valTypeB>(y - x));
|
||||
return x + a * (y - x);
|
||||
}
|
||||
|
||||
template <typename valTypeA, typename valTypeB>
|
||||
GLM_FUNC_QUALIFIER detail::tvec4<valTypeA> mix
|
||||
template <typename valType>
|
||||
GLM_FUNC_QUALIFIER detail::tvec4<valType> mix
|
||||
(
|
||||
detail::tvec4<valTypeA> const & x,
|
||||
detail::tvec4<valTypeA> const & y,
|
||||
valTypeB const & a
|
||||
detail::tvec4<valType> const & x,
|
||||
detail::tvec4<valType> const & y,
|
||||
valType const & a
|
||||
)
|
||||
{
|
||||
return detail::tvec4<valTypeA>(
|
||||
detail::tvec4<valTypeB>(x) + a * detail::tvec4<valTypeB>(y - x));
|
||||
return x + a * (y - x);
|
||||
}
|
||||
|
||||
template <typename valTypeA, typename valTypeB>
|
||||
GLM_FUNC_QUALIFIER detail::tvec2<valTypeA> mix
|
||||
template <typename valType>
|
||||
GLM_FUNC_QUALIFIER detail::tvec2<valType> mix
|
||||
(
|
||||
detail::tvec2<valTypeA> const & x,
|
||||
detail::tvec2<valTypeA> const & y,
|
||||
detail::tvec2<valTypeB> const & a
|
||||
detail::tvec2<valType> const & x,
|
||||
detail::tvec2<valType> const & y,
|
||||
detail::tvec2<valType> const & a
|
||||
)
|
||||
{
|
||||
return detail::tvec2<valTypeA>(
|
||||
detail::tvec2<valTypeB>(x) + a * detail::tvec2<valTypeB>(y - x));
|
||||
return x + a * (y - x);
|
||||
}
|
||||
|
||||
template <typename valTypeA, typename valTypeB>
|
||||
GLM_FUNC_QUALIFIER detail::tvec3<valTypeA> mix
|
||||
template <typename valType>
|
||||
GLM_FUNC_QUALIFIER detail::tvec3<valType> mix
|
||||
(
|
||||
detail::tvec3<valTypeA> const & x,
|
||||
detail::tvec3<valTypeA> const & y,
|
||||
detail::tvec3<valTypeB> const & a
|
||||
detail::tvec3<valType> const & x,
|
||||
detail::tvec3<valType> const & y,
|
||||
detail::tvec3<valType> const & a
|
||||
)
|
||||
{
|
||||
return detail::tvec3<valTypeA>(
|
||||
detail::tvec3<valTypeB>(x) + a * detail::tvec3<valTypeB>(y - x));
|
||||
GLM_STATIC_ASSERT(detail::type<valType>::is_float , "'genType' is not floating-point type");
|
||||
|
||||
return x + a * (y - x);
|
||||
}
|
||||
|
||||
template <typename valTypeA, typename valTypeB>
|
||||
GLM_FUNC_QUALIFIER detail::tvec4<valTypeA> mix
|
||||
template <typename valType>
|
||||
GLM_FUNC_QUALIFIER detail::tvec4<valType> mix
|
||||
(
|
||||
detail::tvec4<valTypeA> const & x,
|
||||
detail::tvec4<valTypeA> const & y,
|
||||
detail::tvec4<valTypeB> const & a
|
||||
detail::tvec4<valType> const & x,
|
||||
detail::tvec4<valType> const & y,
|
||||
detail::tvec4<valType> const & a
|
||||
)
|
||||
{
|
||||
return detail::tvec4<valTypeA>(
|
||||
detail::tvec4<valTypeB>(x) + a * detail::tvec4<valTypeB>(y - x));
|
||||
return x + a * (y - x);
|
||||
}
|
||||
|
||||
//template <typename genTypeT>
|
||||
@ -525,15 +519,63 @@ namespace detail
|
||||
// return x + a * (y - x);
|
||||
//}
|
||||
|
||||
template <typename genType>
|
||||
GLM_FUNC_QUALIFIER genType mix
|
||||
template <>
|
||||
GLM_FUNC_QUALIFIER float mix
|
||||
(
|
||||
genType const & x,
|
||||
genType const & y,
|
||||
float const & x,
|
||||
float const & y,
|
||||
bool const & a
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(detail::type<genType>::is_float, "'mix' only accept floating-point inputs");
|
||||
return a ? y : x;
|
||||
}
|
||||
|
||||
template <>
|
||||
GLM_FUNC_QUALIFIER double mix
|
||||
(
|
||||
double const & x,
|
||||
double const & y,
|
||||
bool const & a
|
||||
)
|
||||
{
|
||||
return a ? y : x;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
GLM_FUNC_QUALIFIER detail::tvec2<T> mix
|
||||
(
|
||||
detail::tvec2<T> const & x,
|
||||
detail::tvec2<T> const & y,
|
||||
bool a
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(detail::type<T>::is_float, "'mix' only accept floating-point inputs");
|
||||
|
||||
return a ? y : x;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
GLM_FUNC_QUALIFIER detail::tvec3<T> mix
|
||||
(
|
||||
detail::tvec3<T> const & x,
|
||||
detail::tvec3<T> const & y,
|
||||
bool a
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(detail::type<T>::is_float, "'mix' only accept floating-point inputs");
|
||||
|
||||
return a ? y : x;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
GLM_FUNC_QUALIFIER detail::tvec4<T> mix
|
||||
(
|
||||
detail::tvec4<T> const & x,
|
||||
detail::tvec4<T> const & y,
|
||||
bool a
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(detail::type<T>::is_float, "'mix' only accept floating-point inputs");
|
||||
|
||||
return a ? y : x;
|
||||
}
|
||||
@ -552,8 +594,7 @@ namespace detail
|
||||
for
|
||||
(
|
||||
typename detail::tvec2<T>::size_type i = 0;
|
||||
i < detail::tvec2<T>::value_size();
|
||||
++i
|
||||
i < x.length(); ++i
|
||||
)
|
||||
{
|
||||
result[i] = a[i] ? y[i] : x[i];
|
||||
@ -575,8 +616,7 @@ namespace detail
|
||||
for
|
||||
(
|
||||
typename detail::tvec3<T>::size_type i = 0;
|
||||
i < detail::tvec3<T>::value_size();
|
||||
++i
|
||||
i < x.length(); ++i
|
||||
)
|
||||
{
|
||||
result[i] = a[i] ? y[i] : x[i];
|
||||
@ -598,8 +638,7 @@ namespace detail
|
||||
for
|
||||
(
|
||||
typename detail::tvec4<T>::size_type i = 0;
|
||||
i < detail::tvec4<T>::value_size();
|
||||
++i
|
||||
i < x.length(); ++i
|
||||
)
|
||||
{
|
||||
result[i] = a[i] ? y[i] : x[i];
|
||||
@ -803,17 +842,19 @@ namespace detail
|
||||
{
|
||||
GLM_STATIC_ASSERT(detail::type<genType>::is_float, "'isnan' only accept floating-point inputs");
|
||||
|
||||
# if(GLM_COMPILER & (GLM_COMPILER_VC | GLM_COMPILER_INTEL))
|
||||
# if(GLM_COMPILER & (GLM_COMPILER_VC | GLM_COMPILER_INTEL))
|
||||
return _isnan(x) != 0;
|
||||
# elif(GLM_COMPILER & GLM_COMPILER_GCC)
|
||||
# elif(GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_CLANG))
|
||||
# if(GLM_PLATFORM & GLM_PLATFORM_ANDROID)
|
||||
return _isnan(x) != 0;
|
||||
# else
|
||||
return std::isnan(x);
|
||||
# endif
|
||||
# else
|
||||
# elif(GLM_COMPILER & GLM_COMPILER_CUDA)
|
||||
return isnan(x) != 0;
|
||||
# else
|
||||
return std::isnan(x);
|
||||
# endif
|
||||
# endif
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
@ -858,32 +899,20 @@ namespace detail
|
||||
{
|
||||
GLM_STATIC_ASSERT(detail::type<genType>::is_float, "'isinf' only accept floating-point inputs");
|
||||
|
||||
# if(GLM_COMPILER & (GLM_COMPILER_INTEL | GLM_COMPILER_VC))
|
||||
# if(GLM_COMPILER & (GLM_COMPILER_INTEL | GLM_COMPILER_VC))
|
||||
return _fpclass(x) == _FPCLASS_NINF || _fpclass(x) == _FPCLASS_PINF;
|
||||
# elif(GLM_COMPILER & GLM_COMPILER_GCC)
|
||||
# elif(GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_CLANG))
|
||||
# if(GLM_PLATFORM & GLM_PLATFORM_ANDROID)
|
||||
return _isinf(x) != 0;
|
||||
# else
|
||||
return std::isinf(x);
|
||||
# endif
|
||||
# else
|
||||
# elif(GLM_COMPILER & GLM_COMPILER_CUDA)
|
||||
// http://developer.download.nvidia.com/compute/cuda/4_2/rel/toolkit/docs/online/group__CUDA__MATH__DOUBLE_g13431dd2b40b51f9139cbb7f50c18fab.html#g13431dd2b40b51f9139cbb7f50c18fab
|
||||
return isinf(double(x)) != 0;
|
||||
# else
|
||||
return std::isinf(x);
|
||||
# endif
|
||||
/*
|
||||
# if(GLM_COMPILER & GLM_COMPILER_VC)
|
||||
return _fpclass(x) == _FPCLASS_NINF || _fpclass(x) == _FPCLASS_PINF;
|
||||
# elif(GLM_COMPILER & GLM_COMPILER_GCC)
|
||||
# if(GLM_PLATFORM & GLM_PLATFORM_ANDROID)
|
||||
return _isinf(x) != 0;
|
||||
# else
|
||||
return std::isinf(x);
|
||||
# endif
|
||||
# elif(GLM_COMPILER & GLM_COMPILER_INTEL)
|
||||
return isinf(x) != 0;
|
||||
# else
|
||||
return std::isinf(x);
|
||||
# endif
|
||||
*/
|
||||
# endif
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
|
@ -1,7 +1,7 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
/// OpenGL Mathematics (glm.g-truc.net)
|
||||
///
|
||||
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
|
||||
/// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
|
||||
/// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
/// of this software and associated documentation files (the "Software"), to deal
|
||||
/// in the Software without restriction, including without limitation the rights
|
||||
@ -41,16 +41,16 @@ namespace glm
|
||||
/// @addtogroup core_func_exponential
|
||||
/// @{
|
||||
|
||||
/// Returns x raised to the y power.
|
||||
/// Returns 'base' raised to the power 'exponent'.
|
||||
///
|
||||
/// @param x pow function is defined for input values of x defined in the range (inf-, inf+) in the limit of the type precision.
|
||||
/// @param y
|
||||
/// @param base Floating point value. pow function is defined for input values of x defined in the range (inf-, inf+) in the limit of the type precision.
|
||||
/// @param exponent Floating point value representing the 'exponent'.
|
||||
/// @tparam genType Floating-point scalar or vector types.
|
||||
///
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/pow.xml">GLSL pow man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>
|
||||
template <typename genType>
|
||||
genType pow(genType const & x, genType const & y);
|
||||
GLM_FUNC_DECL genType pow(genType const & base, genType const & exponent);
|
||||
|
||||
/// Returns the natural exponentiation of x, i.e., e^x.
|
||||
///
|
||||
@ -60,7 +60,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/exp.xml">GLSL exp man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>
|
||||
template <typename genType>
|
||||
genType exp(genType const & x);
|
||||
GLM_FUNC_DECL genType exp(genType const & x);
|
||||
|
||||
/// Returns the natural logarithm of x, i.e.,
|
||||
/// returns the value y which satisfies the equation x = e^y.
|
||||
@ -72,7 +72,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/log.xml">GLSL log man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>
|
||||
template <typename genType>
|
||||
genType log(genType const & x);
|
||||
GLM_FUNC_DECL genType log(genType const & x);
|
||||
|
||||
/// Returns 2 raised to the x power.
|
||||
///
|
||||
@ -82,7 +82,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/exp2.xml">GLSL exp2 man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>
|
||||
template <typename genType>
|
||||
genType exp2(genType const & x);
|
||||
GLM_FUNC_DECL genType exp2(genType const & x);
|
||||
|
||||
/// Returns the base 2 log of x, i.e., returns the value y,
|
||||
/// which satisfies the equation x = 2 ^ y.
|
||||
@ -93,7 +93,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/log2.xml">GLSL log2 man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>
|
||||
template <typename genType>
|
||||
genType log2(genType const & x);
|
||||
GLM_FUNC_DECL genType log2(genType const & x);
|
||||
|
||||
/// Returns the positive square root of x.
|
||||
///
|
||||
@ -103,7 +103,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/sqrt.xml">GLSL sqrt man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>
|
||||
template <typename genType>
|
||||
genType sqrt(genType const & x);
|
||||
GLM_FUNC_DECL genType sqrt(genType const & x);
|
||||
|
||||
/// Returns the reciprocal of the positive square root of x.
|
||||
///
|
||||
@ -113,7 +113,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/inversesqrt.xml">GLSL inversesqrt man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>
|
||||
template <typename genType>
|
||||
genType inversesqrt(genType const & x);
|
||||
GLM_FUNC_DECL genType inversesqrt(genType const & x);
|
||||
|
||||
/// @}
|
||||
}//namespace glm
|
||||
|
@ -1,7 +1,7 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
/// OpenGL Mathematics (glm.g-truc.net)
|
||||
///
|
||||
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
|
||||
/// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
|
||||
/// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
/// of this software and associated documentation files (the "Software"), to deal
|
||||
/// in the Software without restriction, including without limitation the rights
|
||||
@ -146,6 +146,7 @@ namespace _detail
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(detail::type<genType>::is_float, "'inversesqrt' only accept floating-point input");
|
||||
assert(x > genType(0));
|
||||
|
||||
return genType(1) / ::std::sqrt(x);
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
/// OpenGL Mathematics (glm.g-truc.net)
|
||||
///
|
||||
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
|
||||
/// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
|
||||
/// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
/// of this software and associated documentation files (the "Software"), to deal
|
||||
/// in the Software without restriction, including without limitation the rights
|
||||
@ -48,7 +48,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/length.xml">GLSL length man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a>
|
||||
template <typename genType>
|
||||
typename genType::value_type length(
|
||||
GLM_FUNC_DECL typename genType::value_type length(
|
||||
genType const & x);
|
||||
|
||||
/// Returns the distance betwwen p0 and p1, i.e., length(p0 - p1).
|
||||
@ -58,7 +58,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/distance.xml">GLSL distance man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a>
|
||||
template <typename genType>
|
||||
typename genType::value_type distance(
|
||||
GLM_FUNC_DECL typename genType::value_type distance(
|
||||
genType const & p0,
|
||||
genType const & p1);
|
||||
|
||||
@ -69,7 +69,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/dot.xml">GLSL dot man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a>
|
||||
template <typename genType>
|
||||
typename genType::value_type dot(
|
||||
GLM_FUNC_DECL typename genType::value_type dot(
|
||||
genType const & x,
|
||||
genType const & y);
|
||||
|
||||
@ -80,7 +80,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/cross.xml">GLSL cross man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a>
|
||||
template <typename valType>
|
||||
detail::tvec3<valType> cross(
|
||||
GLM_FUNC_DECL detail::tvec3<valType> cross(
|
||||
detail::tvec3<valType> const & x,
|
||||
detail::tvec3<valType> const & y);
|
||||
|
||||
@ -89,7 +89,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/normalize.xml">GLSL normalize man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a>
|
||||
template <typename genType>
|
||||
genType normalize(
|
||||
GLM_FUNC_DECL genType normalize(
|
||||
genType const & x);
|
||||
|
||||
/// If dot(Nref, I) < 0.0, return N, otherwise, return -N.
|
||||
@ -99,7 +99,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/faceforward.xml">GLSL faceforward man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a>
|
||||
template <typename genType>
|
||||
genType faceforward(
|
||||
GLM_FUNC_DECL genType faceforward(
|
||||
genType const & N,
|
||||
genType const & I,
|
||||
genType const & Nref);
|
||||
@ -112,7 +112,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/reflect.xml">GLSL reflect man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a>
|
||||
template <typename genType>
|
||||
genType reflect(
|
||||
GLM_FUNC_DECL genType reflect(
|
||||
genType const & I,
|
||||
genType const & N);
|
||||
|
||||
@ -125,7 +125,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/refract.xml">GLSL refract man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a>
|
||||
template <typename genType>
|
||||
genType refract(
|
||||
GLM_FUNC_DECL genType refract(
|
||||
genType const & I,
|
||||
genType const & N,
|
||||
typename genType::value_type const & eta);
|
||||
|
@ -1,7 +1,7 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
/// OpenGL Mathematics (glm.g-truc.net)
|
||||
///
|
||||
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
|
||||
/// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
|
||||
/// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
/// of this software and associated documentation files (the "Software"), to deal
|
||||
/// in the Software without restriction, including without limitation the rights
|
||||
@ -132,7 +132,6 @@ namespace glm
|
||||
(
|
||||
genType const & x,
|
||||
genType const & y
|
||||
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(detail::type<genType>::is_float, "'dot' only accept floating-point inputs");
|
||||
@ -271,7 +270,7 @@ namespace glm
|
||||
|
||||
// reflect
|
||||
template <typename genType>
|
||||
genType reflect
|
||||
GLM_FUNC_QUALIFIER genType reflect
|
||||
(
|
||||
genType const & I,
|
||||
genType const & N
|
||||
|
@ -1,7 +1,7 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
/// OpenGL Mathematics (glm.g-truc.net)
|
||||
///
|
||||
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
|
||||
/// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
|
||||
/// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
/// of this software and associated documentation files (the "Software"), to deal
|
||||
/// in the Software without restriction, including without limitation the rights
|
||||
@ -52,7 +52,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/uaddCarry.xml">GLSL uaddCarry man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>
|
||||
template <typename genUType>
|
||||
genUType uaddCarry(
|
||||
GLM_FUNC_DECL genUType uaddCarry(
|
||||
genUType const & x,
|
||||
genUType const & y,
|
||||
genUType & carry);
|
||||
@ -66,7 +66,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/usubBorrow.xml">GLSL usubBorrow man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>
|
||||
template <typename genUType>
|
||||
genUType usubBorrow(
|
||||
GLM_FUNC_DECL genUType usubBorrow(
|
||||
genUType const & x,
|
||||
genUType const & y,
|
||||
genUType & borrow);
|
||||
@ -80,7 +80,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/umulExtended.xml">GLSL umulExtended man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>
|
||||
template <typename genUType>
|
||||
void umulExtended(
|
||||
GLM_FUNC_DECL void umulExtended(
|
||||
genUType const & x,
|
||||
genUType const & y,
|
||||
genUType & msb,
|
||||
@ -95,7 +95,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/imulExtended.xml">GLSL imulExtended man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>
|
||||
template <typename genIType>
|
||||
void imulExtended(
|
||||
GLM_FUNC_DECL void imulExtended(
|
||||
genIType const & x,
|
||||
genIType const & y,
|
||||
genIType & msb,
|
||||
@ -105,7 +105,7 @@ namespace glm
|
||||
/// returning them in the least significant bits of the result.
|
||||
/// For unsigned data types, the most significant bits of the
|
||||
/// result will be set to zero. For signed data types, the
|
||||
/// most significant bits will be set to the value of bit offset + base – 1.
|
||||
/// most significant bits will be set to the value of bit offset + base - 1.
|
||||
///
|
||||
/// If bits is zero, the result will be zero. The result will be
|
||||
/// undefined if offset or bits is negative, or if the sum of
|
||||
@ -117,7 +117,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/bitfieldExtract.xml">GLSL bitfieldExtract man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>
|
||||
template <typename genIUType>
|
||||
genIUType bitfieldExtract(
|
||||
GLM_FUNC_DECL genIUType bitfieldExtract(
|
||||
genIUType const & Value,
|
||||
int const & Offset,
|
||||
int const & Bits);
|
||||
@ -125,7 +125,7 @@ namespace glm
|
||||
/// Returns the insertion the bits least-significant bits of insert into base.
|
||||
///
|
||||
/// The result will have bits [offset, offset + bits - 1] taken
|
||||
/// from bits [0, bits – 1] of insert, and all other bits taken
|
||||
/// from bits [0, bits - 1] of insert, and all other bits taken
|
||||
/// directly from the corresponding bits of base. If bits is
|
||||
/// zero, the result will simply be base. The result will be
|
||||
/// undefined if offset or bits is negative, or if the sum of
|
||||
@ -137,7 +137,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/bitfieldInsert.xml">GLSL bitfieldInsert man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>
|
||||
template <typename genIUType>
|
||||
genIUType bitfieldInsert(
|
||||
GLM_FUNC_DECL genIUType bitfieldInsert(
|
||||
genIUType const & Base,
|
||||
genIUType const & Insert,
|
||||
int const & Offset,
|
||||
@ -152,7 +152,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/bitfieldReverse.xml">GLSL bitfieldReverse man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>
|
||||
template <typename genIUType>
|
||||
genIUType bitfieldReverse(genIUType const & Value);
|
||||
GLM_FUNC_DECL genIUType bitfieldReverse(genIUType const & Value);
|
||||
|
||||
/// Returns the number of bits set to 1 in the binary representation of value.
|
||||
///
|
||||
@ -163,7 +163,7 @@ namespace glm
|
||||
///
|
||||
/// @todo Clarify the declaration to specify that scalars are suported.
|
||||
template <typename T, template <typename> class genIUType>
|
||||
typename genIUType<T>::signed_type bitCount(genIUType<T> const & Value);
|
||||
GLM_FUNC_DECL typename genIUType<T>::signed_type bitCount(genIUType<T> const & Value);
|
||||
|
||||
/// Returns the bit number of the least significant bit set to
|
||||
/// 1 in the binary representation of value.
|
||||
@ -176,7 +176,7 @@ namespace glm
|
||||
///
|
||||
/// @todo Clarify the declaration to specify that scalars are suported.
|
||||
template <typename T, template <typename> class genIUType>
|
||||
typename genIUType<T>::signed_type findLSB(genIUType<T> const & Value);
|
||||
GLM_FUNC_DECL typename genIUType<T>::signed_type findLSB(genIUType<T> const & Value);
|
||||
|
||||
/// Returns the bit number of the most significant bit in the binary representation of value.
|
||||
/// For positive integers, the result will be the bit number of the most significant bit set to 1.
|
||||
@ -190,7 +190,7 @@ namespace glm
|
||||
///
|
||||
/// @todo Clarify the declaration to specify that scalars are suported.
|
||||
template <typename T, template <typename> class genIUType>
|
||||
typename genIUType<T>::signed_type findMSB(genIUType<T> const & Value);
|
||||
GLM_FUNC_DECL typename genIUType<T>::signed_type findMSB(genIUType<T> const & Value);
|
||||
|
||||
/// @}
|
||||
}//namespace glm
|
||||
|
@ -1,7 +1,7 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
/// OpenGL Mathematics (glm.g-truc.net)
|
||||
///
|
||||
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
|
||||
/// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
|
||||
/// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
/// of this software and associated documentation files (the "Software"), to deal
|
||||
/// in the Software without restriction, including without limitation the rights
|
||||
@ -26,10 +26,12 @@
|
||||
/// @author Christophe Riccio
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#if(GLM_ARCH != GLM_ARCH_PURE)
|
||||
#if(GLM_COMPILER & GLM_COMPILER_VC)
|
||||
#include <intrin.h>
|
||||
#pragma intrinsic(_BitScanReverse)
|
||||
#endif
|
||||
# include <intrin.h>
|
||||
# pragma intrinsic(_BitScanReverse)
|
||||
#endif//(GLM_COMPILER & GLM_COMPILER_VC)
|
||||
#endif//(GLM_ARCH != GLM_ARCH_PURE)
|
||||
|
||||
namespace glm
|
||||
{
|
||||
@ -103,7 +105,7 @@ namespace glm
|
||||
if(x > y)
|
||||
return genUType(detail::highp_int_t(x) - detail::highp_int_t(y));
|
||||
else
|
||||
return genUType(detail::highp_int_t(1) << detail::highp_int_t(32) + detail::highp_int_t(x) - detail::highp_int_t(y));
|
||||
return genUType((detail::highp_int_t(1) << detail::highp_int_t(32)) + detail::highp_int_t(x) - detail::highp_int_t(y));
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
@ -521,7 +523,6 @@ namespace glm
|
||||
}
|
||||
|
||||
// findMSB
|
||||
/*
|
||||
#if((GLM_ARCH != GLM_ARCH_PURE) && (GLM_COMPILER & GLM_COMPILER_VC))
|
||||
|
||||
template <typename genIUType>
|
||||
@ -538,7 +539,7 @@ namespace glm
|
||||
_BitScanReverse(&Result, Value);
|
||||
return int(Result);
|
||||
}
|
||||
|
||||
/*
|
||||
// __builtin_clz seems to be buggy as it crasks for some values, from 0x00200000 to 80000000
|
||||
#elif((GLM_ARCH != GLM_ARCH_PURE) && (GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC40))
|
||||
|
||||
@ -560,8 +561,9 @@ namespace glm
|
||||
//
|
||||
return 31 - __builtin_clzl(Value);
|
||||
}
|
||||
#else
|
||||
*/
|
||||
#else
|
||||
|
||||
/* SSE implementation idea
|
||||
|
||||
__m128i const Zero = _mm_set_epi32( 0, 0, 0, 0);
|
||||
@ -606,7 +608,7 @@ namespace glm
|
||||
return MostSignificantBit;
|
||||
}
|
||||
}
|
||||
//#endif//(GLM_COMPILER)
|
||||
#endif//(GLM_COMPILER)
|
||||
|
||||
template <typename T>
|
||||
GLM_FUNC_QUALIFIER detail::tvec2<int> findMSB
|
||||
|
@ -1,7 +1,7 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
/// OpenGL Mathematics (glm.g-truc.net)
|
||||
///
|
||||
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
|
||||
/// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
|
||||
/// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
/// of this software and associated documentation files (the "Software"), to deal
|
||||
/// in the Software without restriction, including without limitation the rights
|
||||
@ -53,7 +53,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/matrixCompMult.xml">GLSL matrixCompMult man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.6 Matrix Functions</a>
|
||||
template <typename matType>
|
||||
matType matrixCompMult(
|
||||
GLM_FUNC_DECL matType matrixCompMult(
|
||||
matType const & x,
|
||||
matType const & y);
|
||||
|
||||
@ -68,7 +68,7 @@ namespace glm
|
||||
///
|
||||
/// @todo Clarify the declaration to specify that matType doesn't have to be provided when used.
|
||||
template <typename vecType, typename matType>
|
||||
matType outerProduct(
|
||||
GLM_FUNC_DECL matType outerProduct(
|
||||
vecType const & c,
|
||||
vecType const & r);
|
||||
|
||||
@ -79,7 +79,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/transpose.xml">GLSL transpose man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.6 Matrix Functions</a>
|
||||
template <typename matType>
|
||||
typename matType::transpose_type transpose(
|
||||
GLM_FUNC_DECL typename matType::transpose_type transpose(
|
||||
matType const & x);
|
||||
|
||||
/// Return the determinant of a mat2 matrix.
|
||||
@ -89,7 +89,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/determinant.xml">GLSL determinant man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.6 Matrix Functions</a>
|
||||
template <typename valType>
|
||||
typename detail::tmat2x2<valType>::value_type determinant(
|
||||
GLM_FUNC_DECL typename detail::tmat2x2<valType>::value_type determinant(
|
||||
detail::tmat2x2<valType> const & m);
|
||||
|
||||
/// Return the determinant of a mat3 matrix.
|
||||
@ -99,7 +99,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/determinant.xml">GLSL determinant man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.6 Matrix Functions</a>
|
||||
template <typename valType>
|
||||
typename detail::tmat3x3<valType>::value_type determinant(
|
||||
GLM_FUNC_DECL typename detail::tmat3x3<valType>::value_type determinant(
|
||||
detail::tmat3x3<valType> const & m);
|
||||
|
||||
/// Return the determinant of a mat4 matrix.
|
||||
@ -109,7 +109,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/determinant.xml">GLSL determinant man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.6 Matrix Functions</a>
|
||||
template <typename valType>
|
||||
typename detail::tmat4x4<valType>::value_type determinant(
|
||||
GLM_FUNC_DECL typename detail::tmat4x4<valType>::value_type determinant(
|
||||
detail::tmat4x4<valType> const & m);
|
||||
|
||||
/// Return the inverse of a mat2 matrix.
|
||||
@ -119,7 +119,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/inverse.xml">GLSL inverse man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.6 Matrix Functions</a>
|
||||
template <typename valType>
|
||||
detail::tmat2x2<valType> inverse(
|
||||
GLM_FUNC_DECL detail::tmat2x2<valType> inverse(
|
||||
detail::tmat2x2<valType> const & m);
|
||||
|
||||
/// Return the inverse of a mat3 matrix.
|
||||
@ -129,7 +129,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/inverse.xml">GLSL inverse man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.6 Matrix Functions</a>
|
||||
template <typename valType>
|
||||
detail::tmat3x3<valType> inverse(
|
||||
GLM_FUNC_DECL detail::tmat3x3<valType> inverse(
|
||||
detail::tmat3x3<valType> const & m);
|
||||
|
||||
/// Return the inverse of a mat4 matrix.
|
||||
@ -139,7 +139,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/inverse.xml">GLSL inverse man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.6 Matrix Functions</a>
|
||||
template <typename valType>
|
||||
detail::tmat4x4<valType> inverse(
|
||||
GLM_FUNC_DECL detail::tmat4x4<valType> inverse(
|
||||
detail::tmat4x4<valType> const & m);
|
||||
|
||||
/// @}
|
||||
|
@ -1,7 +1,7 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
/// OpenGL Mathematics (glm.g-truc.net)
|
||||
///
|
||||
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
|
||||
/// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
|
||||
/// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
/// of this software and associated documentation files (the "Software"), to deal
|
||||
/// in the Software without restriction, including without limitation the rights
|
||||
|
@ -1,7 +1,7 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
/// OpenGL Mathematics (glm.g-truc.net)
|
||||
///
|
||||
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
|
||||
/// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
|
||||
/// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
/// of this software and associated documentation files (the "Software"), to deal
|
||||
/// in the Software without restriction, including without limitation the rights
|
||||
@ -50,7 +50,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/noise1.xml">GLSL noise1 man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.13 Noise Functions</a>
|
||||
template <typename genType>
|
||||
typename genType::value_type noise1(genType const & x);
|
||||
GLM_FUNC_DECL typename genType::value_type noise1(genType const & x);
|
||||
|
||||
/// Returns a 2D noise value based on the input value x.
|
||||
///
|
||||
@ -59,7 +59,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/noise2.xml">GLSL noise2 man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.13 Noise Functions</a>
|
||||
template <typename genType>
|
||||
detail::tvec2<typename genType::value_type> noise2(genType const & x);
|
||||
GLM_FUNC_DECL detail::tvec2<typename genType::value_type> noise2(genType const & x);
|
||||
|
||||
/// Returns a 3D noise value based on the input value x.
|
||||
///
|
||||
@ -68,7 +68,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/noise3.xml">GLSL noise3 man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.13 Noise Functions</a>
|
||||
template <typename genType>
|
||||
detail::tvec3<typename genType::value_type> noise3(genType const & x);
|
||||
GLM_FUNC_DECL detail::tvec3<typename genType::value_type> noise3(genType const & x);
|
||||
|
||||
/// Returns a 4D noise value based on the input value x.
|
||||
///
|
||||
@ -77,7 +77,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/noise4.xml">GLSL noise4 man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.13 Noise Functions</a>
|
||||
template <typename genType>
|
||||
detail::tvec4<typename genType::value_type> noise4(genType const & x);
|
||||
GLM_FUNC_DECL detail::tvec4<typename genType::value_type> noise4(genType const & x);
|
||||
|
||||
/// @}
|
||||
}//namespace glm
|
||||
|
@ -1,7 +1,7 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
/// OpenGL Mathematics (glm.g-truc.net)
|
||||
///
|
||||
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
|
||||
/// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
|
||||
/// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
/// of this software and associated documentation files (the "Software"), to deal
|
||||
/// in the Software without restriction, including without limitation the rights
|
||||
|
@ -1,7 +1,7 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
/// OpenGL Mathematics (glm.g-truc.net)
|
||||
///
|
||||
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
|
||||
/// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
|
||||
/// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
/// of this software and associated documentation files (the "Software"), to deal
|
||||
/// in the Software without restriction, including without limitation the rights
|
||||
@ -52,7 +52,7 @@ namespace glm
|
||||
//!
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packUnorm2x16.xml">GLSL packUnorm2x16 man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
|
||||
detail::uint32 packUnorm2x16(detail::tvec2<detail::float32> const & v);
|
||||
GLM_FUNC_DECL detail::uint32 packUnorm2x16(detail::tvec2<detail::float32> const & v);
|
||||
|
||||
//! First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values.
|
||||
//! Then, the results are packed into the returned 32-bit unsigned integer.
|
||||
@ -65,7 +65,7 @@ namespace glm
|
||||
//!
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packSnorm2x16.xml">GLSL packSnorm2x16 man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
|
||||
detail::uint32 packSnorm2x16(detail::tvec2<detail::float32> const & v);
|
||||
GLM_FUNC_DECL detail::uint32 packSnorm2x16(detail::tvec2<detail::float32> const & v);
|
||||
|
||||
//! First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values.
|
||||
//! Then, the results are packed into the returned 32-bit unsigned integer.
|
||||
@ -78,7 +78,7 @@ namespace glm
|
||||
//!
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packUnorm4x8.xml">GLSL packUnorm4x8 man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
|
||||
detail::uint32 packUnorm4x8(detail::tvec4<detail::float32> const & v);
|
||||
GLM_FUNC_DECL detail::uint32 packUnorm4x8(detail::tvec4<detail::float32> const & v);
|
||||
|
||||
//! First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values.
|
||||
//! Then, the results are packed into the returned 32-bit unsigned integer.
|
||||
@ -91,7 +91,7 @@ namespace glm
|
||||
//!
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packSnorm4x8.xml">GLSL packSnorm4x8 man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
|
||||
detail::uint32 packSnorm4x8(detail::tvec4<detail::float32> const & v);
|
||||
GLM_FUNC_DECL detail::uint32 packSnorm4x8(detail::tvec4<detail::float32> const & v);
|
||||
|
||||
//! First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers.
|
||||
//! Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector.
|
||||
@ -104,7 +104,7 @@ namespace glm
|
||||
//!
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackUnorm2x16.xml">GLSL unpackUnorm2x16 man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
|
||||
detail::tvec2<detail::float32> unpackUnorm2x16(detail::uint32 const & p);
|
||||
GLM_FUNC_DECL detail::tvec2<detail::float32> unpackUnorm2x16(detail::uint32 const & p);
|
||||
|
||||
//! First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers.
|
||||
//! Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector.
|
||||
@ -117,7 +117,7 @@ namespace glm
|
||||
//!
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackSnorm2x16.xml">GLSL unpackSnorm2x16 man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
|
||||
detail::tvec2<detail::float32> unpackSnorm2x16(detail::uint32 const & p);
|
||||
GLM_FUNC_DECL detail::tvec2<detail::float32> unpackSnorm2x16(detail::uint32 const & p);
|
||||
|
||||
/// First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers.
|
||||
/// Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector.
|
||||
@ -130,7 +130,7 @@ namespace glm
|
||||
///
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackUnorm4x8.xml">GLSL unpackUnorm4x8 man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
|
||||
detail::tvec4<detail::float32> unpackUnorm4x8(detail::uint32 const & p);
|
||||
GLM_FUNC_DECL detail::tvec4<detail::float32> unpackUnorm4x8(detail::uint32 const & p);
|
||||
|
||||
/// First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers.
|
||||
/// Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector.
|
||||
@ -143,7 +143,7 @@ namespace glm
|
||||
///
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackSnorm4x8.xml">GLSL unpackSnorm4x8 man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
|
||||
detail::tvec4<detail::float32> unpackSnorm4x8(detail::uint32 const & p);
|
||||
GLM_FUNC_DECL detail::tvec4<detail::float32> unpackSnorm4x8(detail::uint32 const & p);
|
||||
|
||||
/// Returns a double-precision value obtained by packing the components of v into a 64-bit value.
|
||||
/// If an IEEE 754 Inf or NaN is created, it will not signal, and the resulting floating point value is unspecified.
|
||||
@ -153,7 +153,7 @@ namespace glm
|
||||
///
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packDouble2x32.xml">GLSL packDouble2x32 man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
|
||||
double packDouble2x32(detail::tvec2<detail::uint32> const & v);
|
||||
GLM_FUNC_DECL double packDouble2x32(detail::tvec2<detail::uint32> const & v);
|
||||
|
||||
/// Returns a two-component unsigned integer vector representation of v.
|
||||
/// The bit-level representation of v is preserved.
|
||||
@ -162,7 +162,7 @@ namespace glm
|
||||
///
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackDouble2x32.xml">GLSL unpackDouble2x32 man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
|
||||
detail::tvec2<detail::uint32> unpackDouble2x32(double const & v);
|
||||
GLM_FUNC_DECL detail::tvec2<detail::uint32> unpackDouble2x32(double const & v);
|
||||
|
||||
/// Returns an unsigned integer obtained by converting the components of a two-component floating-point vector
|
||||
/// to the 16-bit floating-point representation found in the OpenGL Specification,
|
||||
@ -172,7 +172,7 @@ namespace glm
|
||||
///
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packHalf2x16.xml">GLSL packHalf2x16 man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
|
||||
uint packHalf2x16(vec2 const & v);
|
||||
GLM_FUNC_DECL uint packHalf2x16(vec2 const & v);
|
||||
|
||||
/// Returns a two-component floating-point vector with components obtained by unpacking a 32-bit unsigned integer into a pair of 16-bit values,
|
||||
/// interpreting those values as 16-bit floating-point numbers according to the OpenGL Specification,
|
||||
@ -182,7 +182,7 @@ namespace glm
|
||||
///
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackHalf2x16.xml">GLSL unpackHalf2x16 man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
|
||||
vec2 unpackHalf2x16(uint const & v);
|
||||
GLM_FUNC_DECL vec2 unpackHalf2x16(uint const & v);
|
||||
|
||||
/// @}
|
||||
}//namespace glm
|
||||
|
@ -1,7 +1,7 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
/// OpenGL Mathematics (glm.g-truc.net)
|
||||
///
|
||||
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
|
||||
/// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
|
||||
/// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
/// of this software and associated documentation files (the "Software"), to deal
|
||||
/// in the Software without restriction, including without limitation the rights
|
||||
@ -136,12 +136,42 @@ namespace glm
|
||||
|
||||
GLM_FUNC_QUALIFIER double packDouble2x32(detail::tvec2<detail::uint32> const & v)
|
||||
{
|
||||
return *(double*)&v;
|
||||
struct uint32_pair
|
||||
{
|
||||
detail::uint32 x;
|
||||
detail::uint32 y;
|
||||
};
|
||||
|
||||
union helper
|
||||
{
|
||||
uint32_pair input;
|
||||
double output;
|
||||
} Helper;
|
||||
|
||||
Helper.input.x = v.x;
|
||||
Helper.input.y = v.y;
|
||||
|
||||
return Helper.output;
|
||||
//return *(double*)&v;
|
||||
}
|
||||
|
||||
GLM_FUNC_QUALIFIER detail::tvec2<uint> unpackDouble2x32(double const & v)
|
||||
{
|
||||
return *(detail::tvec2<uint>*)&v;
|
||||
struct uint32_pair
|
||||
{
|
||||
detail::uint32 x;
|
||||
detail::uint32 y;
|
||||
};
|
||||
|
||||
union helper
|
||||
{
|
||||
double input;
|
||||
uint32_pair output;
|
||||
} Helper;
|
||||
|
||||
Helper.input = v;
|
||||
|
||||
return detail::tvec2<uint>(Helper.output.x, Helper.output.y);
|
||||
}
|
||||
|
||||
GLM_FUNC_QUALIFIER uint packHalf2x16(detail::tvec2<float> const & v)
|
||||
@ -157,7 +187,7 @@ namespace glm
|
||||
|
||||
Pack.orig.a = detail::toFloat16(v.x);
|
||||
Pack.orig.b = detail::toFloat16(v.y);
|
||||
return *(uint*)&Pack;
|
||||
return Pack.other;
|
||||
}
|
||||
|
||||
GLM_FUNC_QUALIFIER vec2 unpackHalf2x16(uint const & v)
|
||||
|
@ -1,7 +1,7 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
/// OpenGL Mathematics (glm.g-truc.net)
|
||||
///
|
||||
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
|
||||
/// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
|
||||
/// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
/// of this software and associated documentation files (the "Software"), to deal
|
||||
/// in the Software without restriction, including without limitation the rights
|
||||
@ -52,7 +52,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/radians.xml">GLSL radians man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
|
||||
template <typename genType>
|
||||
genType radians(genType const & degrees);
|
||||
GLM_FUNC_DECL genType radians(genType const & degrees);
|
||||
|
||||
/// Converts radians to degrees and returns the result.
|
||||
///
|
||||
@ -61,7 +61,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/degrees.xml">GLSL degrees man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
|
||||
template <typename genType>
|
||||
genType degrees(genType const & radians);
|
||||
GLM_FUNC_DECL genType degrees(genType const & radians);
|
||||
|
||||
/// The standard trigonometric sine function.
|
||||
/// The values returned by this function will range from [-1, 1].
|
||||
@ -71,7 +71,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/sin.xml">GLSL sin man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
|
||||
template <typename genType>
|
||||
genType sin(genType const & angle);
|
||||
GLM_FUNC_DECL genType sin(genType const & angle);
|
||||
|
||||
/// The standard trigonometric cosine function.
|
||||
/// The values returned by this function will range from [-1, 1].
|
||||
@ -81,7 +81,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/cos.xml">GLSL cos man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
|
||||
template <typename genType>
|
||||
genType cos(genType const & angle);
|
||||
GLM_FUNC_DECL genType cos(genType const & angle);
|
||||
|
||||
/// The standard trigonometric tangent function.
|
||||
///
|
||||
@ -90,7 +90,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/tan.xml">GLSL tan man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
|
||||
template <typename genType>
|
||||
genType tan(genType const & angle);
|
||||
GLM_FUNC_DECL genType tan(genType const & angle);
|
||||
|
||||
/// Arc sine. Returns an angle whose sine is x.
|
||||
/// The range of values returned by this function is [-PI/2, PI/2].
|
||||
@ -101,7 +101,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/asin.xml">GLSL asin man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
|
||||
template <typename genType>
|
||||
genType asin(genType const & x);
|
||||
GLM_FUNC_DECL genType asin(genType const & x);
|
||||
|
||||
/// Arc cosine. Returns an angle whose sine is x.
|
||||
/// The range of values returned by this function is [0, PI].
|
||||
@ -112,7 +112,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/acos.xml">GLSL acos man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
|
||||
template <typename genType>
|
||||
genType acos(genType const & x);
|
||||
GLM_FUNC_DECL genType acos(genType const & x);
|
||||
|
||||
/// Arc tangent. Returns an angle whose tangent is y/x.
|
||||
/// The signs of x and y are used to determine what
|
||||
@ -125,7 +125,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/atan.xml">GLSL atan man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
|
||||
template <typename genType>
|
||||
genType atan(genType const & y, genType const & x);
|
||||
GLM_FUNC_DECL genType atan(genType const & y, genType const & x);
|
||||
|
||||
/// Arc tangent. Returns an angle whose tangent is y_over_x.
|
||||
/// The range of values returned by this function is [-PI/2, PI/2].
|
||||
@ -135,7 +135,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/atan.xml">GLSL atan man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
|
||||
template <typename genType>
|
||||
genType atan(genType const & y_over_x);
|
||||
GLM_FUNC_DECL genType atan(genType const & y_over_x);
|
||||
|
||||
/// Returns the hyperbolic sine function, (exp(x) - exp(-x)) / 2
|
||||
///
|
||||
@ -144,7 +144,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/sinh.xml">GLSL sinh man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
|
||||
template <typename genType>
|
||||
genType sinh(genType const & angle);
|
||||
GLM_FUNC_DECL genType sinh(genType const & angle);
|
||||
|
||||
/// Returns the hyperbolic cosine function, (exp(x) + exp(-x)) / 2
|
||||
///
|
||||
@ -153,7 +153,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/cosh.xml">GLSL cosh man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
|
||||
template <typename genType>
|
||||
genType cosh(genType const & angle);
|
||||
GLM_FUNC_DECL genType cosh(genType const & angle);
|
||||
|
||||
/// Returns the hyperbolic tangent function, sinh(angle) / cosh(angle)
|
||||
///
|
||||
@ -162,7 +162,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/tanh.xml">GLSL tanh man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
|
||||
template <typename genType>
|
||||
genType tanh(genType const & angle);
|
||||
GLM_FUNC_DECL genType tanh(genType const & angle);
|
||||
|
||||
/// Arc hyperbolic sine; returns the inverse of sinh.
|
||||
///
|
||||
@ -171,7 +171,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/asinh.xml">GLSL asinh man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
|
||||
template <typename genType>
|
||||
genType asinh(genType const & x);
|
||||
GLM_FUNC_DECL genType asinh(genType const & x);
|
||||
|
||||
/// Arc hyperbolic cosine; returns the non-negative inverse
|
||||
/// of cosh. Results are undefined if x < 1.
|
||||
@ -181,7 +181,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/acosh.xml">GLSL acosh man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
|
||||
template <typename genType>
|
||||
genType acosh(genType const & x);
|
||||
GLM_FUNC_DECL genType acosh(genType const & x);
|
||||
|
||||
/// Arc hyperbolic tangent; returns the inverse of tanh.
|
||||
/// Results are undefined if abs(x) >= 1.
|
||||
@ -191,7 +191,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/atanh.xml">GLSL atanh man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
|
||||
template <typename genType>
|
||||
genType atanh(genType const & x);
|
||||
GLM_FUNC_DECL genType atanh(genType const & x);
|
||||
|
||||
/// @}
|
||||
}//namespace glm
|
||||
|
@ -1,7 +1,7 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
/// OpenGL Mathematics (glm.g-truc.net)
|
||||
///
|
||||
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
|
||||
/// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
|
||||
/// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
/// of this software and associated documentation files (the "Software"), to deal
|
||||
/// in the Software without restriction, including without limitation the rights
|
||||
|
@ -1,7 +1,7 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
/// OpenGL Mathematics (glm.g-truc.net)
|
||||
///
|
||||
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
|
||||
/// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
|
||||
/// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
/// of this software and associated documentation files (the "Software"), to deal
|
||||
/// in the Software without restriction, including without limitation the rights
|
||||
@ -55,7 +55,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/lessThan.xml">GLSL lessThan man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>
|
||||
template <typename vecType>
|
||||
typename vecType::bool_type lessThan(vecType const & x, vecType const & y);
|
||||
GLM_FUNC_DECL typename vecType::bool_type lessThan(vecType const & x, vecType const & y);
|
||||
|
||||
/// Returns the component-wise comparison of result x <= y.
|
||||
///
|
||||
@ -64,7 +64,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/lessThanEqual.xml">GLSL lessThanEqual man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>
|
||||
template <typename vecType>
|
||||
typename vecType::bool_type lessThanEqual(vecType const & x, vecType const & y);
|
||||
GLM_FUNC_DECL typename vecType::bool_type lessThanEqual(vecType const & x, vecType const & y);
|
||||
|
||||
/// Returns the component-wise comparison of result x > y.
|
||||
///
|
||||
@ -73,7 +73,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/greaterThan.xml">GLSL greaterThan man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>
|
||||
template <typename vecType>
|
||||
typename vecType::bool_type greaterThan(vecType const & x, vecType const & y);
|
||||
GLM_FUNC_DECL typename vecType::bool_type greaterThan(vecType const & x, vecType const & y);
|
||||
|
||||
/// Returns the component-wise comparison of result x >= y.
|
||||
///
|
||||
@ -82,7 +82,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/greaterThanEqual.xml">GLSL greaterThanEqual man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>
|
||||
template <typename vecType>
|
||||
typename vecType::bool_type greaterThanEqual(vecType const & x, vecType const & y);
|
||||
GLM_FUNC_DECL typename vecType::bool_type greaterThanEqual(vecType const & x, vecType const & y);
|
||||
|
||||
/// Returns the component-wise comparison of result x == y.
|
||||
///
|
||||
@ -91,7 +91,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/equal.xml">GLSL equal man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>
|
||||
template <typename vecType>
|
||||
typename vecType::bool_type equal(vecType const & x, vecType const & y);
|
||||
GLM_FUNC_DECL typename vecType::bool_type equal(vecType const & x, vecType const & y);
|
||||
|
||||
/// Returns the component-wise comparison of result x != y.
|
||||
///
|
||||
@ -100,7 +100,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/notEqual.xml">GLSL notEqual man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>
|
||||
template <typename vecType>
|
||||
typename vecType::bool_type notEqual(vecType const & x, vecType const & y);
|
||||
GLM_FUNC_DECL typename vecType::bool_type notEqual(vecType const & x, vecType const & y);
|
||||
|
||||
/// Returns true if any component of x is true.
|
||||
///
|
||||
@ -109,7 +109,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/any.xml">GLSL any man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>
|
||||
template <template <typename> class vecType>
|
||||
bool any(vecType<bool> const & v);
|
||||
GLM_FUNC_DECL bool any(vecType<bool> const & v);
|
||||
|
||||
/// Returns true if all components of x are true.
|
||||
///
|
||||
@ -118,7 +118,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/all.xml">GLSL all man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>
|
||||
template <template <typename> class vecType>
|
||||
bool all(vecType<bool> const & v);
|
||||
GLM_FUNC_DECL bool all(vecType<bool> const & v);
|
||||
|
||||
/// Returns the component-wise logical complement of x.
|
||||
/// /!\ Because of language incompatibilities between C++ and GLSL, GLM defines the function not but not_ instead.
|
||||
@ -128,7 +128,7 @@ namespace glm
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/not.xml">GLSL not man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>
|
||||
template <template <typename> class vecType>
|
||||
vecType<bool> not_(vecType<bool> const & v);
|
||||
GLM_FUNC_DECL vecType<bool> not_(vecType<bool> const & v);
|
||||
|
||||
/// @}
|
||||
}//namespace glm
|
||||
|
@ -1,7 +1,7 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
/// OpenGL Mathematics (glm.g-truc.net)
|
||||
///
|
||||
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
|
||||
/// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
|
||||
/// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
/// of this software and associated documentation files (the "Software"), to deal
|
||||
/// in the Software without restriction, including without limitation the rights
|
||||
|
@ -1,7 +1,7 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
/// OpenGL Mathematics (glm.g-truc.net)
|
||||
///
|
||||
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
|
||||
/// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
|
||||
/// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
/// of this software and associated documentation files (the "Software"), to deal
|
||||
/// in the Software without restriction, including without limitation the rights
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user