mirror of
https://github.com/g-truc/glm.git
synced 2024-11-27 02:34:35 +00:00
Updated header files formatting
This commit is contained in:
parent
9ecdd379e4
commit
14760e9770
@ -21,64 +21,59 @@
|
|||||||
# pragma message("GLM: GLM_GTX_associated_min_max extension included")
|
# pragma message("GLM: GLM_GTX_associated_min_max extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm
|
namespace glm{
|
||||||
|
namespace gtx{
|
||||||
|
namespace associated_min_max ///< GLM_GTX_associated_min_max extension: Min and max functions that return associated values not the compared onces.
|
||||||
{
|
{
|
||||||
namespace gtx
|
/// \addtogroup gtx_associated_min_max
|
||||||
{
|
///@{
|
||||||
//! GLM_GTX_associated_min_max extension: Min and max functions that return associated values not the compared onces.
|
|
||||||
namespace associated_min_max
|
|
||||||
{
|
|
||||||
/// \addtogroup gtx_associated_min_max
|
|
||||||
///@{
|
|
||||||
|
|
||||||
//! \brief Min comparison between 2 variables
|
//! \brief Min comparison between 2 variables
|
||||||
template<typename genTypeT, typename genTypeU>
|
template<typename genTypeT, typename genTypeU>
|
||||||
genTypeU associatedMin(
|
genTypeU associatedMin(
|
||||||
const genTypeT& x, const genTypeU& a,
|
const genTypeT& x, const genTypeU& a,
|
||||||
const genTypeT& y, const genTypeU& b);
|
const genTypeT& y, const genTypeU& b);
|
||||||
|
|
||||||
//! \brief Min comparison between 3 variables
|
//! \brief Min comparison between 3 variables
|
||||||
template<typename genTypeT, typename genTypeU>
|
template<typename genTypeT, typename genTypeU>
|
||||||
genTypeU associatedMin(
|
genTypeU associatedMin(
|
||||||
const genTypeT& x, const genTypeU& a,
|
const genTypeT& x, const genTypeU& a,
|
||||||
const genTypeT& y, const genTypeU& b,
|
const genTypeT& y, const genTypeU& b,
|
||||||
const genTypeT& z, const genTypeU& c);
|
const genTypeT& z, const genTypeU& c);
|
||||||
|
|
||||||
//! \brief Min comparison between 4 variables
|
//! \brief Min comparison between 4 variables
|
||||||
template<typename genTypeT, typename genTypeU>
|
template<typename genTypeT, typename genTypeU>
|
||||||
genTypeU associatedMin(
|
genTypeU associatedMin(
|
||||||
const genTypeT& x, const genTypeU& a,
|
const genTypeT& x, const genTypeU& a,
|
||||||
const genTypeT& y, const genTypeU& b,
|
const genTypeT& y, const genTypeU& b,
|
||||||
const genTypeT& z, const genTypeU& c,
|
const genTypeT& z, const genTypeU& c,
|
||||||
const genTypeT& w, const genTypeU& d);
|
const genTypeT& w, const genTypeU& d);
|
||||||
|
|
||||||
//! \brief Max comparison between 2 variables
|
//! \brief Max comparison between 2 variables
|
||||||
template<typename genTypeT, typename genTypeU>
|
template<typename genTypeT, typename genTypeU>
|
||||||
genTypeU associatedMax(
|
genTypeU associatedMax(
|
||||||
const genTypeT& x, const genTypeU& a,
|
const genTypeT& x, const genTypeU& a,
|
||||||
const genTypeT& y, const genTypeU& b);
|
const genTypeT& y, const genTypeU& b);
|
||||||
|
|
||||||
//! \brief Max comparison between 3 variables
|
//! \brief Max comparison between 3 variables
|
||||||
template<typename genTypeT, typename genTypeU>
|
template<typename genTypeT, typename genTypeU>
|
||||||
genTypeU associatedMax(
|
genTypeU associatedMax(
|
||||||
const genTypeT& x, const genTypeU& a,
|
const genTypeT& x, const genTypeU& a,
|
||||||
const genTypeT& y, const genTypeU& b,
|
const genTypeT& y, const genTypeU& b,
|
||||||
const genTypeT& z, const genTypeU& c);
|
const genTypeT& z, const genTypeU& c);
|
||||||
|
|
||||||
//! \brief Max comparison between 4 variables
|
//! \brief Max comparison between 4 variables
|
||||||
template<typename genTypeT, typename genTypeU>
|
template<typename genTypeT, typename genTypeU>
|
||||||
genTypeU associatedMax(
|
genTypeU associatedMax(
|
||||||
const genTypeT& x, const genTypeU& a,
|
const genTypeT& x, const genTypeU& a,
|
||||||
const genTypeT& y, const genTypeU& b,
|
const genTypeT& y, const genTypeU& b,
|
||||||
const genTypeT& z, const genTypeU& c,
|
const genTypeT& z, const genTypeU& c,
|
||||||
const genTypeT& w, const genTypeU& d);
|
const genTypeT& w, const genTypeU& d);
|
||||||
///@}
|
|
||||||
|
|
||||||
}//namespace associated_min_max
|
///@}
|
||||||
|
} //namespace associated_min_max
|
||||||
bool test();
|
} //namespace gtx
|
||||||
}//namespace gtx
|
} //namespace glm
|
||||||
}//namespace glm
|
|
||||||
|
|
||||||
#include "associated_min_max.inl"
|
#include "associated_min_max.inl"
|
||||||
|
|
||||||
|
125
glm/gtx/bit.hpp
125
glm/gtx/bit.hpp
@ -22,85 +22,82 @@
|
|||||||
# pragma message("GLM: GLM_GTX_bit extension included")
|
# pragma message("GLM: GLM_GTX_bit extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm
|
namespace glm{
|
||||||
|
namespace gtx{
|
||||||
|
namespace bit ///< GLM_GTX_bit extension: Allow to perform bit operations on integer values
|
||||||
{
|
{
|
||||||
namespace gtx{
|
using namespace gtc::half_float;
|
||||||
//! GLM_GTX_bit extension: Allow to perform bit operations on integer values
|
|
||||||
namespace bit
|
|
||||||
{
|
|
||||||
using namespace gtc::half_float;
|
|
||||||
|
|
||||||
/// \addtogroup gtx_bit
|
/// \addtogroup gtx_bit
|
||||||
///@{
|
///@{
|
||||||
|
|
||||||
//! Build a mask of 'count' bits
|
//! Build a mask of 'count' bits
|
||||||
//! From GLM_GTX_bit extension.
|
//! From GLM_GTX_bit extension.
|
||||||
template <typename genIType>
|
template <typename genIType>
|
||||||
genIType mask(genIType const & count);
|
genIType mask(genIType const & count);
|
||||||
|
|
||||||
//! Component wise extraction of bit fields.
|
//! Component wise extraction of bit fields.
|
||||||
//! genType and genIType could be a scalar or a vector.
|
//! genType and genIType could be a scalar or a vector.
|
||||||
//! From GLM_GTX_bit extension.
|
//! From GLM_GTX_bit extension.
|
||||||
template <typename genIUType, typename sizeType>
|
template <typename genIUType, typename sizeType>
|
||||||
genIUType extractField(
|
genIUType extractField(
|
||||||
genIUType const & v,
|
genIUType const & v,
|
||||||
sizeType const & first,
|
sizeType const & first,
|
||||||
sizeType const & count);
|
sizeType const & count);
|
||||||
|
|
||||||
//! Find the lowest bit set to 1 in a integer variable.
|
//! Find the lowest bit set to 1 in a integer variable.
|
||||||
//! From GLM_GTX_bit extension.
|
//! From GLM_GTX_bit extension.
|
||||||
template <typename genType>
|
template <typename genType>
|
||||||
int lowestBit(genType const & value);
|
int lowestBit(genType const & value);
|
||||||
|
|
||||||
//! Find the highest bit set to 1 in a integer variable.
|
//! Find the highest bit set to 1 in a integer variable.
|
||||||
//! From GLM_GTX_bit extension.
|
//! From GLM_GTX_bit extension.
|
||||||
template <typename genType>
|
template <typename genType>
|
||||||
int highestBit(genType const & value);
|
int highestBit(genType const & value);
|
||||||
|
|
||||||
//! Find the highest bit set to 1 in a integer variable and return its value.
|
//! Find the highest bit set to 1 in a integer variable and return its value.
|
||||||
//! From GLM_GTX_bit extension.
|
//! From GLM_GTX_bit extension.
|
||||||
template <typename genType>
|
template <typename genType>
|
||||||
genType highestBitValue(genType const & value);
|
genType highestBitValue(genType const & value);
|
||||||
|
|
||||||
//! Return true if the value is a power of two number.
|
//! Return true if the value is a power of two number.
|
||||||
//! From GLM_GTX_bit extension.
|
//! From GLM_GTX_bit extension.
|
||||||
template <typename genType>
|
template <typename genType>
|
||||||
bool isPowerOfTwo(genType const & value);
|
bool isPowerOfTwo(genType const & value);
|
||||||
|
|
||||||
//! Return the power of two number which value is just higher the input value.
|
//! Return the power of two number which value is just higher the input value.
|
||||||
//! From GLM_GTX_bit extension.
|
//! From GLM_GTX_bit extension.
|
||||||
template <typename genType>
|
template <typename genType>
|
||||||
genType powerOfTwoAbove(genType const & value);
|
genType powerOfTwoAbove(genType const & value);
|
||||||
|
|
||||||
//! Return the power of two number which value is just lower the input value.
|
//! Return the power of two number which value is just lower the input value.
|
||||||
//! From GLM_GTX_bit extension.
|
//! From GLM_GTX_bit extension.
|
||||||
template <typename genType>
|
template <typename genType>
|
||||||
genType powerOfTwoBelow(genType const & value);
|
genType powerOfTwoBelow(genType const & value);
|
||||||
|
|
||||||
//! Return the power of two number which value is the closet to the input value.
|
//! Return the power of two number which value is the closet to the input value.
|
||||||
//! From GLM_GTX_bit extension.
|
//! From GLM_GTX_bit extension.
|
||||||
template <typename genType>
|
template <typename genType>
|
||||||
genType powerOfTwoNearest(genType const & value);
|
genType powerOfTwoNearest(genType const & value);
|
||||||
|
|
||||||
//! Revert all bits of any integer based type.
|
//! Revert all bits of any integer based type.
|
||||||
//! From GLM_GTX_bit extension.
|
//! From GLM_GTX_bit extension.
|
||||||
template <typename genType>
|
template <typename genType>
|
||||||
genType bitRevert(genType const & value);
|
genType bitRevert(genType const & value);
|
||||||
|
|
||||||
//! Rotate all bits to the right.
|
//! Rotate all bits to the right.
|
||||||
//! From GLM_GTX_bit extension.
|
//! From GLM_GTX_bit extension.
|
||||||
template <typename genType>
|
template <typename genType>
|
||||||
genType bitRotateRight(genType const & In, std::size_t Shift);
|
genType bitRotateRight(genType const & In, std::size_t Shift);
|
||||||
|
|
||||||
//! Rotate all bits to the left.
|
//! Rotate all bits to the left.
|
||||||
//! From GLM_GTX_bit extension.
|
//! From GLM_GTX_bit extension.
|
||||||
template <typename genType>
|
template <typename genType>
|
||||||
genType bitRotateLeft(genType const & In, std::size_t Shift);
|
genType bitRotateLeft(genType const & In, std::size_t Shift);
|
||||||
|
|
||||||
///@}
|
///@}
|
||||||
|
}//namespace bit
|
||||||
}//namespace bit
|
}//namespace gtx
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "bit.inl"
|
#include "bit.inl"
|
||||||
|
@ -20,27 +20,25 @@
|
|||||||
# pragma message("GLM: GLM_GTX_closest_point extension included")
|
# pragma message("GLM: GLM_GTX_closest_point extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm
|
namespace glm{
|
||||||
|
namespace gtx{
|
||||||
|
namespace closest_point ///< GLM_GTX_closest_point extension: Find the point on a straight line which is the closet of a point.
|
||||||
{
|
{
|
||||||
namespace gtx{
|
|
||||||
//! GLM_GTX_closest_point extension: Find the point on a straight line which is the closet of a point.
|
|
||||||
namespace closest_point{
|
|
||||||
|
|
||||||
/// \addtogroup gtx_closest_point
|
/// \addtogroup gtx_closest_point
|
||||||
///@{
|
/// @{
|
||||||
|
|
||||||
//! Find the point on a straight line which is the closet of a point.
|
/// Find the point on a straight line which is the closet of a point.
|
||||||
//! From GLM_GTX_closest_point extension.
|
/// From GLM_GTX_closest_point extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tvec3<T> closestPointOnLine(
|
detail::tvec3<T> closestPointOnLine(
|
||||||
detail::tvec3<T> const & point,
|
detail::tvec3<T> const & point,
|
||||||
detail::tvec3<T> const & a,
|
detail::tvec3<T> const & a,
|
||||||
detail::tvec3<T> const & b);
|
detail::tvec3<T> const & b);
|
||||||
///@}
|
|
||||||
|
|
||||||
}//namespace closest_point
|
/// @}
|
||||||
}//namespace gtx
|
}// namespace closest_point
|
||||||
}//namespace glm
|
}// namespace gtx
|
||||||
|
}// namespace glm
|
||||||
|
|
||||||
#include "closest_point.inl"
|
#include "closest_point.inl"
|
||||||
|
|
||||||
|
@ -22,84 +22,82 @@
|
|||||||
# pragma message("GLM: GLM_GTX_color_cast extension included")
|
# pragma message("GLM: GLM_GTX_color_cast extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm
|
namespace glm{
|
||||||
|
namespace gtx{
|
||||||
|
namespace color_cast ///< GLM_GTX_color_cast extension: Conversion between two color types
|
||||||
{
|
{
|
||||||
namespace gtx{
|
using namespace gtx::number_precision;
|
||||||
//! GLM_GTX_color_cast extension: Conversion between two color types
|
|
||||||
namespace color_cast
|
|
||||||
{
|
|
||||||
using namespace gtx::number_precision;
|
|
||||||
|
|
||||||
/// \addtogroup gtx_color_cast
|
/// \addtogroup gtx_color_cast
|
||||||
///@{
|
///@{
|
||||||
|
|
||||||
//! Conversion of a floating value into a 8bit unsigned int value.
|
//! Conversion of a floating value into a 8bit unsigned int value.
|
||||||
//! From GLM_GTX_color_cast extension.
|
//! From GLM_GTX_color_cast extension.
|
||||||
template <typename valType> gtc::type_precision::uint8 u8channel_cast(valType a);
|
template <typename valType> gtc::type_precision::uint8 u8channel_cast(valType a);
|
||||||
|
|
||||||
//! Conversion of a floating value into a 16bit unsigned int value.
|
//! Conversion of a floating value into a 16bit unsigned int value.
|
||||||
//! From GLM_GTX_color_cast extension.
|
//! From GLM_GTX_color_cast extension.
|
||||||
template <typename valType> gtc::type_precision::uint16 u16channel_cast(valType a);
|
template <typename valType> gtc::type_precision::uint16 u16channel_cast(valType a);
|
||||||
|
|
||||||
template <typename T> gtc::type_precision::uint32 u32_rgbx_cast(const detail::tvec3<T>& c); //!< \brief Conversion of a 3 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension)
|
template <typename T> gtc::type_precision::uint32 u32_rgbx_cast(const detail::tvec3<T>& c); //!< \brief Conversion of a 3 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension)
|
||||||
template <typename T> gtc::type_precision::uint32 u32_xrgb_cast(const detail::tvec3<T>& c); //!< \brief Conversion of a 3 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension)
|
template <typename T> gtc::type_precision::uint32 u32_xrgb_cast(const detail::tvec3<T>& c); //!< \brief Conversion of a 3 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension)
|
||||||
template <typename T> gtc::type_precision::uint32 u32_bgrx_cast(const detail::tvec3<T>& c); //!< \brief Conversion of a 3 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension)
|
template <typename T> gtc::type_precision::uint32 u32_bgrx_cast(const detail::tvec3<T>& c); //!< \brief Conversion of a 3 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension)
|
||||||
template <typename T> gtc::type_precision::uint32 u32_xbgr_cast(const detail::tvec3<T>& c); //!< \brief Conversion of a 3 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension)
|
template <typename T> gtc::type_precision::uint32 u32_xbgr_cast(const detail::tvec3<T>& c); //!< \brief Conversion of a 3 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension)
|
||||||
|
|
||||||
template <typename T> gtc::type_precision::uint32 u32_rgba_cast(const detail::tvec4<T>& c); //!< \brief Conversion of a 4 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension)
|
template <typename T> gtc::type_precision::uint32 u32_rgba_cast(const detail::tvec4<T>& c); //!< \brief Conversion of a 4 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension)
|
||||||
template <typename T> gtc::type_precision::uint32 u32_argb_cast(const detail::tvec4<T>& c); //!< \brief Conversion of a 4 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension)
|
template <typename T> gtc::type_precision::uint32 u32_argb_cast(const detail::tvec4<T>& c); //!< \brief Conversion of a 4 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension)
|
||||||
template <typename T> gtc::type_precision::uint32 u32_bgra_cast(const detail::tvec4<T>& c); //!< \brief Conversion of a 4 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension)
|
template <typename T> gtc::type_precision::uint32 u32_bgra_cast(const detail::tvec4<T>& c); //!< \brief Conversion of a 4 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension)
|
||||||
template <typename T> gtc::type_precision::uint32 u32_abgr_cast(const detail::tvec4<T>& c); //!< \brief Conversion of a 4 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension)
|
template <typename T> gtc::type_precision::uint32 u32_abgr_cast(const detail::tvec4<T>& c); //!< \brief Conversion of a 4 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension)
|
||||||
|
|
||||||
template <typename T> gtc::type_precision::uint64 u64_rgbx_cast(const detail::tvec3<T>& c); //!< \brief Conversion of a 3 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension)
|
template <typename T> gtc::type_precision::uint64 u64_rgbx_cast(const detail::tvec3<T>& c); //!< \brief Conversion of a 3 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension)
|
||||||
template <typename T> gtc::type_precision::uint64 u64_xrgb_cast(const detail::tvec3<T>& c); //!< \brief Conversion of a 3 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension)
|
template <typename T> gtc::type_precision::uint64 u64_xrgb_cast(const detail::tvec3<T>& c); //!< \brief Conversion of a 3 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension)
|
||||||
template <typename T> gtc::type_precision::uint64 u64_bgrx_cast(const detail::tvec3<T>& c); //!< \brief Conversion of a 3 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension)
|
template <typename T> gtc::type_precision::uint64 u64_bgrx_cast(const detail::tvec3<T>& c); //!< \brief Conversion of a 3 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension)
|
||||||
template <typename T> gtc::type_precision::uint64 u64_xbgr_cast(const detail::tvec3<T>& c); //!< \brief Conversion of a 3 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension)
|
template <typename T> gtc::type_precision::uint64 u64_xbgr_cast(const detail::tvec3<T>& c); //!< \brief Conversion of a 3 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension)
|
||||||
|
|
||||||
template <typename T> gtc::type_precision::uint64 u64_rgba_cast(const detail::tvec4<T>& c); //!< \brief Conversion of a 4 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension)
|
template <typename T> gtc::type_precision::uint64 u64_rgba_cast(const detail::tvec4<T>& c); //!< \brief Conversion of a 4 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension)
|
||||||
template <typename T> gtc::type_precision::uint64 u64_argb_cast(const detail::tvec4<T>& c); //!< \brief Conversion of a 4 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension)
|
template <typename T> gtc::type_precision::uint64 u64_argb_cast(const detail::tvec4<T>& c); //!< \brief Conversion of a 4 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension)
|
||||||
template <typename T> gtc::type_precision::uint64 u64_bgra_cast(const detail::tvec4<T>& c); //!< \brief Conversion of a 4 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension)
|
template <typename T> gtc::type_precision::uint64 u64_bgra_cast(const detail::tvec4<T>& c); //!< \brief Conversion of a 4 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension)
|
||||||
template <typename T> gtc::type_precision::uint64 u64_abgr_cast(const detail::tvec4<T>& c); //!< \brief Conversion of a 4 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension)
|
template <typename T> gtc::type_precision::uint64 u64_abgr_cast(const detail::tvec4<T>& c); //!< \brief Conversion of a 4 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension)
|
||||||
|
|
||||||
template <typename T> gtx::number_precision::f16vec1 f16_channel_cast(T a); //!< \brief Conversion of a u8 or u16 value to a single channel floating value. (From GLM_GTX_color_cast extension)
|
template <typename T> gtx::number_precision::f16vec1 f16_channel_cast(T a); //!< \brief Conversion of a u8 or u16 value to a single channel floating value. (From GLM_GTX_color_cast extension)
|
||||||
|
|
||||||
template <typename T> gtc::type_precision::f16vec3 f16_rgbx_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
|
template <typename T> gtc::type_precision::f16vec3 f16_rgbx_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
|
||||||
template <typename T> gtc::type_precision::f16vec3 f16_xrgb_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
|
template <typename T> gtc::type_precision::f16vec3 f16_xrgb_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
|
||||||
template <typename T> gtc::type_precision::f16vec3 f16_bgrx_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
|
template <typename T> gtc::type_precision::f16vec3 f16_bgrx_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
|
||||||
template <typename T> gtc::type_precision::f16vec3 f16_xbgr_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
|
template <typename T> gtc::type_precision::f16vec3 f16_xbgr_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
|
||||||
|
|
||||||
template <typename T> gtc::type_precision::f16vec4 f16_rgba_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension)
|
template <typename T> gtc::type_precision::f16vec4 f16_rgba_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension)
|
||||||
template <typename T> gtc::type_precision::f16vec4 f16_argb_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension)
|
template <typename T> gtc::type_precision::f16vec4 f16_argb_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension)
|
||||||
template <typename T> gtc::type_precision::f16vec4 f16_bgra_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension)
|
template <typename T> gtc::type_precision::f16vec4 f16_bgra_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension)
|
||||||
template <typename T> gtc::type_precision::f16vec4 f16_abgr_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension)
|
template <typename T> gtc::type_precision::f16vec4 f16_abgr_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension)
|
||||||
|
|
||||||
template <typename T> gtx::number_precision::f32vec1 f32_channel_cast(T a); //!< \brief Conversion of a u8 or u16 value to a single channel floating value. (From GLM_GTX_color_cast extension)
|
template <typename T> gtx::number_precision::f32vec1 f32_channel_cast(T a); //!< \brief Conversion of a u8 or u16 value to a single channel floating value. (From GLM_GTX_color_cast extension)
|
||||||
|
|
||||||
template <typename T> gtc::type_precision::f32vec3 f32_rgbx_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
|
template <typename T> gtc::type_precision::f32vec3 f32_rgbx_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
|
||||||
template <typename T> gtc::type_precision::f32vec3 f32_xrgb_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
|
template <typename T> gtc::type_precision::f32vec3 f32_xrgb_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
|
||||||
template <typename T> gtc::type_precision::f32vec3 f32_bgrx_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
|
template <typename T> gtc::type_precision::f32vec3 f32_bgrx_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
|
||||||
template <typename T> gtc::type_precision::f32vec3 f32_xbgr_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
|
template <typename T> gtc::type_precision::f32vec3 f32_xbgr_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
|
||||||
|
|
||||||
template <typename T> gtc::type_precision::f32vec4 f32_rgba_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension)
|
template <typename T> gtc::type_precision::f32vec4 f32_rgba_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension)
|
||||||
template <typename T> gtc::type_precision::f32vec4 f32_argb_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension)
|
template <typename T> gtc::type_precision::f32vec4 f32_argb_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension)
|
||||||
template <typename T> gtc::type_precision::f32vec4 f32_bgra_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension)
|
template <typename T> gtc::type_precision::f32vec4 f32_bgra_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension)
|
||||||
template <typename T> gtc::type_precision::f32vec4 f32_abgr_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension)
|
template <typename T> gtc::type_precision::f32vec4 f32_abgr_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension)
|
||||||
|
|
||||||
template <typename T> gtx::number_precision::f64vec1 f64_channel_cast(T a); //!< \brief Conversion of a u8 or u16 value to a single channel floating value. (From GLM_GTX_color_cast extension)
|
template <typename T> gtx::number_precision::f64vec1 f64_channel_cast(T a); //!< \brief Conversion of a u8 or u16 value to a single channel floating value. (From GLM_GTX_color_cast extension)
|
||||||
|
|
||||||
template <typename T> gtc::type_precision::f64vec3 f64_rgbx_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
|
template <typename T> gtc::type_precision::f64vec3 f64_rgbx_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
|
||||||
template <typename T> gtc::type_precision::f64vec3 f64_xrgb_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
|
template <typename T> gtc::type_precision::f64vec3 f64_xrgb_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
|
||||||
template <typename T> gtc::type_precision::f64vec3 f64_bgrx_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
|
template <typename T> gtc::type_precision::f64vec3 f64_bgrx_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
|
||||||
template <typename T> gtc::type_precision::f64vec3 f64_xbgr_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
|
template <typename T> gtc::type_precision::f64vec3 f64_xbgr_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
|
||||||
|
|
||||||
template <typename T> gtc::type_precision::f64vec4 f64_rgba_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension)
|
template <typename T> gtc::type_precision::f64vec4 f64_rgba_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension)
|
||||||
template <typename T> gtc::type_precision::f64vec4 f64_argb_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension)
|
template <typename T> gtc::type_precision::f64vec4 f64_argb_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension)
|
||||||
template <typename T> gtc::type_precision::f64vec4 f64_bgra_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension)
|
template <typename T> gtc::type_precision::f64vec4 f64_bgra_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension)
|
||||||
template <typename T> gtc::type_precision::f64vec4 f64_abgr_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension)
|
template <typename T> gtc::type_precision::f64vec4 f64_abgr_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension)
|
||||||
|
|
||||||
///@}
|
///@}
|
||||||
}//namespace color_space
|
}//namespace color_space
|
||||||
}//namespace gtx
|
}//namespace gtx
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "color_cast.inl"
|
#include "color_cast.inl"
|
||||||
|
@ -20,57 +20,54 @@
|
|||||||
# pragma message("GLM: GLM_GTX_color_space extension included")
|
# pragma message("GLM: GLM_GTX_color_space extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm
|
namespace glm{
|
||||||
|
namespace gtx{
|
||||||
|
namespace color_space ///< GLM_GTX_color_space extension: Related to RGB to HSV conversions and operations
|
||||||
{
|
{
|
||||||
namespace gtx{
|
/// \addtogroup gtx_color_space
|
||||||
//! GLM_GTX_color_space extension: Related to RGB to HSV conversions and operations
|
/// @{
|
||||||
namespace color_space
|
|
||||||
{
|
|
||||||
/// \addtogroup gtx_color_space
|
|
||||||
///@{
|
|
||||||
|
|
||||||
//! Converts a color from HSV color space to its color in RGB color space.
|
//! Converts a color from HSV color space to its color in RGB color space.
|
||||||
//! From GLM_GTX_color_space extension.
|
//! From GLM_GTX_color_space extension.
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
detail::tvec3<valType> rgbColor(
|
detail::tvec3<valType> rgbColor(
|
||||||
detail::tvec3<valType> const & hsvValue);
|
detail::tvec3<valType> const & hsvValue);
|
||||||
|
|
||||||
//! Converts a color from RGB color space to its color in HSV color space.
|
//! Converts a color from RGB color space to its color in HSV color space.
|
||||||
//! From GLM_GTX_color_space extension.
|
//! From GLM_GTX_color_space extension.
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
detail::tvec3<valType> hsvColor(
|
detail::tvec3<valType> hsvColor(
|
||||||
detail::tvec3<valType> const & rgbValue);
|
detail::tvec3<valType> const & rgbValue);
|
||||||
|
|
||||||
//! Build a saturation matrix.
|
//! Build a saturation matrix.
|
||||||
//! From GLM_GTX_color_space extension
|
//! From GLM_GTX_color_space extension
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
detail::tmat4x4<valType> saturation(
|
detail::tmat4x4<valType> saturation(
|
||||||
valType const s);
|
valType const s);
|
||||||
|
|
||||||
//! Modify the saturation of a color.
|
//! Modify the saturation of a color.
|
||||||
//! From GLM_GTX_color_space extension.
|
//! From GLM_GTX_color_space extension.
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
detail::tvec3<valType> saturation(
|
detail::tvec3<valType> saturation(
|
||||||
valType const s,
|
valType const s,
|
||||||
detail::tvec3<valType> const & color);
|
detail::tvec3<valType> const & color);
|
||||||
|
|
||||||
//! Modify the saturation of a color.
|
//! Modify the saturation of a color.
|
||||||
//! From GLM_GTX_color_space extension.
|
//! From GLM_GTX_color_space extension.
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
detail::tvec4<valType> saturation(
|
detail::tvec4<valType> saturation(
|
||||||
valType const s,
|
valType const s,
|
||||||
detail::tvec4<valType> const & color);
|
detail::tvec4<valType> const & color);
|
||||||
|
|
||||||
//! Compute color luminosity associating ratios (0.33, 0.59, 0.11) to RGB canals.
|
//! Compute color luminosity associating ratios (0.33, 0.59, 0.11) to RGB canals.
|
||||||
//! From GLM_GTX_color_space extension.
|
//! From GLM_GTX_color_space extension.
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
valType luminosity(
|
valType luminosity(
|
||||||
detail::tvec3<valType> const & color);
|
detail::tvec3<valType> const & color);
|
||||||
|
|
||||||
///@}
|
/// @}
|
||||||
|
}//namespace color_space
|
||||||
}//namespace color_space
|
}//namespace gtx
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "color_space.inl"
|
#include "color_space.inl"
|
||||||
|
@ -20,44 +20,42 @@
|
|||||||
# pragma message("GLM: GLM_GTX_color_space_YCoCg extension included")
|
# pragma message("GLM: GLM_GTX_color_space_YCoCg extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm
|
namespace glm{
|
||||||
|
namespace gtx{
|
||||||
|
namespace color_space_YCoCg ///< GLM_GTX_color_space_YCoCg extension: RGB to YCoCg conversions and operations
|
||||||
{
|
{
|
||||||
namespace gtx{
|
/// \addtogroup gtx_color_space_YCoCg
|
||||||
//! GLM_GTX_color_space_YCoCg extension: RGB to YCoCg conversions and operations
|
///@{
|
||||||
namespace color_space_YCoCg
|
|
||||||
{
|
|
||||||
/// \addtogroup gtx_color_space_YCoCg
|
|
||||||
///@{
|
|
||||||
|
|
||||||
//! Convert a color from RGB color space to YCoCg color space.
|
//! Convert a color from RGB color space to YCoCg color space.
|
||||||
//! From GLM_GTX_color_space_YCoCg extension.
|
//! From GLM_GTX_color_space_YCoCg extension.
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
detail::tvec3<valType> rgb2YCoCg(
|
detail::tvec3<valType> rgb2YCoCg(
|
||||||
detail::tvec3<valType> const & rgbColor);
|
detail::tvec3<valType> const & rgbColor);
|
||||||
|
|
||||||
//! Convert a color from YCoCg color space to RGB color space.
|
//! Convert a color from YCoCg color space to RGB color space.
|
||||||
//! From GLM_GTX_color_space_YCoCg extension.
|
//! From GLM_GTX_color_space_YCoCg extension.
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
detail::tvec3<valType> YCoCg2rgb(
|
detail::tvec3<valType> YCoCg2rgb(
|
||||||
detail::tvec3<valType> const & YCoCgColor);
|
detail::tvec3<valType> const & YCoCgColor);
|
||||||
|
|
||||||
//! Convert a color from RGB color space to YCoCgR color space.
|
//! Convert a color from RGB color space to YCoCgR color space.
|
||||||
//! \see "YCoCg-R: A Color Space with RGB Reversibility and Low Dynamic Range"
|
//! \see "YCoCg-R: A Color Space with RGB Reversibility and Low Dynamic Range"
|
||||||
//! From GLM_GTX_color_space_YCoCg extension.
|
//! From GLM_GTX_color_space_YCoCg extension.
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
detail::tvec3<valType> rgb2YCoCgR(
|
detail::tvec3<valType> rgb2YCoCgR(
|
||||||
detail::tvec3<valType> const & rgbColor);
|
detail::tvec3<valType> const & rgbColor);
|
||||||
|
|
||||||
//! Convert a color from YCoCgR color space to RGB color space.
|
//! Convert a color from YCoCgR color space to RGB color space.
|
||||||
//! \see "YCoCg-R: A Color Space with RGB Reversibility and Low Dynamic Range"
|
//! \see "YCoCg-R: A Color Space with RGB Reversibility and Low Dynamic Range"
|
||||||
//! From GLM_GTX_color_space_YCoCg extension.
|
//! From GLM_GTX_color_space_YCoCg extension.
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
detail::tvec3<valType> YCoCgR2rgb(
|
detail::tvec3<valType> YCoCgR2rgb(
|
||||||
detail::tvec3<valType> const & YCoCgColor);
|
detail::tvec3<valType> const & YCoCgColor);
|
||||||
|
|
||||||
///@}
|
/// @}
|
||||||
}//namespace color_space_YCoCg
|
}//namespace color_space_YCoCg
|
||||||
}//namespace gtx
|
}//namespace gtx
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "color_space_YCoCg.inl"
|
#include "color_space_YCoCg.inl"
|
||||||
|
@ -28,132 +28,129 @@
|
|||||||
#include <cmath>
|
#include <cmath>
|
||||||
#endif//GLM_COMPILER
|
#endif//GLM_COMPILER
|
||||||
|
|
||||||
namespace glm
|
namespace glm{
|
||||||
|
namespace gtx{
|
||||||
|
namespace compatibility ///< GLM_GTX_compatibility extension: Provide functions to increase the compatibility with Cg and HLSL languages
|
||||||
{
|
{
|
||||||
namespace gtx{
|
/// \addtogroup gtx_compatibility
|
||||||
//! GLM_GTX_compatibility extension: Provide functions to increase the compatibility with Cg and HLSL languages
|
///@{
|
||||||
namespace compatibility
|
|
||||||
{
|
|
||||||
/// \addtogroup gtx_compatibility
|
|
||||||
///@{
|
|
||||||
|
|
||||||
template <typename T> GLM_FUNC_QUALIFIER T lerp(T x, T y, T a){return mix(x, y, a);} //!< \brief 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]. (From GLM_GTX_compatibility)
|
template <typename T> GLM_FUNC_QUALIFIER T lerp(T x, T y, T a){return mix(x, y, a);} //!< \brief 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]. (From GLM_GTX_compatibility)
|
||||||
template <typename T> GLM_FUNC_QUALIFIER detail::tvec2<T> lerp(const detail::tvec2<T>& x, const detail::tvec2<T>& y, T a){return mix(x, y, a);} //!< \brief 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]. (From GLM_GTX_compatibility)
|
template <typename T> GLM_FUNC_QUALIFIER detail::tvec2<T> lerp(const detail::tvec2<T>& x, const detail::tvec2<T>& y, T a){return mix(x, y, a);} //!< \brief 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]. (From GLM_GTX_compatibility)
|
||||||
template <typename T> GLM_FUNC_QUALIFIER detail::tvec3<T> lerp(const detail::tvec3<T>& x, const detail::tvec3<T>& y, T a){return mix(x, y, a);} //!< \brief 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]. (From GLM_GTX_compatibility)
|
template <typename T> GLM_FUNC_QUALIFIER detail::tvec3<T> lerp(const detail::tvec3<T>& x, const detail::tvec3<T>& y, T a){return mix(x, y, a);} //!< \brief 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]. (From GLM_GTX_compatibility)
|
||||||
template <typename T> GLM_FUNC_QUALIFIER detail::tvec4<T> lerp(const detail::tvec4<T>& x, const detail::tvec4<T>& y, T a){return mix(x, y, a);} //!< \brief 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]. (From GLM_GTX_compatibility)
|
template <typename T> GLM_FUNC_QUALIFIER detail::tvec4<T> lerp(const detail::tvec4<T>& x, const detail::tvec4<T>& y, T a){return mix(x, y, a);} //!< \brief 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]. (From GLM_GTX_compatibility)
|
||||||
template <typename T> GLM_FUNC_QUALIFIER detail::tvec2<T> lerp(const detail::tvec2<T>& x, const detail::tvec2<T>& y, const detail::tvec2<T>& a){return mix(x, y, a);} //!< \brief Returns the component-wise result of x * (1.0 - a) + y * a, i.e., the linear blend of x and y using vector a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility)
|
template <typename T> GLM_FUNC_QUALIFIER detail::tvec2<T> lerp(const detail::tvec2<T>& x, const detail::tvec2<T>& y, const detail::tvec2<T>& a){return mix(x, y, a);} //!< \brief Returns the component-wise result of x * (1.0 - a) + y * a, i.e., the linear blend of x and y using vector a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility)
|
||||||
template <typename T> GLM_FUNC_QUALIFIER detail::tvec3<T> lerp(const detail::tvec3<T>& x, const detail::tvec3<T>& y, const detail::tvec3<T>& a){return mix(x, y, a);} //!< \brief Returns the component-wise result of x * (1.0 - a) + y * a, i.e., the linear blend of x and y using vector a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility)
|
template <typename T> GLM_FUNC_QUALIFIER detail::tvec3<T> lerp(const detail::tvec3<T>& x, const detail::tvec3<T>& y, const detail::tvec3<T>& a){return mix(x, y, a);} //!< \brief Returns the component-wise result of x * (1.0 - a) + y * a, i.e., the linear blend of x and y using vector a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility)
|
||||||
template <typename T> GLM_FUNC_QUALIFIER detail::tvec4<T> lerp(const detail::tvec4<T>& x, const detail::tvec4<T>& y, const detail::tvec4<T>& a){return mix(x, y, a);} //!< \brief Returns the component-wise result of x * (1.0 - a) + y * a, i.e., the linear blend of x and y using vector a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility)
|
template <typename T> GLM_FUNC_QUALIFIER detail::tvec4<T> lerp(const detail::tvec4<T>& x, const detail::tvec4<T>& y, const detail::tvec4<T>& a){return mix(x, y, a);} //!< \brief Returns the component-wise result of x * (1.0 - a) + y * a, i.e., the linear blend of x and y using vector a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility)
|
||||||
|
|
||||||
template <typename T> GLM_FUNC_QUALIFIER T saturate(T x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility)
|
template <typename T> GLM_FUNC_QUALIFIER T saturate(T x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility)
|
||||||
template <typename T> GLM_FUNC_QUALIFIER detail::tvec2<T> saturate(const detail::tvec2<T>& x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility)
|
template <typename T> GLM_FUNC_QUALIFIER detail::tvec2<T> saturate(const detail::tvec2<T>& x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility)
|
||||||
template <typename T> GLM_FUNC_QUALIFIER detail::tvec3<T> saturate(const detail::tvec3<T>& x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility)
|
template <typename T> GLM_FUNC_QUALIFIER detail::tvec3<T> saturate(const detail::tvec3<T>& x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility)
|
||||||
template <typename T> GLM_FUNC_QUALIFIER detail::tvec4<T> saturate(const detail::tvec4<T>& x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility)
|
template <typename T> GLM_FUNC_QUALIFIER detail::tvec4<T> saturate(const detail::tvec4<T>& x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility)
|
||||||
|
|
||||||
template <typename T> GLM_FUNC_QUALIFIER T atan2(T x, T y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility)
|
template <typename T> GLM_FUNC_QUALIFIER T atan2(T x, T y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility)
|
||||||
template <typename T> GLM_FUNC_QUALIFIER detail::tvec2<T> atan2(const detail::tvec2<T>& x, const detail::tvec2<T>& y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility)
|
template <typename T> GLM_FUNC_QUALIFIER detail::tvec2<T> atan2(const detail::tvec2<T>& x, const detail::tvec2<T>& y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility)
|
||||||
template <typename T> GLM_FUNC_QUALIFIER detail::tvec3<T> atan2(const detail::tvec3<T>& x, const detail::tvec3<T>& y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility)
|
template <typename T> GLM_FUNC_QUALIFIER detail::tvec3<T> atan2(const detail::tvec3<T>& x, const detail::tvec3<T>& y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility)
|
||||||
template <typename T> GLM_FUNC_QUALIFIER detail::tvec4<T> atan2(const detail::tvec4<T>& x, const detail::tvec4<T>& y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility)
|
template <typename T> GLM_FUNC_QUALIFIER detail::tvec4<T> atan2(const detail::tvec4<T>& x, const detail::tvec4<T>& y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility)
|
||||||
|
|
||||||
template <typename genType> bool isfinite(genType const & x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility)
|
template <typename genType> bool isfinite(genType const & x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility)
|
||||||
template <typename valType> detail::tvec2<bool> isfinite(const detail::tvec2<valType>& x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility)
|
template <typename valType> detail::tvec2<bool> isfinite(const detail::tvec2<valType>& x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility)
|
||||||
template <typename valType> detail::tvec3<bool> isfinite(const detail::tvec3<valType>& x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility)
|
template <typename valType> detail::tvec3<bool> isfinite(const detail::tvec3<valType>& x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility)
|
||||||
template <typename valType> detail::tvec4<bool> isfinite(const detail::tvec4<valType>& x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility)
|
template <typename valType> detail::tvec4<bool> isfinite(const detail::tvec4<valType>& x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility)
|
||||||
|
|
||||||
template <typename genType> bool isinf(genType const & x); //!< \brief Determines whether the given floating-point value is infinite. (From GLM_GTX_compatibility extension)
|
template <typename genType> bool isinf(genType const & x); //!< \brief Determines whether the given floating-point value is infinite. (From GLM_GTX_compatibility extension)
|
||||||
template <typename genType> detail::tvec2<bool> isinf(const detail::tvec2<genType>& x); //!< \brief Determines whether the given floating-point value is infinite. (From GLM_GTX_compatibility extension)
|
template <typename genType> detail::tvec2<bool> isinf(const detail::tvec2<genType>& x); //!< \brief Determines whether the given floating-point value is infinite. (From GLM_GTX_compatibility extension)
|
||||||
template <typename genType> detail::tvec3<bool> isinf(const detail::tvec3<genType>& x); //!< \brief Determines whether the given floating-point value is infinite. (From GLM_GTX_compatibility extension)
|
template <typename genType> detail::tvec3<bool> isinf(const detail::tvec3<genType>& x); //!< \brief Determines whether the given floating-point value is infinite. (From GLM_GTX_compatibility extension)
|
||||||
template <typename genType> detail::tvec4<bool> isinf(const detail::tvec4<genType>& x); //!< \brief Determines whether the given floating-point value is infinite. (From GLM_GTX_compatibility extension)
|
template <typename genType> detail::tvec4<bool> isinf(const detail::tvec4<genType>& x); //!< \brief Determines whether the given floating-point value is infinite. (From GLM_GTX_compatibility extension)
|
||||||
|
|
||||||
template <typename genType> bool isnan(genType const & x); //!< \brief Checks given floating-point value for not a number (NAN) (From GLM_GTX_compatibility extension)
|
template <typename genType> bool isnan(genType const & x); //!< \brief Checks given floating-point value for not a number (NAN) (From GLM_GTX_compatibility extension)
|
||||||
template <typename genType> detail::tvec2<bool> isnan(const detail::tvec2<genType>& x); //!< \brief Checks given floating-point value for not a number (NAN) (From GLM_GTX_compatibility extension)
|
template <typename genType> detail::tvec2<bool> isnan(const detail::tvec2<genType>& x); //!< \brief Checks given floating-point value for not a number (NAN) (From GLM_GTX_compatibility extension)
|
||||||
template <typename genType> detail::tvec3<bool> isnan(const detail::tvec3<genType>& x); //!< \brief Checks given floating-point value for not a number (NAN) (From GLM_GTX_compatibility extension)
|
template <typename genType> detail::tvec3<bool> isnan(const detail::tvec3<genType>& x); //!< \brief Checks given floating-point value for not a number (NAN) (From GLM_GTX_compatibility extension)
|
||||||
template <typename genType> detail::tvec4<bool> isnan(const detail::tvec4<genType>& x); //!< \brief Checks given floating-point value for not a number (NAN) (From GLM_GTX_compatibility extension)
|
template <typename genType> detail::tvec4<bool> isnan(const detail::tvec4<genType>& x); //!< \brief Checks given floating-point value for not a number (NAN) (From GLM_GTX_compatibility extension)
|
||||||
|
|
||||||
typedef bool bool1; //!< \brief boolean type with 1 component. (From GLM_GTX_compatibility extension)
|
typedef bool bool1; //!< \brief boolean type with 1 component. (From GLM_GTX_compatibility extension)
|
||||||
typedef detail::tvec2<bool> bool2; //!< \brief boolean type with 2 components. (From GLM_GTX_compatibility extension)
|
typedef detail::tvec2<bool> bool2; //!< \brief boolean type with 2 components. (From GLM_GTX_compatibility extension)
|
||||||
typedef detail::tvec3<bool> bool3; //!< \brief boolean type with 3 components. (From GLM_GTX_compatibility extension)
|
typedef detail::tvec3<bool> bool3; //!< \brief boolean type with 3 components. (From GLM_GTX_compatibility extension)
|
||||||
typedef detail::tvec4<bool> bool4; //!< \brief boolean type with 4 components. (From GLM_GTX_compatibility extension)
|
typedef detail::tvec4<bool> bool4; //!< \brief boolean type with 4 components. (From GLM_GTX_compatibility extension)
|
||||||
|
|
||||||
typedef bool bool1x1; //!< \brief boolean matrix with 1 x 1 component. (From GLM_GTX_compatibility extension)
|
typedef bool bool1x1; //!< \brief boolean matrix with 1 x 1 component. (From GLM_GTX_compatibility extension)
|
||||||
typedef detail::tmat2x2<bool> bool2x2; //!< \brief boolean matrix with 2 x 2 components. (From GLM_GTX_compatibility extension)
|
typedef detail::tmat2x2<bool> bool2x2; //!< \brief boolean matrix with 2 x 2 components. (From GLM_GTX_compatibility extension)
|
||||||
typedef detail::tmat2x3<bool> bool2x3; //!< \brief boolean matrix with 2 x 3 components. (From GLM_GTX_compatibility extension)
|
typedef detail::tmat2x3<bool> bool2x3; //!< \brief boolean matrix with 2 x 3 components. (From GLM_GTX_compatibility extension)
|
||||||
typedef detail::tmat2x4<bool> bool2x4; //!< \brief boolean matrix with 2 x 4 components. (From GLM_GTX_compatibility extension)
|
typedef detail::tmat2x4<bool> bool2x4; //!< \brief boolean matrix with 2 x 4 components. (From GLM_GTX_compatibility extension)
|
||||||
typedef detail::tmat3x2<bool> bool3x2; //!< \brief boolean matrix with 3 x 2 components. (From GLM_GTX_compatibility extension)
|
typedef detail::tmat3x2<bool> bool3x2; //!< \brief boolean matrix with 3 x 2 components. (From GLM_GTX_compatibility extension)
|
||||||
typedef detail::tmat3x3<bool> bool3x3; //!< \brief boolean matrix with 3 x 3 components. (From GLM_GTX_compatibility extension)
|
typedef detail::tmat3x3<bool> bool3x3; //!< \brief boolean matrix with 3 x 3 components. (From GLM_GTX_compatibility extension)
|
||||||
typedef detail::tmat3x4<bool> bool3x4; //!< \brief boolean matrix with 3 x 4 components. (From GLM_GTX_compatibility extension)
|
typedef detail::tmat3x4<bool> bool3x4; //!< \brief boolean matrix with 3 x 4 components. (From GLM_GTX_compatibility extension)
|
||||||
typedef detail::tmat4x2<bool> bool4x2; //!< \brief boolean matrix with 4 x 2 components. (From GLM_GTX_compatibility extension)
|
typedef detail::tmat4x2<bool> bool4x2; //!< \brief boolean matrix with 4 x 2 components. (From GLM_GTX_compatibility extension)
|
||||||
typedef detail::tmat4x3<bool> bool4x3; //!< \brief boolean matrix with 4 x 3 components. (From GLM_GTX_compatibility extension)
|
typedef detail::tmat4x3<bool> bool4x3; //!< \brief boolean matrix with 4 x 3 components. (From GLM_GTX_compatibility extension)
|
||||||
typedef detail::tmat4x4<bool> bool4x4; //!< \brief boolean matrix with 4 x 4 components. (From GLM_GTX_compatibility extension)
|
typedef detail::tmat4x4<bool> bool4x4; //!< \brief boolean matrix with 4 x 4 components. (From GLM_GTX_compatibility extension)
|
||||||
|
|
||||||
typedef int int1; //!< \brief integer vector with 1 component. (From GLM_GTX_compatibility extension)
|
typedef int int1; //!< \brief integer vector with 1 component. (From GLM_GTX_compatibility extension)
|
||||||
typedef detail::tvec2<int> int2; //!< \brief integer vector with 2 components. (From GLM_GTX_compatibility extension)
|
typedef detail::tvec2<int> int2; //!< \brief integer vector with 2 components. (From GLM_GTX_compatibility extension)
|
||||||
typedef detail::tvec3<int> int3; //!< \brief integer vector with 3 components. (From GLM_GTX_compatibility extension)
|
typedef detail::tvec3<int> int3; //!< \brief integer vector with 3 components. (From GLM_GTX_compatibility extension)
|
||||||
typedef detail::tvec4<int> int4; //!< \brief integer vector with 4 components. (From GLM_GTX_compatibility extension)
|
typedef detail::tvec4<int> int4; //!< \brief integer vector with 4 components. (From GLM_GTX_compatibility extension)
|
||||||
|
|
||||||
typedef int int1x1; //!< \brief integer matrix with 1 component. (From GLM_GTX_compatibility extension)
|
typedef int int1x1; //!< \brief integer matrix with 1 component. (From GLM_GTX_compatibility extension)
|
||||||
typedef detail::tmat2x2<int> int2x2; //!< \brief integer matrix with 2 x 2 components. (From GLM_GTX_compatibility extension)
|
typedef detail::tmat2x2<int> int2x2; //!< \brief integer matrix with 2 x 2 components. (From GLM_GTX_compatibility extension)
|
||||||
typedef detail::tmat2x3<int> int2x3; //!< \brief integer matrix with 2 x 3 components. (From GLM_GTX_compatibility extension)
|
typedef detail::tmat2x3<int> int2x3; //!< \brief integer matrix with 2 x 3 components. (From GLM_GTX_compatibility extension)
|
||||||
typedef detail::tmat2x4<int> int2x4; //!< \brief integer matrix with 2 x 4 components. (From GLM_GTX_compatibility extension)
|
typedef detail::tmat2x4<int> int2x4; //!< \brief integer matrix with 2 x 4 components. (From GLM_GTX_compatibility extension)
|
||||||
typedef detail::tmat3x2<int> int3x2; //!< \brief integer matrix with 3 x 2 components. (From GLM_GTX_compatibility extension)
|
typedef detail::tmat3x2<int> int3x2; //!< \brief integer matrix with 3 x 2 components. (From GLM_GTX_compatibility extension)
|
||||||
typedef detail::tmat3x3<int> int3x3; //!< \brief integer matrix with 3 x 3 components. (From GLM_GTX_compatibility extension)
|
typedef detail::tmat3x3<int> int3x3; //!< \brief integer matrix with 3 x 3 components. (From GLM_GTX_compatibility extension)
|
||||||
typedef detail::tmat3x4<int> int3x4; //!< \brief integer matrix with 3 x 4 components. (From GLM_GTX_compatibility extension)
|
typedef detail::tmat3x4<int> int3x4; //!< \brief integer matrix with 3 x 4 components. (From GLM_GTX_compatibility extension)
|
||||||
typedef detail::tmat4x2<int> int4x2; //!< \brief integer matrix with 4 x 2 components. (From GLM_GTX_compatibility extension)
|
typedef detail::tmat4x2<int> int4x2; //!< \brief integer matrix with 4 x 2 components. (From GLM_GTX_compatibility extension)
|
||||||
typedef detail::tmat4x3<int> int4x3; //!< \brief integer matrix with 4 x 3 components. (From GLM_GTX_compatibility extension)
|
typedef detail::tmat4x3<int> int4x3; //!< \brief integer matrix with 4 x 3 components. (From GLM_GTX_compatibility extension)
|
||||||
typedef detail::tmat4x4<int> int4x4; //!< \brief integer matrix with 4 x 4 components. (From GLM_GTX_compatibility extension)
|
typedef detail::tmat4x4<int> int4x4; //!< \brief integer matrix with 4 x 4 components. (From GLM_GTX_compatibility extension)
|
||||||
|
|
||||||
typedef gtc::half_float::half half1; //!< \brief half-precision floating-point vector with 1 component. (From GLM_GTX_compatibility extension)
|
typedef gtc::half_float::half half1; //!< \brief half-precision floating-point vector with 1 component. (From GLM_GTX_compatibility extension)
|
||||||
typedef detail::tvec2<gtc::half_float::half> half2; //!< \brief half-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension)
|
typedef detail::tvec2<gtc::half_float::half> half2; //!< \brief half-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension)
|
||||||
typedef detail::tvec3<gtc::half_float::half> half3; //!< \brief half-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension)
|
typedef detail::tvec3<gtc::half_float::half> half3; //!< \brief half-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension)
|
||||||
typedef detail::tvec4<gtc::half_float::half> half4; //!< \brief half-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension)
|
typedef detail::tvec4<gtc::half_float::half> half4; //!< \brief half-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension)
|
||||||
|
|
||||||
typedef gtc::half_float::half half1x1; //!< \brief half-precision floating-point matrix with 1 component. (From GLM_GTX_compatibility extension)
|
typedef gtc::half_float::half half1x1; //!< \brief half-precision floating-point matrix with 1 component. (From GLM_GTX_compatibility extension)
|
||||||
typedef detail::tmat2x2<gtc::half_float::half> half2x2; //!< \brief half-precision floating-point matrix with 2 x 2 components. (From GLM_GTX_compatibility extension)
|
typedef detail::tmat2x2<gtc::half_float::half> half2x2; //!< \brief half-precision floating-point matrix with 2 x 2 components. (From GLM_GTX_compatibility extension)
|
||||||
typedef detail::tmat2x3<gtc::half_float::half> half2x3; //!< \brief half-precision floating-point matrix with 2 x 3 components. (From GLM_GTX_compatibility extension)
|
typedef detail::tmat2x3<gtc::half_float::half> half2x3; //!< \brief half-precision floating-point matrix with 2 x 3 components. (From GLM_GTX_compatibility extension)
|
||||||
typedef detail::tmat2x4<gtc::half_float::half> half2x4; //!< \brief half-precision floating-point matrix with 2 x 4 components. (From GLM_GTX_compatibility extension)
|
typedef detail::tmat2x4<gtc::half_float::half> half2x4; //!< \brief half-precision floating-point matrix with 2 x 4 components. (From GLM_GTX_compatibility extension)
|
||||||
typedef detail::tmat3x2<gtc::half_float::half> half3x2; //!< \brief half-precision floating-point matrix with 3 x 2 components. (From GLM_GTX_compatibility extension)
|
typedef detail::tmat3x2<gtc::half_float::half> half3x2; //!< \brief half-precision floating-point matrix with 3 x 2 components. (From GLM_GTX_compatibility extension)
|
||||||
typedef detail::tmat3x3<gtc::half_float::half> half3x3; //!< \brief half-precision floating-point matrix with 3 x 3 components. (From GLM_GTX_compatibility extension)
|
typedef detail::tmat3x3<gtc::half_float::half> half3x3; //!< \brief half-precision floating-point matrix with 3 x 3 components. (From GLM_GTX_compatibility extension)
|
||||||
typedef detail::tmat3x4<gtc::half_float::half> half3x4; //!< \brief half-precision floating-point matrix with 3 x 3 components. (From GLM_GTX_compatibility extension)
|
typedef detail::tmat3x4<gtc::half_float::half> half3x4; //!< \brief half-precision floating-point matrix with 3 x 3 components. (From GLM_GTX_compatibility extension)
|
||||||
typedef detail::tmat4x2<gtc::half_float::half> half4x2; //!< \brief half-precision floating-point matrix with 4 x 2 components. (From GLM_GTX_compatibility extension)
|
typedef detail::tmat4x2<gtc::half_float::half> half4x2; //!< \brief half-precision floating-point matrix with 4 x 2 components. (From GLM_GTX_compatibility extension)
|
||||||
typedef detail::tmat4x3<gtc::half_float::half> half4x3; //!< \brief half-precision floating-point matrix with 4 x 3 components. (From GLM_GTX_compatibility extension)
|
typedef detail::tmat4x3<gtc::half_float::half> half4x3; //!< \brief half-precision floating-point matrix with 4 x 3 components. (From GLM_GTX_compatibility extension)
|
||||||
typedef detail::tmat4x4<gtc::half_float::half> half4x4; //!< \brief half-precision floating-point matrix with 4 x 4 components. (From GLM_GTX_compatibility extension)
|
typedef detail::tmat4x4<gtc::half_float::half> half4x4; //!< \brief half-precision floating-point matrix with 4 x 4 components. (From GLM_GTX_compatibility extension)
|
||||||
|
|
||||||
typedef float float1; //!< \brief single-precision floating-point vector with 1 component. (From GLM_GTX_compatibility extension)
|
typedef float float1; //!< \brief single-precision floating-point vector with 1 component. (From GLM_GTX_compatibility extension)
|
||||||
typedef detail::tvec2<float> float2; //!< \brief single-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension)
|
typedef detail::tvec2<float> float2; //!< \brief single-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension)
|
||||||
typedef detail::tvec3<float> float3; //!< \brief single-precision floating-point vector with 3 components. (From GLM_GTX_compatibility extension)
|
typedef detail::tvec3<float> float3; //!< \brief single-precision floating-point vector with 3 components. (From GLM_GTX_compatibility extension)
|
||||||
typedef detail::tvec4<float> float4; //!< \brief single-precision floating-point vector with 4 components. (From GLM_GTX_compatibility extension)
|
typedef detail::tvec4<float> float4; //!< \brief single-precision floating-point vector with 4 components. (From GLM_GTX_compatibility extension)
|
||||||
|
|
||||||
typedef float float1x1; //!< \brief single-precision floating-point matrix with 1 component. (From GLM_GTX_compatibility extension)
|
typedef float float1x1; //!< \brief single-precision floating-point matrix with 1 component. (From GLM_GTX_compatibility extension)
|
||||||
typedef detail::tmat2x2<float> float2x2; //!< \brief single-precision floating-point matrix with 2 x 2 components. (From GLM_GTX_compatibility extension)
|
typedef detail::tmat2x2<float> float2x2; //!< \brief single-precision floating-point matrix with 2 x 2 components. (From GLM_GTX_compatibility extension)
|
||||||
typedef detail::tmat2x3<float> float2x3; //!< \brief single-precision floating-point matrix with 2 x 3 components. (From GLM_GTX_compatibility extension)
|
typedef detail::tmat2x3<float> float2x3; //!< \brief single-precision floating-point matrix with 2 x 3 components. (From GLM_GTX_compatibility extension)
|
||||||
typedef detail::tmat2x4<float> float2x4; //!< \brief single-precision floating-point matrix with 2 x 4 components. (From GLM_GTX_compatibility extension)
|
typedef detail::tmat2x4<float> float2x4; //!< \brief single-precision floating-point matrix with 2 x 4 components. (From GLM_GTX_compatibility extension)
|
||||||
typedef detail::tmat3x2<float> float3x2; //!< \brief single-precision floating-point matrix with 3 x 2 components. (From GLM_GTX_compatibility extension)
|
typedef detail::tmat3x2<float> float3x2; //!< \brief single-precision floating-point matrix with 3 x 2 components. (From GLM_GTX_compatibility extension)
|
||||||
typedef detail::tmat3x3<float> float3x3; //!< \brief single-precision floating-point matrix with 3 x 3 components. (From GLM_GTX_compatibility extension)
|
typedef detail::tmat3x3<float> float3x3; //!< \brief single-precision floating-point matrix with 3 x 3 components. (From GLM_GTX_compatibility extension)
|
||||||
typedef detail::tmat3x4<float> float3x4; //!< \brief single-precision floating-point matrix with 3 x 4 components. (From GLM_GTX_compatibility extension)
|
typedef detail::tmat3x4<float> float3x4; //!< \brief single-precision floating-point matrix with 3 x 4 components. (From GLM_GTX_compatibility extension)
|
||||||
typedef detail::tmat4x2<float> float4x2; //!< \brief single-precision floating-point matrix with 4 x 2 components. (From GLM_GTX_compatibility extension)
|
typedef detail::tmat4x2<float> float4x2; //!< \brief single-precision floating-point matrix with 4 x 2 components. (From GLM_GTX_compatibility extension)
|
||||||
typedef detail::tmat4x3<float> float4x3; //!< \brief single-precision floating-point matrix with 4 x 3 components. (From GLM_GTX_compatibility extension)
|
typedef detail::tmat4x3<float> float4x3; //!< \brief single-precision floating-point matrix with 4 x 3 components. (From GLM_GTX_compatibility extension)
|
||||||
typedef detail::tmat4x4<float> float4x4; //!< \brief single-precision floating-point matrix with 4 x 4 components. (From GLM_GTX_compatibility extension)
|
typedef detail::tmat4x4<float> float4x4; //!< \brief single-precision floating-point matrix with 4 x 4 components. (From GLM_GTX_compatibility extension)
|
||||||
|
|
||||||
typedef double double1; //!< \brief double-precision floating-point vector with 1 component. (From GLM_GTX_compatibility extension)
|
typedef double double1; //!< \brief double-precision floating-point vector with 1 component. (From GLM_GTX_compatibility extension)
|
||||||
typedef detail::tvec2<double> double2; //!< \brief double-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension)
|
typedef detail::tvec2<double> double2; //!< \brief double-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension)
|
||||||
typedef detail::tvec3<double> double3; //!< \brief double-precision floating-point vector with 3 components. (From GLM_GTX_compatibility extension)
|
typedef detail::tvec3<double> double3; //!< \brief double-precision floating-point vector with 3 components. (From GLM_GTX_compatibility extension)
|
||||||
typedef detail::tvec4<double> double4; //!< \brief double-precision floating-point vector with 4 components. (From GLM_GTX_compatibility extension)
|
typedef detail::tvec4<double> double4; //!< \brief double-precision floating-point vector with 4 components. (From GLM_GTX_compatibility extension)
|
||||||
|
|
||||||
typedef double double1x1; //!< \brief double-precision floating-point matrix with 1 component. (From GLM_GTX_compatibility extension)
|
typedef double double1x1; //!< \brief double-precision floating-point matrix with 1 component. (From GLM_GTX_compatibility extension)
|
||||||
typedef detail::tmat2x2<double> double2x2; //!< \brief double-precision floating-point matrix with 2 x 2 components. (From GLM_GTX_compatibility extension)
|
typedef detail::tmat2x2<double> double2x2; //!< \brief double-precision floating-point matrix with 2 x 2 components. (From GLM_GTX_compatibility extension)
|
||||||
typedef detail::tmat2x3<double> double2x3; //!< \brief double-precision floating-point matrix with 2 x 3 components. (From GLM_GTX_compatibility extension)
|
typedef detail::tmat2x3<double> double2x3; //!< \brief double-precision floating-point matrix with 2 x 3 components. (From GLM_GTX_compatibility extension)
|
||||||
typedef detail::tmat2x4<double> double2x4; //!< \brief double-precision floating-point matrix with 2 x 4 components. (From GLM_GTX_compatibility extension)
|
typedef detail::tmat2x4<double> double2x4; //!< \brief double-precision floating-point matrix with 2 x 4 components. (From GLM_GTX_compatibility extension)
|
||||||
typedef detail::tmat3x2<double> double3x2; //!< \brief double-precision floating-point matrix with 3 x 2 components. (From GLM_GTX_compatibility extension)
|
typedef detail::tmat3x2<double> double3x2; //!< \brief double-precision floating-point matrix with 3 x 2 components. (From GLM_GTX_compatibility extension)
|
||||||
typedef detail::tmat3x3<double> double3x3; //!< \brief double-precision floating-point matrix with 3 x 3 components. (From GLM_GTX_compatibility extension)
|
typedef detail::tmat3x3<double> double3x3; //!< \brief double-precision floating-point matrix with 3 x 3 components. (From GLM_GTX_compatibility extension)
|
||||||
typedef detail::tmat3x4<double> double3x4; //!< \brief double-precision floating-point matrix with 3 x 4 components. (From GLM_GTX_compatibility extension)
|
typedef detail::tmat3x4<double> double3x4; //!< \brief double-precision floating-point matrix with 3 x 4 components. (From GLM_GTX_compatibility extension)
|
||||||
typedef detail::tmat4x2<double> double4x2; //!< \brief double-precision floating-point matrix with 4 x 2 components. (From GLM_GTX_compatibility extension)
|
typedef detail::tmat4x2<double> double4x2; //!< \brief double-precision floating-point matrix with 4 x 2 components. (From GLM_GTX_compatibility extension)
|
||||||
typedef detail::tmat4x3<double> double4x3; //!< \brief double-precision floating-point matrix with 4 x 3 components. (From GLM_GTX_compatibility extension)
|
typedef detail::tmat4x3<double> double4x3; //!< \brief double-precision floating-point matrix with 4 x 3 components. (From GLM_GTX_compatibility extension)
|
||||||
typedef detail::tmat4x4<double> double4x4; //!< \brief double-precision floating-point matrix with 4 x 4 components. (From GLM_GTX_compatibility extension)
|
typedef detail::tmat4x4<double> double4x4; //!< \brief double-precision floating-point matrix with 4 x 4 components. (From GLM_GTX_compatibility extension)
|
||||||
|
|
||||||
///@}
|
/// @}
|
||||||
|
}//namespace compatibility
|
||||||
}//namespace compatibility
|
}//namespace gtx
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "compatibility.inl"
|
#include "compatibility.inl"
|
||||||
|
@ -20,43 +20,40 @@
|
|||||||
# pragma message("GLM: GLM_GTX_component_wise extension included")
|
# pragma message("GLM: GLM_GTX_component_wise extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm
|
namespace glm{
|
||||||
|
namespace gtx{
|
||||||
|
namespace component_wise ///< GLM_GTX_component_wise extension: Operations between components of a type
|
||||||
{
|
{
|
||||||
namespace gtx{
|
/// \addtogroup gtx_component_wise
|
||||||
//! GLM_GTX_component_wise extension: Operations between components of a type
|
/// @{
|
||||||
namespace component_wise
|
|
||||||
{
|
|
||||||
/// \addtogroup gtx_component_wise
|
|
||||||
///@{
|
|
||||||
|
|
||||||
//! Add all vector components together.
|
//! Add all vector components together.
|
||||||
//! From GLM_GTX_component_wise extension.
|
//! From GLM_GTX_component_wise extension.
|
||||||
template <typename genType>
|
template <typename genType>
|
||||||
typename genType::value_type compAdd(
|
typename genType::value_type compAdd(
|
||||||
genType const & v);
|
genType const & v);
|
||||||
|
|
||||||
//! Multiply all vector components together.
|
//! Multiply all vector components together.
|
||||||
//! From GLM_GTX_component_wise extension.
|
//! From GLM_GTX_component_wise extension.
|
||||||
template <typename genType>
|
template <typename genType>
|
||||||
typename genType::value_type compMul(
|
typename genType::value_type compMul(
|
||||||
genType const & v);
|
genType const & v);
|
||||||
|
|
||||||
//! Find the minimum value between single vector components.
|
//! Find the minimum value between single vector components.
|
||||||
//! From GLM_GTX_component_wise extension.
|
//! From GLM_GTX_component_wise extension.
|
||||||
template <typename genType>
|
template <typename genType>
|
||||||
typename genType::value_type compMin(
|
typename genType::value_type compMin(
|
||||||
genType const & v);
|
genType const & v);
|
||||||
|
|
||||||
//! Find the maximum value between single vector components.
|
//! Find the maximum value between single vector components.
|
||||||
//! From GLM_GTX_component_wise extension.
|
//! From GLM_GTX_component_wise extension.
|
||||||
template <typename genType>
|
template <typename genType>
|
||||||
typename genType::value_type compMax(
|
typename genType::value_type compMax(
|
||||||
genType const & v);
|
genType const & v);
|
||||||
|
|
||||||
///@}
|
/// @}
|
||||||
|
}//namespace component_wise
|
||||||
}//namespace component_wise
|
}//namespace gtx
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "component_wise.inl"
|
#include "component_wise.inl"
|
||||||
|
@ -22,35 +22,32 @@
|
|||||||
# pragma message("GLM: GLM_GTX_epsilon extension included")
|
# pragma message("GLM: GLM_GTX_epsilon extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm
|
namespace glm{
|
||||||
|
namespace gtx{
|
||||||
|
namespace epsilon ///< GLM_GTX_epsilon extension: Comparison functions for a user defined epsilon values.
|
||||||
{
|
{
|
||||||
namespace gtx{
|
/// \addtogroup gtx_epsilon
|
||||||
//! GLM_GTX_epsilon extension: Comparison functions for a user defined epsilon values.
|
///@{
|
||||||
namespace epsilon
|
|
||||||
{
|
|
||||||
/// \addtogroup gtx_epsilon
|
|
||||||
///@{
|
|
||||||
|
|
||||||
//! Returns the component-wise compare of |x - y| < epsilon.
|
//! Returns the component-wise compare of |x - y| < epsilon.
|
||||||
//! From GLM_GTX_epsilon extension.
|
//! From GLM_GTX_epsilon extension.
|
||||||
template <typename genTypeT, typename genTypeU>
|
template <typename genTypeT, typename genTypeU>
|
||||||
bool equalEpsilon(
|
bool equalEpsilon(
|
||||||
genTypeT const & x,
|
genTypeT const & x,
|
||||||
genTypeT const & y,
|
genTypeT const & y,
|
||||||
genTypeU const & epsilon);
|
genTypeU const & epsilon);
|
||||||
|
|
||||||
//! Returns the component-wise compare of |x - y| >= epsilon.
|
//! Returns the component-wise compare of |x - y| >= epsilon.
|
||||||
//! From GLM_GTX_epsilon extension.
|
//! From GLM_GTX_epsilon extension.
|
||||||
template <typename genTypeT, typename genTypeU>
|
template <typename genTypeT, typename genTypeU>
|
||||||
bool notEqualEpsilon(
|
bool notEqualEpsilon(
|
||||||
genTypeT const & x,
|
genTypeT const & x,
|
||||||
genTypeT const & y,
|
genTypeT const & y,
|
||||||
genTypeU const & epsilon);
|
genTypeU const & epsilon);
|
||||||
|
|
||||||
///@}
|
///@}
|
||||||
|
}//namespace epsilon
|
||||||
}//namespace epsilon
|
}//namespace gtx
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "epsilon.inl"
|
#include "epsilon.inl"
|
||||||
|
@ -26,114 +26,112 @@
|
|||||||
# pragma message("GLM: GLM_GTX_euler_angles extension included")
|
# pragma message("GLM: GLM_GTX_euler_angles extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm
|
namespace glm{
|
||||||
|
namespace gtx{
|
||||||
|
namespace euler_angles ///< GLM_GTX_euler_angles extension: Build matrices from Euler angles.
|
||||||
{
|
{
|
||||||
namespace gtx{
|
/// \addtogroup gtx_euler_angles
|
||||||
//! GLM_GTX_euler_angles extension: Build matrices from Euler angles.
|
/// @{
|
||||||
namespace euler_angles
|
|
||||||
{
|
|
||||||
/// \addtogroup gtx_euler_angles
|
|
||||||
///@{
|
|
||||||
|
|
||||||
//! Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle X.
|
//! Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle X.
|
||||||
//! From GLM_GTX_euler_angles extension.
|
//! From GLM_GTX_euler_angles extension.
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
detail::tmat4x4<valType> eulerAngleX(
|
detail::tmat4x4<valType> eulerAngleX(
|
||||||
valType const & angleX);
|
valType const & angleX);
|
||||||
|
|
||||||
//! Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle Y.
|
//! Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle Y.
|
||||||
//! From GLM_GTX_euler_angles extension.
|
//! From GLM_GTX_euler_angles extension.
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
detail::tmat4x4<valType> eulerAngleY(
|
detail::tmat4x4<valType> eulerAngleY(
|
||||||
valType const & angleY);
|
valType const & angleY);
|
||||||
|
|
||||||
//! Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle Z.
|
//! Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle Z.
|
||||||
//! From GLM_GTX_euler_angles extension.
|
//! From GLM_GTX_euler_angles extension.
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
detail::tmat4x4<valType> eulerAngleZ(
|
detail::tmat4x4<valType> eulerAngleZ(
|
||||||
valType const & angleZ);
|
valType const & angleZ);
|
||||||
|
|
||||||
//! Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Y).
|
//! Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Y).
|
||||||
//! From GLM_GTX_euler_angles extension.
|
//! From GLM_GTX_euler_angles extension.
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
detail::tmat4x4<valType> eulerAngleXY(
|
detail::tmat4x4<valType> eulerAngleXY(
|
||||||
valType const & angleX,
|
valType const & angleX,
|
||||||
valType const & angleY);
|
valType const & angleY);
|
||||||
|
|
||||||
//! Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X).
|
//! Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X).
|
||||||
//! From GLM_GTX_euler_angles extension.
|
//! From GLM_GTX_euler_angles extension.
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
detail::tmat4x4<valType> eulerAngleYX(
|
detail::tmat4x4<valType> eulerAngleYX(
|
||||||
valType const & angleY,
|
valType const & angleY,
|
||||||
valType const & angleX);
|
valType const & angleX);
|
||||||
|
|
||||||
//! Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Z).
|
//! Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Z).
|
||||||
//! From GLM_GTX_euler_angles extension.
|
//! From GLM_GTX_euler_angles extension.
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
detail::tmat4x4<valType> eulerAngleXZ(
|
detail::tmat4x4<valType> eulerAngleXZ(
|
||||||
valType const & angleX,
|
valType const & angleX,
|
||||||
valType const & angleZ);
|
valType const & angleZ);
|
||||||
|
|
||||||
//! Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Z * X).
|
//! Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Z * X).
|
||||||
//! From GLM_GTX_euler_angles extension.
|
//! From GLM_GTX_euler_angles extension.
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
detail::tmat4x4<valType> eulerAngleZX(
|
detail::tmat4x4<valType> eulerAngleZX(
|
||||||
valType const & angleZ,
|
valType const & angleZ,
|
||||||
valType const & angleX);
|
valType const & angleX);
|
||||||
|
|
||||||
//! Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * Z).
|
//! Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * Z).
|
||||||
//! From GLM_GTX_euler_angles extension.
|
//! From GLM_GTX_euler_angles extension.
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
detail::tmat4x4<valType> eulerAngleYZ(
|
detail::tmat4x4<valType> eulerAngleYZ(
|
||||||
valType const & angleY,
|
valType const & angleY,
|
||||||
valType const & angleZ);
|
valType const & angleZ);
|
||||||
|
|
||||||
//! Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Z * Y).
|
//! Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Z * Y).
|
||||||
//! From GLM_GTX_euler_angles extension.
|
//! From GLM_GTX_euler_angles extension.
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
detail::tmat4x4<valType> eulerAngleZY(
|
detail::tmat4x4<valType> eulerAngleZY(
|
||||||
valType const & angleZ,
|
valType const & angleZ,
|
||||||
valType const & angleY);
|
valType const & angleY);
|
||||||
|
|
||||||
//! Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z).
|
//! Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z).
|
||||||
//! From GLM_GTX_euler_angles extension.
|
//! From GLM_GTX_euler_angles extension.
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
detail::tmat4x4<valType> eulerAngleYXZ(
|
detail::tmat4x4<valType> eulerAngleYXZ(
|
||||||
valType const & yaw,
|
valType const & yaw,
|
||||||
valType const & pitch,
|
valType const & pitch,
|
||||||
valType const & roll);
|
valType const & roll);
|
||||||
|
|
||||||
//! Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z).
|
//! Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z).
|
||||||
//! From GLM_GTX_euler_angles extension.
|
//! From GLM_GTX_euler_angles extension.
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
detail::tmat4x4<valType> yawPitchRoll(
|
detail::tmat4x4<valType> yawPitchRoll(
|
||||||
valType const & yaw,
|
valType const & yaw,
|
||||||
valType const & pitch,
|
valType const & pitch,
|
||||||
valType const & roll);
|
valType const & roll);
|
||||||
|
|
||||||
//! Creates a 2D 2 * 2 rotation matrix from an euler angle.
|
//! Creates a 2D 2 * 2 rotation matrix from an euler angle.
|
||||||
//! From GLM_GTX_euler_angles extension.
|
//! From GLM_GTX_euler_angles extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tmat2x2<T> orientate2(T const & angle);
|
detail::tmat2x2<T> orientate2(T const & angle);
|
||||||
|
|
||||||
//! Creates a 2D 4 * 4 homogeneous rotation matrix from an euler angle.
|
//! Creates a 2D 4 * 4 homogeneous rotation matrix from an euler angle.
|
||||||
//! From GLM_GTX_euler_angles extension.
|
//! From GLM_GTX_euler_angles extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tmat3x3<T> orientate3(T const & angle);
|
detail::tmat3x3<T> orientate3(T const & angle);
|
||||||
|
|
||||||
//! Creates a 3D 3 * 3 rotation matrix from euler angles (Y * X * Z).
|
//! Creates a 3D 3 * 3 rotation matrix from euler angles (Y * X * Z).
|
||||||
//! From GLM_GTX_euler_angles extension.
|
//! From GLM_GTX_euler_angles extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tmat3x3<T> orientate3(detail::tvec3<T> const & angles);
|
detail::tmat3x3<T> orientate3(detail::tvec3<T> const & angles);
|
||||||
|
|
||||||
//! Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z).
|
//! Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z).
|
||||||
//! From GLM_GTX_euler_angles extension.
|
//! From GLM_GTX_euler_angles extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tmat4x4<T> orientate4(detail::tvec3<T> const & angles);
|
detail::tmat4x4<T> orientate4(detail::tvec3<T> const & angles);
|
||||||
|
|
||||||
///@}
|
/// @}
|
||||||
}//namespace euler_angles
|
}//namespace euler_angles
|
||||||
}//namespace gtx
|
}//namespace gtx
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "euler_angles.inl"
|
#include "euler_angles.inl"
|
||||||
|
@ -20,27 +20,24 @@
|
|||||||
# pragma message("GLM: GLM_GTX_extend extension included")
|
# pragma message("GLM: GLM_GTX_extend extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm
|
namespace glm{
|
||||||
|
namespace gtx{
|
||||||
|
namespace extend ///< GLM_GTX_extend extension: Extend a position from a source to a position at a defined length.
|
||||||
{
|
{
|
||||||
namespace gtx{
|
/// \addtogroup gtx_extend
|
||||||
//! GLM_GTX_extend extension: Extend a position from a source to a position at a defined length.
|
/// @{
|
||||||
namespace extend
|
|
||||||
{
|
|
||||||
/// \addtogroup gtx_extend
|
|
||||||
///@{
|
|
||||||
|
|
||||||
//! Extends of Length the Origin position using the (Source - Origin) direction.
|
//! Extends of Length the Origin position using the (Source - Origin) direction.
|
||||||
//! From GLM_GTX_extend extension.
|
//! From GLM_GTX_extend extension.
|
||||||
template <typename genType>
|
template <typename genType>
|
||||||
genType extend(
|
genType extend(
|
||||||
genType const & Origin,
|
genType const & Origin,
|
||||||
genType const & Source,
|
genType const & Source,
|
||||||
typename genType::value_type const Length);
|
typename genType::value_type const Length);
|
||||||
|
|
||||||
///@}
|
/// @}
|
||||||
|
}//namespace extend
|
||||||
}//namespace extend
|
}//namespace gtx
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "extend.inl"
|
#include "extend.inl"
|
||||||
|
@ -22,153 +22,150 @@
|
|||||||
# pragma message("GLM: GLM_GTX_extented_min_max extension included")
|
# pragma message("GLM: GLM_GTX_extented_min_max extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm
|
namespace glm{
|
||||||
|
namespace gtx{
|
||||||
|
namespace extented_min_max ///< GLM_GTX_extented_min_max extension: Min and max functions for 3 to 4 parameters.
|
||||||
{
|
{
|
||||||
namespace gtx{
|
/// \addtogroup gtx_extented_min_max
|
||||||
//! GLM_GTX_extented_min_max extension: Min and max functions for 3 to 4 parameters.
|
///@{
|
||||||
namespace extented_min_max
|
|
||||||
{
|
|
||||||
/// \addtogroup gtx_extented_min_max
|
|
||||||
///@{
|
|
||||||
|
|
||||||
//< Return the minimum component-wise values of 3 inputs
|
//< Return the minimum component-wise values of 3 inputs
|
||||||
//< From GLM_GTX_extented_min_max extension
|
//< From GLM_GTX_extented_min_max extension
|
||||||
template <typename T>
|
template <typename T>
|
||||||
T min(
|
T min(
|
||||||
T const & x,
|
T const & x,
|
||||||
T const & y,
|
T const & y,
|
||||||
T const & z);
|
T const & z);
|
||||||
|
|
||||||
//< Return the minimum component-wise values of 3 inputs
|
//< Return the minimum component-wise values of 3 inputs
|
||||||
//< From GLM_GTX_extented_min_max extension
|
//< From GLM_GTX_extented_min_max extension
|
||||||
template
|
template
|
||||||
<
|
<
|
||||||
typename T,
|
typename T,
|
||||||
template <typename> class C
|
template <typename> class C
|
||||||
>
|
>
|
||||||
C<T> min(
|
C<T> min(
|
||||||
C<T> const & x,
|
C<T> const & x,
|
||||||
typename C<T>::value_type const & y,
|
typename C<T>::value_type const & y,
|
||||||
typename C<T>::value_type const & z);
|
typename C<T>::value_type const & z);
|
||||||
|
|
||||||
//< Return the minimum component-wise values of 3 inputs
|
//< Return the minimum component-wise values of 3 inputs
|
||||||
//< From GLM_GTX_extented_min_max extension
|
//< From GLM_GTX_extented_min_max extension
|
||||||
template
|
template
|
||||||
<
|
<
|
||||||
typename T,
|
typename T,
|
||||||
template <typename> class C
|
template <typename> class C
|
||||||
>
|
>
|
||||||
C<T> min(
|
C<T> min(
|
||||||
C<T> const & x,
|
C<T> const & x,
|
||||||
C<T> const & y,
|
C<T> const & y,
|
||||||
C<T> const & z);
|
C<T> const & z);
|
||||||
|
|
||||||
//< Return the minimum component-wise values of 4 inputs
|
//< Return the minimum component-wise values of 4 inputs
|
||||||
//< From GLM_GTX_extented_min_max extension
|
//< From GLM_GTX_extented_min_max extension
|
||||||
template <typename T>
|
template <typename T>
|
||||||
T min(
|
T min(
|
||||||
T const & x,
|
T const & x,
|
||||||
T const & y,
|
T const & y,
|
||||||
T const & z,
|
T const & z,
|
||||||
T const & w);
|
T const & w);
|
||||||
|
|
||||||
//< Return the minimum component-wise values of 4 inputs
|
//< Return the minimum component-wise values of 4 inputs
|
||||||
//< From GLM_GTX_extented_min_max extension
|
//< From GLM_GTX_extented_min_max extension
|
||||||
template
|
template
|
||||||
<
|
<
|
||||||
typename T,
|
typename T,
|
||||||
template <typename> class C
|
template <typename> class C
|
||||||
>
|
>
|
||||||
C<T> min(
|
C<T> min(
|
||||||
C<T> const & x,
|
C<T> const & x,
|
||||||
typename C<T>::value_type const & y,
|
typename C<T>::value_type const & y,
|
||||||
typename C<T>::value_type const & z,
|
typename C<T>::value_type const & z,
|
||||||
typename C<T>::value_type const & w);
|
typename C<T>::value_type const & w);
|
||||||
|
|
||||||
//< Return the minimum component-wise values of 4 inputs
|
//< Return the minimum component-wise values of 4 inputs
|
||||||
//< From GLM_GTX_extented_min_max extension
|
//< From GLM_GTX_extented_min_max extension
|
||||||
template
|
template
|
||||||
<
|
<
|
||||||
typename T,
|
typename T,
|
||||||
template <typename> class C
|
template <typename> class C
|
||||||
>
|
>
|
||||||
C<T> min(
|
C<T> min(
|
||||||
C<T> const & x,
|
C<T> const & x,
|
||||||
C<T> const & y,
|
C<T> const & y,
|
||||||
C<T> const & z,
|
C<T> const & z,
|
||||||
C<T> const & w);
|
C<T> const & w);
|
||||||
|
|
||||||
//< Return the maximum component-wise values of 3 inputs
|
//< Return the maximum component-wise values of 3 inputs
|
||||||
//< From GLM_GTX_extented_min_max extension
|
//< From GLM_GTX_extented_min_max extension
|
||||||
template <typename T>
|
template <typename T>
|
||||||
T max(
|
T max(
|
||||||
T const & x,
|
T const & x,
|
||||||
T const & y,
|
T const & y,
|
||||||
T const & z);
|
T const & z);
|
||||||
|
|
||||||
//< Return the maximum component-wise values of 3 inputs
|
//< Return the maximum component-wise values of 3 inputs
|
||||||
//< From GLM_GTX_extented_min_max extension
|
//< From GLM_GTX_extented_min_max extension
|
||||||
template
|
template
|
||||||
<
|
<
|
||||||
typename T,
|
typename T,
|
||||||
template <typename> class C
|
template <typename> class C
|
||||||
>
|
>
|
||||||
C<T> max(
|
C<T> max(
|
||||||
C<T> const & x,
|
C<T> const & x,
|
||||||
typename C<T>::value_type const & y,
|
typename C<T>::value_type const & y,
|
||||||
typename C<T>::value_type const & z);
|
typename C<T>::value_type const & z);
|
||||||
|
|
||||||
//< Return the maximum component-wise values of 3 inputs
|
//< Return the maximum component-wise values of 3 inputs
|
||||||
//< From GLM_GTX_extented_min_max extension
|
//< From GLM_GTX_extented_min_max extension
|
||||||
template
|
template
|
||||||
<
|
<
|
||||||
typename T,
|
typename T,
|
||||||
template <typename> class C
|
template <typename> class C
|
||||||
>
|
>
|
||||||
C<T> max(
|
C<T> max(
|
||||||
C<T> const & x,
|
C<T> const & x,
|
||||||
C<T> const & y,
|
C<T> const & y,
|
||||||
C<T> const & z);
|
C<T> const & z);
|
||||||
|
|
||||||
//< Return the maximum component-wise values of 4 inputs
|
//< Return the maximum component-wise values of 4 inputs
|
||||||
//< From GLM_GTX_extented_min_max extension
|
//< From GLM_GTX_extented_min_max extension
|
||||||
template <typename T>
|
template <typename T>
|
||||||
T max(
|
T max(
|
||||||
T const & x,
|
T const & x,
|
||||||
T const & y,
|
T const & y,
|
||||||
T const & z,
|
T const & z,
|
||||||
T const & w);
|
T const & w);
|
||||||
|
|
||||||
//< Return the maximum component-wise values of 4 inputs
|
//< Return the maximum component-wise values of 4 inputs
|
||||||
//< From GLM_GTX_extented_min_max extension
|
//< From GLM_GTX_extented_min_max extension
|
||||||
template
|
template
|
||||||
<
|
<
|
||||||
typename T,
|
typename T,
|
||||||
template <typename> class C
|
template <typename> class C
|
||||||
>
|
>
|
||||||
C<T> max(
|
C<T> max(
|
||||||
C<T> const & x,
|
C<T> const & x,
|
||||||
typename C<T>::value_type const & y,
|
typename C<T>::value_type const & y,
|
||||||
typename C<T>::value_type const & z,
|
typename C<T>::value_type const & z,
|
||||||
typename C<T>::value_type const & w);
|
typename C<T>::value_type const & w);
|
||||||
|
|
||||||
//< Return the maximum component-wise values of 4 inputs
|
//< Return the maximum component-wise values of 4 inputs
|
||||||
//< From GLM_GTX_extented_min_max extension
|
//< From GLM_GTX_extented_min_max extension
|
||||||
template
|
template
|
||||||
<
|
<
|
||||||
typename T,
|
typename T,
|
||||||
template <typename> class C
|
template <typename> class C
|
||||||
>
|
>
|
||||||
C<T> max(
|
C<T> max(
|
||||||
C<T> const & x,
|
C<T> const & x,
|
||||||
C<T> const & y,
|
C<T> const & y,
|
||||||
C<T> const & z,
|
C<T> const & z,
|
||||||
C<T> const & w);
|
C<T> const & w);
|
||||||
|
|
||||||
///@}
|
/// @}
|
||||||
|
}//namespace extented_min_max
|
||||||
}//namespace extented_min_max
|
}//namespace gtx
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "extented_min_max.inl"
|
#include "extented_min_max.inl"
|
||||||
|
@ -22,59 +22,56 @@
|
|||||||
# pragma message("GLM: GLM_GTX_fast_exponential extension included")
|
# pragma message("GLM: GLM_GTX_fast_exponential extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm
|
namespace glm{
|
||||||
|
namespace gtx{
|
||||||
|
namespace fast_exponential ///< GLM_GTX_fast_exponential extension: Fast but less accurate implementations of exponential based functions.
|
||||||
{
|
{
|
||||||
namespace gtx{
|
using namespace gtc::half_float;
|
||||||
//! GLM_GTX_fast_exponential extension: Fast but less accurate implementations of exponential based functions.
|
/// \addtogroup gtx_fast_exponential
|
||||||
namespace fast_exponential
|
/// @{
|
||||||
{
|
|
||||||
using namespace gtc::half_float;
|
|
||||||
/// \addtogroup gtx_fast_exponential
|
|
||||||
///@{
|
|
||||||
|
|
||||||
//! Faster than the common pow function but less accurate.
|
//! Faster than the common pow function but less accurate.
|
||||||
//! From GLM_GTX_fast_exponential extension.
|
//! From GLM_GTX_fast_exponential extension.
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
valType fastPow(
|
valType fastPow(
|
||||||
valType const & x,
|
valType const & x,
|
||||||
valType const & y);
|
valType const & y);
|
||||||
|
|
||||||
//! Faster than the common pow function but less accurate.
|
//! Faster than the common pow function but less accurate.
|
||||||
//! From GLM_GTX_fast_exponential extension.
|
//! From GLM_GTX_fast_exponential extension.
|
||||||
template <typename T, typename U>
|
template <typename T, typename U>
|
||||||
T fastPow(
|
T fastPow(
|
||||||
const T& x,
|
const T& x,
|
||||||
const U& y);
|
const U& y);
|
||||||
|
|
||||||
//! Faster than the common exp function but less accurate.
|
//! Faster than the common exp function but less accurate.
|
||||||
//! From GLM_GTX_fast_exponential extension.
|
//! From GLM_GTX_fast_exponential extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
T fastExp(const T& x);
|
T fastExp(const T& x);
|
||||||
|
|
||||||
//! Faster than the common log function but less accurate.
|
//! Faster than the common log function but less accurate.
|
||||||
//! From GLM_GTX_fast_exponential extension.
|
//! From GLM_GTX_fast_exponential extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
T fastLog(const T& x);
|
T fastLog(const T& x);
|
||||||
|
|
||||||
//! Faster than the common exp2 function but less accurate.
|
//! Faster than the common exp2 function but less accurate.
|
||||||
//! From GLM_GTX_fast_exponential extension.
|
//! From GLM_GTX_fast_exponential extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
T fastExp2(const T& x);
|
T fastExp2(const T& x);
|
||||||
|
|
||||||
//! Faster than the common log2 function but less accurate.
|
//! Faster than the common log2 function but less accurate.
|
||||||
//! From GLM_GTX_fast_exponential extension.
|
//! From GLM_GTX_fast_exponential extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
T fastLog2(const T& x);
|
T fastLog2(const T& x);
|
||||||
|
|
||||||
//! Faster than the common ln function but less accurate.
|
//! Faster than the common ln function but less accurate.
|
||||||
//! From GLM_GTX_fast_exponential extension.
|
//! From GLM_GTX_fast_exponential extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
T fastLn(const T& x);
|
T fastLn(const T& x);
|
||||||
|
|
||||||
///@}
|
/// @}
|
||||||
|
}//namespace fast_exponential
|
||||||
}//namespace fast_exponential
|
}//namespace gtx
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "fast_exponential.inl"
|
#include "fast_exponential.inl"
|
||||||
|
@ -24,45 +24,42 @@
|
|||||||
# pragma message("GLM: GLM_GTX_fast_square_root extension included")
|
# pragma message("GLM: GLM_GTX_fast_square_root extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm
|
namespace glm{
|
||||||
|
namespace gtx{
|
||||||
|
namespace fast_square_root ///< GLM_GTX_fast_square_root extension: Fast but less accurate implementations of square root based functions.
|
||||||
{
|
{
|
||||||
namespace gtx{
|
/// \addtogroup gtx_fast_square_root
|
||||||
//! GLM_GTX_fast_square_root extension: Fast but less accurate implementations of square root based functions.
|
/// @{
|
||||||
namespace fast_square_root
|
|
||||||
{
|
|
||||||
/// \addtogroup gtx_fast_square_root
|
|
||||||
///@{
|
|
||||||
|
|
||||||
//! Faster than the common sqrt function but less accurate.
|
//! Faster than the common sqrt function but less accurate.
|
||||||
//! From GLM_GTX_fast_square_root extension.
|
//! From GLM_GTX_fast_square_root extension.
|
||||||
template <typename genType>
|
template <typename genType>
|
||||||
genType fastSqrt(genType const & x);
|
genType fastSqrt(genType const & x);
|
||||||
|
|
||||||
//! Faster than the common inversesqrt function but less accurate.
|
//! Faster than the common inversesqrt function but less accurate.
|
||||||
//! From GLM_GTX_fast_square_root extension.
|
//! From GLM_GTX_fast_square_root extension.
|
||||||
template <typename genType>
|
template <typename genType>
|
||||||
genType fastInverseSqrt(genType const & x);
|
genType fastInverseSqrt(genType const & x);
|
||||||
|
|
||||||
//! Faster than the common length function but less accurate.
|
//! Faster than the common length function but less accurate.
|
||||||
//! From GLM_GTX_fast_square_root extension.
|
//! From GLM_GTX_fast_square_root extension.
|
||||||
template <typename genType>
|
template <typename genType>
|
||||||
typename genType::value_type fastLength(genType const & x);
|
typename genType::value_type fastLength(genType const & x);
|
||||||
|
|
||||||
//! Faster than the common distance function but less accurate.
|
//! Faster than the common distance function but less accurate.
|
||||||
//! From GLM_GTX_fast_square_root extension.
|
//! From GLM_GTX_fast_square_root extension.
|
||||||
template <typename genType>
|
template <typename genType>
|
||||||
typename genType::value_type fastDistance(genType const & x, genType const & y);
|
typename genType::value_type fastDistance(genType const & x, genType const & y);
|
||||||
|
|
||||||
//! Faster than the common normalize function but less accurate.
|
//! Faster than the common normalize function but less accurate.
|
||||||
//! From GLM_GTX_fast_square_root extension.
|
//! From GLM_GTX_fast_square_root extension.
|
||||||
template <typename genType>
|
template <typename genType>
|
||||||
genType fastNormalize(genType const & x);
|
genType fastNormalize(genType const & x);
|
||||||
|
|
||||||
///@}
|
/// @}
|
||||||
|
}// namespace fast_square_root
|
||||||
}//namespace fast_square_root
|
}// namespace gtx
|
||||||
}// namespace gtx
|
}// namespace glm
|
||||||
}//namespace glm
|
|
||||||
|
|
||||||
#include "fast_square_root.inl"
|
#include "fast_square_root.inl"
|
||||||
|
|
||||||
|
@ -20,61 +20,58 @@
|
|||||||
# pragma message("GLM: GLM_GTX_fast_trigonometry extension included")
|
# pragma message("GLM: GLM_GTX_fast_trigonometry extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm
|
namespace glm{
|
||||||
|
namespace gtx{
|
||||||
|
namespace fast_trigonometry ///< GLM_GTX_fast_trigonometry extension: Fast but less accurate implementations of trigonometric functions.
|
||||||
{
|
{
|
||||||
namespace gtx{
|
/// \addtogroup gtx_fast_trigonometry
|
||||||
//! GLM_GTX_fast_trigonometry extension: Fast but less accurate implementations of trigonometric functions.
|
/// @{
|
||||||
namespace fast_trigonometry
|
|
||||||
{
|
|
||||||
/// \addtogroup gtx_fast_trigonometry
|
|
||||||
///@{
|
|
||||||
|
|
||||||
//! Faster than the common sin function but less accurate.
|
//! Faster than the common sin function but less accurate.
|
||||||
//! Defined between -2pi and 2pi.
|
//! Defined between -2pi and 2pi.
|
||||||
//! From GLM_GTX_fast_trigonometry extension.
|
//! From GLM_GTX_fast_trigonometry extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
T fastSin(const T& angle);
|
T fastSin(const T& angle);
|
||||||
|
|
||||||
//! Faster than the common cos function but less accurate.
|
//! Faster than the common cos function but less accurate.
|
||||||
//! Defined between -2pi and 2pi.
|
//! Defined between -2pi and 2pi.
|
||||||
//! From GLM_GTX_fast_trigonometry extension.
|
//! From GLM_GTX_fast_trigonometry extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
T fastCos(const T& angle);
|
T fastCos(const T& angle);
|
||||||
|
|
||||||
//! Faster than the common tan function but less accurate.
|
//! Faster than the common tan function but less accurate.
|
||||||
//! Defined between -2pi and 2pi.
|
//! Defined between -2pi and 2pi.
|
||||||
//! From GLM_GTX_fast_trigonometry extension.
|
//! From GLM_GTX_fast_trigonometry extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
T fastTan(const T& angle);
|
T fastTan(const T& angle);
|
||||||
|
|
||||||
//! Faster than the common asin function but less accurate.
|
//! Faster than the common asin function but less accurate.
|
||||||
//! Defined between -2pi and 2pi.
|
//! Defined between -2pi and 2pi.
|
||||||
//! From GLM_GTX_fast_trigonometry extension.
|
//! From GLM_GTX_fast_trigonometry extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
T fastAsin(const T& angle);
|
T fastAsin(const T& angle);
|
||||||
|
|
||||||
//! Faster than the common acos function but less accurate.
|
//! Faster than the common acos function but less accurate.
|
||||||
//! Defined between -2pi and 2pi.
|
//! Defined between -2pi and 2pi.
|
||||||
//! From GLM_GTX_fast_trigonometry extension.
|
//! From GLM_GTX_fast_trigonometry extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
T fastAcos(const T& angle);
|
T fastAcos(const T& angle);
|
||||||
|
|
||||||
//! Faster than the common atan function but less accurate.
|
//! Faster than the common atan function but less accurate.
|
||||||
//! Defined between -2pi and 2pi.
|
//! Defined between -2pi and 2pi.
|
||||||
//! From GLM_GTX_fast_trigonometry extension.
|
//! From GLM_GTX_fast_trigonometry extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
T fastAtan(const T& y, const T& x);
|
T fastAtan(const T& y, const T& x);
|
||||||
|
|
||||||
//! Faster than the common atan function but less accurate.
|
//! Faster than the common atan function but less accurate.
|
||||||
//! Defined between -2pi and 2pi.
|
//! Defined between -2pi and 2pi.
|
||||||
//! From GLM_GTX_fast_trigonometry extension.
|
//! From GLM_GTX_fast_trigonometry extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
T fastAtan(const T& angle);
|
T fastAtan(const T& angle);
|
||||||
|
|
||||||
///@}
|
/// @}
|
||||||
|
}//namespace fast_trigonometry
|
||||||
}//namespace fast_trigonometry
|
}//namespace gtx
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "fast_trigonometry.inl"
|
#include "fast_trigonometry.inl"
|
||||||
|
@ -21,30 +21,32 @@
|
|||||||
# pragma message("GLM: GLM_GTX_gradient_paint extension included")
|
# pragma message("GLM: GLM_GTX_gradient_paint extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm
|
namespace glm{
|
||||||
|
namespace gtx{
|
||||||
|
namespace gradient_paint ///< GLM_GTX_gradient_paint extension: Compute a radient gradient according section OpenVG 1.1 specifications, 9.3.2 Radial Gradients
|
||||||
{
|
{
|
||||||
namespace gtx{
|
using namespace gtx::optimum_pow;
|
||||||
//! GLM_GTX_gradient_paint extension: Compute a radient gradient according section OpenVG 1.1 specifications, 9.3.2 Radial Gradients
|
|
||||||
namespace gradient_paint
|
|
||||||
{
|
|
||||||
using namespace gtx::optimum_pow;
|
|
||||||
|
|
||||||
template <typename valType>
|
/// \addtogroup gtx_gradient_paint
|
||||||
valType radialGradient(
|
/// @{
|
||||||
glm::detail::tvec2<valType> const & Center,
|
|
||||||
valType const & Radius,
|
|
||||||
glm::detail::tvec2<valType> const & Focal,
|
|
||||||
glm::detail::tvec2<valType> const & Position);
|
|
||||||
|
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
valType linearGradient(
|
valType radialGradient(
|
||||||
glm::detail::tvec2<valType> const & Point0,
|
glm::detail::tvec2<valType> const & Center,
|
||||||
glm::detail::tvec2<valType> const & Point1,
|
valType const & Radius,
|
||||||
glm::detail::tvec2<valType> const & Position);
|
glm::detail::tvec2<valType> const & Focal,
|
||||||
|
glm::detail::tvec2<valType> const & Position);
|
||||||
|
|
||||||
}//namespace gradient_paint
|
template <typename valType>
|
||||||
}//namespace gtx
|
valType linearGradient(
|
||||||
}//namespace glm
|
glm::detail::tvec2<valType> const & Point0,
|
||||||
|
glm::detail::tvec2<valType> const & Point1,
|
||||||
|
glm::detail::tvec2<valType> const & Position);
|
||||||
|
|
||||||
|
/// @}
|
||||||
|
}// namespace gradient_paint
|
||||||
|
}// namespace gtx
|
||||||
|
}// namespace glm
|
||||||
|
|
||||||
#include "gradient_paint.inl"
|
#include "gradient_paint.inl"
|
||||||
|
|
||||||
|
@ -20,36 +20,33 @@
|
|||||||
# pragma message("GLM: GLM_GTX_handed_coordinate_space extension included")
|
# pragma message("GLM: GLM_GTX_handed_coordinate_space extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm
|
namespace glm{
|
||||||
|
namespace gtx{
|
||||||
|
namespace handed_coordinate_space ///< GLM_GTX_handed_coordinate_space extension: To know if a set of three basis vectors defines a right or left-handed coordinate system.
|
||||||
{
|
{
|
||||||
namespace gtx{
|
/// \addtogroup gtx_handed_coordinate_space
|
||||||
//! GLM_GTX_handed_coordinate_space extension: To know if a set of three basis vectors defines a right or left-handed coordinate system.
|
/// @{
|
||||||
namespace handed_coordinate_space
|
|
||||||
{
|
|
||||||
/// \addtogroup gtx_handed_coordinate_space
|
|
||||||
///@{
|
|
||||||
|
|
||||||
//! Return if a trihedron right handed or not.
|
//! Return if a trihedron right handed or not.
|
||||||
//! From GLM_GTX_handed_coordinate_space extension.
|
//! From GLM_GTX_handed_coordinate_space extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
bool rightHanded(
|
bool rightHanded(
|
||||||
detail::tvec3<T> const & tangent,
|
detail::tvec3<T> const & tangent,
|
||||||
detail::tvec3<T> const & binormal,
|
detail::tvec3<T> const & binormal,
|
||||||
detail::tvec3<T> const & normal);
|
detail::tvec3<T> const & normal);
|
||||||
|
|
||||||
//! Return if a trihedron left handed or not.
|
//! Return if a trihedron left handed or not.
|
||||||
//! From GLM_GTX_handed_coordinate_space extension.
|
//! From GLM_GTX_handed_coordinate_space extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
bool leftHanded(
|
bool leftHanded(
|
||||||
detail::tvec3<T> const & tangent,
|
detail::tvec3<T> const & tangent,
|
||||||
detail::tvec3<T> const & binormal,
|
detail::tvec3<T> const & binormal,
|
||||||
detail::tvec3<T> const & normal);
|
detail::tvec3<T> const & normal);
|
||||||
|
|
||||||
///@}
|
/// @}
|
||||||
|
}// namespace handed_coordinate_space
|
||||||
}//namespace handed_coordinate_space
|
}// namespace gtx
|
||||||
}//namespace gtx
|
}// namespace glm
|
||||||
}//namespace glm
|
|
||||||
|
|
||||||
#include "handed_coordinate_space.inl"
|
#include "handed_coordinate_space.inl"
|
||||||
|
|
||||||
|
@ -20,76 +20,73 @@
|
|||||||
# pragma message("GLM: GLM_GTX_inertia extension included")
|
# pragma message("GLM: GLM_GTX_inertia extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm
|
namespace glm{
|
||||||
|
namespace gtx{
|
||||||
|
namespace inertia ///< GLM_GTX_inertia extension: Create inertia matrices
|
||||||
{
|
{
|
||||||
namespace gtx{
|
/// \addtogroup gtx_inertia
|
||||||
//! GLM_GTX_inertia extension: Create inertia matrices
|
/// @{
|
||||||
namespace inertia
|
|
||||||
{
|
|
||||||
/// \addtogroup gtx_inertia
|
|
||||||
///@{
|
|
||||||
|
|
||||||
//! Build an inertia matrix for a box.
|
//! Build an inertia matrix for a box.
|
||||||
//! From GLM_GTX_inertia extension.
|
//! From GLM_GTX_inertia extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tmat3x3<T> boxInertia3(
|
detail::tmat3x3<T> boxInertia3(
|
||||||
const T Mass,
|
const T Mass,
|
||||||
const detail::tvec3<T>& Scale);
|
const detail::tvec3<T>& Scale);
|
||||||
|
|
||||||
//! Build an inertia matrix for a box.
|
//! Build an inertia matrix for a box.
|
||||||
//! From GLM_GTX_inertia extension.
|
//! From GLM_GTX_inertia extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tmat4x4<T> boxInertia4(
|
detail::tmat4x4<T> boxInertia4(
|
||||||
const T Mass,
|
const T Mass,
|
||||||
const detail::tvec3<T>& Scale);
|
const detail::tvec3<T>& Scale);
|
||||||
|
|
||||||
//! Build an inertia matrix for a disk.
|
//! Build an inertia matrix for a disk.
|
||||||
//! From GLM_GTX_inertia extension.
|
//! From GLM_GTX_inertia extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tmat3x3<T> diskInertia3(
|
detail::tmat3x3<T> diskInertia3(
|
||||||
const T Mass,
|
const T Mass,
|
||||||
const T Radius);
|
const T Radius);
|
||||||
|
|
||||||
//! Build an inertia matrix for a disk.
|
//! Build an inertia matrix for a disk.
|
||||||
//! From GLM_GTX_inertia extension.
|
//! From GLM_GTX_inertia extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tmat4x4<T> diskInertia4(
|
detail::tmat4x4<T> diskInertia4(
|
||||||
const T Mass,
|
const T Mass,
|
||||||
const T Radius);
|
const T Radius);
|
||||||
|
|
||||||
//! Build an inertia matrix for a ball.
|
//! Build an inertia matrix for a ball.
|
||||||
//! From GLM_GTX_inertia extension.
|
//! From GLM_GTX_inertia extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tmat3x3<T> ballInertia3(
|
detail::tmat3x3<T> ballInertia3(
|
||||||
const T Mass,
|
const T Mass,
|
||||||
const T Radius);
|
const T Radius);
|
||||||
|
|
||||||
//! Build an inertia matrix for a ball.
|
//! Build an inertia matrix for a ball.
|
||||||
//! From GLM_GTX_inertia extension.
|
//! From GLM_GTX_inertia extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tmat4x4<T> ballInertia4(
|
detail::tmat4x4<T> ballInertia4(
|
||||||
const T Mass,
|
const T Mass,
|
||||||
const T Radius);
|
const T Radius);
|
||||||
|
|
||||||
//! Build an inertia matrix for a sphere.
|
//! Build an inertia matrix for a sphere.
|
||||||
//! From GLM_GTX_inertia extension.
|
//! From GLM_GTX_inertia extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tmat3x3<T> sphereInertia3(
|
detail::tmat3x3<T> sphereInertia3(
|
||||||
const T Mass,
|
const T Mass,
|
||||||
const T Radius);
|
const T Radius);
|
||||||
|
|
||||||
//! Build an inertia matrix for a sphere.
|
//! Build an inertia matrix for a sphere.
|
||||||
//! From GLM_GTX_inertia extension.
|
//! From GLM_GTX_inertia extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tmat4x4<T> sphereInertia4(
|
detail::tmat4x4<T> sphereInertia4(
|
||||||
const T Mass,
|
const T Mass,
|
||||||
const T Radius);
|
const T Radius);
|
||||||
|
|
||||||
///@}
|
/// @}
|
||||||
|
}// namespace inertia
|
||||||
}//namespace inertia
|
}// namespace gtx
|
||||||
}//namespace gtx
|
}// namespace glm
|
||||||
}//namespace glm
|
|
||||||
|
|
||||||
#include "inertia.inl"
|
#include "inertia.inl"
|
||||||
|
|
||||||
|
@ -21,25 +21,23 @@
|
|||||||
# pragma message("GLM: GLM_GTX_int_10_10_10_2 extension included")
|
# pragma message("GLM: GLM_GTX_int_10_10_10_2 extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm
|
namespace glm{
|
||||||
|
namespace gtx{
|
||||||
|
namespace int_10_10_10_2 ///< GLM_GTX_int_10_10_10_2 extension: Add support for integer for core functions
|
||||||
{
|
{
|
||||||
namespace gtx{
|
using namespace gtx::raw_data;
|
||||||
//! GLM_GTX_int_10_10_10_2 extension: Add support for integer for core functions
|
|
||||||
namespace int_10_10_10_2
|
|
||||||
{
|
|
||||||
using namespace gtx::raw_data;
|
|
||||||
|
|
||||||
/// \addtogroup gtx_int_10_10_10_2
|
/// \addtogroup gtx_int_10_10_10_2
|
||||||
///@{
|
///@{
|
||||||
|
|
||||||
//! From GLM_GTX_int_10_10_10_2 extension.
|
//! From GLM_GTX_int_10_10_10_2 extension.
|
||||||
//! Cast a vec4 to an u_10_10_10_2.
|
//! Cast a vec4 to an u_10_10_10_2.
|
||||||
dword uint10_10_10_2_cast(glm::vec4 const & v);
|
dword uint10_10_10_2_cast(glm::vec4 const & v);
|
||||||
|
|
||||||
///@}
|
///@}
|
||||||
|
|
||||||
}//namespace integer
|
}//namespace integer
|
||||||
}//namespace gtx
|
}//namespace gtx
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "int_10_10_10_2.inl"
|
#include "int_10_10_10_2.inl"
|
||||||
|
@ -20,36 +20,33 @@
|
|||||||
# pragma message("GLM: GLM_GTX_integer extension included")
|
# pragma message("GLM: GLM_GTX_integer extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm
|
namespace glm{
|
||||||
|
namespace gtx{
|
||||||
|
namespace integer ///< GLM_GTX_integer extension: Add support for integer for core functions
|
||||||
{
|
{
|
||||||
namespace gtx{
|
/// \addtogroup gtx_integer
|
||||||
//! GLM_GTX_integer extension: Add support for integer for core functions
|
/// @{
|
||||||
namespace integer
|
|
||||||
{
|
|
||||||
/// \addtogroup gtx_integer
|
|
||||||
///@{
|
|
||||||
|
|
||||||
//! Returns x raised to the y power.
|
//! Returns x raised to the y power.
|
||||||
//! From GLM_GTX_integer extension.
|
//! From GLM_GTX_integer extension.
|
||||||
int pow(int x, int y);
|
int pow(int x, int y);
|
||||||
|
|
||||||
//! Returns the positive square root of x.
|
//! Returns the positive square root of x.
|
||||||
//! From GLM_GTX_integer extension.
|
//! From GLM_GTX_integer extension.
|
||||||
int sqrt(int x);
|
int sqrt(int x);
|
||||||
|
|
||||||
//! Modulus. Returns x - y * floor(x / y) for each component in x using the floating point value y.
|
//! Modulus. Returns x - y * floor(x / y) for each component in x using the floating point value y.
|
||||||
//! From GLM_GTX_integer extension.
|
//! From GLM_GTX_integer extension.
|
||||||
int mod(int x, int y);
|
int mod(int x, int y);
|
||||||
|
|
||||||
//! Return the factorial value of a number (!12 max, integer only)
|
//! Return the factorial value of a number (!12 max, integer only)
|
||||||
//! From GLM_GTX_integer extension.
|
//! From GLM_GTX_integer extension.
|
||||||
template <typename genType>
|
template <typename genType>
|
||||||
genType factorial(genType const & x);
|
genType factorial(genType const & x);
|
||||||
|
|
||||||
///@}
|
/// @}
|
||||||
|
}//namespace integer
|
||||||
}//namespace integer
|
}//namespace gtx
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "integer.inl"
|
#include "integer.inl"
|
||||||
|
@ -22,50 +22,47 @@
|
|||||||
# pragma message("GLM: GLM_GTX_closest_point extension included")
|
# pragma message("GLM: GLM_GTX_closest_point extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm
|
namespace glm{
|
||||||
|
namespace gtx{
|
||||||
|
namespace intersect ///< GLM_GTX_intersect extension: Add intersection functions
|
||||||
{
|
{
|
||||||
namespace gtx{
|
/// \addtogroup gtx_intersect
|
||||||
//! GLM_GTX_intersect extension: Add intersection functions
|
/// @{
|
||||||
namespace intersect
|
|
||||||
{
|
|
||||||
/// \addtogroup gtx_intersect
|
|
||||||
///@{
|
|
||||||
|
|
||||||
//! Compute the intersection of a ray and a triangle.
|
//! Compute the intersection of a ray and a triangle.
|
||||||
//! From GLM_GTX_intersect extension.
|
//! From GLM_GTX_intersect extension.
|
||||||
template <typename genType>
|
template <typename genType>
|
||||||
bool intersectRayTriangle(
|
bool intersectRayTriangle(
|
||||||
genType const & orig, genType const & dir,
|
genType const & orig, genType const & dir,
|
||||||
genType const & vert0, genType const & vert1, genType const & vert2,
|
genType const & vert0, genType const & vert1, genType const & vert2,
|
||||||
genType & baryPosition);
|
genType & baryPosition);
|
||||||
|
|
||||||
//! Compute the intersection of a line and a triangle.
|
//! Compute the intersection of a line and a triangle.
|
||||||
//! From GLM_GTX_intersect extension.
|
//! From GLM_GTX_intersect extension.
|
||||||
template <typename genType>
|
template <typename genType>
|
||||||
bool intersectLineTriangle(
|
bool intersectLineTriangle(
|
||||||
genType const & orig, genType const & dir,
|
genType const & orig, genType const & dir,
|
||||||
genType const & vert0, genType const & vert1, genType const & vert2,
|
genType const & vert0, genType const & vert1, genType const & vert2,
|
||||||
genType & position);
|
genType & position);
|
||||||
|
|
||||||
//! Compute the intersection of a ray and a sphere.
|
//! Compute the intersection of a ray and a sphere.
|
||||||
//! From GLM_GTX_intersect extension.
|
//! From GLM_GTX_intersect extension.
|
||||||
template <typename genType>
|
template <typename genType>
|
||||||
bool intersectRaySphere(
|
bool intersectRaySphere(
|
||||||
genType const & orig, genType const & dir,
|
genType const & orig, genType const & dir,
|
||||||
genType const & center, typename genType::value_type radius,
|
genType const & center, typename genType::value_type radius,
|
||||||
genType & position, genType & normal);
|
genType & position, genType & normal);
|
||||||
|
|
||||||
//! Compute the intersection of a line and a sphere.
|
//! Compute the intersection of a line and a sphere.
|
||||||
//! From GLM_GTX_intersect extension
|
//! From GLM_GTX_intersect extension
|
||||||
template <typename genType>
|
template <typename genType>
|
||||||
bool intersectLineSphere(
|
bool intersectLineSphere(
|
||||||
genType const & point0, genType const & point1,
|
genType const & point0, genType const & point1,
|
||||||
genType const & center, typename genType::value_type radius,
|
genType const & center, typename genType::value_type radius,
|
||||||
genType & position, genType & normal);
|
genType & position, genType & normal);
|
||||||
|
|
||||||
///@}
|
/// @}
|
||||||
|
}//namespace intersect
|
||||||
}//namespace intersect
|
|
||||||
}//namespace gtx
|
}//namespace gtx
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
|
@ -20,26 +20,24 @@
|
|||||||
# pragma message("GLM: GLM_GTX_log_base extension included")
|
# pragma message("GLM: GLM_GTX_log_base extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm
|
namespace glm{
|
||||||
|
namespace gtx{
|
||||||
|
namespace log_base ///< GLM_GTX_log_base extension: Logarithm for any base. base can be a vector or a scalar.
|
||||||
{
|
{
|
||||||
namespace gtx{
|
/// \addtogroup gtx_log_base
|
||||||
//! GLM_GTX_log_base extension: Logarithm for any base. base can be a vector or a scalar.
|
/// @{
|
||||||
namespace log_base
|
|
||||||
{
|
|
||||||
/// \addtogroup gtx_log_base
|
|
||||||
///@{
|
|
||||||
|
|
||||||
//! Logarithm for any base.
|
//! Logarithm for any base.
|
||||||
//! From GLM_GTX_log_base.
|
//! From GLM_GTX_log_base.
|
||||||
template <typename genType>
|
template <typename genType>
|
||||||
genType log(
|
genType log(
|
||||||
genType const & x,
|
genType const & x,
|
||||||
genType const & base);
|
genType const & base);
|
||||||
|
|
||||||
///@}
|
/// @}
|
||||||
|
|
||||||
}//namespace extend
|
}//namespace extend
|
||||||
}//namespace gtx
|
}//namespace gtx
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "log_base.inl"
|
#include "log_base.inl"
|
||||||
|
@ -20,31 +20,28 @@
|
|||||||
# pragma message("GLM: GLM_GTX_matrix_cross_product extension included")
|
# pragma message("GLM: GLM_GTX_matrix_cross_product extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm
|
namespace glm{
|
||||||
|
namespace gtx{
|
||||||
|
namespace matrix_cross_product ///< GLM_GTX_matrix_cross_product: Build cross product matrices
|
||||||
{
|
{
|
||||||
namespace gtx{
|
/// \addtogroup gtx_matrix_cross_product
|
||||||
//! GLM_GTX_matrix_cross_product: Build cross product matrices
|
/// @{
|
||||||
namespace matrix_cross_product
|
|
||||||
{
|
|
||||||
/// \addtogroup gtx_matrix_cross_product
|
|
||||||
///@{
|
|
||||||
|
|
||||||
//! Build a cross product matrix.
|
//! Build a cross product matrix.
|
||||||
//! From GLM_GTX_matrix_cross_product extension.
|
//! From GLM_GTX_matrix_cross_product extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tmat3x3<T> matrixCross3(
|
detail::tmat3x3<T> matrixCross3(
|
||||||
detail::tvec3<T> const & x);
|
detail::tvec3<T> const & x);
|
||||||
|
|
||||||
//! Build a cross product matrix.
|
//! Build a cross product matrix.
|
||||||
//! From GLM_GTX_matrix_cross_product extension.
|
//! From GLM_GTX_matrix_cross_product extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tmat4x4<T> matrixCross4(
|
detail::tmat4x4<T> matrixCross4(
|
||||||
detail::tvec3<T> const & x);
|
detail::tvec3<T> const & x);
|
||||||
|
|
||||||
///@}
|
/// @}
|
||||||
|
}//namespace matrix_cross_product
|
||||||
}//namespace matrix_cross_product
|
}//namespace gtx
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "matrix_cross_product.inl"
|
#include "matrix_cross_product.inl"
|
||||||
|
@ -23,43 +23,40 @@
|
|||||||
# pragma message("GLM: GLM_GTX_matrix_interpolation extension included")
|
# pragma message("GLM: GLM_GTX_matrix_interpolation extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm
|
namespace glm{
|
||||||
|
namespace gtx{
|
||||||
|
namespace matrix_interpolation ///< GLM_GTX_matrix_interpolation extension: Add transformation matrices
|
||||||
{
|
{
|
||||||
namespace gtx{
|
/// \addtogroup gtx_matrix_interpolation
|
||||||
//! GLM_GTX_matrix_interpolation extension: Add transformation matrices
|
/// @{
|
||||||
namespace matrix_interpolation
|
|
||||||
{
|
|
||||||
/// \addtogroup gtx_matrix_interpolation
|
|
||||||
///@{
|
|
||||||
|
|
||||||
//! Get the axis and angle of the rotation from a matrix.
|
//! Get the axis and angle of the rotation from a matrix.
|
||||||
//! From GLM_GTX_matrix_interpolation extension.
|
//! From GLM_GTX_matrix_interpolation extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
void axisAngle(
|
void axisAngle(
|
||||||
detail::tmat4x4<T> const & mat,
|
detail::tmat4x4<T> const & mat,
|
||||||
detail::tvec3<T> & axis,
|
detail::tvec3<T> & axis,
|
||||||
T & angle);
|
T & angle);
|
||||||
|
|
||||||
//! Build a matrix from axis and angle.
|
//! Build a matrix from axis and angle.
|
||||||
//! From GLM_GTX_matrix_interpolation extension.
|
//! From GLM_GTX_matrix_interpolation extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tmat4x4<T> axisAngleMatrix(
|
detail::tmat4x4<T> axisAngleMatrix(
|
||||||
detail::tvec3<T> const & axis,
|
detail::tvec3<T> const & axis,
|
||||||
T const angle);
|
T const angle);
|
||||||
|
|
||||||
//! Build a interpolation of 4 * 4 matrixes.
|
//! Build a interpolation of 4 * 4 matrixes.
|
||||||
//! From GLM_GTX_matrix_interpolation extension.
|
//! From GLM_GTX_matrix_interpolation extension.
|
||||||
//! Warning! works only with rotation and/or translation matrixes, scale will generate unexpected results.
|
//! Warning! works only with rotation and/or translation matrixes, scale will generate unexpected results.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tmat4x4<T> interpolate(
|
detail::tmat4x4<T> interpolate(
|
||||||
detail::tmat4x4<T> const & m1,
|
detail::tmat4x4<T> const & m1,
|
||||||
detail::tmat4x4<T> const & m2,
|
detail::tmat4x4<T> const & m2,
|
||||||
T const delta);
|
T const delta);
|
||||||
|
|
||||||
///@}
|
/// @}
|
||||||
|
}//namespace matrix_interpolation
|
||||||
}//namespace matrix_interpolation
|
}//namespace gtx
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "matrix_interpolation.inl"
|
#include "matrix_interpolation.inl"
|
||||||
|
@ -20,103 +20,100 @@
|
|||||||
# pragma message("GLM: GLM_GTX_matrix_major_storage extension included")
|
# pragma message("GLM: GLM_GTX_matrix_major_storage extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm
|
namespace glm{
|
||||||
|
namespace gtx{
|
||||||
|
namespace matrix_major_storage ///< GLM_GTX_matrix_major_storage: Build matrices with specific matrix order, row or column
|
||||||
{
|
{
|
||||||
namespace gtx{
|
/// \addtogroup gtx_matrix_major_storage
|
||||||
//! GLM_GTX_matrix_major_storage: Build matrices with specific matrix order, row or column
|
/// @{
|
||||||
namespace matrix_major_storage
|
|
||||||
{
|
|
||||||
/// \addtogroup gtx_matrix_major_storage
|
|
||||||
///@{
|
|
||||||
|
|
||||||
//! Build a row major matrix from row vectors.
|
//! Build a row major matrix from row vectors.
|
||||||
//! From GLM_GTX_matrix_major_storage extension.
|
//! From GLM_GTX_matrix_major_storage extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tmat2x2<T> rowMajor2(
|
detail::tmat2x2<T> rowMajor2(
|
||||||
const detail::tvec2<T>& v1,
|
const detail::tvec2<T>& v1,
|
||||||
const detail::tvec2<T>& v2);
|
const detail::tvec2<T>& v2);
|
||||||
|
|
||||||
//! Build a row major matrix from other matrix.
|
//! Build a row major matrix from other matrix.
|
||||||
//! From GLM_GTX_matrix_major_storage extension.
|
//! From GLM_GTX_matrix_major_storage extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tmat2x2<T> rowMajor2(
|
detail::tmat2x2<T> rowMajor2(
|
||||||
const detail::tmat2x2<T>& m);
|
const detail::tmat2x2<T>& m);
|
||||||
|
|
||||||
//! Build a row major matrix from row vectors.
|
//! Build a row major matrix from row vectors.
|
||||||
//! From GLM_GTX_matrix_major_storage extension.
|
//! From GLM_GTX_matrix_major_storage extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tmat3x3<T> rowMajor3(
|
detail::tmat3x3<T> rowMajor3(
|
||||||
const detail::tvec3<T>& v1,
|
const detail::tvec3<T>& v1,
|
||||||
const detail::tvec3<T>& v2,
|
const detail::tvec3<T>& v2,
|
||||||
const detail::tvec3<T>& v3);
|
const detail::tvec3<T>& v3);
|
||||||
|
|
||||||
//! Build a row major matrix from other matrix.
|
//! Build a row major matrix from other matrix.
|
||||||
//! From GLM_GTX_matrix_major_storage extension.
|
//! From GLM_GTX_matrix_major_storage extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tmat3x3<T> rowMajor3(
|
detail::tmat3x3<T> rowMajor3(
|
||||||
const detail::tmat3x3<T>& m);
|
const detail::tmat3x3<T>& m);
|
||||||
|
|
||||||
//! Build a row major matrix from row vectors.
|
//! Build a row major matrix from row vectors.
|
||||||
//! From GLM_GTX_matrix_major_storage extension.
|
//! From GLM_GTX_matrix_major_storage extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tmat4x4<T> rowMajor4(
|
detail::tmat4x4<T> rowMajor4(
|
||||||
const detail::tvec4<T>& v1,
|
const detail::tvec4<T>& v1,
|
||||||
const detail::tvec4<T>& v2,
|
const detail::tvec4<T>& v2,
|
||||||
const detail::tvec4<T>& v3,
|
const detail::tvec4<T>& v3,
|
||||||
const detail::tvec4<T>& v4);
|
const detail::tvec4<T>& v4);
|
||||||
|
|
||||||
//! Build a row major matrix from other matrix.
|
//! Build a row major matrix from other matrix.
|
||||||
//! From GLM_GTX_matrix_major_storage extension.
|
//! From GLM_GTX_matrix_major_storage extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tmat4x4<T> rowMajor4(
|
detail::tmat4x4<T> rowMajor4(
|
||||||
const detail::tmat4x4<T>& m);
|
const detail::tmat4x4<T>& m);
|
||||||
|
|
||||||
//! Build a column major matrix from column vectors.
|
//! Build a column major matrix from column vectors.
|
||||||
//! From GLM_GTX_matrix_major_storage extension.
|
//! From GLM_GTX_matrix_major_storage extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tmat2x2<T> colMajor2(
|
detail::tmat2x2<T> colMajor2(
|
||||||
const detail::tvec2<T>& v1,
|
const detail::tvec2<T>& v1,
|
||||||
const detail::tvec2<T>& v2);
|
const detail::tvec2<T>& v2);
|
||||||
|
|
||||||
//! Build a column major matrix from other matrix.
|
//! Build a column major matrix from other matrix.
|
||||||
//! From GLM_GTX_matrix_major_storage extension.
|
//! From GLM_GTX_matrix_major_storage extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tmat2x2<T> colMajor2(
|
detail::tmat2x2<T> colMajor2(
|
||||||
const detail::tmat2x2<T>& m);
|
const detail::tmat2x2<T>& m);
|
||||||
|
|
||||||
//! Build a column major matrix from column vectors.
|
//! Build a column major matrix from column vectors.
|
||||||
//! From GLM_GTX_matrix_major_storage extension.
|
//! From GLM_GTX_matrix_major_storage extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tmat3x3<T> colMajor3(
|
detail::tmat3x3<T> colMajor3(
|
||||||
const detail::tvec3<T>& v1,
|
const detail::tvec3<T>& v1,
|
||||||
const detail::tvec3<T>& v2,
|
const detail::tvec3<T>& v2,
|
||||||
const detail::tvec3<T>& v3);
|
const detail::tvec3<T>& v3);
|
||||||
|
|
||||||
//! Build a column major matrix from other matrix.
|
//! Build a column major matrix from other matrix.
|
||||||
//! From GLM_GTX_matrix_major_storage extension.
|
//! From GLM_GTX_matrix_major_storage extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tmat3x3<T> colMajor3(
|
detail::tmat3x3<T> colMajor3(
|
||||||
const detail::tmat3x3<T>& m);
|
const detail::tmat3x3<T>& m);
|
||||||
|
|
||||||
//! Build a column major matrix from column vectors.
|
//! Build a column major matrix from column vectors.
|
||||||
//! From GLM_GTX_matrix_major_storage extension.
|
//! From GLM_GTX_matrix_major_storage extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tmat4x4<T> colMajor4(
|
detail::tmat4x4<T> colMajor4(
|
||||||
const detail::tvec4<T>& v1,
|
const detail::tvec4<T>& v1,
|
||||||
const detail::tvec4<T>& v2,
|
const detail::tvec4<T>& v2,
|
||||||
const detail::tvec4<T>& v3,
|
const detail::tvec4<T>& v3,
|
||||||
const detail::tvec4<T>& v4);
|
const detail::tvec4<T>& v4);
|
||||||
|
|
||||||
//! Build a column major matrix from other matrix.
|
//! Build a column major matrix from other matrix.
|
||||||
//! From GLM_GTX_matrix_major_storage extension.
|
//! From GLM_GTX_matrix_major_storage extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tmat4x4<T> colMajor4(
|
detail::tmat4x4<T> colMajor4(
|
||||||
const detail::tmat4x4<T>& m);
|
const detail::tmat4x4<T>& m);
|
||||||
|
|
||||||
///@}
|
/// @}
|
||||||
|
}//namespace matrix_major_storage
|
||||||
}//namespace matrix_major_storage
|
}//namespace gtx
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "matrix_major_storage.inl"
|
#include "matrix_major_storage.inl"
|
||||||
|
@ -20,73 +20,70 @@
|
|||||||
# pragma message("GLM: GLM_GTX_matrix_operation extension included")
|
# pragma message("GLM: GLM_GTX_matrix_operation extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm
|
namespace glm{
|
||||||
|
namespace gtx{
|
||||||
|
namespace matrix_operation ///< GLM_GTX_matrix_operation: Build diagonal matrices
|
||||||
{
|
{
|
||||||
namespace gtx{
|
/// \addtogroup gtx_matrix_operation
|
||||||
//! GLM_GTX_matrix_operation: Build diagonal matrices
|
/// @{
|
||||||
namespace matrix_operation
|
|
||||||
{
|
|
||||||
/// \addtogroup gtx_matrix_operation
|
|
||||||
///@{
|
|
||||||
|
|
||||||
//! Build a diagonal matrix.
|
//! Build a diagonal matrix.
|
||||||
//! From GLM_GTX_matrix_operation extension.
|
//! From GLM_GTX_matrix_operation extension.
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
detail::tmat2x2<valType> diagonal2x2(
|
detail::tmat2x2<valType> diagonal2x2(
|
||||||
detail::tvec2<valType> const & v);
|
detail::tvec2<valType> const & v);
|
||||||
|
|
||||||
//! Build a diagonal matrix.
|
//! Build a diagonal matrix.
|
||||||
//! From GLM_GTX_matrix_operation extension.
|
//! From GLM_GTX_matrix_operation extension.
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
detail::tmat2x3<valType> diagonal2x3(
|
detail::tmat2x3<valType> diagonal2x3(
|
||||||
detail::tvec2<valType> const & v);
|
detail::tvec2<valType> const & v);
|
||||||
|
|
||||||
//! Build a diagonal matrix.
|
//! Build a diagonal matrix.
|
||||||
//! From GLM_GTX_matrix_operation extension.
|
//! From GLM_GTX_matrix_operation extension.
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
detail::tmat2x4<valType> diagonal2x4(
|
detail::tmat2x4<valType> diagonal2x4(
|
||||||
detail::tvec2<valType> const & v);
|
detail::tvec2<valType> const & v);
|
||||||
|
|
||||||
//! Build a diagonal matrix.
|
//! Build a diagonal matrix.
|
||||||
//! From GLM_GTX_matrix_operation extension.
|
//! From GLM_GTX_matrix_operation extension.
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
detail::tmat3x2<valType> diagonal3x2(
|
detail::tmat3x2<valType> diagonal3x2(
|
||||||
detail::tvec2<valType> const & v);
|
detail::tvec2<valType> const & v);
|
||||||
|
|
||||||
//! Build a diagonal matrix.
|
//! Build a diagonal matrix.
|
||||||
//! From GLM_GTX_matrix_operation extension.
|
//! From GLM_GTX_matrix_operation extension.
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
detail::tmat3x3<valType> diagonal3x3(
|
detail::tmat3x3<valType> diagonal3x3(
|
||||||
detail::tvec3<valType> const & v);
|
detail::tvec3<valType> const & v);
|
||||||
|
|
||||||
//! Build a diagonal matrix.
|
//! Build a diagonal matrix.
|
||||||
//! From GLM_GTX_matrix_operation extension.
|
//! From GLM_GTX_matrix_operation extension.
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
detail::tmat3x4<valType> diagonal3x4(
|
detail::tmat3x4<valType> diagonal3x4(
|
||||||
detail::tvec3<valType> const & v);
|
detail::tvec3<valType> const & v);
|
||||||
|
|
||||||
//! Build a diagonal matrix.
|
//! Build a diagonal matrix.
|
||||||
//! From GLM_GTX_matrix_operation extension.
|
//! From GLM_GTX_matrix_operation extension.
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
detail::tmat4x2<valType> diagonal4x2(
|
detail::tmat4x2<valType> diagonal4x2(
|
||||||
detail::tvec2<valType> const & v);
|
detail::tvec2<valType> const & v);
|
||||||
|
|
||||||
//! Build a diagonal matrix.
|
//! Build a diagonal matrix.
|
||||||
//! From GLM_GTX_matrix_operation extension.
|
//! From GLM_GTX_matrix_operation extension.
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
detail::tmat4x3<valType> diagonal4x3(
|
detail::tmat4x3<valType> diagonal4x3(
|
||||||
detail::tvec3<valType> const & v);
|
detail::tvec3<valType> const & v);
|
||||||
|
|
||||||
//! Build a diagonal matrix.
|
//! Build a diagonal matrix.
|
||||||
//! From GLM_GTX_matrix_operation extension.
|
//! From GLM_GTX_matrix_operation extension.
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
detail::tmat4x4<valType> diagonal4x4(
|
detail::tmat4x4<valType> diagonal4x4(
|
||||||
detail::tvec4<valType> const & v);
|
detail::tvec4<valType> const & v);
|
||||||
|
|
||||||
///@}
|
/// @}
|
||||||
|
}//namespace matrix_operation
|
||||||
}//namespace matrix_operation
|
}//namespace gtx
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "matrix_operation.inl"
|
#include "matrix_operation.inl"
|
||||||
|
@ -20,74 +20,72 @@
|
|||||||
# pragma message("GLM: GLM_GTX_matrix_query extension included")
|
# pragma message("GLM: GLM_GTX_matrix_query extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm
|
namespace glm{
|
||||||
|
namespace gtx{
|
||||||
|
namespace matrix_query ///< GLM_GTX_matrix_query: Query to evaluate matrix properties
|
||||||
{
|
{
|
||||||
namespace gtx{
|
/// \addtogroup gtx_matrix_query
|
||||||
//! GLM_GTX_matrix_query: Query to evaluate matrix properties
|
/// @{
|
||||||
namespace matrix_query
|
|
||||||
{
|
|
||||||
/// \addtogroup gtx_matrix_query
|
|
||||||
///@{
|
|
||||||
|
|
||||||
//! Return if a matrix a null matrix.
|
//! Return if a matrix a null matrix.
|
||||||
//! From GLM_GTX_matrix_query extension.
|
//! From GLM_GTX_matrix_query extension.
|
||||||
template<typename T>
|
template<typename T>
|
||||||
bool isNull(
|
bool isNull(
|
||||||
const detail::tmat2x2<T>& m,
|
const detail::tmat2x2<T>& m,
|
||||||
const T epsilon = std::numeric_limits<T>::epsilon());
|
const T epsilon = std::numeric_limits<T>::epsilon());
|
||||||
|
|
||||||
//! Return if a matrix a null matrix.
|
//! Return if a matrix a null matrix.
|
||||||
//! From GLM_GTX_matrix_query extension.
|
//! From GLM_GTX_matrix_query extension.
|
||||||
template<typename T>
|
template<typename T>
|
||||||
bool isNull(
|
bool isNull(
|
||||||
const detail::tmat3x3<T>& m,
|
const detail::tmat3x3<T>& m,
|
||||||
const T epsilon = std::numeric_limits<T>::epsilon());
|
const T epsilon = std::numeric_limits<T>::epsilon());
|
||||||
|
|
||||||
//! Return if a matrix a null matrix.
|
//! Return if a matrix a null matrix.
|
||||||
//! From GLM_GTX_matrix_query extension.
|
//! From GLM_GTX_matrix_query extension.
|
||||||
template<typename T>
|
template<typename T>
|
||||||
bool isNull(
|
bool isNull(
|
||||||
const detail::tmat4x4<T>& m,
|
const detail::tmat4x4<T>& m,
|
||||||
const T epsilon = std::numeric_limits<T>::epsilon());
|
const T epsilon = std::numeric_limits<T>::epsilon());
|
||||||
|
|
||||||
//! Return if a matrix an identity matrix.
|
//! Return if a matrix an identity matrix.
|
||||||
//! From GLM_GTX_matrix_query extension.
|
//! From GLM_GTX_matrix_query extension.
|
||||||
template<typename genType>
|
template<typename genType>
|
||||||
bool isIdentity(
|
bool isIdentity(
|
||||||
const genType& m,
|
const genType& m,
|
||||||
const typename genType::value_type epsilon = std::numeric_limits<typename genType::value_type>::epsilon());
|
const typename genType::value_type epsilon = std::numeric_limits<typename genType::value_type>::epsilon());
|
||||||
|
|
||||||
//! Return if a matrix a normalized matrix.
|
//! Return if a matrix a normalized matrix.
|
||||||
//! From GLM_GTX_matrix_query extension.
|
//! From GLM_GTX_matrix_query extension.
|
||||||
template<typename T>
|
template<typename T>
|
||||||
bool isNormalized(
|
bool isNormalized(
|
||||||
const detail::tmat2x2<T>& m,
|
const detail::tmat2x2<T>& m,
|
||||||
const T epsilon = std::numeric_limits<T>::epsilon());
|
const T epsilon = std::numeric_limits<T>::epsilon());
|
||||||
|
|
||||||
//! Return if a matrix a normalized matrix.
|
//! Return if a matrix a normalized matrix.
|
||||||
//! From GLM_GTX_matrix_query extension.
|
//! From GLM_GTX_matrix_query extension.
|
||||||
template<typename T>
|
template<typename T>
|
||||||
bool isNormalized(
|
bool isNormalized(
|
||||||
const detail::tmat3x3<T>& m,
|
const detail::tmat3x3<T>& m,
|
||||||
const T epsilon = std::numeric_limits<T>::epsilon());
|
const T epsilon = std::numeric_limits<T>::epsilon());
|
||||||
|
|
||||||
//! Return if a matrix a normalized matrix.
|
//! Return if a matrix a normalized matrix.
|
||||||
//! From GLM_GTX_matrix_query extension.
|
//! From GLM_GTX_matrix_query extension.
|
||||||
template<typename T>
|
template<typename T>
|
||||||
bool isNormalized(
|
bool isNormalized(
|
||||||
const detail::tmat4x4<T>& m,
|
const detail::tmat4x4<T>& m,
|
||||||
const T epsilon = std::numeric_limits<T>::epsilon());
|
const T epsilon = std::numeric_limits<T>::epsilon());
|
||||||
|
|
||||||
//! Return if a matrix an orthonormalized matrix.
|
//! Return if a matrix an orthonormalized matrix.
|
||||||
//! From GLM_GTX_matrix_query extension.
|
//! From GLM_GTX_matrix_query extension.
|
||||||
template<typename genType>
|
template<typename genType>
|
||||||
bool isOrthogonal(
|
bool isOrthogonal(
|
||||||
const genType& m,
|
const genType& m,
|
||||||
const typename genType::value_type epsilon = std::numeric_limits<typename genType::value_type>::epsilon());
|
const typename genType::value_type epsilon = std::numeric_limits<typename genType::value_type>::epsilon());
|
||||||
|
|
||||||
///@}
|
/// @}
|
||||||
}//namespace matrix_query
|
}//namespace matrix_query
|
||||||
}//namespace gtx
|
}//namespace gtx
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "matrix_query.inl"
|
#include "matrix_query.inl"
|
||||||
|
@ -20,26 +20,24 @@
|
|||||||
# pragma message("GLM: GLM_GTX_mixed_product extension included")
|
# pragma message("GLM: GLM_GTX_mixed_product extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm
|
namespace glm{
|
||||||
|
namespace gtx{
|
||||||
|
namespace mixed_product ///< GLM_GTX_mixed_product extension: Mixed product of 3 vectors.
|
||||||
{
|
{
|
||||||
namespace gtx{
|
/// \addtogroup gtx_mixed_product
|
||||||
//! GLM_GTX_mixed_product extension: Mixed product of 3 vectors.
|
/// @{
|
||||||
namespace mixed_product
|
|
||||||
{
|
|
||||||
/// \addtogroup gtx_mixed_product
|
|
||||||
///@{
|
|
||||||
|
|
||||||
//! \brief Mixed product of 3 vectors (from GLM_GTX_mixed_product extension)
|
//! \brief Mixed product of 3 vectors (from GLM_GTX_mixed_product extension)
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
valType mixedProduct(
|
valType mixedProduct(
|
||||||
detail::tvec3<valType> const & v1,
|
detail::tvec3<valType> const & v1,
|
||||||
detail::tvec3<valType> const & v2,
|
detail::tvec3<valType> const & v2,
|
||||||
detail::tvec3<valType> const & v3);
|
detail::tvec3<valType> const & v3);
|
||||||
|
|
||||||
///@}
|
/// @}
|
||||||
}//namespace mixed_product
|
}// namespace mixed_product
|
||||||
}//namespace gtx
|
}// namespace gtx
|
||||||
}//namespace glm
|
}// namespace glm
|
||||||
|
|
||||||
#include "mixed_product.inl"
|
#include "mixed_product.inl"
|
||||||
|
|
||||||
|
@ -20,33 +20,30 @@
|
|||||||
# pragma message("GLM: GLM_GTX_multiple extension included")
|
# pragma message("GLM: GLM_GTX_multiple extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm
|
namespace glm{
|
||||||
|
namespace gtx{
|
||||||
|
namespace multiple ///< GLM_GTX_multiple: Find the closest number of a number multiple of other number.
|
||||||
{
|
{
|
||||||
namespace gtx{
|
/// \addtogroup gtx_multiple
|
||||||
//! GLM_GTX_multiple: Find the closest number of a number multiple of other number.
|
/// @{
|
||||||
namespace multiple
|
|
||||||
{
|
|
||||||
/// \addtogroup gtx_multiple
|
|
||||||
///@{
|
|
||||||
|
|
||||||
//! Higher Multiple number of Source.
|
//! Higher Multiple number of Source.
|
||||||
//! From GLM_GTX_multiple extension.
|
//! From GLM_GTX_multiple extension.
|
||||||
template <typename genType>
|
template <typename genType>
|
||||||
genType higherMultiple(
|
genType higherMultiple(
|
||||||
genType const & Source,
|
genType const & Source,
|
||||||
genType const & Multiple);
|
genType const & Multiple);
|
||||||
|
|
||||||
//! Lower Multiple number of Source.
|
//! Lower Multiple number of Source.
|
||||||
//! From GLM_GTX_multiple extension.
|
//! From GLM_GTX_multiple extension.
|
||||||
template <typename genType>
|
template <typename genType>
|
||||||
genType lowerMultiple(
|
genType lowerMultiple(
|
||||||
genType const & Source,
|
genType const & Source,
|
||||||
genType const & Multiple);
|
genType const & Multiple);
|
||||||
|
|
||||||
///@}
|
/// @}
|
||||||
|
}//namespace multiple
|
||||||
}//namespace multiple
|
}//namespace gtx
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "multiple.inl"
|
#include "multiple.inl"
|
||||||
|
@ -25,38 +25,35 @@
|
|||||||
# pragma message("GLM: GLM_GTX_noise extension included")
|
# pragma message("GLM: GLM_GTX_noise extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm
|
namespace glm{
|
||||||
|
namespace gtx{
|
||||||
|
namespace noise ///< GLM_GTX_noise extension: Comparison functions for a user defined epsilon values.
|
||||||
{
|
{
|
||||||
namespace gtx{
|
/// \addtogroup gtx_noise
|
||||||
//! GLM_GTX_noise extension: Comparison functions for a user defined epsilon values.
|
/// @{
|
||||||
namespace noise
|
|
||||||
{
|
|
||||||
/// \addtogroup gtx_noise
|
|
||||||
///@{
|
|
||||||
|
|
||||||
//! Classic perlin noise.
|
//! Classic perlin noise.
|
||||||
//! From GLM_GTX_noise extension.
|
//! From GLM_GTX_noise extension.
|
||||||
template <typename T, template<typename> class vecType>
|
template <typename T, template<typename> class vecType>
|
||||||
T perlin(
|
T perlin(
|
||||||
vecType<T> const & p);
|
vecType<T> const & p);
|
||||||
|
|
||||||
//! Periodic perlin noise.
|
//! Periodic perlin noise.
|
||||||
//! From GLM_GTX_noise extension.
|
//! From GLM_GTX_noise extension.
|
||||||
template <typename T, template<typename> class vecType>
|
template <typename T, template<typename> class vecType>
|
||||||
T perlin(
|
T perlin(
|
||||||
vecType<T> const & p,
|
vecType<T> const & p,
|
||||||
vecType<T> const & rep);
|
vecType<T> const & rep);
|
||||||
|
|
||||||
//! Simplex noise.
|
//! Simplex noise.
|
||||||
//! From GLM_GTX_noise extension.
|
//! From GLM_GTX_noise extension.
|
||||||
template <typename T, template<typename> class vecType>
|
template <typename T, template<typename> class vecType>
|
||||||
T simplex(
|
T simplex(
|
||||||
vecType<T> const & p);
|
vecType<T> const & p);
|
||||||
|
|
||||||
///@}
|
/// @}
|
||||||
|
}//namespace noise
|
||||||
}//namespace noise
|
}//namespace gtx
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "noise.inl"
|
#include "noise.inl"
|
||||||
|
187
glm/gtx/norm.hpp
187
glm/gtx/norm.hpp
@ -25,118 +25,115 @@
|
|||||||
# pragma message("GLM: GLM_GTX_norm extension included")
|
# pragma message("GLM: GLM_GTX_norm extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm
|
namespace glm{
|
||||||
|
namespace gtx{
|
||||||
|
namespace norm ///< GLM_GTX_norm extension: Various way to compute vector norms.
|
||||||
{
|
{
|
||||||
namespace gtx{
|
/// \addtogroup gtx_norm
|
||||||
//! GLM_GTX_norm extension: Various way to compute vector norms.
|
/// @{
|
||||||
namespace norm
|
|
||||||
{
|
|
||||||
/// \addtogroup gtx_norm
|
|
||||||
///@{
|
|
||||||
|
|
||||||
//! Returns the squared length of x.
|
//! Returns the squared length of x.
|
||||||
//! From GLM_GTX_norm extension.
|
//! From GLM_GTX_norm extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
T length2(
|
T length2(
|
||||||
const T x);
|
const T x);
|
||||||
|
|
||||||
//! Returns the squared length of x.
|
//! Returns the squared length of x.
|
||||||
//! From GLM_GTX_norm extension.
|
//! From GLM_GTX_norm extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
T length2(
|
T length2(
|
||||||
const detail::tvec2<T> & x);
|
const detail::tvec2<T> & x);
|
||||||
|
|
||||||
//! Returns the squared length of x.
|
//! Returns the squared length of x.
|
||||||
//! From GLM_GTX_norm extension.
|
//! From GLM_GTX_norm extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
T length2(
|
T length2(
|
||||||
const detail::tvec3<T>& x);
|
const detail::tvec3<T>& x);
|
||||||
|
|
||||||
//! Returns the squared length of x.
|
//! Returns the squared length of x.
|
||||||
//! From GLM_GTX_norm extension.
|
//! From GLM_GTX_norm extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
T length2(
|
T length2(
|
||||||
const detail::tvec4<T>& x);
|
const detail::tvec4<T>& x);
|
||||||
|
|
||||||
//! Returns the squared length of x.
|
//! Returns the squared length of x.
|
||||||
//! From GLM_GTX_norm extension.
|
//! From GLM_GTX_norm extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
T length2(
|
T length2(
|
||||||
const detail::tquat<T>& q);
|
const detail::tquat<T>& q);
|
||||||
|
|
||||||
//! Returns the squared distance between p0 and p1, i.e., length(p0 - p1).
|
//! Returns the squared distance between p0 and p1, i.e., length(p0 - p1).
|
||||||
//! From GLM_GTX_norm extension.
|
//! From GLM_GTX_norm extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
T distance2(
|
T distance2(
|
||||||
const T p0,
|
const T p0,
|
||||||
const T p1);
|
const T p1);
|
||||||
|
|
||||||
//! Returns the squared distance between p0 and p1, i.e., length(p0 - p1).
|
//! Returns the squared distance between p0 and p1, i.e., length(p0 - p1).
|
||||||
//! From GLM_GTX_norm extension.
|
//! From GLM_GTX_norm extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
T distance2(
|
T distance2(
|
||||||
const detail::tvec2<T>& p0,
|
const detail::tvec2<T>& p0,
|
||||||
const detail::tvec2<T>& p1);
|
const detail::tvec2<T>& p1);
|
||||||
|
|
||||||
//! Returns the squared distance between p0 and p1, i.e., length(p0 - p1).
|
//! Returns the squared distance between p0 and p1, i.e., length(p0 - p1).
|
||||||
//! From GLM_GTX_norm extension.
|
//! From GLM_GTX_norm extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
T distance2(
|
T distance2(
|
||||||
const detail::tvec3<T>& p0,
|
const detail::tvec3<T>& p0,
|
||||||
const detail::tvec3<T>& p1);
|
const detail::tvec3<T>& p1);
|
||||||
|
|
||||||
//! Returns the squared distance between p0 and p1, i.e., length(p0 - p1).
|
//! Returns the squared distance between p0 and p1, i.e., length(p0 - p1).
|
||||||
//! From GLM_GTX_norm extension.
|
//! From GLM_GTX_norm extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
T distance2(
|
T distance2(
|
||||||
const detail::tvec4<T>& p0,
|
const detail::tvec4<T>& p0,
|
||||||
const detail::tvec4<T>& p1);
|
const detail::tvec4<T>& p1);
|
||||||
|
|
||||||
//! Returns the L1 norm between x and y.
|
//! Returns the L1 norm between x and y.
|
||||||
//! From GLM_GTX_norm extension.
|
//! From GLM_GTX_norm extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
T l1Norm(
|
T l1Norm(
|
||||||
const detail::tvec3<T>& x,
|
const detail::tvec3<T>& x,
|
||||||
const detail::tvec3<T>& y);
|
const detail::tvec3<T>& y);
|
||||||
|
|
||||||
//! Returns the L1 norm of v.
|
//! Returns the L1 norm of v.
|
||||||
//! From GLM_GTX_norm extension.
|
//! From GLM_GTX_norm extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
T l1Norm(
|
T l1Norm(
|
||||||
const detail::tvec3<T>& v);
|
const detail::tvec3<T>& v);
|
||||||
|
|
||||||
//! Returns the L2 norm between x and y.
|
//! Returns the L2 norm between x and y.
|
||||||
//! From GLM_GTX_norm extension.
|
//! From GLM_GTX_norm extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
T l2Norm(
|
T l2Norm(
|
||||||
const detail::tvec3<T>& x,
|
const detail::tvec3<T>& x,
|
||||||
const detail::tvec3<T>& y);
|
const detail::tvec3<T>& y);
|
||||||
|
|
||||||
//! Returns the L2 norm of v.
|
//! Returns the L2 norm of v.
|
||||||
//! From GLM_GTX_norm extension.
|
//! From GLM_GTX_norm extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
T l2Norm(
|
T l2Norm(
|
||||||
const detail::tvec3<T>& x);
|
const detail::tvec3<T>& x);
|
||||||
|
|
||||||
//! Returns the L norm between x and y.
|
//! Returns the L norm between x and y.
|
||||||
//! From GLM_GTX_norm extension.
|
//! From GLM_GTX_norm extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
T lxNorm(
|
T lxNorm(
|
||||||
const detail::tvec3<T>& x,
|
const detail::tvec3<T>& x,
|
||||||
const detail::tvec3<T>& y,
|
const detail::tvec3<T>& y,
|
||||||
unsigned int Depth);
|
unsigned int Depth);
|
||||||
|
|
||||||
//! Returns the L norm of v.
|
//! Returns the L norm of v.
|
||||||
//! From GLM_GTX_norm extension.
|
//! From GLM_GTX_norm extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
T lxNorm(
|
T lxNorm(
|
||||||
const detail::tvec3<T>& x,
|
const detail::tvec3<T>& x,
|
||||||
unsigned int Depth);
|
unsigned int Depth);
|
||||||
|
|
||||||
///@}
|
/// @}
|
||||||
|
}//namespace norm
|
||||||
}//namespace norm
|
}//namespace gtx
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "norm.inl"
|
#include "norm.inl"
|
||||||
|
@ -20,27 +20,24 @@
|
|||||||
# pragma message("GLM: GLM_GTX_normal extension included")
|
# pragma message("GLM: GLM_GTX_normal extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm
|
namespace glm{
|
||||||
|
namespace gtx{
|
||||||
|
namespace normal ///< GLM_GTX_normal extension: Compute the normal of a triangle.
|
||||||
{
|
{
|
||||||
namespace gtx{
|
/// \addtogroup gtx_normal
|
||||||
//! GLM_GTX_normal extension: Compute the normal of a triangle.
|
/// @{
|
||||||
namespace normal
|
|
||||||
{
|
|
||||||
/// \addtogroup gtx_normal
|
|
||||||
///@{
|
|
||||||
|
|
||||||
//! Computes triangle normal from triangle points.
|
//! Computes triangle normal from triangle points.
|
||||||
//! From GLM_GTX_normal extension.
|
//! From GLM_GTX_normal extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tvec3<T> triangleNormal(
|
detail::tvec3<T> triangleNormal(
|
||||||
detail::tvec3<T> const & p1,
|
detail::tvec3<T> const & p1,
|
||||||
detail::tvec3<T> const & p2,
|
detail::tvec3<T> const & p2,
|
||||||
detail::tvec3<T> const & p3);
|
detail::tvec3<T> const & p3);
|
||||||
|
|
||||||
///@}
|
/// @}
|
||||||
|
}//namespace normal
|
||||||
}//namespace normal
|
}//namespace gtx
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "normal.inl"
|
#include "normal.inl"
|
||||||
|
@ -22,37 +22,34 @@
|
|||||||
# pragma message("GLM: GLM_GTX_normalize_dot extension included")
|
# pragma message("GLM: GLM_GTX_normalize_dot extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm
|
namespace glm{
|
||||||
|
namespace gtx{
|
||||||
|
namespace normalize_dot ///< GLM_GTX_normalize_dot extension: Dot product of vectors that need to be normalize with a single square root.
|
||||||
{
|
{
|
||||||
namespace gtx{
|
using namespace gtx::fast_square_root;
|
||||||
//! GLM_GTX_normalize_dot extension: Dot product of vectors that need to be normalize with a single square root.
|
|
||||||
namespace normalize_dot
|
|
||||||
{
|
|
||||||
using namespace gtx::fast_square_root;
|
|
||||||
|
|
||||||
/// \addtogroup gtx_normalize_dot
|
/// \addtogroup gtx_normalize_dot
|
||||||
///@{
|
/// @{
|
||||||
|
|
||||||
//! Normalize parameters and returns the dot product of x and y.
|
//! Normalize parameters and returns the dot product of x and y.
|
||||||
//! It's faster that dot(normalize(x), normalize(y)).
|
//! It's faster that dot(normalize(x), normalize(y)).
|
||||||
//! From GLM_GTX_normalize_dot extension.
|
//! From GLM_GTX_normalize_dot extension.
|
||||||
template <typename genType>
|
template <typename genType>
|
||||||
typename genType::value_type normalizeDot(
|
typename genType::value_type normalizeDot(
|
||||||
genType const & x,
|
genType const & x,
|
||||||
genType const & y);
|
genType const & y);
|
||||||
|
|
||||||
//! Normalize parameters and returns the dot product of x and y.
|
//! Normalize parameters and returns the dot product of x and y.
|
||||||
//! Faster that dot(fastNormalize(x), fastNormalize(y)).
|
//! Faster that dot(fastNormalize(x), fastNormalize(y)).
|
||||||
//! From GLM_GTX_normalize_dot extension.
|
//! From GLM_GTX_normalize_dot extension.
|
||||||
template <typename genType>
|
template <typename genType>
|
||||||
typename genType::value_type fastNormalizeDot(
|
typename genType::value_type fastNormalizeDot(
|
||||||
genType const & x,
|
genType const & x,
|
||||||
genType const & y);
|
genType const & y);
|
||||||
|
|
||||||
///@}
|
/// @}
|
||||||
|
}//namespace normalize_dot
|
||||||
}//namespace normalize_dot
|
}//namespace gtx
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "normalize_dot.inl"
|
#include "normalize_dot.inl"
|
||||||
|
@ -25,8 +25,7 @@
|
|||||||
|
|
||||||
namespace glm{
|
namespace glm{
|
||||||
namespace gtx{
|
namespace gtx{
|
||||||
//! GLM_GTX_number_precision extension: Defined size types.
|
namespace number_precision ///< GLM_GTX_number_precision extension: Defined size types.
|
||||||
namespace number_precision
|
|
||||||
{
|
{
|
||||||
using namespace gtc::type_precision;
|
using namespace gtc::type_precision;
|
||||||
|
|
||||||
@ -34,7 +33,7 @@ namespace number_precision
|
|||||||
// Unsigned int vector types
|
// Unsigned int vector types
|
||||||
|
|
||||||
/// \addtogroup gtx_number_precision
|
/// \addtogroup gtx_number_precision
|
||||||
///@{
|
/// @{
|
||||||
|
|
||||||
typedef u8 u8vec1; //!< \brief 8bit unsigned integer scalar. (from GLM_GTX_number_precision extension)
|
typedef u8 u8vec1; //!< \brief 8bit unsigned integer scalar. (from GLM_GTX_number_precision extension)
|
||||||
typedef u16 u16vec1; //!< \brief 16bit unsigned integer scalar. (from GLM_GTX_number_precision extension)
|
typedef u16 u16vec1; //!< \brief 16bit unsigned integer scalar. (from GLM_GTX_number_precision extension)
|
||||||
@ -58,7 +57,7 @@ namespace number_precision
|
|||||||
typedef f64 f64mat1; //!< \brief Double-precision floating-point scalar. (from GLM_GTX_number_precision extension)
|
typedef f64 f64mat1; //!< \brief Double-precision floating-point scalar. (from GLM_GTX_number_precision extension)
|
||||||
typedef f64 f64mat1x1; //!< \brief Double-precision floating-point scalar. (from GLM_GTX_number_precision extension)
|
typedef f64 f64mat1x1; //!< \brief Double-precision floating-point scalar. (from GLM_GTX_number_precision extension)
|
||||||
|
|
||||||
///@}
|
/// @}
|
||||||
}//namespace number_precision
|
}//namespace number_precision
|
||||||
}//namespace gtx
|
}//namespace gtx
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
@ -22,14 +22,13 @@
|
|||||||
|
|
||||||
namespace glm{
|
namespace glm{
|
||||||
namespace gtx{
|
namespace gtx{
|
||||||
//! GLM_GTX_ocl_type extension: OpenCL types.
|
namespace ocl_type ///< GLM_GTX_ocl_type extension: OpenCL types.
|
||||||
namespace ocl_type
|
|
||||||
{
|
{
|
||||||
///////////////////////////
|
///////////////////////////
|
||||||
// Scalar types
|
// Scalar types
|
||||||
|
|
||||||
/// \addtogroup gtx_ocl_type
|
/// \addtogroup gtx_ocl_type
|
||||||
///@{
|
/// @{
|
||||||
|
|
||||||
typedef detail::int8 cl_char; //!< \brief 8bit signed integer. (from GLM_GTX_ocl_type extension)
|
typedef detail::int8 cl_char; //!< \brief 8bit signed integer. (from GLM_GTX_ocl_type extension)
|
||||||
typedef detail::int16 cl_short; //!< \brief 16bit signed integer. (from GLM_GTX_ocl_type extension)
|
typedef detail::int16 cl_short; //!< \brief 16bit signed integer. (from GLM_GTX_ocl_type extension)
|
||||||
@ -99,8 +98,7 @@ namespace ocl_type
|
|||||||
//typedef detail::tvec4<detail::float16> cl_half4; //!< \brief Half-precision floating-point scalar. (from GLM_GTX_ocl_type extension)
|
//typedef detail::tvec4<detail::float16> cl_half4; //!< \brief Half-precision floating-point scalar. (from GLM_GTX_ocl_type extension)
|
||||||
typedef detail::tvec4<detail::float32> cl_float4; //!< \brief Single-precision floating-point scalar. (from GLM_GTX_ocl_type extension)
|
typedef detail::tvec4<detail::float32> cl_float4; //!< \brief Single-precision floating-point scalar. (from GLM_GTX_ocl_type extension)
|
||||||
|
|
||||||
///@}
|
/// @}
|
||||||
|
|
||||||
}//namespace ocl_type
|
}//namespace ocl_type
|
||||||
}//namespace gtx
|
}//namespace gtx
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
@ -20,50 +20,47 @@
|
|||||||
# pragma message("GLM: GLM_GTX_optimum_pow extension included")
|
# pragma message("GLM: GLM_GTX_optimum_pow extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm
|
namespace glm{
|
||||||
|
namespace gtx{
|
||||||
|
namespace optimum_pow ///< GLM_GTX_optimum_pow extension: Integer exponentiation of power functions.
|
||||||
{
|
{
|
||||||
namespace gtx{
|
/// \addtogroup gtx_optimum_pow
|
||||||
//! GLM_GTX_optimum_pow extension: Integer exponentiation of power functions.
|
/// @{
|
||||||
namespace optimum_pow
|
|
||||||
{
|
|
||||||
/// \addtogroup gtx_optimum_pow
|
|
||||||
///@{
|
|
||||||
|
|
||||||
//! Returns x raised to the power of 2.
|
//! Returns x raised to the power of 2.
|
||||||
//! From GLM_GTX_optimum_pow extension.
|
//! From GLM_GTX_optimum_pow extension.
|
||||||
template <typename genType>
|
template <typename genType>
|
||||||
genType pow2(const genType& x);
|
genType pow2(const genType& x);
|
||||||
|
|
||||||
//! Returns x raised to the power of 3.
|
//! Returns x raised to the power of 3.
|
||||||
//! From GLM_GTX_optimum_pow extension.
|
//! From GLM_GTX_optimum_pow extension.
|
||||||
template <typename genType>
|
template <typename genType>
|
||||||
genType pow3(const genType& x);
|
genType pow3(const genType& x);
|
||||||
|
|
||||||
//! Returns x raised to the power of 4.
|
//! Returns x raised to the power of 4.
|
||||||
//! From GLM_GTX_optimum_pow extension.
|
//! From GLM_GTX_optimum_pow extension.
|
||||||
template <typename genType>
|
template <typename genType>
|
||||||
genType pow4(const genType& x);
|
genType pow4(const genType& x);
|
||||||
|
|
||||||
//! Checks if the parameter is a power of 2 number.
|
//! Checks if the parameter is a power of 2 number.
|
||||||
//! From GLM_GTX_optimum_pow extension.
|
//! From GLM_GTX_optimum_pow extension.
|
||||||
bool powOfTwo(int num);
|
bool powOfTwo(int num);
|
||||||
|
|
||||||
//! Checks to determine if the parameter component are power of 2 numbers.
|
//! Checks to determine if the parameter component are power of 2 numbers.
|
||||||
//! From GLM_GTX_optimum_pow extension.
|
//! From GLM_GTX_optimum_pow extension.
|
||||||
detail::tvec2<bool> powOfTwo(const detail::tvec2<int>& x);
|
detail::tvec2<bool> powOfTwo(const detail::tvec2<int>& x);
|
||||||
|
|
||||||
//! Checks to determine if the parameter component are power of 2 numbers.
|
//! Checks to determine if the parameter component are power of 2 numbers.
|
||||||
//! From GLM_GTX_optimum_pow extension.
|
//! From GLM_GTX_optimum_pow extension.
|
||||||
detail::tvec3<bool> powOfTwo(const detail::tvec3<int>& x);
|
detail::tvec3<bool> powOfTwo(const detail::tvec3<int>& x);
|
||||||
|
|
||||||
//! Checks to determine if the parameter component are power of 2 numbers.
|
//! Checks to determine if the parameter component are power of 2 numbers.
|
||||||
//! From GLM_GTX_optimum_pow extension.
|
//! From GLM_GTX_optimum_pow extension.
|
||||||
detail::tvec4<bool> powOfTwo(const detail::tvec4<int>& x);
|
detail::tvec4<bool> powOfTwo(const detail::tvec4<int>& x);
|
||||||
|
|
||||||
///@}
|
/// @}
|
||||||
|
}//namespace optimum_pow
|
||||||
}//namespace optimum_pow
|
}//namespace gtx
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "optimum_pow.inl"
|
#include "optimum_pow.inl"
|
||||||
|
@ -20,32 +20,29 @@
|
|||||||
# pragma message("GLM: GLM_GTX_orthonormalize extension included")
|
# pragma message("GLM: GLM_GTX_orthonormalize extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm
|
namespace glm{
|
||||||
|
namespace gtx{
|
||||||
|
namespace orthonormalize ///< GLM_GTX_orthonormalize extension: Orthonormalize matrices.
|
||||||
{
|
{
|
||||||
namespace gtx{
|
/// \addtogroup gtx_orthonormalize
|
||||||
//! GLM_GTX_orthonormalize extension: Orthonormalize matrices.
|
/// @{
|
||||||
namespace orthonormalize
|
|
||||||
{
|
|
||||||
/// \addtogroup gtx_orthonormalize
|
|
||||||
///@{
|
|
||||||
|
|
||||||
//! Returns the orthonormalized matrix of m.
|
//! Returns the orthonormalized matrix of m.
|
||||||
//! From GLM_GTX_orthonormalize extension.
|
//! From GLM_GTX_orthonormalize extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tmat3x3<T> orthonormalize(
|
detail::tmat3x3<T> orthonormalize(
|
||||||
const detail::tmat3x3<T>& m);
|
const detail::tmat3x3<T>& m);
|
||||||
|
|
||||||
//! Orthonormalizes x according y.
|
//! Orthonormalizes x according y.
|
||||||
//! From GLM_GTX_orthonormalize extension.
|
//! From GLM_GTX_orthonormalize extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tvec3<T> orthonormalize(
|
detail::tvec3<T> orthonormalize(
|
||||||
const detail::tvec3<T>& x,
|
const detail::tvec3<T>& x,
|
||||||
const detail::tvec3<T>& y);
|
const detail::tvec3<T>& y);
|
||||||
|
|
||||||
///@}
|
/// @}
|
||||||
|
}//namespace orthonormalize
|
||||||
}//namespace orthonormalize
|
}//namespace gtx
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "orthonormalize.inl"
|
#include "orthonormalize.inl"
|
||||||
|
@ -22,41 +22,37 @@
|
|||||||
# pragma message("GLM: GLM_GTX_perpendicular extension included")
|
# pragma message("GLM: GLM_GTX_perpendicular extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm
|
namespace glm{
|
||||||
|
namespace gtx{
|
||||||
|
namespace perpendicular ///< GLM_GTX_perpendicular extension: Perpendicular of a vector from other one
|
||||||
{
|
{
|
||||||
namespace gtx{
|
/// \addtogroup gtx_perpendicular
|
||||||
//! GLM_GTX_perpendicular extension: Perpendicular of a vector from other one
|
/// @{
|
||||||
namespace perpendicular
|
|
||||||
{
|
|
||||||
/// \addtogroup gtx_perpendicular
|
|
||||||
///@{
|
|
||||||
|
|
||||||
//! Projects x a perpendicular axis of Normal.
|
//! Projects x a perpendicular axis of Normal.
|
||||||
//! From GLM_GTX_perpendicular extension.
|
//! From GLM_GTX_perpendicular extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tvec2<T> perp(
|
detail::tvec2<T> perp(
|
||||||
detail::tvec2<T> const & x,
|
detail::tvec2<T> const & x,
|
||||||
detail::tvec2<T> const & Normal);
|
detail::tvec2<T> const & Normal);
|
||||||
|
|
||||||
//! Projects x a perpendicular axis of Normal.
|
//! Projects x a perpendicular axis of Normal.
|
||||||
//! From GLM_GTX_perpendicular extension.
|
//! From GLM_GTX_perpendicular extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tvec3<T> perp(
|
detail::tvec3<T> perp(
|
||||||
detail::tvec3<T> const & x,
|
detail::tvec3<T> const & x,
|
||||||
detail::tvec3<T> const & Normal);
|
detail::tvec3<T> const & Normal);
|
||||||
|
|
||||||
//! Projects x a perpendicular axis of Normal.
|
//! Projects x a perpendicular axis of Normal.
|
||||||
//! From GLM_GTX_perpendicular extension.
|
//! From GLM_GTX_perpendicular extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tvec4<T> perp(
|
detail::tvec4<T> perp(
|
||||||
detail::tvec4<T> const & x,
|
detail::tvec4<T> const & x,
|
||||||
detail::tvec4<T> const & Normal);
|
detail::tvec4<T> const & Normal);
|
||||||
|
|
||||||
|
/// @}
|
||||||
///@}
|
}//namespace perpendicular
|
||||||
|
}//namespace gtx
|
||||||
}//namespace perpendicular
|
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "perpendicular.inl"
|
#include "perpendicular.inl"
|
||||||
|
@ -20,29 +20,26 @@
|
|||||||
# pragma message("GLM: GLM_GTX_polar_coordinates extension included")
|
# pragma message("GLM: GLM_GTX_polar_coordinates extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm
|
namespace glm{
|
||||||
|
namespace gtx{
|
||||||
|
namespace polar_coordinates ///< GLM_GTX_polar_coordinates extension: Conversion from Euclidean space to polar space and revert.
|
||||||
{
|
{
|
||||||
namespace gtx{
|
/// \addtogroup gtx_polar_coordinates
|
||||||
//! GLM_GTX_polar_coordinates extension: Conversion from Euclidean space to polar space and revert.
|
/// @{
|
||||||
namespace polar_coordinates
|
|
||||||
{
|
|
||||||
/// \addtogroup gtx_polar_coordinates
|
|
||||||
///@{
|
|
||||||
|
|
||||||
//! Convert Euclidean to Polar coordinates, x is the xz distance, y, the latitude and z the longitude.
|
//! Convert Euclidean to Polar coordinates, x is the xz distance, y, the latitude and z the longitude.
|
||||||
//! From GLM_GTX_polar_coordinates extension.
|
//! From GLM_GTX_polar_coordinates extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tvec3<T> polar(const detail::tvec3<T>& euclidean);
|
detail::tvec3<T> polar(const detail::tvec3<T>& euclidean);
|
||||||
|
|
||||||
//! Convert Polar to Euclidean coordinates.
|
//! Convert Polar to Euclidean coordinates.
|
||||||
//! From GLM_GTX_polar_coordinates extension.
|
//! From GLM_GTX_polar_coordinates extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tvec3<T> euclidean(const detail::tvec3<T>& polar);
|
detail::tvec3<T> euclidean(const detail::tvec3<T>& polar);
|
||||||
|
|
||||||
///@}
|
/// @}
|
||||||
|
}//namespace polar_coordinates
|
||||||
}//namespace polar_coordinates
|
}//namespace gtx
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "polar_coordinates.inl"
|
#include "polar_coordinates.inl"
|
||||||
|
@ -20,40 +20,37 @@
|
|||||||
# pragma message("GLM: GLM_GTX_projection extension included")
|
# pragma message("GLM: GLM_GTX_projection extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm
|
namespace glm{
|
||||||
|
namespace gtx{
|
||||||
|
namespace projection ///< GLM_GTX_projection extension: Projection of a vector to other one
|
||||||
{
|
{
|
||||||
namespace gtx{
|
/// \addtogroup gtx_projection
|
||||||
//! GLM_GTX_projection extension: Projection of a vector to other one
|
/// @{
|
||||||
namespace projection
|
|
||||||
{
|
|
||||||
/// \addtogroup gtx_projection
|
|
||||||
///@{
|
|
||||||
|
|
||||||
//! Projects x on Normal.
|
//! Projects x on Normal.
|
||||||
//! From GLM_GTX_projection extension.
|
//! From GLM_GTX_projection extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tvec2<T> proj(
|
detail::tvec2<T> proj(
|
||||||
detail::tvec2<T> const & x,
|
detail::tvec2<T> const & x,
|
||||||
detail::tvec2<T> const & Normal);
|
detail::tvec2<T> const & Normal);
|
||||||
|
|
||||||
//! Projects x on Normal.
|
//! Projects x on Normal.
|
||||||
//! From GLM_GTX_projection extension.
|
//! From GLM_GTX_projection extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tvec3<T> proj(
|
detail::tvec3<T> proj(
|
||||||
detail::tvec3<T> const & x,
|
detail::tvec3<T> const & x,
|
||||||
detail::tvec3<T> const & Normal);
|
detail::tvec3<T> const & Normal);
|
||||||
|
|
||||||
//! Projects x on Normal.
|
//! Projects x on Normal.
|
||||||
//! From GLM_GTX_projection extension.
|
//! From GLM_GTX_projection extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tvec4<T> proj(
|
detail::tvec4<T> proj(
|
||||||
detail::tvec4<T> const & x,
|
detail::tvec4<T> const & x,
|
||||||
detail::tvec4<T> const & Normal);
|
detail::tvec4<T> const & Normal);
|
||||||
|
|
||||||
///@}
|
/// @}
|
||||||
|
}//namespace projection
|
||||||
}//namespace projection
|
}//namespace gtx
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "projection.inl"
|
#include "projection.inl"
|
||||||
|
@ -25,192 +25,189 @@
|
|||||||
# pragma message("GLM: GLM_GTX_quaternion extension included")
|
# pragma message("GLM: GLM_GTX_quaternion extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm
|
namespace glm{
|
||||||
|
namespace gtx{
|
||||||
|
namespace quaternion ///< GLM_GTX_quaternion extension: Quaternion types and functions
|
||||||
{
|
{
|
||||||
namespace gtx{
|
using namespace gtc::quaternion;
|
||||||
//! GLM_GTX_quaternion extension: Quaternion types and functions
|
|
||||||
namespace quaternion
|
|
||||||
{
|
|
||||||
using namespace gtc::quaternion;
|
|
||||||
|
|
||||||
/// \addtogroup gtx_quaternion
|
/// \addtogroup gtx_quaternion
|
||||||
///@{
|
///@{
|
||||||
|
|
||||||
//! Compute a cross product between a quaternion and a vector.
|
//! Compute a cross product between a quaternion and a vector.
|
||||||
//! From GLM_GTX_quaternion extension.
|
//! From GLM_GTX_quaternion extension.
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
detail::tvec3<valType> cross(
|
detail::tvec3<valType> cross(
|
||||||
detail::tquat<valType> const & q,
|
detail::tquat<valType> const & q,
|
||||||
detail::tvec3<valType> const & v);
|
detail::tvec3<valType> const & v);
|
||||||
|
|
||||||
//! Compute a cross product between a vector and a quaternion.
|
//! Compute a cross product between a vector and a quaternion.
|
||||||
//! From GLM_GTX_quaternion extension.
|
//! From GLM_GTX_quaternion extension.
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
detail::tvec3<valType> cross(
|
detail::tvec3<valType> cross(
|
||||||
detail::tvec3<valType> const & v,
|
detail::tvec3<valType> const & v,
|
||||||
detail::tquat<valType> const & q);
|
detail::tquat<valType> const & q);
|
||||||
|
|
||||||
//! Compute a point on a path according squad equation.
|
//! Compute a point on a path according squad equation.
|
||||||
//! q1 and q2 are control points; s1 and s2 are intermediate control points.
|
//! q1 and q2 are control points; s1 and s2 are intermediate control points.
|
||||||
//! From GLM_GTX_quaternion extension.
|
//! From GLM_GTX_quaternion extension.
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
detail::tquat<valType> squad(
|
detail::tquat<valType> squad(
|
||||||
detail::tquat<valType> const & q1,
|
detail::tquat<valType> const & q1,
|
||||||
detail::tquat<valType> const & q2,
|
detail::tquat<valType> const & q2,
|
||||||
detail::tquat<valType> const & s1,
|
detail::tquat<valType> const & s1,
|
||||||
detail::tquat<valType> const & s2,
|
detail::tquat<valType> const & s2,
|
||||||
valType const & h);
|
valType const & h);
|
||||||
|
|
||||||
//! Returns an intermediate control point for squad interpolation.
|
//! Returns an intermediate control point for squad interpolation.
|
||||||
//! From GLM_GTX_quaternion extension.
|
//! From GLM_GTX_quaternion extension.
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
detail::tquat<valType> intermediate(
|
detail::tquat<valType> intermediate(
|
||||||
detail::tquat<valType> const & prev,
|
detail::tquat<valType> const & prev,
|
||||||
detail::tquat<valType> const & curr,
|
detail::tquat<valType> const & curr,
|
||||||
detail::tquat<valType> const & next);
|
detail::tquat<valType> const & next);
|
||||||
|
|
||||||
//! Returns a exp of a quaternion.
|
//! Returns a exp of a quaternion.
|
||||||
//! From GLM_GTX_quaternion extension.
|
//! From GLM_GTX_quaternion extension.
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
detail::tquat<valType> exp(
|
detail::tquat<valType> exp(
|
||||||
detail::tquat<valType> const & q,
|
detail::tquat<valType> const & q,
|
||||||
valType const & exponent);
|
valType const & exponent);
|
||||||
|
|
||||||
//! Returns a log of a quaternion.
|
//! Returns a log of a quaternion.
|
||||||
//! From GLM_GTX_quaternion extension.
|
//! From GLM_GTX_quaternion extension.
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
detail::tquat<valType> log(
|
detail::tquat<valType> log(
|
||||||
detail::tquat<valType> const & q);
|
detail::tquat<valType> const & q);
|
||||||
|
|
||||||
//! Returns x raised to the y power.
|
//! Returns x raised to the y power.
|
||||||
//! From GLM_GTX_quaternion extension.
|
//! From GLM_GTX_quaternion extension.
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
detail::tquat<valType> pow(
|
detail::tquat<valType> pow(
|
||||||
detail::tquat<valType> const & x,
|
detail::tquat<valType> const & x,
|
||||||
valType const & y);
|
valType const & y);
|
||||||
|
|
||||||
//! Returns quarternion square root.
|
//! Returns quarternion square root.
|
||||||
//! From GLM_GTX_quaternion extension.
|
//! From GLM_GTX_quaternion extension.
|
||||||
//template <typename valType>
|
//template <typename valType>
|
||||||
//detail::tquat<valType> sqrt(
|
//detail::tquat<valType> sqrt(
|
||||||
// detail::tquat<valType> const & q);
|
// detail::tquat<valType> const & q);
|
||||||
|
|
||||||
//! Rotates a 3 components vector by a quaternion.
|
//! Rotates a 3 components vector by a quaternion.
|
||||||
//! From GLM_GTX_transform extension.
|
//! From GLM_GTX_transform extension.
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
detail::tvec3<valType> rotate(
|
detail::tvec3<valType> rotate(
|
||||||
detail::tquat<valType> const & q,
|
detail::tquat<valType> const & q,
|
||||||
detail::tvec3<valType> const & v);
|
detail::tvec3<valType> const & v);
|
||||||
|
|
||||||
//! Rotates a 4 components vector by a quaternion.
|
//! Rotates a 4 components vector by a quaternion.
|
||||||
//! From GLM_GTX_transform extension.
|
//! From GLM_GTX_transform extension.
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
detail::tvec4<valType> rotate(
|
detail::tvec4<valType> rotate(
|
||||||
detail::tquat<valType> const & q,
|
detail::tquat<valType> const & q,
|
||||||
detail::tvec4<valType> const & v);
|
detail::tvec4<valType> const & v);
|
||||||
|
|
||||||
//! Returns the quaternion rotation angle.
|
//! Returns the quaternion rotation angle.
|
||||||
//! From GLM_GTX_quaternion extension.
|
//! From GLM_GTX_quaternion extension.
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
valType angle(
|
valType angle(
|
||||||
detail::tquat<valType> const & x);
|
detail::tquat<valType> const & x);
|
||||||
|
|
||||||
//! Returns the q rotation axis.
|
//! Returns the q rotation axis.
|
||||||
//! From GLM_GTX_quaternion extension.
|
//! From GLM_GTX_quaternion extension.
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
detail::tvec3<valType> axis(
|
detail::tvec3<valType> axis(
|
||||||
detail::tquat<valType> const & x);
|
detail::tquat<valType> const & x);
|
||||||
|
|
||||||
//! Build a quaternion from an angle and a normalized axis.
|
//! Build a quaternion from an angle and a normalized axis.
|
||||||
//! From GLM_GTX_quaternion extension.
|
//! From GLM_GTX_quaternion extension.
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
detail::tquat<valType> angleAxis(
|
detail::tquat<valType> angleAxis(
|
||||||
valType const & angle,
|
valType const & angle,
|
||||||
valType const & x,
|
valType const & x,
|
||||||
valType const & y,
|
valType const & y,
|
||||||
valType const & z);
|
valType const & z);
|
||||||
|
|
||||||
//! Build a quaternion from an angle and a normalized axis.
|
//! Build a quaternion from an angle and a normalized axis.
|
||||||
//! From GLM_GTX_quaternion extension.
|
//! From GLM_GTX_quaternion extension.
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
detail::tquat<valType> angleAxis(
|
detail::tquat<valType> angleAxis(
|
||||||
valType const & angle,
|
valType const & angle,
|
||||||
detail::tvec3<valType> const & axis);
|
detail::tvec3<valType> const & axis);
|
||||||
|
|
||||||
//! Extract the real component of a quaternion.
|
//! Extract the real component of a quaternion.
|
||||||
//! From GLM_GTX_quaternion extension.
|
//! From GLM_GTX_quaternion extension.
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
valType extractRealComponent(
|
valType extractRealComponent(
|
||||||
detail::tquat<valType> const & q);
|
detail::tquat<valType> const & q);
|
||||||
|
|
||||||
//! Returns roll value of euler angles.
|
//! Returns roll value of euler angles.
|
||||||
//! From GLM_GTX_quaternion extension.
|
//! From GLM_GTX_quaternion extension.
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
valType roll(
|
valType roll(
|
||||||
detail::tquat<valType> const & x);
|
detail::tquat<valType> const & x);
|
||||||
|
|
||||||
//! Returns pitch value of euler angles.
|
//! Returns pitch value of euler angles.
|
||||||
//! From GLM_GTX_quaternion extension.
|
//! From GLM_GTX_quaternion extension.
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
valType pitch(
|
valType pitch(
|
||||||
detail::tquat<valType> const & x);
|
detail::tquat<valType> const & x);
|
||||||
|
|
||||||
//! Returns yaw value of euler angles.
|
//! Returns yaw value of euler angles.
|
||||||
//! From GLM_GTX_quaternion extension.
|
//! From GLM_GTX_quaternion extension.
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
valType yaw(
|
valType yaw(
|
||||||
detail::tquat<valType> const & x);
|
detail::tquat<valType> const & x);
|
||||||
|
|
||||||
//! Returns euler angles, yitch as x, yaw as y, roll as z.
|
//! Returns euler angles, yitch as x, yaw as y, roll as z.
|
||||||
//! From GLM_GTX_quaternion extension.
|
//! From GLM_GTX_quaternion extension.
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
detail::tvec3<valType> eularAngles(
|
detail::tvec3<valType> eularAngles(
|
||||||
detail::tquat<valType> const & x);
|
detail::tquat<valType> const & x);
|
||||||
|
|
||||||
//! Converts a quaternion to a 3 * 3 matrix.
|
//! Converts a quaternion to a 3 * 3 matrix.
|
||||||
//! From GLM_GTX_quaternion extension.
|
//! From GLM_GTX_quaternion extension.
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
detail::tmat3x3<valType> toMat3(
|
detail::tmat3x3<valType> toMat3(
|
||||||
detail::tquat<valType> const & x){return gtc::quaternion::mat3_cast(x);}
|
detail::tquat<valType> const & x){return gtc::quaternion::mat3_cast(x);}
|
||||||
|
|
||||||
//! Converts a quaternion to a 4 * 4 matrix.
|
//! Converts a quaternion to a 4 * 4 matrix.
|
||||||
//! From GLM_GTX_quaternion extension.
|
//! From GLM_GTX_quaternion extension.
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
detail::tmat4x4<valType> toMat4(
|
detail::tmat4x4<valType> toMat4(
|
||||||
detail::tquat<valType> const & x){return gtc::quaternion::mat4_cast(x);}
|
detail::tquat<valType> const & x){return gtc::quaternion::mat4_cast(x);}
|
||||||
|
|
||||||
//! Converts a 3 * 3 matrix to a quaternion.
|
//! Converts a 3 * 3 matrix to a quaternion.
|
||||||
//! From GLM_GTX_quaternion extension.
|
//! From GLM_GTX_quaternion extension.
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
detail::tquat<valType> toQuat(
|
detail::tquat<valType> toQuat(
|
||||||
detail::tmat3x3<valType> const & x){return gtc::quaternion::quat_cast(x);}
|
detail::tmat3x3<valType> const & x){return gtc::quaternion::quat_cast(x);}
|
||||||
|
|
||||||
//! Converts a 4 * 4 matrix to a quaternion.
|
//! Converts a 4 * 4 matrix to a quaternion.
|
||||||
//! From GLM_GTX_quaternion extension.
|
//! From GLM_GTX_quaternion extension.
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
detail::tquat<valType> toQuat(
|
detail::tquat<valType> toQuat(
|
||||||
detail::tmat4x4<valType> const & x){return gtc::quaternion::quat_cast(x);}
|
detail::tmat4x4<valType> const & x){return gtc::quaternion::quat_cast(x);}
|
||||||
|
|
||||||
//! Quaternion interpolation using the rotation short path.
|
//! Quaternion interpolation using the rotation short path.
|
||||||
//! From GLM_GTX_quaternion extension.
|
//! From GLM_GTX_quaternion extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tquat<T> shortMix(
|
detail::tquat<T> shortMix(
|
||||||
detail::tquat<T> const & x,
|
detail::tquat<T> const & x,
|
||||||
detail::tquat<T> const & y,
|
detail::tquat<T> const & y,
|
||||||
T const & a);
|
T const & a);
|
||||||
|
|
||||||
//! Quaternion normalized linear interpolation.
|
//! Quaternion normalized linear interpolation.
|
||||||
//! From GLM_GTX_quaternion extension.
|
//! From GLM_GTX_quaternion extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tquat<T> fastMix(
|
detail::tquat<T> fastMix(
|
||||||
detail::tquat<T> const & x,
|
detail::tquat<T> const & x,
|
||||||
detail::tquat<T> const & y,
|
detail::tquat<T> const & y,
|
||||||
T const & a);
|
T const & a);
|
||||||
|
|
||||||
///@}
|
/// @}
|
||||||
|
}//namespace quaternion
|
||||||
}//namespace quaternion
|
}//namespace gtx
|
||||||
}//namespace gtx
|
|
||||||
} //namespace glm
|
} //namespace glm
|
||||||
|
|
||||||
#include "quaternion.inl"
|
#include "quaternion.inl"
|
||||||
|
@ -25,11 +25,10 @@
|
|||||||
|
|
||||||
namespace glm{
|
namespace glm{
|
||||||
namespace gtx{
|
namespace gtx{
|
||||||
//! GLM_GTX_random extension: Generate random number from various distribution methods
|
namespace random ///< GLM_GTX_random extension: Generate random number from various distribution methods
|
||||||
namespace random
|
|
||||||
{
|
{
|
||||||
/// \addtogroup gtx_random
|
/// \addtogroup gtx_random
|
||||||
///@{
|
/// @{
|
||||||
|
|
||||||
//! Generate a random number in the interval [-1, 1], according a linear distribution.
|
//! Generate a random number in the interval [-1, 1], according a linear distribution.
|
||||||
//! From GLM_GTX_random extension.
|
//! From GLM_GTX_random extension.
|
||||||
|
@ -22,36 +22,34 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm{
|
namespace glm{
|
||||||
namespace gtx
|
namespace gtx{
|
||||||
|
namespace raw_data ///< GLM_GTX_raw_data extension: Projection of a vector to other one
|
||||||
{
|
{
|
||||||
//! GLM_GTX_raw_data extension: Projection of a vector to other one
|
using namespace gtc::type_precision;
|
||||||
namespace raw_data
|
|
||||||
{
|
|
||||||
using namespace gtc::type_precision;
|
|
||||||
|
|
||||||
/// \addtogroup gtx_raw_data
|
/// \addtogroup gtx_raw_data
|
||||||
///@{
|
///@{
|
||||||
|
|
||||||
//! Type for byte numbers.
|
//! Type for byte numbers.
|
||||||
//! From GLM_GTX_raw_data extension.
|
//! From GLM_GTX_raw_data extension.
|
||||||
typedef uint8 byte;
|
typedef uint8 byte;
|
||||||
|
|
||||||
//! Type for word numbers.
|
//! Type for word numbers.
|
||||||
//! From GLM_GTX_raw_data extension.
|
//! From GLM_GTX_raw_data extension.
|
||||||
typedef uint16 word;
|
typedef uint16 word;
|
||||||
|
|
||||||
//! Type for dword numbers.
|
//! Type for dword numbers.
|
||||||
//! From GLM_GTX_raw_data extension.
|
//! From GLM_GTX_raw_data extension.
|
||||||
typedef uint32 dword;
|
typedef uint32 dword;
|
||||||
|
|
||||||
//! Type for qword numbers.
|
//! Type for qword numbers.
|
||||||
//! From GLM_GTX_raw_data extension.
|
//! From GLM_GTX_raw_data extension.
|
||||||
typedef uint64 qword;
|
typedef uint64 qword;
|
||||||
|
|
||||||
///@}
|
///@}
|
||||||
}
|
}// namespace raw_data
|
||||||
}//namespace gtx
|
}// namespace gtx
|
||||||
}//namespace glm
|
}// namespace glm
|
||||||
|
|
||||||
#include "raw_data.inl"
|
#include "raw_data.inl"
|
||||||
|
|
||||||
|
@ -17,82 +17,79 @@
|
|||||||
# pragma message("GLM: GLM_GTX_reciprocal extension included")
|
# pragma message("GLM: GLM_GTX_reciprocal extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm
|
namespace glm{
|
||||||
|
namespace gtx{
|
||||||
|
namespace reciprocal ///< GLM_GTX_reciprocal extension: Define secant, cosecant and cotangent functions.
|
||||||
{
|
{
|
||||||
namespace gtx{
|
/// \addtogroup gtx_reciprocal
|
||||||
//! GLM_GTX_reciprocal extension: Define secant, cosecant and cotangent functions.
|
/// @{
|
||||||
namespace reciprocal
|
|
||||||
{
|
|
||||||
/// \addtogroup gtx_reciprocal
|
|
||||||
///@{
|
|
||||||
|
|
||||||
//! Secant function.
|
//! Secant function.
|
||||||
//! hypotenuse / adjacent or 1 / cos(x)
|
//! hypotenuse / adjacent or 1 / cos(x)
|
||||||
//! From GLM_GTX_reciprocal extension.
|
//! From GLM_GTX_reciprocal extension.
|
||||||
template <typename genType>
|
template <typename genType>
|
||||||
genType sec(genType const & angle);
|
genType sec(genType const & angle);
|
||||||
|
|
||||||
//! Cosecant function.
|
//! Cosecant function.
|
||||||
//! hypotenuse / opposite or 1 / sin(x)
|
//! hypotenuse / opposite or 1 / sin(x)
|
||||||
//! From GLM_GTX_reciprocal extension.
|
//! From GLM_GTX_reciprocal extension.
|
||||||
template <typename genType>
|
template <typename genType>
|
||||||
genType csc(genType const & angle);
|
genType csc(genType const & angle);
|
||||||
|
|
||||||
//! Cotangent function.
|
//! Cotangent function.
|
||||||
//! adjacent / opposite or 1 / tan(x)
|
//! adjacent / opposite or 1 / tan(x)
|
||||||
//! From GLM_GTX_reciprocal extension.
|
//! From GLM_GTX_reciprocal extension.
|
||||||
template <typename genType>
|
template <typename genType>
|
||||||
genType cot(genType const & angle);
|
genType cot(genType const & angle);
|
||||||
|
|
||||||
//! Inverse secant function.
|
//! Inverse secant function.
|
||||||
//! From GLM_GTX_reciprocal extension.
|
//! From GLM_GTX_reciprocal extension.
|
||||||
template <typename genType>
|
template <typename genType>
|
||||||
genType asec(genType const & x);
|
genType asec(genType const & x);
|
||||||
|
|
||||||
//! Inverse cosecant function.
|
//! Inverse cosecant function.
|
||||||
//! From GLM_GTX_reciprocal extension.
|
//! From GLM_GTX_reciprocal extension.
|
||||||
template <typename genType>
|
template <typename genType>
|
||||||
genType acsc(genType const & x);
|
genType acsc(genType const & x);
|
||||||
|
|
||||||
//! Inverse cotangent function.
|
//! Inverse cotangent function.
|
||||||
//! From GLM_GTX_reciprocal extension.
|
//! From GLM_GTX_reciprocal extension.
|
||||||
template <typename genType>
|
template <typename genType>
|
||||||
genType acot(genType const & x);
|
genType acot(genType const & x);
|
||||||
|
|
||||||
//! Secant hyperbolic function.
|
//! Secant hyperbolic function.
|
||||||
//! From GLM_GTX_reciprocal extension.
|
//! From GLM_GTX_reciprocal extension.
|
||||||
template <typename genType>
|
template <typename genType>
|
||||||
genType sech(genType const & angle);
|
genType sech(genType const & angle);
|
||||||
|
|
||||||
//! Cosecant hyperbolic function.
|
//! Cosecant hyperbolic function.
|
||||||
//! From GLM_GTX_reciprocal extension.
|
//! From GLM_GTX_reciprocal extension.
|
||||||
template <typename genType>
|
template <typename genType>
|
||||||
genType csch(genType const & angle);
|
genType csch(genType const & angle);
|
||||||
|
|
||||||
//! Cotangent hyperbolic function.
|
//! Cotangent hyperbolic function.
|
||||||
//! From GLM_GTX_reciprocal extension.
|
//! From GLM_GTX_reciprocal extension.
|
||||||
template <typename genType>
|
template <typename genType>
|
||||||
genType coth(genType const & angle);
|
genType coth(genType const & angle);
|
||||||
|
|
||||||
//! Inverse secant hyperbolic function.
|
//! Inverse secant hyperbolic function.
|
||||||
//! From GLM_GTX_reciprocal extension.
|
//! From GLM_GTX_reciprocal extension.
|
||||||
template <typename genType>
|
template <typename genType>
|
||||||
genType asech(genType const & x);
|
genType asech(genType const & x);
|
||||||
|
|
||||||
//! Inverse cosecant hyperbolic function.
|
//! Inverse cosecant hyperbolic function.
|
||||||
//! From GLM_GTX_reciprocal extension.
|
//! From GLM_GTX_reciprocal extension.
|
||||||
template <typename genType>
|
template <typename genType>
|
||||||
genType acsch(genType const & x);
|
genType acsch(genType const & x);
|
||||||
|
|
||||||
//! Inverse cotangent hyperbolic function.
|
//! Inverse cotangent hyperbolic function.
|
||||||
//! From GLM_GTX_reciprocal extension.
|
//! From GLM_GTX_reciprocal extension.
|
||||||
template <typename genType>
|
template <typename genType>
|
||||||
genType acoth(genType const & x);
|
genType acoth(genType const & x);
|
||||||
|
|
||||||
///@}
|
/// @}
|
||||||
|
}//namespace reciprocal
|
||||||
}//namespace reciprocal
|
}//namespace gtx
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "reciprocal.inl"
|
#include "reciprocal.inl"
|
||||||
|
@ -23,88 +23,86 @@
|
|||||||
|
|
||||||
namespace glm{
|
namespace glm{
|
||||||
namespace gtx{
|
namespace gtx{
|
||||||
//! GLM_GTX_rotate_vector extension: Function to directly rotate a vector
|
namespace rotate_vector ///< GLM_GTX_rotate_vector extension: Function to directly rotate a vector
|
||||||
namespace rotate_vector
|
|
||||||
{
|
{
|
||||||
using namespace transform;
|
using namespace transform;
|
||||||
|
|
||||||
/// \addtogroup gtx_rotate_vector
|
/// \addtogroup gtx_rotate_vector
|
||||||
///@{
|
/// @{
|
||||||
|
|
||||||
//! Rotate a two dimensional vector.
|
//! Rotate a two dimensional vector.
|
||||||
//! From GLM_GTX_rotate_vector extension.
|
//! From GLM_GTX_rotate_vector extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tvec2<T> rotate(
|
detail::tvec2<T> rotate(
|
||||||
detail::tvec2<T> const & v,
|
detail::tvec2<T> const & v,
|
||||||
T const & angle);
|
T const & angle);
|
||||||
|
|
||||||
//! Rotate a three dimensional vector around an axis.
|
//! Rotate a three dimensional vector around an axis.
|
||||||
//! From GLM_GTX_rotate_vector extension.
|
//! From GLM_GTX_rotate_vector extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tvec3<T> rotate(
|
detail::tvec3<T> rotate(
|
||||||
detail::tvec3<T> const & v,
|
detail::tvec3<T> const & v,
|
||||||
T const & angle,
|
T const & angle,
|
||||||
detail::tvec3<T> const & normal);
|
detail::tvec3<T> const & normal);
|
||||||
|
|
||||||
//! Rotate a four dimensional vector around an axis.
|
//! Rotate a four dimensional vector around an axis.
|
||||||
//! From GLM_GTX_rotate_vector extension.
|
//! From GLM_GTX_rotate_vector extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tvec4<T> rotate(
|
detail::tvec4<T> rotate(
|
||||||
detail::tvec4<T> const & v,
|
detail::tvec4<T> const & v,
|
||||||
T const & angle,
|
T const & angle,
|
||||||
detail::tvec3<T> const & normal);
|
detail::tvec3<T> const & normal);
|
||||||
|
|
||||||
//! Rotate a three dimensional vector around the X axis.
|
//! Rotate a three dimensional vector around the X axis.
|
||||||
//! From GLM_GTX_rotate_vector extension.
|
//! From GLM_GTX_rotate_vector extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tvec3<T> rotateX(
|
detail::tvec3<T> rotateX(
|
||||||
detail::tvec3<T> const & v,
|
detail::tvec3<T> const & v,
|
||||||
T const & angle);
|
T const & angle);
|
||||||
|
|
||||||
//! Rotate a three dimensional vector around the Y axis.
|
//! Rotate a three dimensional vector around the Y axis.
|
||||||
//! From GLM_GTX_rotate_vector extension.
|
//! From GLM_GTX_rotate_vector extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tvec3<T> rotateY(
|
detail::tvec3<T> rotateY(
|
||||||
detail::tvec3<T> const & v,
|
detail::tvec3<T> const & v,
|
||||||
T const & angle);
|
T const & angle);
|
||||||
|
|
||||||
//! Rotate a three dimensional vector around the Z axis.
|
//! Rotate a three dimensional vector around the Z axis.
|
||||||
//! From GLM_GTX_rotate_vector extension.
|
//! From GLM_GTX_rotate_vector extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tvec3<T> rotateZ(
|
detail::tvec3<T> rotateZ(
|
||||||
detail::tvec3<T> const & v,
|
detail::tvec3<T> const & v,
|
||||||
T const & angle);
|
T const & angle);
|
||||||
|
|
||||||
//! Rotate a four dimentionnals vector around the X axis.
|
//! Rotate a four dimentionnals vector around the X axis.
|
||||||
//! From GLM_GTX_rotate_vector extension.
|
//! From GLM_GTX_rotate_vector extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tvec4<T> rotateX(
|
detail::tvec4<T> rotateX(
|
||||||
detail::tvec4<T> const & v,
|
detail::tvec4<T> const & v,
|
||||||
T const & angle);
|
T const & angle);
|
||||||
|
|
||||||
//! Rotate a four dimensional vector around the X axis.
|
//! Rotate a four dimensional vector around the X axis.
|
||||||
//! From GLM_GTX_rotate_vector extension.
|
//! From GLM_GTX_rotate_vector extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tvec4<T> rotateY(
|
detail::tvec4<T> rotateY(
|
||||||
detail::tvec4<T> const & v,
|
detail::tvec4<T> const & v,
|
||||||
T const & angle);
|
T const & angle);
|
||||||
|
|
||||||
//! Rotate a four dimensional vector around the X axis.
|
//! Rotate a four dimensional vector around the X axis.
|
||||||
//! From GLM_GTX_rotate_vector extension.
|
//! From GLM_GTX_rotate_vector extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tvec4<T> rotateZ(
|
detail::tvec4<T> rotateZ(
|
||||||
detail::tvec4<T> const & v,
|
detail::tvec4<T> const & v,
|
||||||
T const & angle);
|
T const & angle);
|
||||||
|
|
||||||
//! Build a rotation matrix from a normal and a up vector.
|
//! Build a rotation matrix from a normal and a up vector.
|
||||||
//! From GLM_GTX_rotate_vector extension.
|
//! From GLM_GTX_rotate_vector extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tmat4x4<T> orientation(
|
detail::tmat4x4<T> orientation(
|
||||||
detail::tvec3<T> const & Normal,
|
detail::tvec3<T> const & Normal,
|
||||||
detail::tvec3<T> const & Up);
|
detail::tvec3<T> const & Up);
|
||||||
|
|
||||||
///@}
|
|
||||||
|
|
||||||
|
/// @}
|
||||||
}//namespace rotate_vector
|
}//namespace rotate_vector
|
||||||
}//namespace gtx
|
}//namespace gtx
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
@ -28,157 +28,153 @@
|
|||||||
# pragma message("GLM: GLM_GTX_simd_mat4 extension included")
|
# pragma message("GLM: GLM_GTX_simd_mat4 extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm
|
namespace glm{
|
||||||
|
namespace detail
|
||||||
{
|
{
|
||||||
namespace detail
|
/// 4x4 Matrix implemented using SIMD SEE intrinsics.
|
||||||
|
/// \ingroup gtx_simd_mat4
|
||||||
|
GLM_ALIGNED_STRUCT(16) fmat4x4SIMD
|
||||||
{
|
{
|
||||||
/// 4x4 Matrix implemented using SIMD SEE intrinsics.
|
enum ctor{null};
|
||||||
/// \ingroup gtx_simd_mat4
|
|
||||||
GLM_ALIGNED_STRUCT(16) fmat4x4SIMD
|
|
||||||
{
|
|
||||||
enum ctor{null};
|
|
||||||
|
|
||||||
typedef float value_type;
|
typedef float value_type;
|
||||||
typedef fvec4SIMD col_type;
|
typedef fvec4SIMD col_type;
|
||||||
typedef fvec4SIMD row_type;
|
typedef fvec4SIMD row_type;
|
||||||
typedef std::size_t size_type;
|
typedef std::size_t size_type;
|
||||||
static size_type value_size();
|
static size_type value_size();
|
||||||
static size_type col_size();
|
static size_type col_size();
|
||||||
static size_type row_size();
|
static size_type row_size();
|
||||||
static bool is_matrix();
|
static bool is_matrix();
|
||||||
|
|
||||||
fvec4SIMD Data[4];
|
fvec4SIMD Data[4];
|
||||||
|
|
||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
fmat4x4SIMD();
|
fmat4x4SIMD();
|
||||||
explicit fmat4x4SIMD(float const & s);
|
explicit fmat4x4SIMD(float const & s);
|
||||||
explicit fmat4x4SIMD(
|
explicit fmat4x4SIMD(
|
||||||
float const & x0, float const & y0, float const & z0, float const & w0,
|
float const & x0, float const & y0, float const & z0, float const & w0,
|
||||||
float const & x1, float const & y1, float const & z1, float const & w1,
|
float const & x1, float const & y1, float const & z1, float const & w1,
|
||||||
float const & x2, float const & y2, float const & z2, float const & w2,
|
float const & x2, float const & y2, float const & z2, float const & w2,
|
||||||
float const & x3, float const & y3, float const & z3, float const & w3);
|
float const & x3, float const & y3, float const & z3, float const & w3);
|
||||||
explicit fmat4x4SIMD(
|
explicit fmat4x4SIMD(
|
||||||
fvec4SIMD const & v0,
|
fvec4SIMD const & v0,
|
||||||
fvec4SIMD const & v1,
|
fvec4SIMD const & v1,
|
||||||
fvec4SIMD const & v2,
|
fvec4SIMD const & v2,
|
||||||
fvec4SIMD const & v3);
|
fvec4SIMD const & v3);
|
||||||
explicit fmat4x4SIMD(
|
explicit fmat4x4SIMD(
|
||||||
tmat4x4<float> const & m);
|
tmat4x4<float> const & m);
|
||||||
|
|
||||||
// Conversions
|
// Conversions
|
||||||
//template <typename U>
|
//template <typename U>
|
||||||
//explicit tmat4x4(tmat4x4<U> const & m);
|
//explicit tmat4x4(tmat4x4<U> const & m);
|
||||||
|
|
||||||
//explicit tmat4x4(tmat2x2<T> const & x);
|
//explicit tmat4x4(tmat2x2<T> const & x);
|
||||||
//explicit tmat4x4(tmat3x3<T> const & x);
|
//explicit tmat4x4(tmat3x3<T> const & x);
|
||||||
//explicit tmat4x4(tmat2x3<T> const & x);
|
//explicit tmat4x4(tmat2x3<T> const & x);
|
||||||
//explicit tmat4x4(tmat3x2<T> const & x);
|
//explicit tmat4x4(tmat3x2<T> const & x);
|
||||||
//explicit tmat4x4(tmat2x4<T> const & x);
|
//explicit tmat4x4(tmat2x4<T> const & x);
|
||||||
//explicit tmat4x4(tmat4x2<T> const & x);
|
//explicit tmat4x4(tmat4x2<T> const & x);
|
||||||
//explicit tmat4x4(tmat3x4<T> const & x);
|
//explicit tmat4x4(tmat3x4<T> const & x);
|
||||||
//explicit tmat4x4(tmat4x3<T> const & x);
|
//explicit tmat4x4(tmat4x3<T> const & x);
|
||||||
|
|
||||||
// Accesses
|
// Accesses
|
||||||
fvec4SIMD & operator[](size_type i);
|
fvec4SIMD & operator[](size_type i);
|
||||||
fvec4SIMD const & operator[](size_type i) const;
|
fvec4SIMD const & operator[](size_type i) const;
|
||||||
|
|
||||||
// Unary updatable operators
|
// Unary updatable operators
|
||||||
fmat4x4SIMD & operator= (fmat4x4SIMD const & m);
|
fmat4x4SIMD & operator= (fmat4x4SIMD const & m);
|
||||||
fmat4x4SIMD & operator+= (float const & s);
|
fmat4x4SIMD & operator+= (float const & s);
|
||||||
fmat4x4SIMD & operator+= (fmat4x4SIMD const & m);
|
fmat4x4SIMD & operator+= (fmat4x4SIMD const & m);
|
||||||
fmat4x4SIMD & operator-= (float const & s);
|
fmat4x4SIMD & operator-= (float const & s);
|
||||||
fmat4x4SIMD & operator-= (fmat4x4SIMD const & m);
|
fmat4x4SIMD & operator-= (fmat4x4SIMD const & m);
|
||||||
fmat4x4SIMD & operator*= (float const & s);
|
fmat4x4SIMD & operator*= (float const & s);
|
||||||
fmat4x4SIMD & operator*= (fmat4x4SIMD const & m);
|
fmat4x4SIMD & operator*= (fmat4x4SIMD const & m);
|
||||||
fmat4x4SIMD & operator/= (float const & s);
|
fmat4x4SIMD & operator/= (float const & s);
|
||||||
fmat4x4SIMD & operator/= (fmat4x4SIMD const & m);
|
fmat4x4SIMD & operator/= (fmat4x4SIMD const & m);
|
||||||
fmat4x4SIMD & operator++ ();
|
fmat4x4SIMD & operator++ ();
|
||||||
fmat4x4SIMD & operator-- ();
|
fmat4x4SIMD & operator-- ();
|
||||||
};
|
};
|
||||||
|
|
||||||
// Binary operators
|
// Binary operators
|
||||||
fmat4x4SIMD operator+ (fmat4x4SIMD const & m, float const & s);
|
fmat4x4SIMD operator+ (fmat4x4SIMD const & m, float const & s);
|
||||||
fmat4x4SIMD operator+ (float const & s, fmat4x4SIMD const & m);
|
fmat4x4SIMD operator+ (float const & s, fmat4x4SIMD const & m);
|
||||||
fmat4x4SIMD operator+ (fmat4x4SIMD const & m1, fmat4x4SIMD const & m2);
|
fmat4x4SIMD operator+ (fmat4x4SIMD const & m1, fmat4x4SIMD const & m2);
|
||||||
|
|
||||||
fmat4x4SIMD operator- (fmat4x4SIMD const & m, float const & s);
|
fmat4x4SIMD operator- (fmat4x4SIMD const & m, float const & s);
|
||||||
fmat4x4SIMD operator- (float const & s, fmat4x4SIMD const & m);
|
fmat4x4SIMD operator- (float const & s, fmat4x4SIMD const & m);
|
||||||
fmat4x4SIMD operator- (fmat4x4SIMD const & m1, fmat4x4SIMD const & m2);
|
fmat4x4SIMD operator- (fmat4x4SIMD const & m1, fmat4x4SIMD const & m2);
|
||||||
|
|
||||||
fmat4x4SIMD operator* (fmat4x4SIMD const & m, float const & s);
|
fmat4x4SIMD operator* (fmat4x4SIMD const & m, float const & s);
|
||||||
fmat4x4SIMD operator* (float const & s, fmat4x4SIMD const & m);
|
fmat4x4SIMD operator* (float const & s, fmat4x4SIMD const & m);
|
||||||
|
|
||||||
fvec4SIMD operator* (fmat4x4SIMD const & m, fvec4SIMD const & v);
|
fvec4SIMD operator* (fmat4x4SIMD const & m, fvec4SIMD const & v);
|
||||||
fvec4SIMD operator* (fvec4SIMD const & v, fmat4x4SIMD const & m);
|
fvec4SIMD operator* (fvec4SIMD const & v, fmat4x4SIMD const & m);
|
||||||
|
|
||||||
fmat4x4SIMD operator* (fmat4x4SIMD const & m1, fmat4x4SIMD const & m2);
|
fmat4x4SIMD operator* (fmat4x4SIMD const & m1, fmat4x4SIMD const & m2);
|
||||||
|
|
||||||
fmat4x4SIMD operator/ (fmat4x4SIMD const & m, float const & s);
|
fmat4x4SIMD operator/ (fmat4x4SIMD const & m, float const & s);
|
||||||
fmat4x4SIMD operator/ (float const & s, fmat4x4SIMD const & m);
|
fmat4x4SIMD operator/ (float const & s, fmat4x4SIMD const & m);
|
||||||
|
|
||||||
fvec4SIMD operator/ (fmat4x4SIMD const & m, fvec4SIMD const & v);
|
fvec4SIMD operator/ (fmat4x4SIMD const & m, fvec4SIMD const & v);
|
||||||
fvec4SIMD operator/ (fvec4SIMD const & v, fmat4x4SIMD const & m);
|
fvec4SIMD operator/ (fvec4SIMD const & v, fmat4x4SIMD const & m);
|
||||||
|
|
||||||
fmat4x4SIMD operator/ (fmat4x4SIMD const & m1, fmat4x4SIMD const & m2);
|
fmat4x4SIMD operator/ (fmat4x4SIMD const & m1, fmat4x4SIMD const & m2);
|
||||||
|
|
||||||
// Unary constant operators
|
// Unary constant operators
|
||||||
fmat4x4SIMD const operator- (fmat4x4SIMD const & m);
|
fmat4x4SIMD const operator- (fmat4x4SIMD const & m);
|
||||||
fmat4x4SIMD const operator-- (fmat4x4SIMD const & m, int);
|
fmat4x4SIMD const operator-- (fmat4x4SIMD const & m, int);
|
||||||
fmat4x4SIMD const operator++ (fmat4x4SIMD const & m, int);
|
fmat4x4SIMD const operator++ (fmat4x4SIMD const & m, int);
|
||||||
|
}//namespace detail
|
||||||
|
|
||||||
}//namespace detail
|
namespace gtx{
|
||||||
|
namespace simd_mat4 ///< GLM_GTX_simd_mat4 extension: SIMD implementation of mat4 type.
|
||||||
|
{
|
||||||
|
typedef detail::fmat4x4SIMD simdMat4;
|
||||||
|
|
||||||
namespace gtx{
|
/// \addtogroup gtx_simd_mat4
|
||||||
//! GLM_GTX_simd_mat4 extension: SIMD implementation of mat4 type.
|
///@{
|
||||||
namespace simd_mat4
|
|
||||||
{
|
|
||||||
typedef detail::fmat4x4SIMD simdMat4;
|
|
||||||
|
|
||||||
/// \addtogroup gtx_simd_mat4
|
//! Convert a simdMat4 to a mat4.
|
||||||
///@{
|
//! (From GLM_GTX_simd_mat4 extension)
|
||||||
|
detail::tmat4x4<float> mat4_cast(
|
||||||
|
detail::fmat4x4SIMD const & x);
|
||||||
|
|
||||||
//! Convert a simdMat4 to a mat4.
|
//! Multiply matrix x by matrix y component-wise, i.e.,
|
||||||
//! (From GLM_GTX_simd_mat4 extension)
|
//! result[i][j] is the scalar product of x[i][j] and y[i][j].
|
||||||
detail::tmat4x4<float> mat4_cast(
|
//! (From GLM_GTX_simd_mat4 extension).
|
||||||
detail::fmat4x4SIMD const & x);
|
detail::fmat4x4SIMD matrixCompMult(
|
||||||
|
detail::fmat4x4SIMD const & x,
|
||||||
|
detail::fmat4x4SIMD const & y);
|
||||||
|
|
||||||
//! Multiply matrix x by matrix y component-wise, i.e.,
|
//! Treats the first parameter c as a column vector
|
||||||
//! result[i][j] is the scalar product of x[i][j] and y[i][j].
|
//! and the second parameter r as a row vector
|
||||||
//! (From GLM_GTX_simd_mat4 extension).
|
//! and does a linear algebraic matrix multiply c * r.
|
||||||
detail::fmat4x4SIMD matrixCompMult(
|
//! (From GLM_GTX_simd_mat4 extension).
|
||||||
detail::fmat4x4SIMD const & x,
|
detail::fmat4x4SIMD outerProduct(
|
||||||
detail::fmat4x4SIMD const & y);
|
detail::fvec4SIMD const & c,
|
||||||
|
detail::fvec4SIMD const & r);
|
||||||
|
|
||||||
//! Treats the first parameter c as a column vector
|
//! Returns the transposed matrix of x
|
||||||
//! and the second parameter r as a row vector
|
//! (From GLM_GTX_simd_mat4 extension).
|
||||||
//! and does a linear algebraic matrix multiply c * r.
|
detail::fmat4x4SIMD transpose(
|
||||||
//! (From GLM_GTX_simd_mat4 extension).
|
detail::fmat4x4SIMD const & x);
|
||||||
detail::fmat4x4SIMD outerProduct(
|
|
||||||
detail::fvec4SIMD const & c,
|
|
||||||
detail::fvec4SIMD const & r);
|
|
||||||
|
|
||||||
//! Returns the transposed matrix of x
|
//! Return the determinant of a mat4 matrix.
|
||||||
//! (From GLM_GTX_simd_mat4 extension).
|
//! (From GLM_GTX_simd_mat4 extension).
|
||||||
detail::fmat4x4SIMD transpose(
|
float determinant(
|
||||||
detail::fmat4x4SIMD const & x);
|
detail::fmat4x4SIMD const & m);
|
||||||
|
|
||||||
//! Return the determinant of a mat4 matrix.
|
//! Return the inverse of a mat4 matrix.
|
||||||
//! (From GLM_GTX_simd_mat4 extension).
|
//! (From GLM_GTX_simd_mat4 extension).
|
||||||
float determinant(
|
detail::fmat4x4SIMD inverse(
|
||||||
detail::fmat4x4SIMD const & m);
|
detail::fmat4x4SIMD const & m);
|
||||||
|
|
||||||
//! Return the inverse of a mat4 matrix.
|
/// @}
|
||||||
//! (From GLM_GTX_simd_mat4 extension).
|
}// namespace simd_mat4
|
||||||
detail::fmat4x4SIMD inverse(
|
}// namespace gtx
|
||||||
detail::fmat4x4SIMD const & m);
|
}// namespace glm
|
||||||
|
|
||||||
///@}
|
|
||||||
|
|
||||||
}//namespace simd_mat4
|
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
|
||||||
|
|
||||||
#include "simd_mat4.inl"
|
#include "simd_mat4.inl"
|
||||||
|
|
||||||
|
@ -28,446 +28,443 @@
|
|||||||
# pragma message("GLM: GLM_GTX_simd_vec4 extension included")
|
# pragma message("GLM: GLM_GTX_simd_vec4 extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm
|
namespace glm{
|
||||||
|
namespace detail
|
||||||
{
|
{
|
||||||
namespace detail
|
/// 4-dimensional vector implemented using SIMD SEE intrinsics.
|
||||||
|
/// \ingroup gtx_simd_vec4
|
||||||
|
GLM_ALIGNED_STRUCT(4) fvec4SIMD
|
||||||
{
|
{
|
||||||
/// 4-dimensional vector implemented using SIMD SEE intrinsics.
|
enum ctor{null};
|
||||||
/// \ingroup gtx_simd_vec4
|
typedef __m128 value_type;
|
||||||
GLM_ALIGNED_STRUCT(4) fvec4SIMD
|
typedef std::size_t size_type;
|
||||||
{
|
static size_type value_size();
|
||||||
enum ctor{null};
|
|
||||||
typedef __m128 value_type;
|
typedef fvec4SIMD type;
|
||||||
typedef std::size_t size_type;
|
typedef tvec4<bool> bool_type;
|
||||||
static size_type value_size();
|
|
||||||
|
__m128 Data;
|
||||||
typedef fvec4SIMD type;
|
|
||||||
typedef tvec4<bool> bool_type;
|
//////////////////////////////////////
|
||||||
|
// Implicit basic constructors
|
||||||
__m128 Data;
|
|
||||||
|
fvec4SIMD();
|
||||||
//////////////////////////////////////
|
fvec4SIMD(__m128 const & Data);
|
||||||
// Implicit basic constructors
|
fvec4SIMD(fvec4SIMD const & v);
|
||||||
|
|
||||||
fvec4SIMD();
|
//////////////////////////////////////
|
||||||
fvec4SIMD(__m128 const & Data);
|
// Explicit basic constructors
|
||||||
fvec4SIMD(fvec4SIMD const & v);
|
|
||||||
|
explicit fvec4SIMD(
|
||||||
//////////////////////////////////////
|
ctor);
|
||||||
// Explicit basic constructors
|
explicit fvec4SIMD(
|
||||||
|
float const & s);
|
||||||
explicit fvec4SIMD(
|
explicit fvec4SIMD(
|
||||||
ctor);
|
float const & x,
|
||||||
explicit fvec4SIMD(
|
float const & y,
|
||||||
float const & s);
|
float const & z,
|
||||||
explicit fvec4SIMD(
|
float const & w);
|
||||||
float const & x,
|
explicit fvec4SIMD(
|
||||||
float const & y,
|
tvec4<float> const & v);
|
||||||
float const & z,
|
|
||||||
float const & w);
|
////////////////////////////////////////
|
||||||
explicit fvec4SIMD(
|
//// Convertion vector constructors
|
||||||
tvec4<float> const & v);
|
|
||||||
|
fvec4SIMD(vec2 const & v, float const & s1, float const & s2);
|
||||||
////////////////////////////////////////
|
fvec4SIMD(float const & s1, vec2 const & v, float const & s2);
|
||||||
//// Convertion vector constructors
|
fvec4SIMD(float const & s1, float const & s2, vec2 const & v);
|
||||||
|
fvec4SIMD(vec3 const & v, float const & s);
|
||||||
fvec4SIMD(vec2 const & v, float const & s1, float const & s2);
|
fvec4SIMD(float const & s, vec3 const & v);
|
||||||
fvec4SIMD(float const & s1, vec2 const & v, float const & s2);
|
fvec4SIMD(vec2 const & v1, vec2 const & v2);
|
||||||
fvec4SIMD(float const & s1, float const & s2, vec2 const & v);
|
//fvec4SIMD(ivec4SIMD const & v);
|
||||||
fvec4SIMD(vec3 const & v, float const & s);
|
|
||||||
fvec4SIMD(float const & s, vec3 const & v);
|
//////////////////////////////////////
|
||||||
fvec4SIMD(vec2 const & v1, vec2 const & v2);
|
// Unary arithmetic operators
|
||||||
//fvec4SIMD(ivec4SIMD const & v);
|
|
||||||
|
fvec4SIMD& operator= (fvec4SIMD const & v);
|
||||||
//////////////////////////////////////
|
fvec4SIMD& operator+=(fvec4SIMD const & v);
|
||||||
// Unary arithmetic operators
|
fvec4SIMD& operator-=(fvec4SIMD const & v);
|
||||||
|
fvec4SIMD& operator*=(fvec4SIMD const & v);
|
||||||
fvec4SIMD& operator= (fvec4SIMD const & v);
|
fvec4SIMD& operator/=(fvec4SIMD const & v);
|
||||||
fvec4SIMD& operator+=(fvec4SIMD const & v);
|
|
||||||
fvec4SIMD& operator-=(fvec4SIMD const & v);
|
fvec4SIMD& operator+=(float const & s);
|
||||||
fvec4SIMD& operator*=(fvec4SIMD const & v);
|
fvec4SIMD& operator-=(float const & s);
|
||||||
fvec4SIMD& operator/=(fvec4SIMD const & v);
|
fvec4SIMD& operator*=(float const & s);
|
||||||
|
fvec4SIMD& operator/=(float const & s);
|
||||||
fvec4SIMD& operator+=(float const & s);
|
|
||||||
fvec4SIMD& operator-=(float const & s);
|
fvec4SIMD& operator++();
|
||||||
fvec4SIMD& operator*=(float const & s);
|
fvec4SIMD& operator--();
|
||||||
fvec4SIMD& operator/=(float const & s);
|
|
||||||
|
//////////////////////////////////////
|
||||||
fvec4SIMD& operator++();
|
// Swizzle operators
|
||||||
fvec4SIMD& operator--();
|
|
||||||
|
template <comp X, comp Y, comp Z, comp W>
|
||||||
//////////////////////////////////////
|
fvec4SIMD& swizzle();
|
||||||
// Swizzle operators
|
template <comp X, comp Y, comp Z, comp W>
|
||||||
|
fvec4SIMD swizzle() const;
|
||||||
template <comp X, comp Y, comp Z, comp W>
|
template <comp X, comp Y, comp Z>
|
||||||
fvec4SIMD& swizzle();
|
fvec4SIMD swizzle() const;
|
||||||
template <comp X, comp Y, comp Z, comp W>
|
template <comp X, comp Y>
|
||||||
fvec4SIMD swizzle() const;
|
fvec4SIMD swizzle() const;
|
||||||
template <comp X, comp Y, comp Z>
|
template <comp X>
|
||||||
fvec4SIMD swizzle() const;
|
fvec4SIMD swizzle() const;
|
||||||
template <comp X, comp Y>
|
};
|
||||||
fvec4SIMD swizzle() const;
|
}//namespace detail
|
||||||
template <comp X>
|
|
||||||
fvec4SIMD swizzle() const;
|
namespace gtx{
|
||||||
};
|
namespace simd_vec4 ///< GLM_GTX_simd_vec4 extension: SIMD implementation of vec4 type.
|
||||||
|
{
|
||||||
}//namespace detail
|
typedef detail::fvec4SIMD simdVec4;
|
||||||
|
|
||||||
namespace gtx{
|
/// \addtogroup gtx_simd_vec4
|
||||||
//! GLM_GTX_simd_vec4 extension: SIMD implementation of vec4 type.
|
///@{
|
||||||
namespace simd_vec4
|
|
||||||
{
|
//! Convert a simdVec4 to a vec4.
|
||||||
typedef detail::fvec4SIMD simdVec4;
|
//! (From GLM_GTX_simd_vec4 extension)
|
||||||
|
detail::tvec4<float> vec4_cast(
|
||||||
/// \addtogroup gtx_simd_vec4
|
detail::fvec4SIMD const & x);
|
||||||
///@{
|
|
||||||
|
//! Returns x if x >= 0; otherwise, it returns -x.
|
||||||
//! Convert a simdVec4 to a vec4.
|
//! (From GLM_GTX_simd_vec4 extension, common function)
|
||||||
//! (From GLM_GTX_simd_vec4 extension)
|
detail::fvec4SIMD abs(detail::fvec4SIMD const & x);
|
||||||
detail::tvec4<float> vec4_cast(
|
|
||||||
detail::fvec4SIMD const & x);
|
//! Returns 1.0 if x > 0, 0.0 if x = 0, or -1.0 if x < 0.
|
||||||
|
//! (From GLM_GTX_simd_vec4 extension, common function)
|
||||||
//! Returns x if x >= 0; otherwise, it returns -x.
|
detail::fvec4SIMD sign(detail::fvec4SIMD const & x);
|
||||||
//! (From GLM_GTX_simd_vec4 extension, common function)
|
|
||||||
detail::fvec4SIMD abs(detail::fvec4SIMD const & x);
|
//! Returns a value equal to the nearest integer that is less then or equal to x.
|
||||||
|
//! (From GLM_GTX_simd_vec4 extension, common function)
|
||||||
//! Returns 1.0 if x > 0, 0.0 if x = 0, or -1.0 if x < 0.
|
detail::fvec4SIMD floor(detail::fvec4SIMD const & x);
|
||||||
//! (From GLM_GTX_simd_vec4 extension, common function)
|
|
||||||
detail::fvec4SIMD sign(detail::fvec4SIMD const & x);
|
//! Returns a value equal to the nearest integer to x
|
||||||
|
//! whose absolute value is not larger than the absolute value of x.
|
||||||
//! Returns a value equal to the nearest integer that is less then or equal to x.
|
//! (From GLM_GTX_simd_vec4 extension, common function)
|
||||||
//! (From GLM_GTX_simd_vec4 extension, common function)
|
detail::fvec4SIMD trunc(detail::fvec4SIMD const & x);
|
||||||
detail::fvec4SIMD floor(detail::fvec4SIMD const & x);
|
|
||||||
|
//! Returns a value equal to the nearest integer to x.
|
||||||
//! Returns a value equal to the nearest integer to x
|
//! The fraction 0.5 will round in a direction chosen by the
|
||||||
//! whose absolute value is not larger than the absolute value of x.
|
//! implementation, presumably the direction that is fastest.
|
||||||
//! (From GLM_GTX_simd_vec4 extension, common function)
|
//! This includes the possibility that round(x) returns the
|
||||||
detail::fvec4SIMD trunc(detail::fvec4SIMD const & x);
|
//! same value as roundEven(x) for all values of x.
|
||||||
|
//! (From GLM_GTX_simd_vec4 extension, common function)
|
||||||
//! Returns a value equal to the nearest integer to x.
|
detail::fvec4SIMD round(detail::fvec4SIMD const & x);
|
||||||
//! The fraction 0.5 will round in a direction chosen by the
|
|
||||||
//! implementation, presumably the direction that is fastest.
|
//! Returns a value equal to the nearest integer to x.
|
||||||
//! This includes the possibility that round(x) returns the
|
//! A fractional part of 0.5 will round toward the nearest even
|
||||||
//! same value as roundEven(x) for all values of x.
|
//! integer. (Both 3.5 and 4.5 for x will return 4.0.)
|
||||||
//! (From GLM_GTX_simd_vec4 extension, common function)
|
//! (From GLM_GTX_simd_vec4 extension, common function)
|
||||||
detail::fvec4SIMD round(detail::fvec4SIMD const & x);
|
//detail::fvec4SIMD roundEven(detail::fvec4SIMD const & x);
|
||||||
|
|
||||||
//! Returns a value equal to the nearest integer to x.
|
//! Returns a value equal to the nearest integer
|
||||||
//! A fractional part of 0.5 will round toward the nearest even
|
//! that is greater than or equal to x.
|
||||||
//! integer. (Both 3.5 and 4.5 for x will return 4.0.)
|
//! (From GLM_GTX_simd_vec4 extension, common function)
|
||||||
//! (From GLM_GTX_simd_vec4 extension, common function)
|
detail::fvec4SIMD ceil(detail::fvec4SIMD const & x);
|
||||||
//detail::fvec4SIMD roundEven(detail::fvec4SIMD const & x);
|
|
||||||
|
//! Return x - floor(x).
|
||||||
//! Returns a value equal to the nearest integer
|
//! (From GLM_GTX_simd_vec4 extension, common function)
|
||||||
//! that is greater than or equal to x.
|
detail::fvec4SIMD fract(detail::fvec4SIMD const & x);
|
||||||
//! (From GLM_GTX_simd_vec4 extension, common function)
|
|
||||||
detail::fvec4SIMD ceil(detail::fvec4SIMD const & x);
|
//! Modulus. Returns x - y * floor(x / y)
|
||||||
|
//! for each component in x using the floating point value y.
|
||||||
//! Return x - floor(x).
|
//! (From GLM_GTX_simd_vec4 extension, common function)
|
||||||
//! (From GLM_GTX_simd_vec4 extension, common function)
|
detail::fvec4SIMD mod(
|
||||||
detail::fvec4SIMD fract(detail::fvec4SIMD const & x);
|
detail::fvec4SIMD const & x,
|
||||||
|
detail::fvec4SIMD const & y);
|
||||||
//! Modulus. Returns x - y * floor(x / y)
|
|
||||||
//! for each component in x using the floating point value y.
|
//! Modulus. Returns x - y * floor(x / y)
|
||||||
//! (From GLM_GTX_simd_vec4 extension, common function)
|
//! for each component in x using the floating point value y.
|
||||||
detail::fvec4SIMD mod(
|
//! (From GLM_GTX_simd_vec4 extension, common function)
|
||||||
detail::fvec4SIMD const & x,
|
detail::fvec4SIMD mod(
|
||||||
detail::fvec4SIMD const & y);
|
detail::fvec4SIMD const & x,
|
||||||
|
float const & y);
|
||||||
//! Modulus. Returns x - y * floor(x / y)
|
|
||||||
//! for each component in x using the floating point value y.
|
//! Returns the fractional part of x and sets i to the integer
|
||||||
//! (From GLM_GTX_simd_vec4 extension, common function)
|
//! part (as a whole number floating point value). Both the
|
||||||
detail::fvec4SIMD mod(
|
//! return value and the output parameter will have the same
|
||||||
detail::fvec4SIMD const & x,
|
//! sign as x.
|
||||||
float const & y);
|
//! (From GLM_GTX_simd_vec4 extension, common function)
|
||||||
|
//detail::fvec4SIMD modf(
|
||||||
//! Returns the fractional part of x and sets i to the integer
|
// detail::fvec4SIMD const & x,
|
||||||
//! part (as a whole number floating point value). Both the
|
// detail::fvec4SIMD & i);
|
||||||
//! return value and the output parameter will have the same
|
|
||||||
//! sign as x.
|
//! Returns y if y < x; otherwise, it returns x.
|
||||||
//! (From GLM_GTX_simd_vec4 extension, common function)
|
//! (From GLM_GTX_simd_vec4 extension, common function)
|
||||||
//detail::fvec4SIMD modf(
|
detail::fvec4SIMD min(
|
||||||
// detail::fvec4SIMD const & x,
|
detail::fvec4SIMD const & x,
|
||||||
// detail::fvec4SIMD & i);
|
detail::fvec4SIMD const & y);
|
||||||
|
|
||||||
//! Returns y if y < x; otherwise, it returns x.
|
detail::fvec4SIMD min(
|
||||||
//! (From GLM_GTX_simd_vec4 extension, common function)
|
detail::fvec4SIMD const & x,
|
||||||
detail::fvec4SIMD min(
|
float const & y);
|
||||||
detail::fvec4SIMD const & x,
|
|
||||||
detail::fvec4SIMD const & y);
|
//! Returns y if x < y; otherwise, it returns x.
|
||||||
|
//! (From GLM_GTX_simd_vec4 extension, common function)
|
||||||
detail::fvec4SIMD min(
|
detail::fvec4SIMD max(
|
||||||
detail::fvec4SIMD const & x,
|
detail::fvec4SIMD const & x,
|
||||||
float const & y);
|
detail::fvec4SIMD const & y);
|
||||||
|
|
||||||
//! Returns y if x < y; otherwise, it returns x.
|
detail::fvec4SIMD max(
|
||||||
//! (From GLM_GTX_simd_vec4 extension, common function)
|
detail::fvec4SIMD const & x,
|
||||||
detail::fvec4SIMD max(
|
float const & y);
|
||||||
detail::fvec4SIMD const & x,
|
|
||||||
detail::fvec4SIMD const & y);
|
//! Returns min(max(x, minVal), maxVal) for each component in x
|
||||||
|
//! using the floating-point values minVal and maxVal.
|
||||||
detail::fvec4SIMD max(
|
//! (From GLM_GTX_simd_vec4 extension, common function)
|
||||||
detail::fvec4SIMD const & x,
|
detail::fvec4SIMD clamp(
|
||||||
float const & y);
|
detail::fvec4SIMD const & x,
|
||||||
|
detail::fvec4SIMD const & minVal,
|
||||||
//! Returns min(max(x, minVal), maxVal) for each component in x
|
detail::fvec4SIMD const & maxVal);
|
||||||
//! using the floating-point values minVal and maxVal.
|
|
||||||
//! (From GLM_GTX_simd_vec4 extension, common function)
|
detail::fvec4SIMD clamp(
|
||||||
detail::fvec4SIMD clamp(
|
detail::fvec4SIMD const & x,
|
||||||
detail::fvec4SIMD const & x,
|
float const & minVal,
|
||||||
detail::fvec4SIMD const & minVal,
|
float const & maxVal);
|
||||||
detail::fvec4SIMD const & maxVal);
|
|
||||||
|
//! \return If genTypeU is a floating scalar or vector:
|
||||||
detail::fvec4SIMD clamp(
|
//! Returns x * (1.0 - a) + y * a, i.e., the linear blend of
|
||||||
detail::fvec4SIMD const & x,
|
//! x and y using the floating-point value a.
|
||||||
float const & minVal,
|
//! The value for a is not restricted to the range [0, 1].
|
||||||
float const & maxVal);
|
//!
|
||||||
|
//! \return If genTypeU is a boolean scalar or vector:
|
||||||
//! \return If genTypeU is a floating scalar or vector:
|
//! Selects which vector each returned component comes
|
||||||
//! Returns x * (1.0 - a) + y * a, i.e., the linear blend of
|
//! from. For a component of a that is false, the
|
||||||
//! x and y using the floating-point value a.
|
//! corresponding component of x is returned. For a
|
||||||
//! The value for a is not restricted to the range [0, 1].
|
//! component of a that is true, the corresponding
|
||||||
//!
|
//! component of y is returned. Components of x and y that
|
||||||
//! \return If genTypeU is a boolean scalar or vector:
|
//! are not selected are allowed to be invalid floating point
|
||||||
//! Selects which vector each returned component comes
|
//! values and will have no effect on the results. Thus, this
|
||||||
//! from. For a component of a that is false, the
|
//! provides different functionality than
|
||||||
//! corresponding component of x is returned. For a
|
//! genType mix(genType x, genType y, genType(a))
|
||||||
//! component of a that is true, the corresponding
|
//! where a is a Boolean vector.
|
||||||
//! component of y is returned. Components of x and y that
|
//!
|
||||||
//! are not selected are allowed to be invalid floating point
|
//! From GLSL 1.30.08 specification, section 8.3
|
||||||
//! values and will have no effect on the results. Thus, this
|
//!
|
||||||
//! provides different functionality than
|
//! \param[in] x Floating point scalar or vector.
|
||||||
//! genType mix(genType x, genType y, genType(a))
|
//! \param[in] y Floating point scalar or vector.
|
||||||
//! where a is a Boolean vector.
|
//! \param[in] a Floating point or boolean scalar or vector.
|
||||||
//!
|
//!
|
||||||
//! From GLSL 1.30.08 specification, section 8.3
|
// \todo Test when 'a' is a boolean.
|
||||||
//!
|
//! (From GLM_GTX_simd_vec4 extension, common function)
|
||||||
//! \param[in] x Floating point scalar or vector.
|
detail::fvec4SIMD mix(
|
||||||
//! \param[in] y Floating point scalar or vector.
|
detail::fvec4SIMD const & x,
|
||||||
//! \param[in] a Floating point or boolean scalar or vector.
|
detail::fvec4SIMD const & y,
|
||||||
//!
|
detail::fvec4SIMD const & a);
|
||||||
// \todo Test when 'a' is a boolean.
|
|
||||||
//! (From GLM_GTX_simd_vec4 extension, common function)
|
//! Returns 0.0 if x < edge, otherwise it returns 1.0.
|
||||||
detail::fvec4SIMD mix(
|
//! (From GLM_GTX_simd_vec4 extension, common function)
|
||||||
detail::fvec4SIMD const & x,
|
detail::fvec4SIMD step(
|
||||||
detail::fvec4SIMD const & y,
|
detail::fvec4SIMD const & edge,
|
||||||
detail::fvec4SIMD const & a);
|
detail::fvec4SIMD const & x);
|
||||||
|
|
||||||
//! Returns 0.0 if x < edge, otherwise it returns 1.0.
|
detail::fvec4SIMD step(
|
||||||
//! (From GLM_GTX_simd_vec4 extension, common function)
|
float const & edge,
|
||||||
detail::fvec4SIMD step(
|
detail::fvec4SIMD const & x);
|
||||||
detail::fvec4SIMD const & edge,
|
|
||||||
detail::fvec4SIMD const & x);
|
//! Returns 0.0 if x <= edge0 and 1.0 if x >= edge1 and
|
||||||
|
//! performs smooth Hermite interpolation between 0 and 1
|
||||||
detail::fvec4SIMD step(
|
//! when edge0 < x < edge1. This is useful in cases where
|
||||||
float const & edge,
|
//! you would want a threshold function with a smooth
|
||||||
detail::fvec4SIMD const & x);
|
//! transition. This is equivalent to:
|
||||||
|
//! genType t;
|
||||||
//! Returns 0.0 if x <= edge0 and 1.0 if x >= edge1 and
|
//! t = clamp ((x – edge0) / (edge1 – edge0), 0, 1);
|
||||||
//! performs smooth Hermite interpolation between 0 and 1
|
//! return t * t * (3 – 2 * t);
|
||||||
//! when edge0 < x < edge1. This is useful in cases where
|
//! Results are undefined if edge0 >= edge1.
|
||||||
//! you would want a threshold function with a smooth
|
//! (From GLM_GTX_simd_vec4 extension, common function)
|
||||||
//! transition. This is equivalent to:
|
detail::fvec4SIMD smoothstep(
|
||||||
//! genType t;
|
detail::fvec4SIMD const & edge0,
|
||||||
//! t = clamp ((x – edge0) / (edge1 – edge0), 0, 1);
|
detail::fvec4SIMD const & edge1,
|
||||||
//! return t * t * (3 – 2 * t);
|
detail::fvec4SIMD const & x);
|
||||||
//! Results are undefined if edge0 >= edge1.
|
|
||||||
//! (From GLM_GTX_simd_vec4 extension, common function)
|
detail::fvec4SIMD smoothstep(
|
||||||
detail::fvec4SIMD smoothstep(
|
float const & edge0,
|
||||||
detail::fvec4SIMD const & edge0,
|
float const & edge1,
|
||||||
detail::fvec4SIMD const & edge1,
|
detail::fvec4SIMD const & x);
|
||||||
detail::fvec4SIMD const & x);
|
|
||||||
|
//! Returns true if x holds a NaN (not a number)
|
||||||
detail::fvec4SIMD smoothstep(
|
//! representation in the underlying implementation's set of
|
||||||
float const & edge0,
|
//! floating point representations. Returns false otherwise,
|
||||||
float const & edge1,
|
//! including for implementations with no NaN
|
||||||
detail::fvec4SIMD const & x);
|
//! representations.
|
||||||
|
//! (From GLM_GTX_simd_vec4 extension, common function)
|
||||||
//! Returns true if x holds a NaN (not a number)
|
//bvec4 isnan(detail::fvec4SIMD const & x);
|
||||||
//! representation in the underlying implementation's set of
|
|
||||||
//! floating point representations. Returns false otherwise,
|
//! Returns true if x holds a positive infinity or negative
|
||||||
//! including for implementations with no NaN
|
//! infinity representation in the underlying implementation's
|
||||||
//! representations.
|
//! set of floating point representations. Returns false
|
||||||
//! (From GLM_GTX_simd_vec4 extension, common function)
|
//! otherwise, including for implementations with no infinity
|
||||||
//bvec4 isnan(detail::fvec4SIMD const & x);
|
//! representations.
|
||||||
|
//! (From GLM_GTX_simd_vec4 extension, common function)
|
||||||
//! Returns true if x holds a positive infinity or negative
|
//bvec4 isinf(detail::fvec4SIMD const & x);
|
||||||
//! infinity representation in the underlying implementation's
|
|
||||||
//! set of floating point representations. Returns false
|
//! Returns a signed or unsigned integer value representing
|
||||||
//! otherwise, including for implementations with no infinity
|
//! the encoding of a floating-point value. The floatingpoint
|
||||||
//! representations.
|
//! value's bit-level representation is preserved.
|
||||||
//! (From GLM_GTX_simd_vec4 extension, common function)
|
//! (From GLM_GTX_simd_vec4 extension, common function)
|
||||||
//bvec4 isinf(detail::fvec4SIMD const & x);
|
//detail::ivec4SIMD floatBitsToInt(detail::fvec4SIMD const & value);
|
||||||
|
|
||||||
//! Returns a signed or unsigned integer value representing
|
//! Returns a floating-point value corresponding to a signed
|
||||||
//! the encoding of a floating-point value. The floatingpoint
|
//! or unsigned integer encoding of a floating-point value.
|
||||||
//! value's bit-level representation is preserved.
|
//! If an inf or NaN is passed in, it will not signal, and the
|
||||||
//! (From GLM_GTX_simd_vec4 extension, common function)
|
//! resulting floating point value is unspecified. Otherwise,
|
||||||
//detail::ivec4SIMD floatBitsToInt(detail::fvec4SIMD const & value);
|
//! the bit-level representation is preserved.
|
||||||
|
//! (From GLM_GTX_simd_vec4 extension, common function)
|
||||||
//! Returns a floating-point value corresponding to a signed
|
//detail::fvec4SIMD intBitsToFloat(detail::ivec4SIMD const & value);
|
||||||
//! or unsigned integer encoding of a floating-point value.
|
|
||||||
//! If an inf or NaN is passed in, it will not signal, and the
|
//! Computes and returns a * b + c.
|
||||||
//! resulting floating point value is unspecified. Otherwise,
|
//! (From GLM_GTX_simd_vec4 extension, common function)
|
||||||
//! the bit-level representation is preserved.
|
detail::fvec4SIMD fma(
|
||||||
//! (From GLM_GTX_simd_vec4 extension, common function)
|
detail::fvec4SIMD const & a,
|
||||||
//detail::fvec4SIMD intBitsToFloat(detail::ivec4SIMD const & value);
|
detail::fvec4SIMD const & b,
|
||||||
|
detail::fvec4SIMD const & c);
|
||||||
//! Computes and returns a * b + c.
|
|
||||||
//! (From GLM_GTX_simd_vec4 extension, common function)
|
//! Splits x into a floating-point significand in the range
|
||||||
detail::fvec4SIMD fma(
|
//! [0.5, 1.0) and an integral exponent of two, such that:
|
||||||
detail::fvec4SIMD const & a,
|
//! x = significand * exp(2, exponent)
|
||||||
detail::fvec4SIMD const & b,
|
//! The significand is returned by the function and the
|
||||||
detail::fvec4SIMD const & c);
|
//! exponent is returned in the parameter exp. For a
|
||||||
|
//! floating-point value of zero, the significant and exponent
|
||||||
//! Splits x into a floating-point significand in the range
|
//! are both zero. For a floating-point value that is an
|
||||||
//! [0.5, 1.0) and an integral exponent of two, such that:
|
//! infinity or is not a number, the results are undefined.
|
||||||
//! x = significand * exp(2, exponent)
|
//! (From GLM_GTX_simd_vec4 extension, common function)
|
||||||
//! The significand is returned by the function and the
|
//detail::fvec4SIMD frexp(detail::fvec4SIMD const & x, detail::ivec4SIMD & exp);
|
||||||
//! exponent is returned in the parameter exp. For a
|
|
||||||
//! floating-point value of zero, the significant and exponent
|
//! Builds a floating-point number from x and the
|
||||||
//! are both zero. For a floating-point value that is an
|
//! corresponding integral exponent of two in exp, returning:
|
||||||
//! infinity or is not a number, the results are undefined.
|
//! significand * exp(2, exponent)
|
||||||
//! (From GLM_GTX_simd_vec4 extension, common function)
|
//! If this product is too large to be represented in the
|
||||||
//detail::fvec4SIMD frexp(detail::fvec4SIMD const & x, detail::ivec4SIMD & exp);
|
//! floating-point type, the result is undefined.
|
||||||
|
//! (From GLM_GTX_simd_vec4 extension, common function)
|
||||||
//! Builds a floating-point number from x and the
|
//detail::fvec4SIMD ldexp(detail::fvec4SIMD const & x, detail::ivec4SIMD const & exp);
|
||||||
//! corresponding integral exponent of two in exp, returning:
|
|
||||||
//! significand * exp(2, exponent)
|
//! Returns the length of x, i.e., sqrt(x * x).
|
||||||
//! If this product is too large to be represented in the
|
//! (From GLM_GTX_simd_vec4 extension, geometry functions)
|
||||||
//! floating-point type, the result is undefined.
|
float length(
|
||||||
//! (From GLM_GTX_simd_vec4 extension, common function)
|
detail::fvec4SIMD const & x);
|
||||||
//detail::fvec4SIMD ldexp(detail::fvec4SIMD const & x, detail::ivec4SIMD const & exp);
|
|
||||||
|
//! Returns the length of x, i.e., sqrt(x * x).
|
||||||
//! Returns the length of x, i.e., sqrt(x * x).
|
//! Less accurate but much faster than simdLength.
|
||||||
//! (From GLM_GTX_simd_vec4 extension, geometry functions)
|
//! (From GLM_GTX_simd_vec4 extension, geometry functions)
|
||||||
float length(
|
float fastLength(
|
||||||
detail::fvec4SIMD const & x);
|
detail::fvec4SIMD const & x);
|
||||||
|
|
||||||
//! Returns the length of x, i.e., sqrt(x * x).
|
//! Returns the length of x, i.e., sqrt(x * x).
|
||||||
//! Less accurate but much faster than simdLength.
|
//! Slightly more accurate but much slower than simdLength.
|
||||||
//! (From GLM_GTX_simd_vec4 extension, geometry functions)
|
//! (From GLM_GTX_simd_vec4 extension, geometry functions)
|
||||||
float fastLength(
|
float niceLength(
|
||||||
detail::fvec4SIMD const & x);
|
detail::fvec4SIMD const & x);
|
||||||
|
|
||||||
//! Returns the length of x, i.e., sqrt(x * x).
|
//! Returns the length of x, i.e., sqrt(x * x).
|
||||||
//! Slightly more accurate but much slower than simdLength.
|
//! (From GLM_GTX_simd_vec4 extension, geometry functions)
|
||||||
//! (From GLM_GTX_simd_vec4 extension, geometry functions)
|
detail::fvec4SIMD length4(
|
||||||
float niceLength(
|
detail::fvec4SIMD const & x);
|
||||||
detail::fvec4SIMD const & x);
|
|
||||||
|
//! Returns the length of x, i.e., sqrt(x * x).
|
||||||
//! Returns the length of x, i.e., sqrt(x * x).
|
//! Less accurate but much faster than simdLength4.
|
||||||
//! (From GLM_GTX_simd_vec4 extension, geometry functions)
|
//! (From GLM_GTX_simd_vec4 extension, geometry functions)
|
||||||
detail::fvec4SIMD length4(
|
detail::fvec4SIMD fastLength4(
|
||||||
detail::fvec4SIMD const & x);
|
detail::fvec4SIMD const & x);
|
||||||
|
|
||||||
//! Returns the length of x, i.e., sqrt(x * x).
|
//! Returns the length of x, i.e., sqrt(x * x).
|
||||||
//! Less accurate but much faster than simdLength4.
|
//! Slightly more accurate but much slower than simdLength4.
|
||||||
//! (From GLM_GTX_simd_vec4 extension, geometry functions)
|
//! (From GLM_GTX_simd_vec4 extension, geometry functions)
|
||||||
detail::fvec4SIMD fastLength4(
|
detail::fvec4SIMD niceLength4(
|
||||||
detail::fvec4SIMD const & x);
|
detail::fvec4SIMD const & x);
|
||||||
|
|
||||||
//! Returns the length of x, i.e., sqrt(x * x).
|
//! Returns the distance betwwen p0 and p1, i.e., length(p0 - p1).
|
||||||
//! Slightly more accurate but much slower than simdLength4.
|
//! (From GLM_GTX_simd_vec4 extension, geometry functions)
|
||||||
//! (From GLM_GTX_simd_vec4 extension, geometry functions)
|
float distance(
|
||||||
detail::fvec4SIMD niceLength4(
|
detail::fvec4SIMD const & p0,
|
||||||
detail::fvec4SIMD const & x);
|
detail::fvec4SIMD const & p1);
|
||||||
|
|
||||||
//! Returns the distance betwwen p0 and p1, i.e., length(p0 - p1).
|
//! Returns the distance betwwen p0 and p1, i.e., length(p0 - p1).
|
||||||
//! (From GLM_GTX_simd_vec4 extension, geometry functions)
|
//! (From GLM_GTX_simd_vec4 extension, geometry functions)
|
||||||
float distance(
|
detail::fvec4SIMD distance4(
|
||||||
detail::fvec4SIMD const & p0,
|
detail::fvec4SIMD const & p0,
|
||||||
detail::fvec4SIMD const & p1);
|
detail::fvec4SIMD const & p1);
|
||||||
|
|
||||||
//! Returns the distance betwwen p0 and p1, i.e., length(p0 - p1).
|
//! Returns the dot product of x and y, i.e., result = x * y.
|
||||||
//! (From GLM_GTX_simd_vec4 extension, geometry functions)
|
//! (From GLM_GTX_simd_vec4 extension, geometry functions)
|
||||||
detail::fvec4SIMD distance4(
|
float simdDot(
|
||||||
detail::fvec4SIMD const & p0,
|
detail::fvec4SIMD const & x,
|
||||||
detail::fvec4SIMD const & p1);
|
detail::fvec4SIMD const & y);
|
||||||
|
|
||||||
//! Returns the dot product of x and y, i.e., result = x * y.
|
//! Returns the dot product of x and y, i.e., result = x * y.
|
||||||
//! (From GLM_GTX_simd_vec4 extension, geometry functions)
|
//! (From GLM_GTX_simd_vec4 extension, geometry functions)
|
||||||
float simdDot(
|
detail::fvec4SIMD dot4(
|
||||||
detail::fvec4SIMD const & x,
|
detail::fvec4SIMD const & x,
|
||||||
detail::fvec4SIMD const & y);
|
detail::fvec4SIMD const & y);
|
||||||
|
|
||||||
//! Returns the dot product of x and y, i.e., result = x * y.
|
//! Returns the cross product of x and y.
|
||||||
//! (From GLM_GTX_simd_vec4 extension, geometry functions)
|
//! (From GLM_GTX_simd_vec4 extension, geometry functions)
|
||||||
detail::fvec4SIMD dot4(
|
detail::fvec4SIMD cross(
|
||||||
detail::fvec4SIMD const & x,
|
detail::fvec4SIMD const & x,
|
||||||
detail::fvec4SIMD const & y);
|
detail::fvec4SIMD const & y);
|
||||||
|
|
||||||
//! Returns the cross product of x and y.
|
//! Returns a vector in the same direction as x but with length of 1.
|
||||||
//! (From GLM_GTX_simd_vec4 extension, geometry functions)
|
//! (From GLM_GTX_simd_vec4 extension, geometry functions)
|
||||||
detail::fvec4SIMD cross(
|
detail::fvec4SIMD normalize(
|
||||||
detail::fvec4SIMD const & x,
|
detail::fvec4SIMD const & x);
|
||||||
detail::fvec4SIMD const & y);
|
|
||||||
|
//! Returns a vector in the same direction as x but with length of 1.
|
||||||
//! Returns a vector in the same direction as x but with length of 1.
|
//! Less accurate but much faster than simdNormalize.
|
||||||
//! (From GLM_GTX_simd_vec4 extension, geometry functions)
|
//! (From GLM_GTX_simd_vec4 extension, geometry functions)
|
||||||
detail::fvec4SIMD normalize(
|
detail::fvec4SIMD fastNormalize(
|
||||||
detail::fvec4SIMD const & x);
|
detail::fvec4SIMD const & x);
|
||||||
|
|
||||||
//! Returns a vector in the same direction as x but with length of 1.
|
//! If dot(Nref, I) < 0.0, return N, otherwise, return -N.
|
||||||
//! Less accurate but much faster than simdNormalize.
|
//! (From GLM_GTX_simd_vec4 extension, geometry functions)
|
||||||
//! (From GLM_GTX_simd_vec4 extension, geometry functions)
|
detail::fvec4SIMD simdFaceforward(
|
||||||
detail::fvec4SIMD fastNormalize(
|
detail::fvec4SIMD const & N,
|
||||||
detail::fvec4SIMD const & x);
|
detail::fvec4SIMD const & I,
|
||||||
|
detail::fvec4SIMD const & Nref);
|
||||||
//! If dot(Nref, I) < 0.0, return N, otherwise, return -N.
|
|
||||||
//! (From GLM_GTX_simd_vec4 extension, geometry functions)
|
//! For the incident vector I and surface orientation N,
|
||||||
detail::fvec4SIMD simdFaceforward(
|
//! returns the reflection direction : result = I - 2.0 * dot(N, I) * N.
|
||||||
detail::fvec4SIMD const & N,
|
//! (From GLM_GTX_simd_vec4 extension, geometry functions)
|
||||||
detail::fvec4SIMD const & I,
|
detail::fvec4SIMD reflect(
|
||||||
detail::fvec4SIMD const & Nref);
|
detail::fvec4SIMD const & I,
|
||||||
|
detail::fvec4SIMD const & N);
|
||||||
//! For the incident vector I and surface orientation N,
|
|
||||||
//! returns the reflection direction : result = I - 2.0 * dot(N, I) * N.
|
//! For the incident vector I and surface normal N,
|
||||||
//! (From GLM_GTX_simd_vec4 extension, geometry functions)
|
//! and the ratio of indices of refraction eta,
|
||||||
detail::fvec4SIMD reflect(
|
//! return the refraction vector.
|
||||||
detail::fvec4SIMD const & I,
|
//! (From GLM_GTX_simd_vec4 extension, geometry functions)
|
||||||
detail::fvec4SIMD const & N);
|
detail::fvec4SIMD refract(
|
||||||
|
detail::fvec4SIMD const & I,
|
||||||
//! For the incident vector I and surface normal N,
|
detail::fvec4SIMD const & N,
|
||||||
//! and the ratio of indices of refraction eta,
|
float const & eta);
|
||||||
//! return the refraction vector.
|
|
||||||
//! (From GLM_GTX_simd_vec4 extension, geometry functions)
|
//! Returns the positive square root of x.
|
||||||
detail::fvec4SIMD refract(
|
//! (From GLM_GTX_simd_vec4 extension, exponential function)
|
||||||
detail::fvec4SIMD const & I,
|
detail::fvec4SIMD sqrt(
|
||||||
detail::fvec4SIMD const & N,
|
detail::fvec4SIMD const & x);
|
||||||
float const & eta);
|
|
||||||
|
//! Returns the positive square root of x with the nicest quality but very slow.
|
||||||
//! Returns the positive square root of x.
|
//! Slightly more accurate but much slower than simdSqrt.
|
||||||
//! (From GLM_GTX_simd_vec4 extension, exponential function)
|
//! (From GLM_GTX_simd_vec4 extension, exponential function)
|
||||||
detail::fvec4SIMD sqrt(
|
detail::fvec4SIMD niceSqrt(
|
||||||
detail::fvec4SIMD const & x);
|
detail::fvec4SIMD const & x);
|
||||||
|
|
||||||
//! Returns the positive square root of x with the nicest quality but very slow.
|
//! Returns the positive square root of x
|
||||||
//! Slightly more accurate but much slower than simdSqrt.
|
//! Less accurate but much faster than sqrt.
|
||||||
//! (From GLM_GTX_simd_vec4 extension, exponential function)
|
//! (From GLM_GTX_simd_vec4 extension, exponential function)
|
||||||
detail::fvec4SIMD niceSqrt(
|
detail::fvec4SIMD fastSqrt(
|
||||||
detail::fvec4SIMD const & x);
|
detail::fvec4SIMD const & x);
|
||||||
|
|
||||||
//! Returns the positive square root of x
|
//! Returns the reciprocal of the positive square root of x.
|
||||||
//! Less accurate but much faster than sqrt.
|
//! (From GLM_GTX_simd_vec4 extension, exponential function)
|
||||||
//! (From GLM_GTX_simd_vec4 extension, exponential function)
|
detail::fvec4SIMD inversesqrt(
|
||||||
detail::fvec4SIMD fastSqrt(
|
detail::fvec4SIMD const & x);
|
||||||
detail::fvec4SIMD const & x);
|
|
||||||
|
//! Returns the reciprocal of the positive square root of x.
|
||||||
//! Returns the reciprocal of the positive square root of x.
|
//! Faster than inversesqrt but less accurate.
|
||||||
//! (From GLM_GTX_simd_vec4 extension, exponential function)
|
//! (From GLM_GTX_simd_vec4 extension, exponential function)
|
||||||
detail::fvec4SIMD inversesqrt(
|
detail::fvec4SIMD fastInversesqrt(
|
||||||
detail::fvec4SIMD const & x);
|
detail::fvec4SIMD const & x);
|
||||||
|
|
||||||
//! Returns the reciprocal of the positive square root of x.
|
/// @}
|
||||||
//! Faster than inversesqrt but less accurate.
|
}//namespace simd_vec4
|
||||||
//! (From GLM_GTX_simd_vec4 extension, exponential function)
|
}//namespace gtx
|
||||||
detail::fvec4SIMD fastInversesqrt(
|
|
||||||
detail::fvec4SIMD const & x);
|
|
||||||
|
|
||||||
///@}
|
|
||||||
}//namespace simd_vec4
|
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "simd_vec4.inl"
|
#include "simd_vec4.inl"
|
||||||
|
@ -22,8 +22,7 @@
|
|||||||
|
|
||||||
namespace glm{
|
namespace glm{
|
||||||
namespace gtx{
|
namespace gtx{
|
||||||
//! GLM_GTX_simplex extension: Spline functions
|
namespace spline ///< GLM_GTX_simplex extension: Spline functions
|
||||||
namespace spline
|
|
||||||
{
|
{
|
||||||
/// \addtogroup gtx_spline
|
/// \addtogroup gtx_spline
|
||||||
///@{
|
///@{
|
||||||
@ -58,11 +57,10 @@ namespace spline
|
|||||||
genType const & v4,
|
genType const & v4,
|
||||||
typename genType::value_type const & s);
|
typename genType::value_type const & s);
|
||||||
|
|
||||||
///@}
|
/// @}
|
||||||
|
}// namespace simplex
|
||||||
}//namespace simplex
|
}// namespace gtx
|
||||||
}//namespace gtx
|
}// namespace glm
|
||||||
}//namespace glm
|
|
||||||
|
|
||||||
#include "simplex.inl"
|
#include "simplex.inl"
|
||||||
|
|
||||||
|
@ -23,13 +23,12 @@
|
|||||||
|
|
||||||
namespace glm{
|
namespace glm{
|
||||||
namespace gtx{
|
namespace gtx{
|
||||||
//! GLM_GTX_spline extension: Spline functions
|
namespace spline ///< GLM_GTX_spline extension: Spline functions
|
||||||
namespace spline
|
|
||||||
{
|
{
|
||||||
using namespace gtx::optimum_pow;
|
using namespace gtx::optimum_pow;
|
||||||
|
|
||||||
/// \addtogroup gtx_spline
|
/// \addtogroup gtx_spline
|
||||||
///@{
|
/// @{
|
||||||
|
|
||||||
//! Return a point from a catmull rom curve.
|
//! Return a point from a catmull rom curve.
|
||||||
//! From GLM_GTX_spline extension.
|
//! From GLM_GTX_spline extension.
|
||||||
@ -61,8 +60,7 @@ namespace spline
|
|||||||
genType const & v4,
|
genType const & v4,
|
||||||
typename genType::value_type const & s);
|
typename genType::value_type const & s);
|
||||||
|
|
||||||
///@}
|
/// @}
|
||||||
|
|
||||||
}//namespace spline
|
}//namespace spline
|
||||||
}//namespace gtx
|
}//namespace gtx
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
@ -21,50 +21,48 @@
|
|||||||
# pragma message("GLM: GLM_GTX_std_based_type extension included")
|
# pragma message("GLM: GLM_GTX_std_based_type extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm
|
namespace glm{
|
||||||
|
namespace gtx{
|
||||||
|
namespace std_based_type ///< GLM_GTX_std_based_type extension: Add support vector types based on C++ standard type
|
||||||
{
|
{
|
||||||
namespace gtx{
|
typedef detail::tvec2<std::size_t> size2;
|
||||||
//! GLM_GTX_std_based_type extension: Add support vector types based on C++ standard type
|
typedef detail::tvec3<std::size_t> size3;
|
||||||
namespace std_based_type
|
typedef detail::tvec4<std::size_t> size4;
|
||||||
{
|
|
||||||
typedef detail::tvec2<std::size_t> size2;
|
|
||||||
typedef detail::tvec3<std::size_t> size3;
|
|
||||||
typedef detail::tvec4<std::size_t> size4;
|
|
||||||
|
|
||||||
typedef detail::tvec2<signed char> scvec2;
|
typedef detail::tvec2<signed char> scvec2;
|
||||||
typedef detail::tvec3<signed char> scvec3;
|
typedef detail::tvec3<signed char> scvec3;
|
||||||
typedef detail::tvec4<signed char> scvec4;
|
typedef detail::tvec4<signed char> scvec4;
|
||||||
|
|
||||||
typedef detail::tvec2<unsigned char> ucvec2;
|
typedef detail::tvec2<unsigned char> ucvec2;
|
||||||
typedef detail::tvec3<unsigned char> ucvec3;
|
typedef detail::tvec3<unsigned char> ucvec3;
|
||||||
typedef detail::tvec4<unsigned char> ucvec4;
|
typedef detail::tvec4<unsigned char> ucvec4;
|
||||||
|
|
||||||
typedef detail::tvec2<signed short> ssvec2;
|
typedef detail::tvec2<signed short> ssvec2;
|
||||||
typedef detail::tvec3<signed short> ssvec3;
|
typedef detail::tvec3<signed short> ssvec3;
|
||||||
typedef detail::tvec4<signed short> ssvec4;
|
typedef detail::tvec4<signed short> ssvec4;
|
||||||
|
|
||||||
typedef detail::tvec2<unsigned short> usvec2;
|
typedef detail::tvec2<unsigned short> usvec2;
|
||||||
typedef detail::tvec3<unsigned short> usvec3;
|
typedef detail::tvec3<unsigned short> usvec3;
|
||||||
typedef detail::tvec4<unsigned short> usvec4;
|
typedef detail::tvec4<unsigned short> usvec4;
|
||||||
|
|
||||||
typedef detail::tvec2<signed int> sivec2;
|
typedef detail::tvec2<signed int> sivec2;
|
||||||
typedef detail::tvec3<signed int> sivec3;
|
typedef detail::tvec3<signed int> sivec3;
|
||||||
typedef detail::tvec4<signed int> sivec4;
|
typedef detail::tvec4<signed int> sivec4;
|
||||||
|
|
||||||
typedef detail::tvec2<unsigned int> uivec2;
|
typedef detail::tvec2<unsigned int> uivec2;
|
||||||
typedef detail::tvec3<unsigned int> uivec3;
|
typedef detail::tvec3<unsigned int> uivec3;
|
||||||
typedef detail::tvec4<unsigned int> uivec4;
|
typedef detail::tvec4<unsigned int> uivec4;
|
||||||
|
|
||||||
typedef detail::tvec2<signed long> slvec2;
|
typedef detail::tvec2<signed long> slvec2;
|
||||||
typedef detail::tvec3<signed long> slvec3;
|
typedef detail::tvec3<signed long> slvec3;
|
||||||
typedef detail::tvec4<signed long> slvec4;
|
typedef detail::tvec4<signed long> slvec4;
|
||||||
|
|
||||||
typedef detail::tvec2<unsigned long> ulvec2;
|
typedef detail::tvec2<unsigned long> ulvec2;
|
||||||
typedef detail::tvec3<unsigned long> ulvec3;
|
typedef detail::tvec3<unsigned long> ulvec3;
|
||||||
typedef detail::tvec4<unsigned long> ulvec4;
|
typedef detail::tvec4<unsigned long> ulvec4;
|
||||||
|
|
||||||
}//namespace std_based_type
|
}//namespace std_based_type
|
||||||
}//namespace gtx
|
}//namespace gtx
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "std_based_type.inl"
|
#include "std_based_type.inl"
|
||||||
|
@ -28,29 +28,26 @@
|
|||||||
# pragma message("GLM: GLM_GTX_string_cast extension included")
|
# pragma message("GLM: GLM_GTX_string_cast extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm
|
namespace glm{
|
||||||
|
namespace gtx{
|
||||||
|
namespace string_cast ///< GLM_GTX_string_cast extension: Setup strings for GLM type values
|
||||||
{
|
{
|
||||||
namespace gtx{
|
using namespace gtc::half_float;
|
||||||
//! GLM_GTX_string_cast extension: Setup strings for GLM type values
|
using namespace gtx::integer;
|
||||||
namespace string_cast
|
using namespace gtx::unsigned_int;
|
||||||
{
|
using namespace gtx::quaternion;
|
||||||
using namespace gtc::half_float;
|
|
||||||
using namespace gtx::integer;
|
|
||||||
using namespace gtx::unsigned_int;
|
|
||||||
using namespace gtx::quaternion;
|
|
||||||
|
|
||||||
/// \addtogroup gtx_string_cast
|
/// \addtogroup gtx_string_cast
|
||||||
///@{
|
/// @{
|
||||||
|
|
||||||
//! Create a string from a GLM type value.
|
//! Create a string from a GLM type value.
|
||||||
//! From GLM_GTX_string_cast extension.
|
//! From GLM_GTX_string_cast extension.
|
||||||
template <typename genType>
|
template <typename genType>
|
||||||
std::string to_string(genType const & x);
|
std::string to_string(genType const & x);
|
||||||
|
|
||||||
///@}
|
/// @}
|
||||||
|
}//namespace string_cast
|
||||||
}//namespace string_cast
|
}//namespace gtx
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "string_cast.inl"
|
#include "string_cast.inl"
|
||||||
|
@ -22,81 +22,78 @@
|
|||||||
# pragma message("GLM: GLM_GTX_transform extension included")
|
# pragma message("GLM: GLM_GTX_transform extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm
|
namespace glm{
|
||||||
|
namespace gtx{
|
||||||
|
namespace transform ///< GLM_GTX_transform extension: Add transformation matrices
|
||||||
{
|
{
|
||||||
namespace gtx{
|
using namespace gtc::matrix_transform;
|
||||||
//! GLM_GTX_transform extension: Add transformation matrices
|
|
||||||
namespace transform
|
|
||||||
{
|
|
||||||
using namespace gtc::matrix_transform;
|
|
||||||
|
|
||||||
/// \addtogroup gtx_transform
|
/// \addtogroup gtx_transform
|
||||||
///@{
|
/// @{
|
||||||
|
|
||||||
//! Builds a translation 4 * 4 matrix created from 3 scalars.
|
//! Builds a translation 4 * 4 matrix created from 3 scalars.
|
||||||
//! From GLM_GTX_transform extension.
|
//! From GLM_GTX_transform extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tmat4x4<T> translate(
|
detail::tmat4x4<T> translate(
|
||||||
T x, T y, T z);
|
T x, T y, T z);
|
||||||
|
|
||||||
//! Transforms a matrix with a translation 4 * 4 matrix created from 3 scalars.
|
//! Transforms a matrix with a translation 4 * 4 matrix created from 3 scalars.
|
||||||
//! From GLM_GTX_transform extension.
|
//! From GLM_GTX_transform extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tmat4x4<T> translate(
|
detail::tmat4x4<T> translate(
|
||||||
detail::tmat4x4<T> const & m,
|
detail::tmat4x4<T> const & m,
|
||||||
T x, T y, T z);
|
T x, T y, T z);
|
||||||
|
|
||||||
//! Transforms a matrix with a translation 4 * 4 matrix created from 3 scalars.
|
//! Transforms a matrix with a translation 4 * 4 matrix created from 3 scalars.
|
||||||
//! From GLM_GTX_transform extension.
|
//! From GLM_GTX_transform extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tmat4x4<T> translate(
|
detail::tmat4x4<T> translate(
|
||||||
detail::tvec3<T> const & v);
|
detail::tvec3<T> const & v);
|
||||||
|
|
||||||
//! Builds a rotation 4 * 4 matrix created from an axis of 3 scalars and an angle expressed in degrees.
|
//! Builds a rotation 4 * 4 matrix created from an axis of 3 scalars and an angle expressed in degrees.
|
||||||
//! From GLM_GTX_transform extension.
|
//! From GLM_GTX_transform extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tmat4x4<T> rotate(
|
detail::tmat4x4<T> rotate(
|
||||||
T angle,
|
T angle,
|
||||||
T x, T y, T z);
|
T x, T y, T z);
|
||||||
|
|
||||||
//! Builds a rotation 4 * 4 matrix created from an axis of 3 scalars and an angle expressed in degrees.
|
//! Builds a rotation 4 * 4 matrix created from an axis of 3 scalars and an angle expressed in degrees.
|
||||||
//! From GLM_GTX_transform extension.
|
//! From GLM_GTX_transform extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tmat4x4<T> rotate(
|
detail::tmat4x4<T> rotate(
|
||||||
T angle,
|
T angle,
|
||||||
detail::tvec3<T> const & v);
|
detail::tvec3<T> const & v);
|
||||||
|
|
||||||
//! Transforms a matrix with a rotation 4 * 4 matrix created from an axis of 3 scalars and an angle expressed in degrees.
|
//! Transforms a matrix with a rotation 4 * 4 matrix created from an axis of 3 scalars and an angle expressed in degrees.
|
||||||
//! From GLM_GTX_transform extension.
|
//! From GLM_GTX_transform extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tmat4x4<T> rotate(
|
detail::tmat4x4<T> rotate(
|
||||||
detail::tmat4x4<T> const & m,
|
detail::tmat4x4<T> const & m,
|
||||||
T angle,
|
T angle,
|
||||||
T x, T y, T z);
|
T x, T y, T z);
|
||||||
|
|
||||||
//! Builds a scale 4 * 4 matrix created from 3 scalars.
|
//! Builds a scale 4 * 4 matrix created from 3 scalars.
|
||||||
//! From GLM_GTX_transform extension.
|
//! From GLM_GTX_transform extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tmat4x4<T> scale(
|
detail::tmat4x4<T> scale(
|
||||||
T x, T y, T z);
|
T x, T y, T z);
|
||||||
|
|
||||||
//! Transforms a matrix with a scale 4 * 4 matrix created from 3 scalars.
|
//! Transforms a matrix with a scale 4 * 4 matrix created from 3 scalars.
|
||||||
//! From GLM_GTX_transform extension.
|
//! From GLM_GTX_transform extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tmat4x4<T> scale(
|
detail::tmat4x4<T> scale(
|
||||||
detail::tmat4x4<T> const & m,
|
detail::tmat4x4<T> const & m,
|
||||||
T x, T y, T z);
|
T x, T y, T z);
|
||||||
|
|
||||||
//! Transforms a matrix with a scale 4 * 4 matrix created from a vector of 3 components.
|
//! Transforms a matrix with a scale 4 * 4 matrix created from a vector of 3 components.
|
||||||
//! From GLM_GTX_transform extension.
|
//! From GLM_GTX_transform extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tmat4x4<T> scale(
|
detail::tmat4x4<T> scale(
|
||||||
detail::tvec3<T> const & v);
|
detail::tvec3<T> const & v);
|
||||||
|
|
||||||
///@}
|
/// @}
|
||||||
|
}//namespace transform
|
||||||
}//namespace transform
|
}//namespace gtx
|
||||||
}//namespace gtx
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "transform.inl"
|
#include "transform.inl"
|
||||||
|
@ -22,97 +22,94 @@
|
|||||||
# pragma message("GLM: GLM_GTX_transform2 extension included")
|
# pragma message("GLM: GLM_GTX_transform2 extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace glm
|
namespace glm{
|
||||||
|
namespace gtx{
|
||||||
|
namespace transform2 ///< GLM_GTX_transform2 extension: Add extra transformation matrices
|
||||||
{
|
{
|
||||||
namespace gtx{
|
using namespace gtx::transform;
|
||||||
//! GLM_GTX_transform2 extension: Add extra transformation matrices
|
|
||||||
namespace transform2
|
|
||||||
{
|
|
||||||
using namespace gtx::transform;
|
|
||||||
|
|
||||||
/// \addtogroup gtx_transform2
|
/// \addtogroup gtx_transform2
|
||||||
///@{
|
/// @{
|
||||||
|
|
||||||
//! Transforms a matrix with a shearing on X axis.
|
//! Transforms a matrix with a shearing on X axis.
|
||||||
//! From GLM_GTX_transform2 extension.
|
//! From GLM_GTX_transform2 extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tmat3x3<T> shearX2D(
|
detail::tmat3x3<T> shearX2D(
|
||||||
detail::tmat3x3<T> const & m,
|
detail::tmat3x3<T> const & m,
|
||||||
T y);
|
T y);
|
||||||
|
|
||||||
//! Transforms a matrix with a shearing on Y axis.
|
//! Transforms a matrix with a shearing on Y axis.
|
||||||
//! From GLM_GTX_transform2 extension.
|
//! From GLM_GTX_transform2 extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tmat3x3<T> shearY2D(
|
detail::tmat3x3<T> shearY2D(
|
||||||
detail::tmat3x3<T> const & m,
|
detail::tmat3x3<T> const & m,
|
||||||
T x);
|
T x);
|
||||||
|
|
||||||
//! Transforms a matrix with a shearing on X axis
|
//! Transforms a matrix with a shearing on X axis
|
||||||
//! From GLM_GTX_transform2 extension.
|
//! From GLM_GTX_transform2 extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tmat4x4<T> shearX3D(
|
detail::tmat4x4<T> shearX3D(
|
||||||
const detail::tmat4x4<T> & m,
|
const detail::tmat4x4<T> & m,
|
||||||
T y,
|
T y,
|
||||||
T z);
|
T z);
|
||||||
|
|
||||||
//! Transforms a matrix with a shearing on Y axis.
|
//! Transforms a matrix with a shearing on Y axis.
|
||||||
//! From GLM_GTX_transform2 extension.
|
//! From GLM_GTX_transform2 extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tmat4x4<T> shearY3D(
|
detail::tmat4x4<T> shearY3D(
|
||||||
const detail::tmat4x4<T> & m,
|
const detail::tmat4x4<T> & m,
|
||||||
T x,
|
T x,
|
||||||
T z);
|
T z);
|
||||||
|
|
||||||
//! Transforms a matrix with a shearing on Z axis.
|
//! Transforms a matrix with a shearing on Z axis.
|
||||||
//! From GLM_GTX_transform2 extension.
|
//! From GLM_GTX_transform2 extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tmat4x4<T> shearZ3D(
|
detail::tmat4x4<T> shearZ3D(
|
||||||
const detail::tmat4x4<T> & m,
|
const detail::tmat4x4<T> & m,
|
||||||
T x,
|
T x,
|
||||||
T y);
|
T y);
|
||||||
|
|
||||||
//template <typename T> GLM_FUNC_QUALIFIER detail::tmat4x4<T> shear(const detail::tmat4x4<T> & m, shearPlane, planePoint, angle)
|
//template <typename T> GLM_FUNC_QUALIFIER detail::tmat4x4<T> shear(const detail::tmat4x4<T> & m, shearPlane, planePoint, angle)
|
||||||
// Identity + tan(angle) * cross(Normal, OnPlaneVector) 0
|
// Identity + tan(angle) * cross(Normal, OnPlaneVector) 0
|
||||||
// - dot(PointOnPlane, normal) * OnPlaneVector 1
|
// - dot(PointOnPlane, normal) * OnPlaneVector 1
|
||||||
|
|
||||||
// Reflect functions seem to don't work
|
// Reflect functions seem to don't work
|
||||||
//template <typename T> detail::tmat3x3<T> reflect2D(const detail::tmat3x3<T> & m, const detail::tvec3<T>& normal){return reflect2DGTX(m, normal);} //!< \brief Build a reflection matrix (from GLM_GTX_transform2 extension)
|
//template <typename T> detail::tmat3x3<T> reflect2D(const detail::tmat3x3<T> & m, const detail::tvec3<T>& normal){return reflect2DGTX(m, normal);} //!< \brief Build a reflection matrix (from GLM_GTX_transform2 extension)
|
||||||
//template <typename T> detail::tmat4x4<T> reflect3D(const detail::tmat4x4<T> & m, const detail::tvec3<T>& normal){return reflect3DGTX(m, normal);} //!< \brief Build a reflection matrix (from GLM_GTX_transform2 extension)
|
//template <typename T> detail::tmat4x4<T> reflect3D(const detail::tmat4x4<T> & m, const detail::tvec3<T>& normal){return reflect3DGTX(m, normal);} //!< \brief Build a reflection matrix (from GLM_GTX_transform2 extension)
|
||||||
|
|
||||||
//! Build planar projection matrix along normal axis.
|
//! Build planar projection matrix along normal axis.
|
||||||
//! From GLM_GTX_transform2 extension.
|
//! From GLM_GTX_transform2 extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tmat3x3<T> proj2D(
|
detail::tmat3x3<T> proj2D(
|
||||||
const detail::tmat3x3<T> & m,
|
const detail::tmat3x3<T> & m,
|
||||||
const detail::tvec3<T>& normal);
|
const detail::tvec3<T>& normal);
|
||||||
|
|
||||||
//! Build planar projection matrix along normal axis.
|
//! Build planar projection matrix along normal axis.
|
||||||
//! From GLM_GTX_transform2 extension.
|
//! From GLM_GTX_transform2 extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tmat4x4<T> proj3D(
|
detail::tmat4x4<T> proj3D(
|
||||||
const detail::tmat4x4<T> & m,
|
const detail::tmat4x4<T> & m,
|
||||||
const detail::tvec3<T>& normal);
|
const detail::tvec3<T>& normal);
|
||||||
|
|
||||||
//! Build a scale bias matrix.
|
//! Build a scale bias matrix.
|
||||||
//! From GLM_GTX_transform2 extension.
|
//! From GLM_GTX_transform2 extension.
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
detail::tmat4x4<valType> scaleBias(
|
detail::tmat4x4<valType> scaleBias(
|
||||||
valType scale,
|
valType scale,
|
||||||
valType bias);
|
valType bias);
|
||||||
|
|
||||||
//! Build a scale bias matrix.
|
//! Build a scale bias matrix.
|
||||||
//! From GLM_GTX_transform2 extension.
|
//! From GLM_GTX_transform2 extension.
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
detail::tmat4x4<valType> scaleBias(
|
detail::tmat4x4<valType> scaleBias(
|
||||||
detail::tmat4x4<valType> const & m,
|
detail::tmat4x4<valType> const & m,
|
||||||
valType scale,
|
valType scale,
|
||||||
valType bias);
|
valType bias);
|
||||||
|
|
||||||
///@}
|
/// @}
|
||||||
|
}// namespace transform2
|
||||||
}//namespace transform2
|
}// namespace gtx
|
||||||
}//namespace gtx
|
}// namespace glm
|
||||||
}//namespace glm
|
|
||||||
|
|
||||||
#include "transform2.inl"
|
#include "transform2.inl"
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ namespace gtx{
|
|||||||
namespace ulp ///< GLM_GTX_ulp extension: Precision calculation functions
|
namespace ulp ///< GLM_GTX_ulp extension: Precision calculation functions
|
||||||
{
|
{
|
||||||
/// \addtogroup gtx_ulp
|
/// \addtogroup gtx_ulp
|
||||||
///@{
|
/// @{
|
||||||
|
|
||||||
//! Return the next ULP value(s) after the input value(s).
|
//! Return the next ULP value(s) after the input value(s).
|
||||||
//! From GLM_GTX_ulp extension.
|
//! From GLM_GTX_ulp extension.
|
||||||
@ -58,10 +58,9 @@ namespace ulp ///< GLM_GTX_ulp extension: Precision calculation functions
|
|||||||
vecType<uint> float_distance(vecType<T> const & x, vecType<T> const & y);
|
vecType<uint> float_distance(vecType<T> const & x, vecType<T> const & y);
|
||||||
|
|
||||||
///@}
|
///@}
|
||||||
|
}// namespace ulp
|
||||||
}//namespace ulp
|
}// namespace gtx
|
||||||
}//namespace gtx
|
}// namespace glm
|
||||||
}//namespace glm
|
|
||||||
|
|
||||||
#include "ulp.inl"
|
#include "ulp.inl"
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ namespace unsigned_int ///< GLM_GTX_unsigned_int extension: Add support for unsi
|
|||||||
using namespace gtx::integer;
|
using namespace gtx::integer;
|
||||||
|
|
||||||
/// \addtogroup gtx_unsigned_int
|
/// \addtogroup gtx_unsigned_int
|
||||||
///@{
|
/// @{
|
||||||
|
|
||||||
//! 32bit signed integer.
|
//! 32bit signed integer.
|
||||||
//! From GLM_GTX_unsigned_int extension.
|
//! From GLM_GTX_unsigned_int extension.
|
||||||
@ -47,8 +47,7 @@ namespace unsigned_int ///< GLM_GTX_unsigned_int extension: Add support for unsi
|
|||||||
//! From GLM_GTX_unsigned_int extension.
|
//! From GLM_GTX_unsigned_int extension.
|
||||||
uint mod(uint x, uint y);
|
uint mod(uint x, uint y);
|
||||||
|
|
||||||
///@}
|
/// @}
|
||||||
|
|
||||||
}//namespace unsigned_int
|
}//namespace unsigned_int
|
||||||
}//namespace gtx
|
}//namespace gtx
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
@ -109,9 +109,9 @@ namespace precision
|
|||||||
typedef precision::mediump_uvec1 uvec1;
|
typedef precision::mediump_uvec1 uvec1;
|
||||||
#endif//GLM_PRECISION
|
#endif//GLM_PRECISION
|
||||||
|
|
||||||
}//namespace vec1
|
}// namespace vec1
|
||||||
}//namespace gtx
|
}// namespace gtx
|
||||||
}//namespace glm
|
}// namespace glm
|
||||||
|
|
||||||
#include "vec1.inl"
|
#include "vec1.inl"
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ namespace gtx{
|
|||||||
namespace vector_access ///< GLM_GTX_vector_access extension: Function to set values to vectors
|
namespace vector_access ///< GLM_GTX_vector_access extension: Function to set values to vectors
|
||||||
{
|
{
|
||||||
/// \addtogroup gtx_vector_access
|
/// \addtogroup gtx_vector_access
|
||||||
///@{
|
/// @{
|
||||||
|
|
||||||
//! Set values to a 2 components vector.
|
//! Set values to a 2 components vector.
|
||||||
//! From GLM_GTX_vector_access extension.
|
//! From GLM_GTX_vector_access extension.
|
||||||
@ -54,8 +54,7 @@ namespace vector_access ///< GLM_GTX_vector_access extension: Function to set va
|
|||||||
valType const & z,
|
valType const & z,
|
||||||
valType const & w);
|
valType const & w);
|
||||||
|
|
||||||
///@}
|
/// @}
|
||||||
|
|
||||||
}//namespace vector_access
|
}//namespace vector_access
|
||||||
}//namespace gtx
|
}//namespace gtx
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
@ -60,10 +60,10 @@ namespace vector_angle ///< GLM_GTX_vector_angle extension: Compute angle betwee
|
|||||||
detail::tvec3<T> const & y,
|
detail::tvec3<T> const & y,
|
||||||
detail::tvec3<T> const & ref);
|
detail::tvec3<T> const & ref);
|
||||||
|
|
||||||
///@}
|
/// @}
|
||||||
}//namespace vector_angle
|
}// namespace vector_angle
|
||||||
}//namespace gtx
|
}// namespace gtx
|
||||||
}//namespace glm
|
}// namespace glm
|
||||||
|
|
||||||
#include "vector_angle.inl"
|
#include "vector_angle.inl"
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ namespace gtx{
|
|||||||
namespace vector_query ///< GLM_GTX_vector_query extension: Query informations of vector types
|
namespace vector_query ///< GLM_GTX_vector_query extension: Query informations of vector types
|
||||||
{
|
{
|
||||||
/// \addtogroup gtx_vector_query
|
/// \addtogroup gtx_vector_query
|
||||||
///@{
|
/// @{
|
||||||
|
|
||||||
//! Check if two vectors are collinears.
|
//! Check if two vectors are collinears.
|
||||||
//! From GLM_GTX_vector_query extensions.
|
//! From GLM_GTX_vector_query extensions.
|
||||||
@ -83,11 +83,10 @@ namespace vector_query ///< GLM_GTX_vector_query extension: Query informations o
|
|||||||
genType const & v1,
|
genType const & v1,
|
||||||
typename genType::value_type const & epsilon = std::numeric_limits<typename genType::value_type>::epsilon());
|
typename genType::value_type const & epsilon = std::numeric_limits<typename genType::value_type>::epsilon());
|
||||||
|
|
||||||
///@}
|
/// @}
|
||||||
|
}// namespace vector_query
|
||||||
}//namespace vector_query
|
}// namespace gtx
|
||||||
}//namespace gtx
|
}// namespace glm
|
||||||
}//namespace glm
|
|
||||||
|
|
||||||
#include "vector_query.inl"
|
#include "vector_query.inl"
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ namespace gtx{
|
|||||||
namespace verbose_operator ///< GLM_GTX_verbose_operator extension: Use words to replace operators
|
namespace verbose_operator ///< GLM_GTX_verbose_operator extension: Use words to replace operators
|
||||||
{
|
{
|
||||||
/// \addtogroup gtx_verbose_operator
|
/// \addtogroup gtx_verbose_operator
|
||||||
///@{
|
/// @{
|
||||||
|
|
||||||
//! Addition of two values
|
//! Addition of two values
|
||||||
//! From GLM_GTX_verbose_operator extension.
|
//! From GLM_GTX_verbose_operator extension.
|
||||||
@ -52,10 +52,10 @@ namespace verbose_operator ///< GLM_GTX_verbose_operator extension: Use words to
|
|||||||
template <typename genTypeT, typename genTypeU, typename genTypeV>
|
template <typename genTypeT, typename genTypeU, typename genTypeV>
|
||||||
genTypeT mad(genTypeT const & a, genTypeU const & b, genTypeV const & c);
|
genTypeT mad(genTypeT const & a, genTypeU const & b, genTypeV const & c);
|
||||||
|
|
||||||
///@}
|
/// @}
|
||||||
}//namespace verbose_operator
|
}// namespace verbose_operator
|
||||||
}//namespace gtx
|
}// namespace gtx
|
||||||
}//namespace glm
|
}// namespace glm
|
||||||
|
|
||||||
#include "verbose_operator.inl"
|
#include "verbose_operator.inl"
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ namespace gtx{
|
|||||||
namespace wrap ///< GLM_GTX_wrap: Wrapping mode using my texture samping.
|
namespace wrap ///< GLM_GTX_wrap: Wrapping mode using my texture samping.
|
||||||
{
|
{
|
||||||
/// \addtogroup gtx_wrap
|
/// \addtogroup gtx_wrap
|
||||||
///@{
|
/// @{
|
||||||
|
|
||||||
//! Simulate GL_CLAMP OpenGL wrap mode
|
//! Simulate GL_CLAMP OpenGL wrap mode
|
||||||
//! From GLM_GTX_wrap extension.
|
//! From GLM_GTX_wrap extension.
|
||||||
@ -42,11 +42,10 @@ namespace wrap ///< GLM_GTX_wrap: Wrapping mode using my texture samping.
|
|||||||
template <typename genType>
|
template <typename genType>
|
||||||
genType mirrorRepeat(genType const & Texcoord);
|
genType mirrorRepeat(genType const & Texcoord);
|
||||||
|
|
||||||
///@}
|
/// @}
|
||||||
|
}// namespace wrap
|
||||||
}//namespace wrap
|
}// namespace gtx
|
||||||
}//namespace gtx
|
}// namespace glm
|
||||||
}//namespace glm
|
|
||||||
|
|
||||||
#include "wrap.inl"
|
#include "wrap.inl"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user