This commit is contained in:
Christophe Riccio 2011-06-02 13:06:24 +01:00
parent 852ada9c3d
commit ebba087843
22 changed files with 2650 additions and 2784 deletions

View File

@ -12,14 +12,9 @@
namespace glm namespace glm
{ {
namespace test{
void main_core_func_geometric();
}//namespace test
namespace core{ namespace core{
namespace function{ namespace function{
//! Define all geometric functions from Section 8.4 of GLSL 1.30.8 specification. Included in glm namespace. namespace geometric{ //!< Define all geometric functions from Section 8.4 of GLSL 1.30.8 specification. Included in glm namespace.
namespace geometric{
/// \addtogroup core_funcs /// \addtogroup core_funcs
///@{ ///@{

View File

@ -12,10 +12,6 @@
namespace glm namespace glm
{ {
namespace test{
void main_core_func_integer();
}//namespace test
namespace core{ namespace core{
namespace function{ namespace function{
//! Define integer functions from Section 8.8 of GLSL 4.00.8 specification. //! Define integer functions from Section 8.8 of GLSL 4.00.8 specification.

View File

@ -12,10 +12,6 @@
namespace glm namespace glm
{ {
namespace test{
void main_core_func_matrix();
}//namespace test
namespace core{ namespace core{
namespace function{ namespace function{
//! Define all matrix functions from Section 8.5 of GLSL 1.30.8 specification. Included in glm namespace. //! Define all matrix functions from Section 8.5 of GLSL 1.30.8 specification. Included in glm namespace.

View File

@ -12,10 +12,6 @@
namespace glm namespace glm
{ {
namespace test{
void main_core_func_noise();
}//namespace test
namespace core{ namespace core{
namespace function{ namespace function{
// Define all noise functions from Section 8.9 of GLSL 1.30.8 specification. Included in glm namespace. // Define all noise functions from Section 8.9 of GLSL 1.30.8 specification. Included in glm namespace.

View File

@ -12,10 +12,6 @@
namespace glm namespace glm
{ {
namespace test{
void main_core_func_packing();
}//namespace test
namespace core{ namespace core{
namespace function{ namespace function{
//! Define packing functions from section 8.4 floating-point pack and unpack functions of GLSL 4.00.8 specification //! Define packing functions from section 8.4 floating-point pack and unpack functions of GLSL 4.00.8 specification

View File

@ -12,10 +12,6 @@
namespace glm namespace glm
{ {
namespace test{
void main_core_func_trigonometric();
}//namespace test
namespace core{ namespace core{
namespace function{ namespace function{
//! Define Angle and trigonometry functions //! Define Angle and trigonometry functions

View File

@ -14,10 +14,6 @@
namespace glm namespace glm
{ {
namespace test{
void main_core_func_vector_relational();
}//namespace test
namespace core{ namespace core{
namespace function{ namespace function{
//! Define vector relational functions from Section 8.6 of GLSL 1.30.8 specification. //! Define vector relational functions from Section 8.6 of GLSL 1.30.8 specification.

View File

@ -12,74 +12,65 @@
#include <cstdlib> #include <cstdlib>
namespace glm namespace glm{
namespace detail
{ {
namespace test typedef short hdata;
float toFloat32(hdata value);
hdata toFloat16(float const & value);
///16-bit floating point type.
/// \ingroup gtc_half_float
class thalf
{ {
bool main_type_half(); public:
// Constructors
}//namespace test GLM_FUNC_DECL thalf();
GLM_FUNC_DECL thalf(thalf const & s);
namespace detail
{
typedef short hdata;
float toFloat32(hdata value);
hdata toFloat16(float const & value);
///16-bit floating point type.
/// \ingroup gtc_half_float
class thalf
{
public:
// Constructors
GLM_FUNC_DECL thalf();
GLM_FUNC_DECL thalf(thalf const & s);
template <typename U> template <typename U>
GLM_FUNC_DECL explicit thalf(U const & s); GLM_FUNC_DECL explicit thalf(U const & s);
// Cast // Cast
//operator float(); //operator float();
GLM_FUNC_DECL operator float() const; GLM_FUNC_DECL operator float() const;
//operator double(); //operator double();
//operator double() const; //operator double() const;
// Unary updatable operators // Unary updatable operators
GLM_FUNC_DECL thalf& operator= (thalf const & s); GLM_FUNC_DECL thalf& operator= (thalf const & s);
GLM_FUNC_DECL thalf& operator+=(thalf const & s); GLM_FUNC_DECL thalf& operator+=(thalf const & s);
GLM_FUNC_DECL thalf& operator-=(thalf const & s); GLM_FUNC_DECL thalf& operator-=(thalf const & s);
GLM_FUNC_DECL thalf& operator*=(thalf const & s); GLM_FUNC_DECL thalf& operator*=(thalf const & s);
GLM_FUNC_DECL thalf& operator/=(thalf const & s); GLM_FUNC_DECL thalf& operator/=(thalf const & s);
GLM_FUNC_DECL thalf& operator++(); GLM_FUNC_DECL thalf& operator++();
GLM_FUNC_DECL thalf& operator--(); GLM_FUNC_DECL thalf& operator--();
GLM_FUNC_DECL float toFloat() const{return toFloat32(data);} GLM_FUNC_DECL float toFloat() const{return toFloat32(data);}
GLM_FUNC_DECL hdata _data() const{return data;} GLM_FUNC_DECL hdata _data() const{return data;}
private: private:
hdata data; hdata data;
}; };
thalf operator+ (thalf const & s1, thalf const & s2); thalf operator+ (thalf const & s1, thalf const & s2);
thalf operator- (thalf const & s1, thalf const & s2); thalf operator- (thalf const & s1, thalf const & s2);
thalf operator* (thalf const & s1, thalf const & s2); thalf operator* (thalf const & s1, thalf const & s2);
thalf operator/ (thalf const & s1, thalf const & s2); thalf operator/ (thalf const & s1, thalf const & s2);
// Unary constant operators // Unary constant operators
thalf operator- (thalf const & s); thalf operator- (thalf const & s);
thalf operator-- (thalf const & s, int); thalf operator-- (thalf const & s, int);
thalf operator++ (thalf const & s, int);
}//namespace detail
thalf operator++ (thalf const & s, int);
}//namespace detail
}//namespace glm }//namespace glm
#include "type_half.inl" #include "type_half.inl"

View File

@ -13,71 +13,66 @@
#include "setup.hpp" #include "setup.hpp"
#include "_detail.hpp" #include "_detail.hpp"
namespace glm namespace glm{
namespace detail
{ {
namespace detail typedef signed short lowp_int_t;
{ typedef signed int mediump_int_t;
typedef signed short lowp_int_t; typedef sint64 highp_int_t;
typedef signed int mediump_int_t;
typedef sint64 highp_int_t;
typedef unsigned short lowp_uint_t; typedef unsigned short lowp_uint_t;
typedef unsigned int mediump_uint_t; typedef unsigned int mediump_uint_t;
typedef uint64 highp_uint_t; typedef uint64 highp_uint_t;
GLM_DETAIL_IS_INT(signed char); GLM_DETAIL_IS_INT(signed char);
GLM_DETAIL_IS_INT(signed short); GLM_DETAIL_IS_INT(signed short);
GLM_DETAIL_IS_INT(signed int); GLM_DETAIL_IS_INT(signed int);
GLM_DETAIL_IS_INT(signed long); GLM_DETAIL_IS_INT(signed long);
GLM_DETAIL_IS_INT(highp_int_t); GLM_DETAIL_IS_INT(highp_int_t);
GLM_DETAIL_IS_UINT(unsigned char); GLM_DETAIL_IS_UINT(unsigned char);
GLM_DETAIL_IS_UINT(unsigned short); GLM_DETAIL_IS_UINT(unsigned short);
GLM_DETAIL_IS_UINT(unsigned int); GLM_DETAIL_IS_UINT(unsigned int);
GLM_DETAIL_IS_UINT(unsigned long); GLM_DETAIL_IS_UINT(unsigned long);
GLM_DETAIL_IS_UINT(highp_uint_t); GLM_DETAIL_IS_UINT(highp_uint_t);
} }//namespace detail
//namespace detail
namespace core{ namespace core{
namespace type{ namespace type{
namespace precision //!< Namespace for precision stuff.
{
//! Low precision signed integer.
//! There is no guarantee on the actual precision.
//! From GLSL 1.30.8 specification.
//! \ingroup core_precision
typedef detail::lowp_int_t lowp_int;
//! Medium precision signed integer.
//! There is no guarantee on the actual precision.
//! From GLSL 1.30.8 specification.
//! \ingroup core_precision
typedef detail::mediump_int_t mediump_int;
//! High precision signed integer.
//! There is no guarantee on the actual precision.
//! From GLSL 1.30.8 specification.
//! \ingroup core_precision
typedef detail::highp_int_t highp_int;
///namespace for precision stuff. //! Low precision unsigned integer.
namespace precision //! There is no guarantee on the actual precision.
{ //! From GLSL 1.30.8 specification.
//! Low precision signed integer. //! \ingroup core_precision
//! There is no guarantee on the actual precision. typedef detail::lowp_uint_t lowp_uint;
//! From GLSL 1.30.8 specification. //! Medium precision unsigned integer.
//! \ingroup core_precision //! There is no guarantee on the actual precision.
typedef detail::lowp_int_t lowp_int; //! From GLSL 1.30.8 specification.
//! Medium precision signed integer. //! \ingroup core_precision
//! There is no guarantee on the actual precision. typedef detail::mediump_uint_t mediump_uint;
//! From GLSL 1.30.8 specification. //! High precision unsigned integer.
//! \ingroup core_precision //! There is no guarantee on the actual precision.
typedef detail::mediump_int_t mediump_int; //! From GLSL 1.30.8 specification.
//! High precision signed integer. //! \ingroup core_precision
//! There is no guarantee on the actual precision. typedef detail::highp_uint_t highp_uint;
//! From GLSL 1.30.8 specification. }//namespace precision
//! \ingroup core_precision
typedef detail::highp_int_t highp_int;
//! Low precision unsigned integer.
//! There is no guarantee on the actual precision.
//! From GLSL 1.30.8 specification.
//! \ingroup core_precision
typedef detail::lowp_uint_t lowp_uint;
//! Medium precision unsigned integer.
//! There is no guarantee on the actual precision.
//! From GLSL 1.30.8 specification.
//! \ingroup core_precision
typedef detail::mediump_uint_t mediump_uint;
//! High precision unsigned integer.
//! There is no guarantee on the actual precision.
//! From GLSL 1.30.8 specification.
//! \ingroup core_precision
typedef detail::highp_uint_t highp_uint;
}
//namespace precision
#if(!defined(GLM_PRECISION_HIGHP_INT) && !defined(GLM_PRECISION_MEDIUMP_INT) && !defined(GLM_PRECISION_LOWP_INT)) #if(!defined(GLM_PRECISION_HIGHP_INT) && !defined(GLM_PRECISION_MEDIUMP_INT) && !defined(GLM_PRECISION_LOWP_INT))
typedef precision::mediump_int int_t; typedef precision::mediump_int int_t;
@ -107,8 +102,8 @@ namespace glm
//! From GLSL 1.30.8 specification section 4.1.3 Integers. //! From GLSL 1.30.8 specification section 4.1.3 Integers.
typedef uint_t uint; typedef uint_t uint;
}//namespace type }//namespace type
}//namespace core }//namespace core
}//namespace glm }//namespace glm
#endif//glm_core_type_int #endif//glm_core_type_int

View File

@ -12,276 +12,267 @@
#include "type_mat.hpp" #include "type_mat.hpp"
namespace glm namespace glm{
namespace detail
{ {
namespace test template <typename T> struct tvec1;
template <typename T> struct tvec2;
template <typename T> struct tvec3;
template <typename T> struct tvec4;
template <typename T> struct tmat2x2;
template <typename T> struct tmat2x3;
template <typename T> struct tmat2x4;
template <typename T> struct tmat3x2;
template <typename T> struct tmat3x3;
template <typename T> struct tmat3x4;
template <typename T> struct tmat4x2;
template <typename T> struct tmat4x3;
template <typename T> struct tmat4x4;
//! \brief Template for 2 * 2 matrix of floating-point numbers.
//! \ingroup core_template
template <typename T>
struct tmat2x2
{ {
void main_mat2x2(); enum ctor{null};
}//namespace test typedef T value_type;
typedef std::size_t size_type;
typedef tvec2<T> col_type;
typedef tvec2<T> row_type;
static GLM_FUNC_DECL size_type col_size();
static GLM_FUNC_DECL size_type row_size();
namespace detail typedef tmat2x2<T> type;
{ typedef tmat2x2<T> transpose_type;
template <typename T> struct tvec1;
template <typename T> struct tvec2;
template <typename T> struct tvec3;
template <typename T> struct tvec4;
template <typename T> struct tmat2x2;
template <typename T> struct tmat2x3;
template <typename T> struct tmat2x4;
template <typename T> struct tmat3x2;
template <typename T> struct tmat3x3;
template <typename T> struct tmat3x4;
template <typename T> struct tmat4x2;
template <typename T> struct tmat4x3;
template <typename T> struct tmat4x4;
//! \brief Template for 2 * 2 matrix of floating-point numbers. public:
//! \ingroup core_template // Implementation detail
template <typename T> GLM_FUNC_DECL tmat2x2<T> _inverse() const;
struct tmat2x2
{
enum ctor{null};
typedef T value_type;
typedef std::size_t size_type;
typedef tvec2<T> col_type;
typedef tvec2<T> row_type;
static GLM_FUNC_DECL size_type col_size();
static GLM_FUNC_DECL size_type row_size();
typedef tmat2x2<T> type; private:
typedef tmat2x2<T> transpose_type; //////////////////////////////////////
// Data
col_type value[2];
public: public:
// Implementation detail //////////////////////////////////////
GLM_FUNC_DECL tmat2x2<T> _inverse() const; // Constructors
GLM_FUNC_DECL tmat2x2();
GLM_FUNC_DECL tmat2x2(
tmat2x2 const & m);
private: GLM_FUNC_DECL explicit tmat2x2(
////////////////////////////////////// ctor Null);
// Data GLM_FUNC_DECL explicit tmat2x2(
col_type value[2]; value_type const & x);
GLM_FUNC_DECL explicit tmat2x2(
value_type const & x1, value_type const & y1,
value_type const & x2, value_type const & y2);
GLM_FUNC_DECL explicit tmat2x2(
col_type const & v1,
col_type const & v2);
public: //////////////////////////////////////
////////////////////////////////////// // Conversions
// Constructors template <typename U>
GLM_FUNC_DECL tmat2x2(); GLM_FUNC_DECL explicit tmat2x2(
GLM_FUNC_DECL tmat2x2( U const & x);
tmat2x2 const & m);
GLM_FUNC_DECL explicit tmat2x2(
ctor Null);
GLM_FUNC_DECL explicit tmat2x2(
value_type const & x);
GLM_FUNC_DECL explicit tmat2x2(
value_type const & x1, value_type const & y1,
value_type const & x2, value_type const & y2);
GLM_FUNC_DECL explicit tmat2x2(
col_type const & v1,
col_type const & v2);
//////////////////////////////////////
// Conversions
template <typename U>
GLM_FUNC_DECL explicit tmat2x2(
U const & x);
template <typename U, typename V, typename M, typename N> template <typename U, typename V, typename M, typename N>
GLM_FUNC_DECL explicit tmat2x2( GLM_FUNC_DECL explicit tmat2x2(
U const & x1, V const & y1, U const & x1, V const & y1,
M const & x2, N const & y2); M const & x2, N const & y2);
template <typename U, typename V> template <typename U, typename V>
GLM_FUNC_DECL explicit tmat2x2( GLM_FUNC_DECL explicit tmat2x2(
tvec2<U> const & v1, tvec2<U> const & v1,
tvec2<V> const & v2); tvec2<V> const & v2);
////////////////////////////////////// //////////////////////////////////////
// Matrix conversions // Matrix conversions
template <typename U> template <typename U>
GLM_FUNC_DECL explicit tmat2x2(tmat2x2<U> const & m); GLM_FUNC_DECL explicit tmat2x2(tmat2x2<U> const & m);
GLM_FUNC_DECL explicit tmat2x2(tmat3x3<T> const & x); GLM_FUNC_DECL explicit tmat2x2(tmat3x3<T> const & x);
GLM_FUNC_DECL explicit tmat2x2(tmat4x4<T> const & x); GLM_FUNC_DECL explicit tmat2x2(tmat4x4<T> const & x);
GLM_FUNC_DECL explicit tmat2x2(tmat2x3<T> const & x); GLM_FUNC_DECL explicit tmat2x2(tmat2x3<T> const & x);
GLM_FUNC_DECL explicit tmat2x2(tmat3x2<T> const & x); GLM_FUNC_DECL explicit tmat2x2(tmat3x2<T> const & x);
GLM_FUNC_DECL explicit tmat2x2(tmat2x4<T> const & x); GLM_FUNC_DECL explicit tmat2x2(tmat2x4<T> const & x);
GLM_FUNC_DECL explicit tmat2x2(tmat4x2<T> const & x); GLM_FUNC_DECL explicit tmat2x2(tmat4x2<T> const & x);
GLM_FUNC_DECL explicit tmat2x2(tmat3x4<T> const & x); GLM_FUNC_DECL explicit tmat2x2(tmat3x4<T> const & x);
GLM_FUNC_DECL explicit tmat2x2(tmat4x3<T> const & x); GLM_FUNC_DECL explicit tmat2x2(tmat4x3<T> const & x);
////////////////////////////////////// //////////////////////////////////////
// Accesses // Accesses
GLM_FUNC_DECL col_type & operator[](size_type i); GLM_FUNC_DECL col_type & operator[](size_type i);
GLM_FUNC_DECL col_type const & operator[](size_type i) const; GLM_FUNC_DECL col_type const & operator[](size_type i) const;
// Unary updatable operators // Unary updatable operators
GLM_FUNC_DECL tmat2x2<T> & operator=(tmat2x2<T> const & m); GLM_FUNC_DECL tmat2x2<T> & operator=(tmat2x2<T> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x2<T> & operator=(tmat2x2<U> const & m); GLM_FUNC_DECL tmat2x2<T> & operator=(tmat2x2<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x2<T> & operator+=(U const & s); GLM_FUNC_DECL tmat2x2<T> & operator+=(U const & s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x2<T> & operator+=(tmat2x2<U> const & m); GLM_FUNC_DECL tmat2x2<T> & operator+=(tmat2x2<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x2<T> & operator-=(U const & s); GLM_FUNC_DECL tmat2x2<T> & operator-=(U const & s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x2<T> & operator-=(tmat2x2<U> const & m); GLM_FUNC_DECL tmat2x2<T> & operator-=(tmat2x2<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x2<T> & operator*=(U const & s); GLM_FUNC_DECL tmat2x2<T> & operator*=(U const & s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x2<T> & operator*=(tmat2x2<U> const & m); GLM_FUNC_DECL tmat2x2<T> & operator*=(tmat2x2<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x2<T> & operator/=(U const & s); GLM_FUNC_DECL tmat2x2<T> & operator/=(U const & s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x2<T> & operator/=(tmat2x2<U> const & m); GLM_FUNC_DECL tmat2x2<T> & operator/=(tmat2x2<U> const & m);
GLM_FUNC_DECL tmat2x2<T> & operator++(); GLM_FUNC_DECL tmat2x2<T> & operator++();
GLM_FUNC_DECL tmat2x2<T> & operator--(); GLM_FUNC_DECL tmat2x2<T> & operator--();
}; };
// Binary operators // Binary operators
template <typename T> template <typename T>
tmat2x2<T> operator+ ( tmat2x2<T> operator+ (
tmat2x2<T> const & m, tmat2x2<T> const & m,
typename tmat2x2<T>::value_type const & s); typename tmat2x2<T>::value_type const & s);
template <typename T> template <typename T>
tmat2x2<T> operator+ ( tmat2x2<T> operator+ (
typename tmat2x2<T>::value_type const & s, typename tmat2x2<T>::value_type const & s,
tmat2x2<T> const & m); tmat2x2<T> const & m);
template <typename T> template <typename T>
tmat2x2<T> operator+ ( tmat2x2<T> operator+ (
tmat2x2<T> const & m1, tmat2x2<T> const & m1,
tmat2x2<T> const & m2); tmat2x2<T> const & m2);
template <typename T> template <typename T>
tmat2x2<T> operator- ( tmat2x2<T> operator- (
tmat2x2<T> const & m, tmat2x2<T> const & m,
typename tmat2x2<T>::value_type const & s); typename tmat2x2<T>::value_type const & s);
template <typename T> template <typename T>
tmat2x2<T> operator- ( tmat2x2<T> operator- (
typename tmat2x2<T>::value_type const & s, typename tmat2x2<T>::value_type const & s,
tmat2x2<T> const & m); tmat2x2<T> const & m);
template <typename T> template <typename T>
tmat2x2<T> operator- ( tmat2x2<T> operator- (
tmat2x2<T> const & m1, tmat2x2<T> const & m1,
tmat2x2<T> const & m2); tmat2x2<T> const & m2);
template <typename T> template <typename T>
tmat2x2<T> operator* ( tmat2x2<T> operator* (
tmat2x2<T> const & m, tmat2x2<T> const & m,
typename tmat2x2<T>::value_type const & s); typename tmat2x2<T>::value_type const & s);
template <typename T> template <typename T>
tmat2x2<T> operator* ( tmat2x2<T> operator* (
typename tmat2x2<T>::value_type const & s, typename tmat2x2<T>::value_type const & s,
tmat2x2<T> const & m); tmat2x2<T> const & m);
template <typename T> template <typename T>
typename tmat2x2<T>::col_type operator* ( typename tmat2x2<T>::col_type operator* (
tmat2x2<T> const & m, tmat2x2<T> const & m,
typename tmat2x2<T>::row_type const & v); typename tmat2x2<T>::row_type const & v);
template <typename T> template <typename T>
typename tmat2x2<T>::row_type operator* ( typename tmat2x2<T>::row_type operator* (
typename tmat2x2<T>::col_type const & v, typename tmat2x2<T>::col_type const & v,
tmat2x2<T> const & m); tmat2x2<T> const & m);
template <typename T> template <typename T>
tmat2x2<T> operator* ( tmat2x2<T> operator* (
tmat2x2<T> const & m1, tmat2x2<T> const & m1,
tmat2x2<T> const & m2); tmat2x2<T> const & m2);
template <typename T> template <typename T>
tmat2x2<T> operator/ ( tmat2x2<T> operator/ (
tmat2x2<T> const & m, tmat2x2<T> const & m,
typename tmat2x2<T>::value_type const & s); typename tmat2x2<T>::value_type const & s);
template <typename T> template <typename T>
tmat2x2<T> operator/ ( tmat2x2<T> operator/ (
typename tmat2x2<T>::value_type const & s, typename tmat2x2<T>::value_type const & s,
tmat2x2<T> const & m); tmat2x2<T> const & m);
template <typename T> template <typename T>
typename tmat2x2<T>::col_type operator/ ( typename tmat2x2<T>::col_type operator/ (
tmat2x2<T> const & m, tmat2x2<T> const & m,
typename tmat2x2<T>::row_type const & v); typename tmat2x2<T>::row_type const & v);
template <typename T> template <typename T>
typename tmat2x2<T>::row_type operator/ ( typename tmat2x2<T>::row_type operator/ (
typename tmat2x2<T>::col_type const & v, typename tmat2x2<T>::col_type const & v,
tmat2x2<T> const & m); tmat2x2<T> const & m);
template <typename T> template <typename T>
tmat2x2<T> operator/ ( tmat2x2<T> operator/ (
tmat2x2<T> const & m1, tmat2x2<T> const & m1,
tmat2x2<T> const & m2); tmat2x2<T> const & m2);
// Unary constant operators // Unary constant operators
template <typename T> template <typename T>
tmat2x2<T> const operator- ( tmat2x2<T> const operator- (
tmat2x2<T> const & m); tmat2x2<T> const & m);
template <typename T> template <typename T>
tmat2x2<T> const operator-- ( tmat2x2<T> const operator-- (
tmat2x2<T> const & m, tmat2x2<T> const & m,
int); int);
template <typename T> template <typename T>
tmat2x2<T> const operator++ ( tmat2x2<T> const operator++ (
tmat2x2<T> const & m, tmat2x2<T> const & m,
int); int);
} //namespace detail
} //namespace detail namespace core{
namespace type{
namespace precision
{
//! 2 columns of 2 components matrix of low precision floating-point numbers.
//! There is no guarantee on the actual precision.
//! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers
//! \ingroup core_precision
typedef detail::tmat2x2<lowp_float> lowp_mat2;
namespace core{ //! 2 columns of 2 components matrix of medium precision floating-point numbers.
namespace type{ //! There is no guarantee on the actual precision.
//! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers
//! \ingroup core_precision
typedef detail::tmat2x2<mediump_float> mediump_mat2;
namespace precision //! 2 columns of 2 components matrix of high precision floating-point numbers.
{ //! There is no guarantee on the actual precision.
//! 2 columns of 2 components matrix of low precision floating-point numbers. //! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers
//! There is no guarantee on the actual precision. //! \ingroup core_precision
//! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers typedef detail::tmat2x2<highp_float> highp_mat2;
//! \ingroup core_precision
typedef detail::tmat2x2<lowp_float> lowp_mat2;
//! 2 columns of 2 components matrix of medium precision floating-point numbers. //! 2 columns of 2 components matrix of low precision floating-point numbers.
//! There is no guarantee on the actual precision. //! There is no guarantee on the actual precision.
//! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers //! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers
//! \ingroup core_precision //! \ingroup core_precision
typedef detail::tmat2x2<mediump_float> mediump_mat2; typedef detail::tmat2x2<lowp_float> lowp_mat2x2;
//! 2 columns of 2 components matrix of high precision floating-point numbers. //! 2 columns of 2 components matrix of medium precision floating-point numbers.
//! There is no guarantee on the actual precision. //! There is no guarantee on the actual precision.
//! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers //! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers
//! \ingroup core_precision //! \ingroup core_precision
typedef detail::tmat2x2<highp_float> highp_mat2; typedef detail::tmat2x2<mediump_float> mediump_mat2x2;
//! 2 columns of 2 components matrix of low precision floating-point numbers. //! 2 columns of 2 components matrix of high precision floating-point numbers.
//! There is no guarantee on the actual precision. //! There is no guarantee on the actual precision.
//! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers //! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers
//! \ingroup core_precision //! \ingroup core_precision
typedef detail::tmat2x2<lowp_float> lowp_mat2x2; typedef detail::tmat2x2<highp_float> highp_mat2x2;
//! 2 columns of 2 components matrix of medium precision floating-point numbers. }//namespace precision
//! There is no guarantee on the actual precision. }//namespace type
//! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers }//namespace core
//! \ingroup core_precision }//namespace glm
typedef detail::tmat2x2<mediump_float> mediump_mat2x2;
//! 2 columns of 2 components matrix of high precision floating-point numbers.
//! There is no guarantee on the actual precision.
//! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers
//! \ingroup core_precision
typedef detail::tmat2x2<highp_float> highp_mat2x2;
}
//namespace precision
}//namespace type
}//namespace core
} //namespace glm
#ifndef GLM_EXTERNAL_TEMPLATE #ifndef GLM_EXTERNAL_TEMPLATE
#include "type_mat2x2.inl" #include "type_mat2x2.inl"

View File

@ -12,222 +12,213 @@
#include "type_mat.hpp" #include "type_mat.hpp"
namespace glm namespace glm{
namespace detail
{ {
namespace test template <typename T> struct tvec1;
template <typename T> struct tvec2;
template <typename T> struct tvec3;
template <typename T> struct tvec4;
template <typename T> struct tmat2x2;
template <typename T> struct tmat2x3;
template <typename T> struct tmat2x4;
template <typename T> struct tmat3x2;
template <typename T> struct tmat3x3;
template <typename T> struct tmat3x4;
template <typename T> struct tmat4x2;
template <typename T> struct tmat4x3;
template <typename T> struct tmat4x4;
//! \brief Template for 2 columns and 3 rows matrix of floating-point numbers.
//! \ingroup core_template
template <typename T>
struct tmat2x3
{ {
void main_mat2x3(); enum ctor{null};
}//namespace test typedef T value_type;
typedef std::size_t size_type;
typedef tvec3<T> col_type;
typedef tvec2<T> row_type;
static GLM_FUNC_DECL size_type col_size();
static GLM_FUNC_DECL size_type row_size();
namespace detail typedef tmat2x3<T> type;
{ typedef tmat3x2<T> transpose_type;
template <typename T> struct tvec1;
template <typename T> struct tvec2;
template <typename T> struct tvec3;
template <typename T> struct tvec4;
template <typename T> struct tmat2x2;
template <typename T> struct tmat2x3;
template <typename T> struct tmat2x4;
template <typename T> struct tmat3x2;
template <typename T> struct tmat3x3;
template <typename T> struct tmat3x4;
template <typename T> struct tmat4x2;
template <typename T> struct tmat4x3;
template <typename T> struct tmat4x4;
//! \brief Template for 2 columns and 3 rows matrix of floating-point numbers. private:
//! \ingroup core_template // Data
template <typename T> col_type value[2];
struct tmat2x3
{
enum ctor{null};
typedef T value_type;
typedef std::size_t size_type;
typedef tvec3<T> col_type;
typedef tvec2<T> row_type;
static GLM_FUNC_DECL size_type col_size();
static GLM_FUNC_DECL size_type row_size();
typedef tmat2x3<T> type; public:
typedef tmat3x2<T> transpose_type; // Constructors
GLM_FUNC_DECL tmat2x3();
GLM_FUNC_DECL tmat2x3(tmat2x3 const & m);
private: GLM_FUNC_DECL explicit tmat2x3(
// Data ctor);
col_type value[2]; GLM_FUNC_DECL explicit tmat2x3(
value_type const & s);
public: GLM_FUNC_DECL explicit tmat2x3(
// Constructors value_type const & x0, value_type const & y0, value_type const & z0,
GLM_FUNC_DECL tmat2x3(); value_type const & x1, value_type const & y1, value_type const & z1);
GLM_FUNC_DECL tmat2x3(tmat2x3 const & m); GLM_FUNC_DECL explicit tmat2x3(
col_type const & v0,
GLM_FUNC_DECL explicit tmat2x3( col_type const & v1);
ctor);
GLM_FUNC_DECL explicit tmat2x3(
value_type const & s);
GLM_FUNC_DECL explicit tmat2x3(
value_type const & x0, value_type const & y0, value_type const & z0,
value_type const & x1, value_type const & y1, value_type const & z1);
GLM_FUNC_DECL explicit tmat2x3(
col_type const & v0,
col_type const & v1);
////////////////////////////////////// //////////////////////////////////////
// Conversions // Conversions
template <typename U> template <typename U>
GLM_FUNC_DECL explicit tmat2x3( GLM_FUNC_DECL explicit tmat2x3(
U const & x); U const & x);
template <typename X1, typename Y1, typename Z1, typename X2, typename Y2, typename Z2> template <typename X1, typename Y1, typename Z1, typename X2, typename Y2, typename Z2>
GLM_FUNC_DECL explicit tmat2x3( GLM_FUNC_DECL explicit tmat2x3(
X1 const & x1, Y1 const & y1, Z1 const & z1, X1 const & x1, Y1 const & y1, Z1 const & z1,
X2 const & x2, Y2 const & y2, Z2 const & z2); X2 const & x2, Y2 const & y2, Z2 const & z2);
template <typename U, typename V> template <typename U, typename V>
GLM_FUNC_DECL explicit tmat2x3( GLM_FUNC_DECL explicit tmat2x3(
tvec3<U> const & v1, tvec3<U> const & v1,
tvec3<V> const & v2); tvec3<V> const & v2);
////////////////////////////////////// //////////////////////////////////////
// Matrix conversion // Matrix conversion
template <typename U> template <typename U>
GLM_FUNC_DECL explicit tmat2x3(tmat2x3<U> const & m); GLM_FUNC_DECL explicit tmat2x3(tmat2x3<U> const & m);
GLM_FUNC_DECL explicit tmat2x3(tmat2x2<T> const & x); GLM_FUNC_DECL explicit tmat2x3(tmat2x2<T> const & x);
GLM_FUNC_DECL explicit tmat2x3(tmat3x3<T> const & x); GLM_FUNC_DECL explicit tmat2x3(tmat3x3<T> const & x);
GLM_FUNC_DECL explicit tmat2x3(tmat4x4<T> const & x); GLM_FUNC_DECL explicit tmat2x3(tmat4x4<T> const & x);
GLM_FUNC_DECL explicit tmat2x3(tmat2x4<T> const & x); GLM_FUNC_DECL explicit tmat2x3(tmat2x4<T> const & x);
GLM_FUNC_DECL explicit tmat2x3(tmat3x2<T> const & x); GLM_FUNC_DECL explicit tmat2x3(tmat3x2<T> const & x);
GLM_FUNC_DECL explicit tmat2x3(tmat3x4<T> const & x); GLM_FUNC_DECL explicit tmat2x3(tmat3x4<T> const & x);
GLM_FUNC_DECL explicit tmat2x3(tmat4x2<T> const & x); GLM_FUNC_DECL explicit tmat2x3(tmat4x2<T> const & x);
GLM_FUNC_DECL explicit tmat2x3(tmat4x3<T> const & x); GLM_FUNC_DECL explicit tmat2x3(tmat4x3<T> const & x);
// Accesses // Accesses
col_type & operator[](size_type i); col_type & operator[](size_type i);
col_type const & operator[](size_type i) const; col_type const & operator[](size_type i) const;
// Unary updatable operators // Unary updatable operators
GLM_FUNC_DECL tmat2x3<T> & operator= (tmat2x3<T> const & m); GLM_FUNC_DECL tmat2x3<T> & operator= (tmat2x3<T> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x3<T> & operator= (tmat2x3<U> const & m); GLM_FUNC_DECL tmat2x3<T> & operator= (tmat2x3<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x3<T> & operator+= (U const & s); GLM_FUNC_DECL tmat2x3<T> & operator+= (U const & s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x3<T> & operator+= (tmat2x3<U> const & m); GLM_FUNC_DECL tmat2x3<T> & operator+= (tmat2x3<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x3<T> & operator-= (U const & s); GLM_FUNC_DECL tmat2x3<T> & operator-= (U const & s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x3<T> & operator-= (tmat2x3<U> const & m); GLM_FUNC_DECL tmat2x3<T> & operator-= (tmat2x3<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x3<T> & operator*= (U const & s); GLM_FUNC_DECL tmat2x3<T> & operator*= (U const & s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x3<T> & operator*= (tmat2x3<U> const & m); GLM_FUNC_DECL tmat2x3<T> & operator*= (tmat2x3<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x3<T> & operator/= (U const & s); GLM_FUNC_DECL tmat2x3<T> & operator/= (U const & s);
GLM_FUNC_DECL tmat2x3<T> & operator++ (); GLM_FUNC_DECL tmat2x3<T> & operator++ ();
GLM_FUNC_DECL tmat2x3<T> & operator-- (); GLM_FUNC_DECL tmat2x3<T> & operator-- ();
}; };
// Binary operators // Binary operators
template <typename T> template <typename T>
tmat2x3<T> operator+ ( tmat2x3<T> operator+ (
tmat2x3<T> const & m, tmat2x3<T> const & m,
typename tmat2x3<T>::value_type const & s); typename tmat2x3<T>::value_type const & s);
template <typename T> template <typename T>
tmat2x3<T> operator+ ( tmat2x3<T> operator+ (
tmat2x3<T> const & m1, tmat2x3<T> const & m1,
tmat2x3<T> const & m2); tmat2x3<T> const & m2);
template <typename T> template <typename T>
tmat2x3<T> operator- ( tmat2x3<T> operator- (
tmat2x3<T> const & m, tmat2x3<T> const & m,
typename tmat2x3<T>::value_type const & s); typename tmat2x3<T>::value_type const & s);
template <typename T> template <typename T>
tmat2x3<T> operator- ( tmat2x3<T> operator- (
tmat2x3<T> const & m1, tmat2x3<T> const & m1,
tmat2x3<T> const & m2); tmat2x3<T> const & m2);
template <typename T> template <typename T>
tmat2x3<T> operator* ( tmat2x3<T> operator* (
tmat2x3<T> const & m, tmat2x3<T> const & m,
typename tmat2x3<T>::value_type const & s); typename tmat2x3<T>::value_type const & s);
template <typename T> template <typename T>
tmat2x3<T> operator* ( tmat2x3<T> operator* (
typename tmat2x3<T>::value_type const & s, typename tmat2x3<T>::value_type const & s,
tmat2x3<T> const & m); tmat2x3<T> const & m);
template <typename T> template <typename T>
typename tmat2x3<T>::col_type operator* ( typename tmat2x3<T>::col_type operator* (
tmat2x3<T> const & m, tmat2x3<T> const & m,
typename tmat2x3<T>::row_type const & v); typename tmat2x3<T>::row_type const & v);
template <typename T> template <typename T>
typename tmat2x3<T>::row_type operator* ( typename tmat2x3<T>::row_type operator* (
typename tmat2x3<T>::col_type const & v, typename tmat2x3<T>::col_type const & v,
tmat2x3<T> const & m); tmat2x3<T> const & m);
template <typename T> template <typename T>
tmat3x3<T> operator* ( tmat3x3<T> operator* (
tmat2x3<T> const & m1, tmat2x3<T> const & m1,
tmat3x2<T> const & m2); tmat3x2<T> const & m2);
template <typename T> template <typename T>
tmat2x3<T> operator/ ( tmat2x3<T> operator/ (
tmat2x3<T> const & m, tmat2x3<T> const & m,
typename tmat2x3<T>::value_type const & s); typename tmat2x3<T>::value_type const & s);
template <typename T> template <typename T>
tmat2x3<T> operator/ ( tmat2x3<T> operator/ (
typename tmat2x3<T>::value_type const & s, typename tmat2x3<T>::value_type const & s,
tmat2x3<T> const & m); tmat2x3<T> const & m);
// Unary constant operators // Unary constant operators
template <typename T> template <typename T>
tmat2x3<T> const operator- ( tmat2x3<T> const operator- (
tmat2x3<T> const & m); tmat2x3<T> const & m);
template <typename T> template <typename T>
tmat2x3<T> const operator-- ( tmat2x3<T> const operator-- (
tmat2x3<T> const & m, tmat2x3<T> const & m,
int); int);
template <typename T> template <typename T>
tmat2x3<T> const operator++ ( tmat2x3<T> const operator++ (
tmat2x3<T> const & m, tmat2x3<T> const & m,
int); int);
} //namespace detail } //namespace detail
namespace core{ namespace core{
namespace type{ namespace type{
namespace precision
namespace precision {
{ //! 2 columns of 3 components matrix of low precision floating-point numbers.
//! 2 columns of 3 components matrix of low precision floating-point numbers. //! There is no guarantee on the actual precision.
//! There is no guarantee on the actual precision. //! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers)
//! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers) //! \ingroup core_precision
//! \ingroup core_precision typedef detail::tmat2x3<lowp_float> lowp_mat2x3;
typedef detail::tmat2x3<lowp_float> lowp_mat2x3; //! 2 columns of 3 components matrix of medium precision floating-point numbers.
//! 2 columns of 3 components matrix of medium precision floating-point numbers. //! There is no guarantee on the actual precision.
//! There is no guarantee on the actual precision. //! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers)
//! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers) //! \ingroup core_precision
//! \ingroup core_precision typedef detail::tmat2x3<mediump_float> mediump_mat2x3;
typedef detail::tmat2x3<mediump_float> mediump_mat2x3; //! 2 columns of 3 components matrix of high precision floating-point numbers.
//! 2 columns of 3 components matrix of high precision floating-point numbers. //! There is no guarantee on the actual precision.
//! There is no guarantee on the actual precision. //! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers)
//! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers) //! \ingroup core_precision
//! \ingroup core_precision typedef detail::tmat2x3<highp_float> highp_mat2x3;
typedef detail::tmat2x3<highp_float> highp_mat2x3; }//namespace precision
} }//namespace type
//namespace precision }//namespace core
}//namespace glm
}//namespace type
}//namespace core
} //namespace glm
#ifndef GLM_EXTERNAL_TEMPLATE #ifndef GLM_EXTERNAL_TEMPLATE
#include "type_mat2x3.inl" #include "type_mat2x3.inl"

View File

@ -12,220 +12,211 @@
#include "type_mat.hpp" #include "type_mat.hpp"
namespace glm namespace glm{
namespace detail
{ {
namespace test template <typename T> struct tvec1;
template <typename T> struct tvec2;
template <typename T> struct tvec3;
template <typename T> struct tvec4;
template <typename T> struct tmat2x2;
template <typename T> struct tmat2x3;
template <typename T> struct tmat2x4;
template <typename T> struct tmat3x2;
template <typename T> struct tmat3x3;
template <typename T> struct tmat3x4;
template <typename T> struct tmat4x2;
template <typename T> struct tmat4x3;
template <typename T> struct tmat4x4;
//! Template for 2 columns and 4 rows matrix of floating-point numbers.
//! \ingroup core_template
template <typename T>
struct tmat2x4
{ {
void main_mat2x4(); enum ctor{null};
}//namespace test typedef T value_type;
typedef std::size_t size_type;
typedef tvec4<T> col_type;
typedef tvec2<T> row_type;
static GLM_FUNC_DECL size_type col_size();
static GLM_FUNC_DECL size_type row_size();
namespace detail typedef tmat2x4<T> type;
{ typedef tmat4x2<T> transpose_type;
template <typename T> struct tvec1;
template <typename T> struct tvec2;
template <typename T> struct tvec3;
template <typename T> struct tvec4;
template <typename T> struct tmat2x2;
template <typename T> struct tmat2x3;
template <typename T> struct tmat2x4;
template <typename T> struct tmat3x2;
template <typename T> struct tmat3x3;
template <typename T> struct tmat3x4;
template <typename T> struct tmat4x2;
template <typename T> struct tmat4x3;
template <typename T> struct tmat4x4;
//! Template for 2 columns and 4 rows matrix of floating-point numbers. private:
//! \ingroup core_template // Data
template <typename T> col_type value[2];
struct tmat2x4
{
enum ctor{null};
typedef T value_type;
typedef std::size_t size_type;
typedef tvec4<T> col_type;
typedef tvec2<T> row_type;
static GLM_FUNC_DECL size_type col_size();
static GLM_FUNC_DECL size_type row_size();
typedef tmat2x4<T> type; public:
typedef tmat4x2<T> transpose_type; // Constructors
GLM_FUNC_DECL tmat2x4();
GLM_FUNC_DECL tmat2x4(tmat2x4 const & m);
private: GLM_FUNC_DECL explicit tmat2x4(
// Data ctor);
col_type value[2]; GLM_FUNC_DECL explicit tmat2x4(
value_type const & s);
public: GLM_FUNC_DECL explicit tmat2x4(
// Constructors value_type const & x0, value_type const & y0, value_type const & z0, value_type const & w0,
GLM_FUNC_DECL tmat2x4(); value_type const & x1, value_type const & y1, value_type const & z1, value_type const & w1);
GLM_FUNC_DECL tmat2x4(tmat2x4 const & m); GLM_FUNC_DECL explicit tmat2x4(
col_type const & v0,
GLM_FUNC_DECL explicit tmat2x4( col_type const & v1);
ctor);
GLM_FUNC_DECL explicit tmat2x4(
value_type const & s);
GLM_FUNC_DECL explicit tmat2x4(
value_type const & x0, value_type const & y0, value_type const & z0, value_type const & w0,
value_type const & x1, value_type const & y1, value_type const & z1, value_type const & w1);
GLM_FUNC_DECL explicit tmat2x4(
col_type const & v0,
col_type const & v1);
////////////////////////////////////// //////////////////////////////////////
// Conversions // Conversions
template <typename U> template <typename U>
GLM_FUNC_DECL explicit tmat2x4( GLM_FUNC_DECL explicit tmat2x4(
U const & x); U const & x);
template < template <
typename X1, typename Y1, typename Z1, typename W1, typename X1, typename Y1, typename Z1, typename W1,
typename X2, typename Y2, typename Z2, typename W2> typename X2, typename Y2, typename Z2, typename W2>
GLM_FUNC_DECL explicit tmat2x4( GLM_FUNC_DECL explicit tmat2x4(
X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1, X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1,
X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2); X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2);
template <typename U, typename V> template <typename U, typename V>
GLM_FUNC_DECL explicit tmat2x4( GLM_FUNC_DECL explicit tmat2x4(
tvec4<U> const & v1, tvec4<U> const & v1,
tvec4<V> const & v2); tvec4<V> const & v2);
////////////////////////////////////// //////////////////////////////////////
// Matrix conversions // Matrix conversions
template <typename U> template <typename U>
GLM_FUNC_DECL explicit tmat2x4(tmat2x4<U> const & m); GLM_FUNC_DECL explicit tmat2x4(tmat2x4<U> const & m);
GLM_FUNC_DECL explicit tmat2x4(tmat2x2<T> const & x); GLM_FUNC_DECL explicit tmat2x4(tmat2x2<T> const & x);
GLM_FUNC_DECL explicit tmat2x4(tmat3x3<T> const & x); GLM_FUNC_DECL explicit tmat2x4(tmat3x3<T> const & x);
GLM_FUNC_DECL explicit tmat2x4(tmat4x4<T> const & x); GLM_FUNC_DECL explicit tmat2x4(tmat4x4<T> const & x);
GLM_FUNC_DECL explicit tmat2x4(tmat2x3<T> const & x); GLM_FUNC_DECL explicit tmat2x4(tmat2x3<T> const & x);
GLM_FUNC_DECL explicit tmat2x4(tmat3x2<T> const & x); GLM_FUNC_DECL explicit tmat2x4(tmat3x2<T> const & x);
GLM_FUNC_DECL explicit tmat2x4(tmat3x4<T> const & x); GLM_FUNC_DECL explicit tmat2x4(tmat3x4<T> const & x);
GLM_FUNC_DECL explicit tmat2x4(tmat4x2<T> const & x); GLM_FUNC_DECL explicit tmat2x4(tmat4x2<T> const & x);
GLM_FUNC_DECL explicit tmat2x4(tmat4x3<T> const & x); GLM_FUNC_DECL explicit tmat2x4(tmat4x3<T> const & x);
// Accesses // Accesses
GLM_FUNC_DECL col_type & operator[](size_type i); GLM_FUNC_DECL col_type & operator[](size_type i);
GLM_FUNC_DECL col_type const & operator[](size_type i) const; GLM_FUNC_DECL col_type const & operator[](size_type i) const;
// Unary updatable operators // Unary updatable operators
GLM_FUNC_DECL tmat2x4<T>& operator= (tmat2x4<T> const & m); GLM_FUNC_DECL tmat2x4<T>& operator= (tmat2x4<T> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x4<T>& operator= (tmat2x4<U> const & m); GLM_FUNC_DECL tmat2x4<T>& operator= (tmat2x4<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x4<T>& operator+= (U const & s); GLM_FUNC_DECL tmat2x4<T>& operator+= (U const & s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x4<T>& operator+= (tmat2x4<U> const & m); GLM_FUNC_DECL tmat2x4<T>& operator+= (tmat2x4<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x4<T>& operator-= (U const & s); GLM_FUNC_DECL tmat2x4<T>& operator-= (U const & s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x4<T>& operator-= (tmat2x4<U> const & m); GLM_FUNC_DECL tmat2x4<T>& operator-= (tmat2x4<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x4<T>& operator*= (U const & s); GLM_FUNC_DECL tmat2x4<T>& operator*= (U const & s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x4<T>& operator*= (tmat2x4<U> const & m); GLM_FUNC_DECL tmat2x4<T>& operator*= (tmat2x4<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x4<T>& operator/= (U const & s); GLM_FUNC_DECL tmat2x4<T>& operator/= (U const & s);
GLM_FUNC_DECL tmat2x4<T>& operator++ (); GLM_FUNC_DECL tmat2x4<T>& operator++ ();
GLM_FUNC_DECL tmat2x4<T>& operator-- (); GLM_FUNC_DECL tmat2x4<T>& operator-- ();
}; };
// Binary operators // Binary operators
template <typename T> template <typename T>
tmat2x4<T> operator+ ( tmat2x4<T> operator+ (
tmat2x4<T> const & m, tmat2x4<T> const & m,
typename tmat2x4<T>::value_type const & s); typename tmat2x4<T>::value_type const & s);
template <typename T> template <typename T>
tmat2x4<T> operator+ ( tmat2x4<T> operator+ (
tmat2x4<T> const & m1, tmat2x4<T> const & m1,
tmat2x4<T> const & m2); tmat2x4<T> const & m2);
template <typename T> template <typename T>
tmat2x4<T> operator- ( tmat2x4<T> operator- (
tmat2x4<T> const & m, tmat2x4<T> const & m,
typename tmat2x4<T>::value_type const & s); typename tmat2x4<T>::value_type const & s);
template <typename T> template <typename T>
tmat2x4<T> operator- ( tmat2x4<T> operator- (
tmat2x4<T> const & m1, tmat2x4<T> const & m1,
tmat2x4<T> const & m2); tmat2x4<T> const & m2);
template <typename T> template <typename T>
tmat2x4<T> operator* ( tmat2x4<T> operator* (
tmat2x4<T> const & m, tmat2x4<T> const & m,
typename tmat2x4<T>::value_type const & s); typename tmat2x4<T>::value_type const & s);
template <typename T> template <typename T>
tmat2x4<T> operator* ( tmat2x4<T> operator* (
typename tmat2x4<T>::value_type const & s, typename tmat2x4<T>::value_type const & s,
tmat2x4<T> const & m); tmat2x4<T> const & m);
template <typename T> template <typename T>
typename tmat2x4<T>::col_type operator* ( typename tmat2x4<T>::col_type operator* (
tmat2x4<T> const & m, tmat2x4<T> const & m,
typename tmat2x4<T>::row_type const & v); typename tmat2x4<T>::row_type const & v);
template <typename T> template <typename T>
typename tmat2x4<T>::row_type operator* ( typename tmat2x4<T>::row_type operator* (
typename tmat2x4<T>::col_type const & v, typename tmat2x4<T>::col_type const & v,
tmat2x4<T> const & m); tmat2x4<T> const & m);
template <typename T> template <typename T>
tmat2x4<T> operator* ( tmat2x4<T> operator* (
tmat2x4<T> const & m1, tmat2x4<T> const & m1,
tmat2x4<T> const & m2); tmat2x4<T> const & m2);
template <typename T> template <typename T>
tmat2x4<T> operator/ ( tmat2x4<T> operator/ (
tmat2x4<T> const & m, tmat2x4<T> const & m,
typename tmat2x4<T>::value_type const & s); typename tmat2x4<T>::value_type const & s);
template <typename T> template <typename T>
tmat2x4<T> operator/ ( tmat2x4<T> operator/ (
typename tmat2x4<T>::value_type const & s, typename tmat2x4<T>::value_type const & s,
tmat2x4<T> const & m); tmat2x4<T> const & m);
// Unary constant operators // Unary constant operators
template <typename T> template <typename T>
tmat2x4<T> const operator- ( tmat2x4<T> const operator- (
tmat2x4<T> const & m); tmat2x4<T> const & m);
template <typename T> template <typename T>
tmat2x4<T> const operator-- ( tmat2x4<T> const operator-- (
tmat2x4<T> const & m, tmat2x4<T> const & m,
int); int);
template <typename T> template <typename T>
tmat2x4<T> const operator++ ( tmat2x4<T> const operator++ (
tmat2x4<T> const & m, tmat2x4<T> const & m,
int); int);
} //namespace detail } //namespace detail
namespace core{ namespace core{
namespace type{ namespace type{
namespace precision
namespace precision {
{ //! 2 columns of 4 components matrix of low precision floating-point numbers.
//! 2 columns of 4 components matrix of low precision floating-point numbers. //! There is no guarantee on the actual precision.
//! There is no guarantee on the actual precision. //! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers)
//! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers) typedef detail::tmat2x4<lowp_float> lowp_mat2x4;
typedef detail::tmat2x4<lowp_float> lowp_mat2x4; //! 2 columns of 4 components matrix of medium precision floating-point numbers.
//! 2 columns of 4 components matrix of medium precision floating-point numbers. //! There is no guarantee on the actual precision.
//! There is no guarantee on the actual precision. //! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers)
//! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers) typedef detail::tmat2x4<mediump_float> mediump_mat2x4;
typedef detail::tmat2x4<mediump_float> mediump_mat2x4; //! 2 columns of 4 components matrix of high precision floating-point numbers.
//! 2 columns of 4 components matrix of high precision floating-point numbers. //! There is no guarantee on the actual precision.
//! There is no guarantee on the actual precision. //! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers)
//! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers) typedef detail::tmat2x4<highp_float> highp_mat2x4;
typedef detail::tmat2x4<highp_float> highp_mat2x4; }//namespace precision
} }//namespace type
//namespace precision }//namespace core
}//namespace glm
}//namespace type
}//namespace core
} //namespace glm
#ifndef GLM_EXTERNAL_TEMPLATE #ifndef GLM_EXTERNAL_TEMPLATE
#include "type_mat2x4.inl" #include "type_mat2x4.inl"

View File

@ -12,226 +12,217 @@
#include "type_mat.hpp" #include "type_mat.hpp"
namespace glm namespace glm{
namespace detail
{ {
namespace test template <typename T> struct tvec1;
template <typename T> struct tvec2;
template <typename T> struct tvec3;
template <typename T> struct tvec4;
template <typename T> struct tmat2x2;
template <typename T> struct tmat2x3;
template <typename T> struct tmat2x4;
template <typename T> struct tmat3x2;
template <typename T> struct tmat3x3;
template <typename T> struct tmat3x4;
template <typename T> struct tmat4x2;
template <typename T> struct tmat4x3;
template <typename T> struct tmat4x4;
//! \brief Template for 3 columns and 2 rows matrix of floating-point numbers.
//! \ingroup core_template
template <typename T>
struct tmat3x2
{ {
void main_mat3x2(); enum ctor{null};
}//namespace test typedef T value_type;
typedef std::size_t size_type;
typedef tvec2<T> col_type;
typedef tvec3<T> row_type;
static GLM_FUNC_DECL size_type col_size();
static GLM_FUNC_DECL size_type row_size();
namespace detail typedef tmat3x2<T> type;
{ typedef tmat2x3<T> transpose_type;
template <typename T> struct tvec1;
template <typename T> struct tvec2;
template <typename T> struct tvec3;
template <typename T> struct tvec4;
template <typename T> struct tmat2x2;
template <typename T> struct tmat2x3;
template <typename T> struct tmat2x4;
template <typename T> struct tmat3x2;
template <typename T> struct tmat3x3;
template <typename T> struct tmat3x4;
template <typename T> struct tmat4x2;
template <typename T> struct tmat4x3;
template <typename T> struct tmat4x4;
//! \brief Template for 3 columns and 2 rows matrix of floating-point numbers. private:
//! \ingroup core_template // Data
template <typename T> col_type value[3];
struct tmat3x2
{
enum ctor{null};
typedef T value_type;
typedef std::size_t size_type;
typedef tvec2<T> col_type;
typedef tvec3<T> row_type;
static GLM_FUNC_DECL size_type col_size();
static GLM_FUNC_DECL size_type row_size();
typedef tmat3x2<T> type; public:
typedef tmat2x3<T> transpose_type; // Constructors
GLM_FUNC_DECL tmat3x2();
GLM_FUNC_DECL tmat3x2(tmat3x2 const & m);
private: GLM_FUNC_DECL explicit tmat3x2(
// Data ctor);
col_type value[3]; GLM_FUNC_DECL explicit tmat3x2(
value_type const & s);
GLM_FUNC_DECL explicit tmat3x2(
value_type const & x0, value_type const & y0,
value_type const & x1, value_type const & y1,
value_type const & x2, value_type const & y2);
GLM_FUNC_DECL explicit tmat3x2(
col_type const & v0,
col_type const & v1,
col_type const & v2);
public: //////////////////////////////////////
// Constructors // Conversions
GLM_FUNC_DECL tmat3x2(); template <typename U>
GLM_FUNC_DECL tmat3x2(tmat3x2 const & m); GLM_FUNC_DECL explicit tmat3x2(
U const & x);
GLM_FUNC_DECL explicit tmat3x2(
ctor);
GLM_FUNC_DECL explicit tmat3x2(
value_type const & s);
GLM_FUNC_DECL explicit tmat3x2(
value_type const & x0, value_type const & y0,
value_type const & x1, value_type const & y1,
value_type const & x2, value_type const & y2);
GLM_FUNC_DECL explicit tmat3x2(
col_type const & v0,
col_type const & v1,
col_type const & v2);
//////////////////////////////////////
// Conversions
template <typename U>
GLM_FUNC_DECL explicit tmat3x2(
U const & x);
template template
< <
typename X1, typename Y1, typename X1, typename Y1,
typename X2, typename Y2, typename X2, typename Y2,
typename X3, typename Y3 typename X3, typename Y3
> >
GLM_FUNC_DECL explicit tmat3x2( GLM_FUNC_DECL explicit tmat3x2(
X1 const & x1, Y1 const & y1, X1 const & x1, Y1 const & y1,
X2 const & x2, Y2 const & y2, X2 const & x2, Y2 const & y2,
X3 const & x3, Y3 const & y3); X3 const & x3, Y3 const & y3);
template <typename V1, typename V2, typename V3> template <typename V1, typename V2, typename V3>
GLM_FUNC_DECL explicit tmat3x2( GLM_FUNC_DECL explicit tmat3x2(
tvec2<V1> const & v1, tvec2<V1> const & v1,
tvec2<V2> const & v2, tvec2<V2> const & v2,
tvec2<V3> const & v3); tvec2<V3> const & v3);
// Matrix conversions // Matrix conversions
template <typename U> template <typename U>
GLM_FUNC_DECL explicit tmat3x2(tmat3x2<U> const & m); GLM_FUNC_DECL explicit tmat3x2(tmat3x2<U> const & m);
GLM_FUNC_DECL explicit tmat3x2(tmat2x2<T> const & x); GLM_FUNC_DECL explicit tmat3x2(tmat2x2<T> const & x);
GLM_FUNC_DECL explicit tmat3x2(tmat3x3<T> const & x); GLM_FUNC_DECL explicit tmat3x2(tmat3x3<T> const & x);
GLM_FUNC_DECL explicit tmat3x2(tmat4x4<T> const & x); GLM_FUNC_DECL explicit tmat3x2(tmat4x4<T> const & x);
GLM_FUNC_DECL explicit tmat3x2(tmat2x3<T> const & x); GLM_FUNC_DECL explicit tmat3x2(tmat2x3<T> const & x);
GLM_FUNC_DECL explicit tmat3x2(tmat2x4<T> const & x); GLM_FUNC_DECL explicit tmat3x2(tmat2x4<T> const & x);
GLM_FUNC_DECL explicit tmat3x2(tmat3x4<T> const & x); GLM_FUNC_DECL explicit tmat3x2(tmat3x4<T> const & x);
GLM_FUNC_DECL explicit tmat3x2(tmat4x2<T> const & x); GLM_FUNC_DECL explicit tmat3x2(tmat4x2<T> const & x);
GLM_FUNC_DECL explicit tmat3x2(tmat4x3<T> const & x); GLM_FUNC_DECL explicit tmat3x2(tmat4x3<T> const & x);
// Accesses // Accesses
GLM_FUNC_DECL col_type & operator[](size_type i); GLM_FUNC_DECL col_type & operator[](size_type i);
GLM_FUNC_DECL col_type const & operator[](size_type i) const; GLM_FUNC_DECL col_type const & operator[](size_type i) const;
// Unary updatable operators // Unary updatable operators
GLM_FUNC_DECL tmat3x2<T> & operator= (tmat3x2<T> const & m); GLM_FUNC_DECL tmat3x2<T> & operator= (tmat3x2<T> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x2<T> & operator= (tmat3x2<U> const & m); GLM_FUNC_DECL tmat3x2<T> & operator= (tmat3x2<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x2<T> & operator+= (U const & s); GLM_FUNC_DECL tmat3x2<T> & operator+= (U const & s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x2<T> & operator+= (tmat3x2<U> const & m); GLM_FUNC_DECL tmat3x2<T> & operator+= (tmat3x2<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x2<T> & operator-= (U const & s); GLM_FUNC_DECL tmat3x2<T> & operator-= (U const & s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x2<T> & operator-= (tmat3x2<U> const & m); GLM_FUNC_DECL tmat3x2<T> & operator-= (tmat3x2<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x2<T> & operator*= (U const & s); GLM_FUNC_DECL tmat3x2<T> & operator*= (U const & s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x2<T> & operator*= (tmat3x2<U> const & m); GLM_FUNC_DECL tmat3x2<T> & operator*= (tmat3x2<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x2<T> & operator/= (U const & s); GLM_FUNC_DECL tmat3x2<T> & operator/= (U const & s);
GLM_FUNC_DECL tmat3x2<T> & operator++ (); GLM_FUNC_DECL tmat3x2<T> & operator++ ();
GLM_FUNC_DECL tmat3x2<T> & operator-- (); GLM_FUNC_DECL tmat3x2<T> & operator-- ();
}; };
// Binary operators // Binary operators
template <typename T> template <typename T>
tmat3x2<T> operator+ ( tmat3x2<T> operator+ (
tmat3x2<T> const & m, tmat3x2<T> const & m,
typename tmat3x2<T>::value_type const & s); typename tmat3x2<T>::value_type const & s);
template <typename T> template <typename T>
tmat3x2<T> operator+ ( tmat3x2<T> operator+ (
tmat3x2<T> const & m1, tmat3x2<T> const & m1,
tmat3x2<T> const & m2); tmat3x2<T> const & m2);
template <typename T> template <typename T>
tmat3x2<T> operator- ( tmat3x2<T> operator- (
tmat3x2<T> const & m, tmat3x2<T> const & m,
typename tmat3x2<T>::value_type const & s); typename tmat3x2<T>::value_type const & s);
template <typename T> template <typename T>
tmat3x2<T> operator- ( tmat3x2<T> operator- (
tmat3x2<T> const & m1, tmat3x2<T> const & m1,
tmat3x2<T> const & m2); tmat3x2<T> const & m2);
template <typename T> template <typename T>
tmat3x2<T> operator* ( tmat3x2<T> operator* (
tmat3x2<T> const & m, tmat3x2<T> const & m,
typename tmat3x2<T>::value_type const & s); typename tmat3x2<T>::value_type const & s);
template <typename T> template <typename T>
tmat3x2<T> operator* ( tmat3x2<T> operator* (
typename tmat3x2<T>::value_type const & s, typename tmat3x2<T>::value_type const & s,
tmat3x2<T> const & m); tmat3x2<T> const & m);
template <typename T> template <typename T>
typename tmat3x2<T>::col_type operator* ( typename tmat3x2<T>::col_type operator* (
tmat3x2<T> const & m, tmat3x2<T> const & m,
typename tmat3x2<T>::row_type const & v); typename tmat3x2<T>::row_type const & v);
template <typename T> template <typename T>
typename tmat3x2<T>::row_type operator* ( typename tmat3x2<T>::row_type operator* (
typename tmat3x2<T>::col_type const & v, typename tmat3x2<T>::col_type const & v,
tmat3x2<T> const & m); tmat3x2<T> const & m);
template <typename T> template <typename T>
tmat2x2<T> operator* ( tmat2x2<T> operator* (
tmat3x2<T> const & m1, tmat3x2<T> const & m1,
tmat2x3<T> const & m2); tmat2x3<T> const & m2);
template <typename T> template <typename T>
tmat3x2<T> operator/ ( tmat3x2<T> operator/ (
tmat3x2<T> const & m, tmat3x2<T> const & m,
typename tmat3x2<T>::value_type const & s); typename tmat3x2<T>::value_type const & s);
template <typename T> template <typename T>
tmat3x2<T> operator/ ( tmat3x2<T> operator/ (
typename tmat3x2<T>::value_type const & s, typename tmat3x2<T>::value_type const & s,
tmat3x2<T> const & m); tmat3x2<T> const & m);
// Unary constant operators // Unary constant operators
template <typename T> template <typename T>
tmat3x2<T> const operator- ( tmat3x2<T> const operator- (
tmat3x2<T> const & m); tmat3x2<T> const & m);
template <typename T> template <typename T>
tmat3x2<T> const operator-- ( tmat3x2<T> const operator-- (
tmat3x2<T> const & m, tmat3x2<T> const & m,
int); int);
template <typename T> template <typename T>
tmat3x2<T> const operator++ ( tmat3x2<T> const operator++ (
tmat3x2<T> const & m, tmat3x2<T> const & m,
int); int);
} //namespace detail } //namespace detail
namespace core{ namespace core{
namespace type{ namespace type{
namespace precision
namespace precision {
{ //! 3 columns of 2 components matrix of low precision floating-point numbers.
//! 3 columns of 2 components matrix of low precision floating-point numbers. //! There is no guarantee on the actual precision.
//! There is no guarantee on the actual precision. //! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers)
//! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers) typedef detail::tmat3x2<lowp_float> lowp_mat3x2;
typedef detail::tmat3x2<lowp_float> lowp_mat3x2; //! 3 columns of 2 components matrix of medium precision floating-point numbers.
//! 3 columns of 2 components matrix of medium precision floating-point numbers. //! There is no guarantee on the actual precision.
//! There is no guarantee on the actual precision. //! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers)
//! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers) typedef detail::tmat3x2<mediump_float> mediump_mat3x2;
typedef detail::tmat3x2<mediump_float> mediump_mat3x2; //! 3 columns of 2 components matrix of high precision floating-point numbers.
//! 3 columns of 2 components matrix of high precision floating-point numbers. //! There is no guarantee on the actual precision.
//! There is no guarantee on the actual precision. //! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers)
//! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers) typedef detail::tmat3x2<highp_float> highp_mat3x2;
typedef detail::tmat3x2<highp_float> highp_mat3x2; }//namespace precision
} }//namespace type
//namespace precision }//namespace core
}//namespace glm
}//namespace type
}//namespace core
} //namespace glm
#ifndef GLM_EXTERNAL_TEMPLATE #ifndef GLM_EXTERNAL_TEMPLATE
#include "type_mat3x2.inl" #include "type_mat3x2.inl"

View File

@ -12,277 +12,269 @@
#include "type_mat.hpp" #include "type_mat.hpp"
namespace glm namespace glm{
namespace detail
{ {
namespace test template <typename T> struct tvec1;
template <typename T> struct tvec2;
template <typename T> struct tvec3;
template <typename T> struct tvec4;
template <typename T> struct tmat2x2;
template <typename T> struct tmat2x3;
template <typename T> struct tmat2x4;
template <typename T> struct tmat3x2;
template <typename T> struct tmat3x3;
template <typename T> struct tmat3x4;
template <typename T> struct tmat4x2;
template <typename T> struct tmat4x3;
template <typename T> struct tmat4x4;
//! \brief Template for 3 * 3 matrix of floating-point numbers.
//! \ingroup core_template
template <typename T>
struct tmat3x3
{ {
void main_mat3x3(); enum ctor{null};
}//namespace test typedef T value_type;
typedef std::size_t size_type;
typedef tvec3<T> col_type;
typedef tvec3<T> row_type;
static GLM_FUNC_DECL size_type col_size();
static GLM_FUNC_DECL size_type row_size();
namespace detail typedef tmat3x3<T> type;
{ typedef tmat3x3<T> transpose_type;
template <typename T> struct tvec1;
template <typename T> struct tvec2;
template <typename T> struct tvec3;
template <typename T> struct tvec4;
template <typename T> struct tmat2x2;
template <typename T> struct tmat2x3;
template <typename T> struct tmat2x4;
template <typename T> struct tmat3x2;
template <typename T> struct tmat3x3;
template <typename T> struct tmat3x4;
template <typename T> struct tmat4x2;
template <typename T> struct tmat4x3;
template <typename T> struct tmat4x4;
//! \brief Template for 3 * 3 matrix of floating-point numbers. public:
//! \ingroup core_template // Implementation detail
template <typename T> GLM_FUNC_DECL tmat3x3<T> _inverse() const;
struct tmat3x3
{
enum ctor{null};
typedef T value_type;
typedef std::size_t size_type;
typedef tvec3<T> col_type;
typedef tvec3<T> row_type;
static GLM_FUNC_DECL size_type col_size();
static GLM_FUNC_DECL size_type row_size();
typedef tmat3x3<T> type; private:
typedef tmat3x3<T> transpose_type; // Data
col_type value[3];
public: public:
// Implementation detail // Constructors
GLM_FUNC_DECL tmat3x3<T> _inverse() const; GLM_FUNC_DECL tmat3x3();
GLM_FUNC_DECL tmat3x3(tmat3x3 const & m);
private: GLM_FUNC_DECL explicit tmat3x3(
// Data ctor Null);
col_type value[3]; GLM_FUNC_DECL explicit tmat3x3(
value_type const & s);
GLM_FUNC_DECL explicit tmat3x3(
value_type const & x0, value_type const & y0, value_type const & z0,
value_type const & x1, value_type const & y1, value_type const & z1,
value_type const & x2, value_type const & y2, value_type const & z2);
GLM_FUNC_DECL explicit tmat3x3(
col_type const & v0,
col_type const & v1,
col_type const & v2);
public: //////////////////////////////////////
// Constructors // Conversions
GLM_FUNC_DECL tmat3x3(); template <typename U>
GLM_FUNC_DECL tmat3x3(tmat3x3 const & m); GLM_FUNC_DECL explicit tmat3x3(
U const & x);
GLM_FUNC_DECL explicit tmat3x3(
ctor Null);
GLM_FUNC_DECL explicit tmat3x3(
value_type const & s);
GLM_FUNC_DECL explicit tmat3x3(
value_type const & x0, value_type const & y0, value_type const & z0,
value_type const & x1, value_type const & y1, value_type const & z1,
value_type const & x2, value_type const & y2, value_type const & z2);
GLM_FUNC_DECL explicit tmat3x3(
col_type const & v0,
col_type const & v1,
col_type const & v2);
//////////////////////////////////////
// Conversions
template <typename U>
GLM_FUNC_DECL explicit tmat3x3(
U const & x);
template template
< <
typename X1, typename Y1, typename Z1, typename X1, typename Y1, typename Z1,
typename X2, typename Y2, typename Z2, typename X2, typename Y2, typename Z2,
typename X3, typename Y3, typename Z3 typename X3, typename Y3, typename Z3
> >
GLM_FUNC_DECL explicit tmat3x3( GLM_FUNC_DECL explicit tmat3x3(
X1 const & x1, Y1 const & y1, Z1 const & z1, X1 const & x1, Y1 const & y1, Z1 const & z1,
X2 const & x2, Y2 const & y2, Z2 const & z2, X2 const & x2, Y2 const & y2, Z2 const & z2,
X3 const & x3, Y3 const & y3, Z3 const & z3); X3 const & x3, Y3 const & y3, Z3 const & z3);
template <typename V1, typename V2, typename V3> template <typename V1, typename V2, typename V3>
GLM_FUNC_DECL explicit tmat3x3( GLM_FUNC_DECL explicit tmat3x3(
tvec3<V1> const & v1, tvec3<V1> const & v1,
tvec3<V2> const & v2, tvec3<V2> const & v2,
tvec3<V3> const & v3); tvec3<V3> const & v3);
// Matrix conversions // Matrix conversions
template <typename U> template <typename U>
GLM_FUNC_DECL explicit tmat3x3(tmat3x3<U> const & m); GLM_FUNC_DECL explicit tmat3x3(tmat3x3<U> const & m);
GLM_FUNC_DECL explicit tmat3x3(tmat2x2<T> const & x); GLM_FUNC_DECL explicit tmat3x3(tmat2x2<T> const & x);
GLM_FUNC_DECL explicit tmat3x3(tmat4x4<T> const & x); GLM_FUNC_DECL explicit tmat3x3(tmat4x4<T> const & x);
GLM_FUNC_DECL explicit tmat3x3(tmat2x3<T> const & x); GLM_FUNC_DECL explicit tmat3x3(tmat2x3<T> const & x);
GLM_FUNC_DECL explicit tmat3x3(tmat3x2<T> const & x); GLM_FUNC_DECL explicit tmat3x3(tmat3x2<T> const & x);
GLM_FUNC_DECL explicit tmat3x3(tmat2x4<T> const & x); GLM_FUNC_DECL explicit tmat3x3(tmat2x4<T> const & x);
GLM_FUNC_DECL explicit tmat3x3(tmat4x2<T> const & x); GLM_FUNC_DECL explicit tmat3x3(tmat4x2<T> const & x);
GLM_FUNC_DECL explicit tmat3x3(tmat3x4<T> const & x); GLM_FUNC_DECL explicit tmat3x3(tmat3x4<T> const & x);
GLM_FUNC_DECL explicit tmat3x3(tmat4x3<T> const & x); GLM_FUNC_DECL explicit tmat3x3(tmat4x3<T> const & x);
// Accesses // Accesses
GLM_FUNC_DECL col_type & operator[](size_type i); GLM_FUNC_DECL col_type & operator[](size_type i);
GLM_FUNC_DECL col_type const & operator[](size_type i) const; GLM_FUNC_DECL col_type const & operator[](size_type i) const;
// Unary updatable operators // Unary updatable operators
GLM_FUNC_DECL tmat3x3<T>& operator= (tmat3x3<T> const & m); GLM_FUNC_DECL tmat3x3<T>& operator= (tmat3x3<T> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x3<T>& operator= (tmat3x3<U> const & m); GLM_FUNC_DECL tmat3x3<T>& operator= (tmat3x3<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x3<T>& operator+= (U const & s); GLM_FUNC_DECL tmat3x3<T>& operator+= (U const & s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x3<T>& operator+= (tmat3x3<U> const & m); GLM_FUNC_DECL tmat3x3<T>& operator+= (tmat3x3<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x3<T>& operator-= (U const & s); GLM_FUNC_DECL tmat3x3<T>& operator-= (U const & s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x3<T>& operator-= (tmat3x3<U> const & m); GLM_FUNC_DECL tmat3x3<T>& operator-= (tmat3x3<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x3<T>& operator*= (U const & s); GLM_FUNC_DECL tmat3x3<T>& operator*= (U const & s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x3<T>& operator*= (tmat3x3<U> const & m); GLM_FUNC_DECL tmat3x3<T>& operator*= (tmat3x3<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x3<T>& operator/= (U const & s); GLM_FUNC_DECL tmat3x3<T>& operator/= (U const & s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x3<T>& operator/= (tmat3x3<U> const & m); GLM_FUNC_DECL tmat3x3<T>& operator/= (tmat3x3<U> const & m);
GLM_FUNC_DECL tmat3x3<T>& operator++ (); GLM_FUNC_DECL tmat3x3<T>& operator++ ();
GLM_FUNC_DECL tmat3x3<T>& operator-- (); GLM_FUNC_DECL tmat3x3<T>& operator-- ();
}; };
// Binary operators // Binary operators
template <typename T> template <typename T>
tmat3x3<T> operator+ ( tmat3x3<T> operator+ (
tmat3x3<T> const & m, tmat3x3<T> const & m,
typename tmat3x3<T>::value_type const & s); typename tmat3x3<T>::value_type const & s);
template <typename T> template <typename T>
tmat3x3<T> operator+ ( tmat3x3<T> operator+ (
typename tmat3x3<T>::value_type const & s, typename tmat3x3<T>::value_type const & s,
tmat3x3<T> const & m); tmat3x3<T> const & m);
template <typename T> template <typename T>
tmat3x3<T> operator+ ( tmat3x3<T> operator+ (
tmat3x3<T> const & m1, tmat3x3<T> const & m1,
tmat3x3<T> const & m2); tmat3x3<T> const & m2);
template <typename T> template <typename T>
tmat3x3<T> operator- ( tmat3x3<T> operator- (
tmat3x3<T> const & m, tmat3x3<T> const & m,
typename tmat3x3<T>::value_type const & s); typename tmat3x3<T>::value_type const & s);
template <typename T> template <typename T>
tmat3x3<T> operator- ( tmat3x3<T> operator- (
typename tmat3x3<T>::value_type const & s, typename tmat3x3<T>::value_type const & s,
tmat3x3<T> const & m); tmat3x3<T> const & m);
template <typename T> template <typename T>
tmat3x3<T> operator- ( tmat3x3<T> operator- (
tmat3x3<T> const & m1, tmat3x3<T> const & m1,
tmat3x3<T> const & m2); tmat3x3<T> const & m2);
template <typename T> template <typename T>
tmat3x3<T> operator* ( tmat3x3<T> operator* (
tmat3x3<T> const & m, tmat3x3<T> const & m,
typename tmat3x3<T>::value_type const & s); typename tmat3x3<T>::value_type const & s);
template <typename T> template <typename T>
tmat3x3<T> operator* ( tmat3x3<T> operator* (
typename tmat3x3<T>::value_type const & s, typename tmat3x3<T>::value_type const & s,
tmat3x3<T> const & m); tmat3x3<T> const & m);
template <typename T> template <typename T>
typename tmat3x3<T>::col_type operator* ( typename tmat3x3<T>::col_type operator* (
tmat3x3<T> const & m, tmat3x3<T> const & m,
typename tmat3x3<T>::row_type const & v); typename tmat3x3<T>::row_type const & v);
template <typename T> template <typename T>
typename tmat3x3<T>::row_type operator* ( typename tmat3x3<T>::row_type operator* (
typename tmat3x3<T>::col_type const & v, typename tmat3x3<T>::col_type const & v,
tmat3x3<T> const & m); tmat3x3<T> const & m);
template <typename T> template <typename T>
tmat3x3<T> operator* ( tmat3x3<T> operator* (
tmat3x3<T> const & m1, tmat3x3<T> const & m1,
tmat3x3<T> const & m2); tmat3x3<T> const & m2);
template <typename T> template <typename T>
tmat3x3<T> operator/ ( tmat3x3<T> operator/ (
tmat3x3<T> const & m, tmat3x3<T> const & m,
typename tmat3x3<T>::value_type const & s); typename tmat3x3<T>::value_type const & s);
template <typename T> template <typename T>
tmat3x3<T> operator/ ( tmat3x3<T> operator/ (
typename tmat3x3<T>::value_type const & s, typename tmat3x3<T>::value_type const & s,
tmat3x3<T> const & m); tmat3x3<T> const & m);
template <typename T> template <typename T>
typename tmat3x3<T>::col_type operator/ ( typename tmat3x3<T>::col_type operator/ (
tmat3x3<T> const & m, tmat3x3<T> const & m,
typename tmat3x3<T>::row_type const & v); typename tmat3x3<T>::row_type const & v);
template <typename T> template <typename T>
typename tmat3x3<T>::row_type operator/ ( typename tmat3x3<T>::row_type operator/ (
typename tmat3x3<T>::col_type const & v, typename tmat3x3<T>::col_type const & v,
tmat3x3<T> const & m); tmat3x3<T> const & m);
template <typename T> template <typename T>
tmat3x3<T> operator/ ( tmat3x3<T> operator/ (
tmat3x3<T> const & m1, tmat3x3<T> const & m1,
tmat3x3<T> const & m2); tmat3x3<T> const & m2);
// Unary constant operators // Unary constant operators
template <typename T> template <typename T>
tmat3x3<T> const operator- ( tmat3x3<T> const operator- (
tmat3x3<T> const & m); tmat3x3<T> const & m);
template <typename T> template <typename T>
tmat3x3<T> const operator-- ( tmat3x3<T> const operator-- (
tmat3x3<T> const & m, tmat3x3<T> const & m,
int); int);
template <typename T> template <typename T>
tmat3x3<T> const operator++ ( tmat3x3<T> const operator++ (
tmat3x3<T> const & m, tmat3x3<T> const & m,
int); int);
} //namespace detail } //namespace detail
namespace core{ namespace core{
namespace type{ namespace type{
namespace precision
{
//! 3 columns of 3 components matrix of low precision floating-point numbers.
//! There is no guarantee on the actual precision.
//! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers
//! \ingroup core_precision
typedef detail::tmat3x3<lowp_float> lowp_mat3;
//! 3 columns of 3 components matrix of medium precision floating-point numbers.
//! There is no guarantee on the actual precision.
//! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers
//! \ingroup core_precision
typedef detail::tmat3x3<mediump_float> mediump_mat3;
//! 3 columns of 3 components matrix of high precision floating-point numbers.
//! There is no guarantee on the actual precision.
//! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers
//! \ingroup core_precision
typedef detail::tmat3x3<highp_float> highp_mat3;
namespace precision //! 3 columns of 3 components matrix of low precision floating-point numbers.
{ //! There is no guarantee on the actual precision.
//! 3 columns of 3 components matrix of low precision floating-point numbers. //! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers
//! There is no guarantee on the actual precision. //! \ingroup core_precision
//! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers typedef detail::tmat3x3<lowp_float> lowp_mat3x3;
//! \ingroup core_precision
typedef detail::tmat3x3<lowp_float> lowp_mat3;
//! 3 columns of 3 components matrix of medium precision floating-point numbers.
//! There is no guarantee on the actual precision.
//! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers
//! \ingroup core_precision
typedef detail::tmat3x3<mediump_float> mediump_mat3;
//! 3 columns of 3 components matrix of high precision floating-point numbers.
//! There is no guarantee on the actual precision.
//! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers
//! \ingroup core_precision
typedef detail::tmat3x3<highp_float> highp_mat3;
//! 3 columns of 3 components matrix of low precision floating-point numbers. //! 3 columns of 3 components matrix of medium precision floating-point numbers.
//! There is no guarantee on the actual precision. //! There is no guarantee on the actual precision.
//! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers //! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers
//! \ingroup core_precision //! \ingroup core_precision
typedef detail::tmat3x3<lowp_float> lowp_mat3x3; typedef detail::tmat3x3<mediump_float> mediump_mat3x3;
//! 3 columns of 3 components matrix of medium precision floating-point numbers. //! 3 columns of 3 components matrix of high precision floating-point numbers.
//! There is no guarantee on the actual precision. //! There is no guarantee on the actual precision.
//! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers //! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers
//! \ingroup core_precision //! \ingroup core_precision
typedef detail::tmat3x3<mediump_float> mediump_mat3x3; typedef detail::tmat3x3<highp_float> highp_mat3x3;
//! 3 columns of 3 components matrix of high precision floating-point numbers. }//namespace precision
//! There is no guarantee on the actual precision. }//namespace type
//! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers }//namespace core
//! \ingroup core_precision }//namespace glm
typedef detail::tmat3x3<highp_float> highp_mat3x3;
}
//namespace precision
}//namespace type
}//namespace core
} //namespace glm
#ifndef GLM_EXTERNAL_TEMPLATE #ifndef GLM_EXTERNAL_TEMPLATE
#include "type_mat3x3.inl" #include "type_mat3x3.inl"

View File

@ -12,226 +12,218 @@
#include "type_mat.hpp" #include "type_mat.hpp"
namespace glm namespace glm{
namespace detail
{ {
namespace test template <typename T> struct tvec1;
template <typename T> struct tvec2;
template <typename T> struct tvec3;
template <typename T> struct tvec4;
template <typename T> struct tmat2x2;
template <typename T> struct tmat2x3;
template <typename T> struct tmat2x4;
template <typename T> struct tmat3x2;
template <typename T> struct tmat3x3;
template <typename T> struct tmat3x4;
template <typename T> struct tmat4x2;
template <typename T> struct tmat4x3;
template <typename T> struct tmat4x4;
//! \brief Template for 3 columns and 4 rows matrix of floating-point numbers.
//! \ingroup core_template
template <typename T>
struct tmat3x4
{ {
void main_mat3x4(); enum ctor{null};
}//namespace test typedef T value_type;
typedef std::size_t size_type;
typedef tvec4<T> col_type;
typedef tvec3<T> row_type;
static GLM_FUNC_DECL size_type col_size();
static GLM_FUNC_DECL size_type row_size();
namespace detail typedef tmat3x4<T> type;
{ typedef tmat4x3<T> transpose_type;
template <typename T> struct tvec1;
template <typename T> struct tvec2;
template <typename T> struct tvec3;
template <typename T> struct tvec4;
template <typename T> struct tmat2x2;
template <typename T> struct tmat2x3;
template <typename T> struct tmat2x4;
template <typename T> struct tmat3x2;
template <typename T> struct tmat3x3;
template <typename T> struct tmat3x4;
template <typename T> struct tmat4x2;
template <typename T> struct tmat4x3;
template <typename T> struct tmat4x4;
//! \brief Template for 3 columns and 4 rows matrix of floating-point numbers. private:
//! \ingroup core_template // Data
template <typename T> col_type value[3];
struct tmat3x4
{
enum ctor{null};
typedef T value_type;
typedef std::size_t size_type;
typedef tvec4<T> col_type;
typedef tvec3<T> row_type;
static GLM_FUNC_DECL size_type col_size();
static GLM_FUNC_DECL size_type row_size();
typedef tmat3x4<T> type; public:
typedef tmat4x3<T> transpose_type; // Constructors
GLM_FUNC_DECL tmat3x4();
GLM_FUNC_DECL tmat3x4(tmat3x4 const & m);
private: GLM_FUNC_DECL explicit tmat3x4(
// Data ctor Null);
col_type value[3]; GLM_FUNC_DECL explicit tmat3x4(
value_type const & s);
GLM_FUNC_DECL explicit tmat3x4(
value_type const & x0, value_type const & y0, value_type const & z0, value_type const & w0,
value_type const & x1, value_type const & y1, value_type const & z1, value_type const & w1,
value_type const & x2, value_type const & y2, value_type const & z2, value_type const & w2);
GLM_FUNC_DECL explicit tmat3x4(
col_type const & v0,
col_type const & v1,
col_type const & v2);
public: //////////////////////////////////////
// Constructors // Conversions
GLM_FUNC_DECL tmat3x4(); template <typename U>
GLM_FUNC_DECL tmat3x4(tmat3x4 const & m); GLM_FUNC_DECL explicit tmat3x4(
U const & x);
GLM_FUNC_DECL explicit tmat3x4(
ctor Null);
GLM_FUNC_DECL explicit tmat3x4(
value_type const & s);
GLM_FUNC_DECL explicit tmat3x4(
value_type const & x0, value_type const & y0, value_type const & z0, value_type const & w0,
value_type const & x1, value_type const & y1, value_type const & z1, value_type const & w1,
value_type const & x2, value_type const & y2, value_type const & z2, value_type const & w2);
GLM_FUNC_DECL explicit tmat3x4(
col_type const & v0,
col_type const & v1,
col_type const & v2);
//////////////////////////////////////
// Conversions
template <typename U>
GLM_FUNC_DECL explicit tmat3x4(
U const & x);
template template
< <
typename X1, typename Y1, typename Z1, typename W1, typename X1, typename Y1, typename Z1, typename W1,
typename X2, typename Y2, typename Z2, typename W2, typename X2, typename Y2, typename Z2, typename W2,
typename X3, typename Y3, typename Z3, typename W3 typename X3, typename Y3, typename Z3, typename W3
> >
GLM_FUNC_DECL explicit tmat3x4( GLM_FUNC_DECL explicit tmat3x4(
X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1, X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1,
X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2, X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2,
X3 const & x3, Y3 const & y3, Z3 const & z3, W3 const & w3); X3 const & x3, Y3 const & y3, Z3 const & z3, W3 const & w3);
template <typename V1, typename V2, typename V3> template <typename V1, typename V2, typename V3>
GLM_FUNC_DECL explicit tmat3x4( GLM_FUNC_DECL explicit tmat3x4(
tvec4<V1> const & v1, tvec4<V1> const & v1,
tvec4<V2> const & v2, tvec4<V2> const & v2,
tvec4<V3> const & v3); tvec4<V3> const & v3);
// Matrix conversion // Matrix conversion
template <typename U> template <typename U>
GLM_FUNC_DECL explicit tmat3x4(tmat3x4<U> const & m); GLM_FUNC_DECL explicit tmat3x4(tmat3x4<U> const & m);
GLM_FUNC_DECL explicit tmat3x4(tmat2x2<T> const & x); GLM_FUNC_DECL explicit tmat3x4(tmat2x2<T> const & x);
GLM_FUNC_DECL explicit tmat3x4(tmat3x3<T> const & x); GLM_FUNC_DECL explicit tmat3x4(tmat3x3<T> const & x);
GLM_FUNC_DECL explicit tmat3x4(tmat4x4<T> const & x); GLM_FUNC_DECL explicit tmat3x4(tmat4x4<T> const & x);
GLM_FUNC_DECL explicit tmat3x4(tmat2x3<T> const & x); GLM_FUNC_DECL explicit tmat3x4(tmat2x3<T> const & x);
GLM_FUNC_DECL explicit tmat3x4(tmat3x2<T> const & x); GLM_FUNC_DECL explicit tmat3x4(tmat3x2<T> const & x);
GLM_FUNC_DECL explicit tmat3x4(tmat2x4<T> const & x); GLM_FUNC_DECL explicit tmat3x4(tmat2x4<T> const & x);
GLM_FUNC_DECL explicit tmat3x4(tmat4x2<T> const & x); GLM_FUNC_DECL explicit tmat3x4(tmat4x2<T> const & x);
GLM_FUNC_DECL explicit tmat3x4(tmat4x3<T> const & x); GLM_FUNC_DECL explicit tmat3x4(tmat4x3<T> const & x);
// Accesses // Accesses
col_type & operator[](size_type i); col_type & operator[](size_type i);
col_type const & operator[](size_type i) const; col_type const & operator[](size_type i) const;
// Unary updatable operators // Unary updatable operators
GLM_FUNC_DECL tmat3x4<T> & operator= (tmat3x4<T> const & m); GLM_FUNC_DECL tmat3x4<T> & operator= (tmat3x4<T> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x4<T> & operator= (tmat3x4<U> const & m); GLM_FUNC_DECL tmat3x4<T> & operator= (tmat3x4<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x4<T> & operator+= (U const & s); GLM_FUNC_DECL tmat3x4<T> & operator+= (U const & s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x4<T> & operator+= (tmat3x4<U> const & m); GLM_FUNC_DECL tmat3x4<T> & operator+= (tmat3x4<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x4<T> & operator-= (U const & s); GLM_FUNC_DECL tmat3x4<T> & operator-= (U const & s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x4<T> & operator-= (tmat3x4<U> const & m); GLM_FUNC_DECL tmat3x4<T> & operator-= (tmat3x4<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x4<T> & operator*= (U const & s); GLM_FUNC_DECL tmat3x4<T> & operator*= (U const & s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x4<T> & operator*= (tmat3x4<U> const & m); GLM_FUNC_DECL tmat3x4<T> & operator*= (tmat3x4<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x4<T> & operator/= (U const & s); GLM_FUNC_DECL tmat3x4<T> & operator/= (U const & s);
GLM_FUNC_DECL tmat3x4<T> & operator++ (); GLM_FUNC_DECL tmat3x4<T> & operator++ ();
GLM_FUNC_DECL tmat3x4<T> & operator-- (); GLM_FUNC_DECL tmat3x4<T> & operator-- ();
}; };
// Binary operators // Binary operators
template <typename T> template <typename T>
tmat3x4<T> operator+ ( tmat3x4<T> operator+ (
tmat3x4<T> const & m, tmat3x4<T> const & m,
typename tmat3x4<T>::value_type const & s); typename tmat3x4<T>::value_type const & s);
template <typename T> template <typename T>
tmat3x4<T> operator+ ( tmat3x4<T> operator+ (
tmat3x4<T> const & m1, tmat3x4<T> const & m1,
tmat3x4<T> const & m2); tmat3x4<T> const & m2);
template <typename T> template <typename T>
tmat3x4<T> operator- ( tmat3x4<T> operator- (
tmat3x4<T> const & m, tmat3x4<T> const & m,
typename tmat3x4<T>::value_type const & s); typename tmat3x4<T>::value_type const & s);
template <typename T> template <typename T>
tmat3x4<T> operator- ( tmat3x4<T> operator- (
tmat3x4<T> const & m1, tmat3x4<T> const & m1,
tmat3x4<T> const & m2); tmat3x4<T> const & m2);
template <typename T> template <typename T>
tmat3x4<T> operator* ( tmat3x4<T> operator* (
tmat3x4<T> const & m, tmat3x4<T> const & m,
typename tmat3x4<T>::value_type const & s); typename tmat3x4<T>::value_type const & s);
template <typename T> template <typename T>
tmat3x4<T> operator* ( tmat3x4<T> operator* (
typename tmat3x4<T>::value_type const & s, typename tmat3x4<T>::value_type const & s,
tmat3x4<T> const & m); tmat3x4<T> const & m);
template <typename T> template <typename T>
typename tmat3x4<T>::col_type operator* ( typename tmat3x4<T>::col_type operator* (
tmat3x4<T> const & m, tmat3x4<T> const & m,
typename tmat3x4<T>::row_type const & v); typename tmat3x4<T>::row_type const & v);
template <typename T> template <typename T>
typename tmat3x4<T>::row_type operator* ( typename tmat3x4<T>::row_type operator* (
typename tmat3x4<T>::col_type const & v, typename tmat3x4<T>::col_type const & v,
tmat3x4<T> const & m); tmat3x4<T> const & m);
template <typename T> template <typename T>
tmat4x4<T> operator* ( tmat4x4<T> operator* (
tmat3x4<T> const & m1, tmat3x4<T> const & m1,
tmat4x3<T> const & m2); tmat4x3<T> const & m2);
template <typename T> template <typename T>
tmat3x4<T> operator/ ( tmat3x4<T> operator/ (
tmat3x4<T> const & m, tmat3x4<T> const & m,
typename tmat3x4<T>::value_type const & s); typename tmat3x4<T>::value_type const & s);
template <typename T> template <typename T>
tmat3x4<T> operator/ ( tmat3x4<T> operator/ (
typename tmat3x4<T>::value_type const & s, typename tmat3x4<T>::value_type const & s,
tmat3x4<T> const & m); tmat3x4<T> const & m);
// Unary constant operators // Unary constant operators
template <typename T> template <typename T>
tmat3x4<T> const operator- ( tmat3x4<T> const operator- (
tmat3x4<T> const & m); tmat3x4<T> const & m);
template <typename T> template <typename T>
tmat3x4<T> const operator-- ( tmat3x4<T> const operator-- (
tmat3x4<T> const & m, tmat3x4<T> const & m,
int); int);
template <typename T> template <typename T>
tmat3x4<T> const operator++ ( tmat3x4<T> const operator++ (
tmat3x4<T> const & m, tmat3x4<T> const & m,
int); int);
} //namespace detail }//namespace detail
namespace core{ namespace core{
namespace type{ namespace type{
namespace precision
{
//! 3 columns of 4 components matrix of low precision floating-point numbers.
//! There is no guarantee on the actual precision.
//! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers)
typedef detail::tmat3x4<lowp_float> lowp_mat3x4;
//! 3 columns of 4 components matrix of medium precision floating-point numbers.
//! There is no guarantee on the actual precision.
//! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers)
typedef detail::tmat3x4<mediump_float> mediump_mat3x4;
//! 3 columns of 4 components matrix of high precision floating-point numbers.
//! There is no guarantee on the actual precision.
//! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers)
typedef detail::tmat3x4<highp_float> highp_mat3x4;
namespace precision }//namespace precision
{ }//namespace type
//! 3 columns of 4 components matrix of low precision floating-point numbers. }//namespace core
//! There is no guarantee on the actual precision. }//namespace glm
//! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers)
typedef detail::tmat3x4<lowp_float> lowp_mat3x4;
//! 3 columns of 4 components matrix of medium precision floating-point numbers.
//! There is no guarantee on the actual precision.
//! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers)
typedef detail::tmat3x4<mediump_float> mediump_mat3x4;
//! 3 columns of 4 components matrix of high precision floating-point numbers.
//! There is no guarantee on the actual precision.
//! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers)
typedef detail::tmat3x4<highp_float> highp_mat3x4;
}
//namespace precision
}//namespace type
}//namespace core
} //namespace glm
#ifndef GLM_EXTERNAL_TEMPLATE #ifndef GLM_EXTERNAL_TEMPLATE
#include "type_mat3x4.inl" #include "type_mat3x4.inl"

View File

@ -12,234 +12,228 @@
#include "type_mat.hpp" #include "type_mat.hpp"
namespace glm namespace glm{
namespace detail
{ {
namespace test template <typename T> struct tvec1;
template <typename T> struct tvec2;
template <typename T> struct tvec3;
template <typename T> struct tvec4;
template <typename T> struct tmat2x2;
template <typename T> struct tmat2x3;
template <typename T> struct tmat2x4;
template <typename T> struct tmat3x2;
template <typename T> struct tmat3x3;
template <typename T> struct tmat3x4;
template <typename T> struct tmat4x2;
template <typename T> struct tmat4x3;
template <typename T> struct tmat4x4;
//! \brief Template for 4 columns and 2 rows matrix of floating-point numbers.
//! \ingroup core_template
template <typename T>
struct tmat4x2
{ {
void main_mat4x2(); enum ctor{null};
}//namespace test typedef T value_type;
typedef std::size_t size_type;
typedef tvec2<T> col_type;
typedef tvec4<T> row_type;
static GLM_FUNC_DECL size_type col_size();
static GLM_FUNC_DECL size_type row_size();
namespace detail typedef tmat4x2<T> type;
{ typedef tmat2x4<T> transpose_type;
template <typename T> struct tvec1;
template <typename T> struct tvec2;
template <typename T> struct tvec3;
template <typename T> struct tvec4;
template <typename T> struct tmat2x2;
template <typename T> struct tmat2x3;
template <typename T> struct tmat2x4;
template <typename T> struct tmat3x2;
template <typename T> struct tmat3x3;
template <typename T> struct tmat3x4;
template <typename T> struct tmat4x2;
template <typename T> struct tmat4x3;
template <typename T> struct tmat4x4;
//! \brief Template for 4 columns and 2 rows matrix of floating-point numbers. private:
//! \ingroup core_template // Data
template <typename T> col_type value[4];
struct tmat4x2
{
enum ctor{null};
typedef T value_type;
typedef std::size_t size_type;
typedef tvec2<T> col_type;
typedef tvec4<T> row_type;
static GLM_FUNC_DECL size_type col_size();
static GLM_FUNC_DECL size_type row_size();
typedef tmat4x2<T> type; public:
typedef tmat2x4<T> transpose_type; // Constructors
GLM_FUNC_DECL tmat4x2();
GLM_FUNC_DECL tmat4x2(tmat4x2 const & m);
private: GLM_FUNC_DECL explicit tmat4x2(
// Data ctor Null);
col_type value[4]; GLM_FUNC_DECL explicit tmat4x2(
value_type const & x);
public: GLM_FUNC_DECL explicit tmat4x2(
// Constructors value_type const & x0, value_type const & y0,
GLM_FUNC_DECL tmat4x2(); value_type const & x1, value_type const & y1,
GLM_FUNC_DECL tmat4x2(tmat4x2 const & m); value_type const & x2, value_type const & y2,
value_type const & x3, value_type const & y3);
GLM_FUNC_DECL explicit tmat4x2( GLM_FUNC_DECL explicit tmat4x2(
ctor Null); col_type const & v0,
GLM_FUNC_DECL explicit tmat4x2( col_type const & v1,
value_type const & x); col_type const & v2,
GLM_FUNC_DECL explicit tmat4x2( col_type const & v3);
value_type const & x0, value_type const & y0,
value_type const & x1, value_type const & y1,
value_type const & x2, value_type const & y2,
value_type const & x3, value_type const & y3);
GLM_FUNC_DECL explicit tmat4x2(
col_type const & v0,
col_type const & v1,
col_type const & v2,
col_type const & v3);
////////////////////////////////////// //////////////////////////////////////
// Conversions // Conversions
template <typename U> template <typename U>
GLM_FUNC_DECL explicit tmat4x2( GLM_FUNC_DECL explicit tmat4x2(
U const & x); U const & x);
template template
< <
typename X1, typename Y1, typename X1, typename Y1,
typename X2, typename Y2, typename X2, typename Y2,
typename X3, typename Y3, typename X3, typename Y3,
typename X4, typename Y4 typename X4, typename Y4
> >
GLM_FUNC_DECL explicit tmat4x2( GLM_FUNC_DECL explicit tmat4x2(
X1 const & x1, Y1 const & y1, X1 const & x1, Y1 const & y1,
X2 const & x2, Y2 const & y2, X2 const & x2, Y2 const & y2,
X3 const & x3, Y3 const & y3, X3 const & x3, Y3 const & y3,
X4 const & x4, Y4 const & y4); X4 const & x4, Y4 const & y4);
template <typename V1, typename V2, typename V3, typename V4> template <typename V1, typename V2, typename V3, typename V4>
GLM_FUNC_DECL explicit tmat4x2( GLM_FUNC_DECL explicit tmat4x2(
tvec2<V1> const & v1, tvec2<V1> const & v1,
tvec2<V2> const & v2, tvec2<V2> const & v2,
tvec2<V3> const & v3, tvec2<V3> const & v3,
tvec2<V4> const & v4); tvec2<V4> const & v4);
// Matrix conversions // Matrix conversions
template <typename U> template <typename U>
GLM_FUNC_DECL explicit tmat4x2(tmat4x2<U> const & m); GLM_FUNC_DECL explicit tmat4x2(tmat4x2<U> const & m);
GLM_FUNC_DECL explicit tmat4x2(tmat2x2<T> const & x); GLM_FUNC_DECL explicit tmat4x2(tmat2x2<T> const & x);
GLM_FUNC_DECL explicit tmat4x2(tmat3x3<T> const & x); GLM_FUNC_DECL explicit tmat4x2(tmat3x3<T> const & x);
GLM_FUNC_DECL explicit tmat4x2(tmat4x4<T> const & x); GLM_FUNC_DECL explicit tmat4x2(tmat4x4<T> const & x);
GLM_FUNC_DECL explicit tmat4x2(tmat2x3<T> const & x); GLM_FUNC_DECL explicit tmat4x2(tmat2x3<T> const & x);
GLM_FUNC_DECL explicit tmat4x2(tmat3x2<T> const & x); GLM_FUNC_DECL explicit tmat4x2(tmat3x2<T> const & x);
GLM_FUNC_DECL explicit tmat4x2(tmat2x4<T> const & x); GLM_FUNC_DECL explicit tmat4x2(tmat2x4<T> const & x);
GLM_FUNC_DECL explicit tmat4x2(tmat4x3<T> const & x); GLM_FUNC_DECL explicit tmat4x2(tmat4x3<T> const & x);
GLM_FUNC_DECL explicit tmat4x2(tmat3x4<T> const & x); GLM_FUNC_DECL explicit tmat4x2(tmat3x4<T> const & x);
// Accesses // Accesses
GLM_FUNC_DECL col_type & operator[](size_type i); GLM_FUNC_DECL col_type & operator[](size_type i);
GLM_FUNC_DECL col_type const & operator[](size_type i) const; GLM_FUNC_DECL col_type const & operator[](size_type i) const;
// Unary updatable operators // Unary updatable operators
GLM_FUNC_DECL tmat4x2<T>& operator= (tmat4x2<T> const & m); GLM_FUNC_DECL tmat4x2<T>& operator= (tmat4x2<T> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x2<T>& operator= (tmat4x2<U> const & m); GLM_FUNC_DECL tmat4x2<T>& operator= (tmat4x2<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x2<T>& operator+= (U const & s); GLM_FUNC_DECL tmat4x2<T>& operator+= (U const & s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x2<T>& operator+= (tmat4x2<U> const & m); GLM_FUNC_DECL tmat4x2<T>& operator+= (tmat4x2<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x2<T>& operator-= (U const & s); GLM_FUNC_DECL tmat4x2<T>& operator-= (U const & s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x2<T>& operator-= (tmat4x2<U> const & m); GLM_FUNC_DECL tmat4x2<T>& operator-= (tmat4x2<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x2<T>& operator*= (U const & s); GLM_FUNC_DECL tmat4x2<T>& operator*= (U const & s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x2<T>& operator*= (tmat4x2<U> const & m); GLM_FUNC_DECL tmat4x2<T>& operator*= (tmat4x2<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x2<T>& operator/= (U const & s); GLM_FUNC_DECL tmat4x2<T>& operator/= (U const & s);
GLM_FUNC_DECL tmat4x2<T>& operator++ (); GLM_FUNC_DECL tmat4x2<T>& operator++ ();
GLM_FUNC_DECL tmat4x2<T>& operator-- (); GLM_FUNC_DECL tmat4x2<T>& operator-- ();
}; };
// Binary operators // Binary operators
template <typename T> template <typename T>
tmat4x2<T> operator+ ( tmat4x2<T> operator+ (
tmat4x2<T> const & m, tmat4x2<T> const & m,
typename tmat4x2<T>::value_type const & s); typename tmat4x2<T>::value_type const & s);
template <typename T> template <typename T>
tmat4x2<T> operator+ ( tmat4x2<T> operator+ (
tmat4x2<T> const & m1, tmat4x2<T> const & m1,
tmat4x2<T> const & m2); tmat4x2<T> const & m2);
template <typename T> template <typename T>
tmat4x2<T> operator- ( tmat4x2<T> operator- (
tmat4x2<T> const & m, tmat4x2<T> const & m,
typename tmat4x2<T>::value_type const & s); typename tmat4x2<T>::value_type const & s);
template <typename T> template <typename T>
tmat4x2<T> operator- ( tmat4x2<T> operator- (
tmat4x2<T> const & m1, tmat4x2<T> const & m1,
tmat4x2<T> const & m2); tmat4x2<T> const & m2);
template <typename T> template <typename T>
tmat4x2<T> operator* ( tmat4x2<T> operator* (
tmat4x2<T> const & m, tmat4x2<T> const & m,
typename tmat4x2<T>::value_type const & s); typename tmat4x2<T>::value_type const & s);
template <typename T> template <typename T>
tmat4x2<T> operator* ( tmat4x2<T> operator* (
typename tmat4x2<T>::value_type const & s, typename tmat4x2<T>::value_type const & s,
tmat4x2<T> const & m); tmat4x2<T> const & m);
template <typename T> template <typename T>
typename tmat4x2<T>::col_type operator* ( typename tmat4x2<T>::col_type operator* (
tmat4x2<T> const & m, tmat4x2<T> const & m,
typename tmat4x2<T>::row_type const & v); typename tmat4x2<T>::row_type const & v);
template <typename T> template <typename T>
typename tmat4x2<T>::row_type operator* ( typename tmat4x2<T>::row_type operator* (
typename tmat4x2<T>::col_type const & v, typename tmat4x2<T>::col_type const & v,
tmat4x2<T> const & m); tmat4x2<T> const & m);
template <typename T> template <typename T>
tmat2x2<T> operator* ( tmat2x2<T> operator* (
tmat4x2<T> const & m1, tmat4x2<T> const & m1,
tmat2x4<T> const & m2); tmat2x4<T> const & m2);
template <typename T> template <typename T>
tmat4x2<T> operator/ ( tmat4x2<T> operator/ (
tmat4x2<T> const & m, tmat4x2<T> const & m,
typename tmat4x2<T>::value_type const & s); typename tmat4x2<T>::value_type const & s);
template <typename T> template <typename T>
tmat4x2<T> operator/ ( tmat4x2<T> operator/ (
typename tmat4x2<T>::value_type const & s, typename tmat4x2<T>::value_type const & s,
tmat4x2<T> const & m); tmat4x2<T> const & m);
// Unary constant operators // Unary constant operators
template <typename T> template <typename T>
tmat4x2<T> const operator- ( tmat4x2<T> const operator- (
tmat4x2<T> const & m); tmat4x2<T> const & m);
template <typename T> template <typename T>
tmat4x2<T> const operator-- ( tmat4x2<T> const operator-- (
tmat4x2<T> const & m, tmat4x2<T> const & m,
int); int);
template <typename T> template <typename T>
tmat4x2<T> const operator++ ( tmat4x2<T> const operator++ (
tmat4x2<T> const & m, tmat4x2<T> const & m,
int); int);
} //namespace detail } //namespace detail
namespace core{ namespace core{
namespace type{ namespace type{
namespace precision
{
//! 4 columns of 2 components matrix of low precision floating-point numbers.
//! There is no guarantee on the actual precision.
//! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers)
//! \ingroup core_precision
typedef detail::tmat4x2<lowp_float> lowp_mat4x2;
namespace precision //! 4 columns of 2 components matrix of medium precision floating-point numbers.
{ //! There is no guarantee on the actual precision.
//! 4 columns of 2 components matrix of low precision floating-point numbers. //! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers)
//! There is no guarantee on the actual precision. //! \ingroup core_precision
//! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers) typedef detail::tmat4x2<mediump_float> mediump_mat4x2;
//! \ingroup core_precision
typedef detail::tmat4x2<lowp_float> lowp_mat4x2;
//! 4 columns of 2 components matrix of medium precision floating-point numbers.
//! There is no guarantee on the actual precision.
//! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers)
//! \ingroup core_precision
typedef detail::tmat4x2<mediump_float> mediump_mat4x2;
//! 4 columns of 2 components matrix of high precision floating-point numbers.
//! There is no guarantee on the actual precision.
//! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers)
//! \ingroup core_precision
typedef detail::tmat4x2<highp_float> highp_mat4x2;
}
//namespace precision
}//namespace type //! 4 columns of 2 components matrix of high precision floating-point numbers.
}//namespace core //! There is no guarantee on the actual precision.
} //namespace glm //! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers)
//! \ingroup core_precision
typedef detail::tmat4x2<highp_float> highp_mat4x2;
}//namespace precision
}//namespace type
}//namespace core
}//namespace glm
#ifndef GLM_EXTERNAL_TEMPLATE #ifndef GLM_EXTERNAL_TEMPLATE
#include "type_mat4x2.inl" #include "type_mat4x2.inl"

View File

@ -12,235 +12,229 @@
#include "type_mat.hpp" #include "type_mat.hpp"
namespace glm namespace glm{
namespace detail
{ {
namespace test template <typename T> struct tvec1;
template <typename T> struct tvec2;
template <typename T> struct tvec3;
template <typename T> struct tvec4;
template <typename T> struct tmat2x2;
template <typename T> struct tmat2x3;
template <typename T> struct tmat2x4;
template <typename T> struct tmat3x2;
template <typename T> struct tmat3x3;
template <typename T> struct tmat3x4;
template <typename T> struct tmat4x2;
template <typename T> struct tmat4x3;
template <typename T> struct tmat4x4;
//! \brief Template for 4 columns and 3 rows matrix of floating-point numbers.
//! \ingroup core_template
template <typename T>
struct tmat4x3
{ {
void main_mat4x3(); enum ctor{null};
}//namespace test typedef T value_type;
typedef std::size_t size_type;
typedef tvec3<T> col_type;
typedef tvec4<T> row_type;
static GLM_FUNC_DECL size_type col_size();
static GLM_FUNC_DECL size_type row_size();
namespace detail typedef tmat4x3<T> type;
{ typedef tmat3x4<T> transpose_type;
template <typename T> struct tvec1;
template <typename T> struct tvec2;
template <typename T> struct tvec3;
template <typename T> struct tvec4;
template <typename T> struct tmat2x2;
template <typename T> struct tmat2x3;
template <typename T> struct tmat2x4;
template <typename T> struct tmat3x2;
template <typename T> struct tmat3x3;
template <typename T> struct tmat3x4;
template <typename T> struct tmat4x2;
template <typename T> struct tmat4x3;
template <typename T> struct tmat4x4;
//! \brief Template for 4 columns and 3 rows matrix of floating-point numbers. private:
//! \ingroup core_template // Data
template <typename T> col_type value[4];
struct tmat4x3
{
enum ctor{null};
typedef T value_type;
typedef std::size_t size_type;
typedef tvec3<T> col_type;
typedef tvec4<T> row_type;
static GLM_FUNC_DECL size_type col_size();
static GLM_FUNC_DECL size_type row_size();
typedef tmat4x3<T> type; public:
typedef tmat3x4<T> transpose_type; // Constructors
GLM_FUNC_DECL tmat4x3();
GLM_FUNC_DECL tmat4x3(tmat4x3 const & m);
private: GLM_FUNC_DECL explicit tmat4x3(
// Data ctor Null);
col_type value[4]; GLM_FUNC_DECL explicit tmat4x3(
value_type const & x);
public: GLM_FUNC_DECL explicit tmat4x3(
// Constructors value_type const & x0, value_type const & y0, value_type const & z0,
GLM_FUNC_DECL tmat4x3(); value_type const & x1, value_type const & y1, value_type const & z1,
GLM_FUNC_DECL tmat4x3(tmat4x3 const & m); value_type const & x2, value_type const & y2, value_type const & z2,
value_type const & x3, value_type const & y3, value_type const & z3);
GLM_FUNC_DECL explicit tmat4x3( GLM_FUNC_DECL explicit tmat4x3(
ctor Null); col_type const & v0,
GLM_FUNC_DECL explicit tmat4x3( col_type const & v1,
value_type const & x); col_type const & v2,
GLM_FUNC_DECL explicit tmat4x3( col_type const & v3);
value_type const & x0, value_type const & y0, value_type const & z0,
value_type const & x1, value_type const & y1, value_type const & z1,
value_type const & x2, value_type const & y2, value_type const & z2,
value_type const & x3, value_type const & y3, value_type const & z3);
GLM_FUNC_DECL explicit tmat4x3(
col_type const & v0,
col_type const & v1,
col_type const & v2,
col_type const & v3);
////////////////////////////////////// //////////////////////////////////////
// Conversions // Conversions
template <typename U> template <typename U>
GLM_FUNC_DECL explicit tmat4x3( GLM_FUNC_DECL explicit tmat4x3(
U const & x); U const & x);
template < template <
typename X1, typename Y1, typename Z1, typename X1, typename Y1, typename Z1,
typename X2, typename Y2, typename Z2, typename X2, typename Y2, typename Z2,
typename X3, typename Y3, typename Z3, typename X3, typename Y3, typename Z3,
typename X4, typename Y4, typename Z4> typename X4, typename Y4, typename Z4>
GLM_FUNC_DECL explicit tmat4x3( GLM_FUNC_DECL explicit tmat4x3(
X1 const & x1, Y1 const & y1, Z1 const & z1, X1 const & x1, Y1 const & y1, Z1 const & z1,
X2 const & x2, Y2 const & y2, Z2 const & z2, X2 const & x2, Y2 const & y2, Z2 const & z2,
X3 const & x3, Y3 const & y3, Z3 const & z3, X3 const & x3, Y3 const & y3, Z3 const & z3,
X4 const & x4, Y4 const & y4, Z4 const & z4); X4 const & x4, Y4 const & y4, Z4 const & z4);
template <typename V1, typename V2, typename V3, typename V4> template <typename V1, typename V2, typename V3, typename V4>
GLM_FUNC_DECL explicit tmat4x3( GLM_FUNC_DECL explicit tmat4x3(
tvec3<V1> const & v1, tvec3<V1> const & v1,
tvec3<V2> const & v2, tvec3<V2> const & v2,
tvec3<V3> const & v3, tvec3<V3> const & v3,
tvec3<V4> const & v4); tvec3<V4> const & v4);
// Matrix conversions // Matrix conversions
template <typename U> template <typename U>
GLM_FUNC_DECL explicit tmat4x3(tmat4x3<U> const & m); GLM_FUNC_DECL explicit tmat4x3(tmat4x3<U> const & m);
GLM_FUNC_DECL explicit tmat4x3(tmat2x2<T> const & x); GLM_FUNC_DECL explicit tmat4x3(tmat2x2<T> const & x);
GLM_FUNC_DECL explicit tmat4x3(tmat3x3<T> const & x); GLM_FUNC_DECL explicit tmat4x3(tmat3x3<T> const & x);
GLM_FUNC_DECL explicit tmat4x3(tmat4x4<T> const & x); GLM_FUNC_DECL explicit tmat4x3(tmat4x4<T> const & x);
GLM_FUNC_DECL explicit tmat4x3(tmat2x3<T> const & x); GLM_FUNC_DECL explicit tmat4x3(tmat2x3<T> const & x);
GLM_FUNC_DECL explicit tmat4x3(tmat3x2<T> const & x); GLM_FUNC_DECL explicit tmat4x3(tmat3x2<T> const & x);
GLM_FUNC_DECL explicit tmat4x3(tmat2x4<T> const & x); GLM_FUNC_DECL explicit tmat4x3(tmat2x4<T> const & x);
GLM_FUNC_DECL explicit tmat4x3(tmat4x2<T> const & x); GLM_FUNC_DECL explicit tmat4x3(tmat4x2<T> const & x);
GLM_FUNC_DECL explicit tmat4x3(tmat3x4<T> const & x); GLM_FUNC_DECL explicit tmat4x3(tmat3x4<T> const & x);
// Accesses // Accesses
col_type & operator[](size_type i); col_type & operator[](size_type i);
col_type const & operator[](size_type i) const; col_type const & operator[](size_type i) const;
// Unary updatable operators // Unary updatable operators
GLM_FUNC_DECL tmat4x3<T> & operator= (tmat4x3<T> const & m); GLM_FUNC_DECL tmat4x3<T> & operator= (tmat4x3<T> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x3<T> & operator= (tmat4x3<U> const & m); GLM_FUNC_DECL tmat4x3<T> & operator= (tmat4x3<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x3<T> & operator+= (U const & s); GLM_FUNC_DECL tmat4x3<T> & operator+= (U const & s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x3<T> & operator+= (tmat4x3<U> const & m); GLM_FUNC_DECL tmat4x3<T> & operator+= (tmat4x3<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x3<T> & operator-= (U const & s); GLM_FUNC_DECL tmat4x3<T> & operator-= (U const & s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x3<T> & operator-= (tmat4x3<U> const & m); GLM_FUNC_DECL tmat4x3<T> & operator-= (tmat4x3<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x3<T> & operator*= (U const & s); GLM_FUNC_DECL tmat4x3<T> & operator*= (U const & s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x3<T> & operator*= (tmat4x3<U> const & m); GLM_FUNC_DECL tmat4x3<T> & operator*= (tmat4x3<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x3<T> & operator/= (U const & s); GLM_FUNC_DECL tmat4x3<T> & operator/= (U const & s);
GLM_FUNC_DECL tmat4x3<T> & operator++ (); GLM_FUNC_DECL tmat4x3<T> & operator++ ();
GLM_FUNC_DECL tmat4x3<T> & operator-- (); GLM_FUNC_DECL tmat4x3<T> & operator-- ();
}; };
// Binary operators // Binary operators
template <typename T> template <typename T>
tmat4x3<T> operator+ ( tmat4x3<T> operator+ (
tmat4x3<T> const & m, tmat4x3<T> const & m,
typename tmat4x3<T>::value_type const & s); typename tmat4x3<T>::value_type const & s);
template <typename T> template <typename T>
tmat4x3<T> operator+ ( tmat4x3<T> operator+ (
tmat4x3<T> const & m1, tmat4x3<T> const & m1,
tmat4x3<T> const & m2); tmat4x3<T> const & m2);
template <typename T> template <typename T>
tmat4x3<T> operator- ( tmat4x3<T> operator- (
tmat4x3<T> const & m, tmat4x3<T> const & m,
typename tmat4x3<T>::value_type const & s); typename tmat4x3<T>::value_type const & s);
template <typename T> template <typename T>
tmat4x3<T> operator- ( tmat4x3<T> operator- (
tmat4x3<T> const & m1, tmat4x3<T> const & m1,
tmat4x3<T> const & m2); tmat4x3<T> const & m2);
template <typename T> template <typename T>
tmat4x3<T> operator* ( tmat4x3<T> operator* (
tmat4x3<T> const & m, tmat4x3<T> const & m,
typename tmat4x3<T>::value_type const & s); typename tmat4x3<T>::value_type const & s);
template <typename T> template <typename T>
tmat4x3<T> operator* ( tmat4x3<T> operator* (
typename tmat4x3<T>::value_type const & s, typename tmat4x3<T>::value_type const & s,
tmat4x3<T> const & m); tmat4x3<T> const & m);
template <typename T> template <typename T>
typename tmat4x3<T>::col_type operator* ( typename tmat4x3<T>::col_type operator* (
tmat4x3<T> const & m, tmat4x3<T> const & m,
typename tmat4x3<T>::row_type const & v); typename tmat4x3<T>::row_type const & v);
template <typename T> template <typename T>
typename tmat4x3<T>::row_type operator* ( typename tmat4x3<T>::row_type operator* (
typename tmat4x3<T>::col_type const & v, typename tmat4x3<T>::col_type const & v,
tmat4x3<T> const & m); tmat4x3<T> const & m);
template <typename T> template <typename T>
tmat3x3<T> operator* ( tmat3x3<T> operator* (
tmat4x3<T> const & m1, tmat4x3<T> const & m1,
tmat3x4<T> const & m2); tmat3x4<T> const & m2);
template <typename T> template <typename T>
tmat4x3<T> operator/ ( tmat4x3<T> operator/ (
tmat4x3<T> const & m, tmat4x3<T> const & m,
typename tmat4x3<T>::value_type const & s); typename tmat4x3<T>::value_type const & s);
template <typename T> template <typename T>
tmat4x3<T> operator/ ( tmat4x3<T> operator/ (
typename tmat4x3<T>::value_type const & s, typename tmat4x3<T>::value_type const & s,
tmat4x3<T> const & m); tmat4x3<T> const & m);
// Unary constant operators // Unary constant operators
template <typename T> template <typename T>
tmat4x3<T> const operator- ( tmat4x3<T> const operator- (
tmat4x3<T> const & m); tmat4x3<T> const & m);
template <typename T> template <typename T>
tmat4x3<T> const operator-- ( tmat4x3<T> const operator-- (
tmat4x3<T> const & m, tmat4x3<T> const & m,
int); int);
template <typename T> template <typename T>
tmat4x3<T> const operator++ ( tmat4x3<T> const operator++ (
tmat4x3<T> const & m, tmat4x3<T> const & m,
int); int);
} //namespace detail }//namespace detail
namespace core{ namespace core{
namespace type{ namespace type{
namespace precision
{
//! 4 columns of 3 components matrix of low precision floating-point numbers.
//! There is no guarantee on the actual precision.
//! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers)
//! \ingroup core_precision
typedef detail::tmat4x3<lowp_float> lowp_mat4x3;
namespace precision //! 4 columns of 3 components matrix of medium precision floating-point numbers.
{ //! There is no guarantee on the actual precision.
//! 4 columns of 3 components matrix of low precision floating-point numbers. //! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers)
//! There is no guarantee on the actual precision. //! \ingroup core_precision
//! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers) typedef detail::tmat4x3<mediump_float> mediump_mat4x3;
//! \ingroup core_precision
typedef detail::tmat4x3<lowp_float> lowp_mat4x3;
//! 4 columns of 3 components matrix of medium precision floating-point numbers.
//! There is no guarantee on the actual precision.
//! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers)
//! \ingroup core_precision
typedef detail::tmat4x3<mediump_float> mediump_mat4x3;
//! 4 columns of 3 components matrix of high precision floating-point numbers.
//! There is no guarantee on the actual precision.
//! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers)
//! \ingroup core_precision
typedef detail::tmat4x3<highp_float> highp_mat4x3;
}
//namespace precision
}//namespace type //! 4 columns of 3 components matrix of high precision floating-point numbers.
}//namespace core //! There is no guarantee on the actual precision.
} //namespace glm //! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers)
//! \ingroup core_precision
typedef detail::tmat4x3<highp_float> highp_mat4x3;
}//namespace precision
}//namespace type
}//namespace core
}//namespace glm
#ifndef GLM_EXTERNAL_TEMPLATE #ifndef GLM_EXTERNAL_TEMPLATE
#include "type_mat4x3.inl" #include "type_mat4x3.inl"
#endif #endif //GLM_EXTERNAL_TEMPLATE
#endif//glm_core_type_mat4x3 #endif//glm_core_type_mat4x3

View File

@ -2,7 +2,7 @@
// OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net) // OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net)
/////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////
// Created : 2005-01-27 // Created : 2005-01-27
// Updated : 2008-08-30 // Updated : 2011-06-02
// Licence : This source is under MIT License // Licence : This source is under MIT License
// File : glm/core/type_mat4x4.hpp // File : glm/core/type_mat4x4.hpp
/////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////
@ -12,283 +12,275 @@
#include "type_mat.hpp" #include "type_mat.hpp"
namespace glm namespace glm{
namespace detail
{ {
namespace test template <typename T> struct tvec1;
template <typename T> struct tvec2;
template <typename T> struct tvec3;
template <typename T> struct tvec4;
template <typename T> struct tmat2x2;
template <typename T> struct tmat2x3;
template <typename T> struct tmat2x4;
template <typename T> struct tmat3x2;
template <typename T> struct tmat3x3;
template <typename T> struct tmat3x4;
template <typename T> struct tmat4x2;
template <typename T> struct tmat4x3;
template <typename T> struct tmat4x4;
//! \brief Template for 4 * 4 matrix of floating-point numbers.
//! \ingroup core_template
template <typename T>
struct tmat4x4
{ {
void main_mat4x4(); enum ctor{null};
}//namespace test typedef T value_type;
typedef std::size_t size_type;
typedef tvec4<T> col_type;
typedef tvec4<T> row_type;
static GLM_FUNC_DECL size_type col_size();
static GLM_FUNC_DECL size_type row_size();
namespace detail typedef tmat4x4<T> type;
{ typedef tmat4x4<T> transpose_type;
template <typename T> struct tvec1;
template <typename T> struct tvec2;
template <typename T> struct tvec3;
template <typename T> struct tvec4;
template <typename T> struct tmat2x2;
template <typename T> struct tmat2x3;
template <typename T> struct tmat2x4;
template <typename T> struct tmat3x2;
template <typename T> struct tmat3x3;
template <typename T> struct tmat3x4;
template <typename T> struct tmat4x2;
template <typename T> struct tmat4x3;
template <typename T> struct tmat4x4;
//! \brief Template for 4 * 4 matrix of floating-point numbers. public:
//! \ingroup core_template // Implementation detail
template <typename T> GLM_FUNC_DECL tmat4x4<T> _inverse() const;
struct tmat4x4
{
enum ctor{null};
typedef T value_type;
typedef std::size_t size_type;
typedef tvec4<T> col_type;
typedef tvec4<T> row_type;
static GLM_FUNC_DECL size_type col_size();
static GLM_FUNC_DECL size_type row_size();
typedef tmat4x4<T> type; private:
typedef tmat4x4<T> transpose_type; // Data
col_type value[4];
public: public:
// Implementation detail // Constructors
GLM_FUNC_DECL tmat4x4<T> _inverse() const; GLM_FUNC_DECL tmat4x4();
GLM_FUNC_DECL tmat4x4(tmat4x4 const & m);
private: GLM_FUNC_DECL explicit tmat4x4(
// Data ctor Null);
col_type value[4]; GLM_FUNC_DECL explicit tmat4x4(
value_type const & x);
GLM_FUNC_DECL explicit tmat4x4(
value_type const & x0, value_type const & y0, value_type const & z0, value_type const & w0,
value_type const & x1, value_type const & y1, value_type const & z1, value_type const & w1,
value_type const & x2, value_type const & y2, value_type const & z2, value_type const & w2,
value_type const & x3, value_type const & y3, value_type const & z3, value_type const & w3);
GLM_FUNC_DECL explicit tmat4x4(
col_type const & v0,
col_type const & v1,
col_type const & v2,
col_type const & v3);
public: //////////////////////////////////////
// Constructors // Conversions
GLM_FUNC_DECL tmat4x4(); template <typename U>
GLM_FUNC_DECL tmat4x4(tmat4x4 const & m); GLM_FUNC_DECL explicit tmat4x4(
U const & x);
GLM_FUNC_DECL explicit tmat4x4(
ctor Null);
GLM_FUNC_DECL explicit tmat4x4(
value_type const & x);
GLM_FUNC_DECL explicit tmat4x4(
value_type const & x0, value_type const & y0, value_type const & z0, value_type const & w0,
value_type const & x1, value_type const & y1, value_type const & z1, value_type const & w1,
value_type const & x2, value_type const & y2, value_type const & z2, value_type const & w2,
value_type const & x3, value_type const & y3, value_type const & z3, value_type const & w3);
GLM_FUNC_DECL explicit tmat4x4(
col_type const & v0,
col_type const & v1,
col_type const & v2,
col_type const & v3);
//////////////////////////////////////
// Conversions
template <typename U>
GLM_FUNC_DECL explicit tmat4x4(
U const & x);
template < template <
typename X1, typename Y1, typename Z1, typename W1, typename X1, typename Y1, typename Z1, typename W1,
typename X2, typename Y2, typename Z2, typename W2, typename X2, typename Y2, typename Z2, typename W2,
typename X3, typename Y3, typename Z3, typename W3, typename X3, typename Y3, typename Z3, typename W3,
typename X4, typename Y4, typename Z4, typename W4> typename X4, typename Y4, typename Z4, typename W4>
GLM_FUNC_DECL explicit tmat4x4( GLM_FUNC_DECL explicit tmat4x4(
X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1, X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1,
X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2, X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2,
X3 const & x3, Y3 const & y3, Z3 const & z3, W3 const & w3, X3 const & x3, Y3 const & y3, Z3 const & z3, W3 const & w3,
X4 const & x4, Y4 const & y4, Z4 const & z4, W4 const & w4); X4 const & x4, Y4 const & y4, Z4 const & z4, W4 const & w4);
template <typename V1, typename V2, typename V3, typename V4> template <typename V1, typename V2, typename V3, typename V4>
GLM_FUNC_DECL explicit tmat4x4( GLM_FUNC_DECL explicit tmat4x4(
tvec4<V1> const & v1, tvec4<V1> const & v1,
tvec4<V2> const & v2, tvec4<V2> const & v2,
tvec4<V3> const & v3, tvec4<V3> const & v3,
tvec4<V4> const & v4); tvec4<V4> const & v4);
// Matrix conversions // Matrix conversions
template <typename U> template <typename U>
GLM_FUNC_DECL explicit tmat4x4(tmat4x4<U> const & m); GLM_FUNC_DECL explicit tmat4x4(tmat4x4<U> const & m);
GLM_FUNC_DECL explicit tmat4x4(tmat2x2<T> const & x); GLM_FUNC_DECL explicit tmat4x4(tmat2x2<T> const & x);
GLM_FUNC_DECL explicit tmat4x4(tmat3x3<T> const & x); GLM_FUNC_DECL explicit tmat4x4(tmat3x3<T> const & x);
GLM_FUNC_DECL explicit tmat4x4(tmat2x3<T> const & x); GLM_FUNC_DECL explicit tmat4x4(tmat2x3<T> const & x);
GLM_FUNC_DECL explicit tmat4x4(tmat3x2<T> const & x); GLM_FUNC_DECL explicit tmat4x4(tmat3x2<T> const & x);
GLM_FUNC_DECL explicit tmat4x4(tmat2x4<T> const & x); GLM_FUNC_DECL explicit tmat4x4(tmat2x4<T> const & x);
GLM_FUNC_DECL explicit tmat4x4(tmat4x2<T> const & x); GLM_FUNC_DECL explicit tmat4x4(tmat4x2<T> const & x);
GLM_FUNC_DECL explicit tmat4x4(tmat3x4<T> const & x); GLM_FUNC_DECL explicit tmat4x4(tmat3x4<T> const & x);
GLM_FUNC_DECL explicit tmat4x4(tmat4x3<T> const & x); GLM_FUNC_DECL explicit tmat4x4(tmat4x3<T> const & x);
// Accesses // Accesses
GLM_FUNC_DECL col_type & operator[](size_type i); GLM_FUNC_DECL col_type & operator[](size_type i);
GLM_FUNC_DECL col_type const & operator[](size_type i) const; GLM_FUNC_DECL col_type const & operator[](size_type i) const;
// Unary updatable operators // Unary updatable operators
GLM_FUNC_DECL tmat4x4<T> & operator= (tmat4x4<T> const & m); GLM_FUNC_DECL tmat4x4<T> & operator= (tmat4x4<T> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x4<T> & operator= (tmat4x4<U> const & m); GLM_FUNC_DECL tmat4x4<T> & operator= (tmat4x4<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x4<T> & operator+= (U const & s); GLM_FUNC_DECL tmat4x4<T> & operator+= (U const & s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x4<T> & operator+= (tmat4x4<U> const & m); GLM_FUNC_DECL tmat4x4<T> & operator+= (tmat4x4<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x4<T> & operator-= (U const & s); GLM_FUNC_DECL tmat4x4<T> & operator-= (U const & s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x4<T> & operator-= (tmat4x4<U> const & m); GLM_FUNC_DECL tmat4x4<T> & operator-= (tmat4x4<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x4<T> & operator*= (U const & s); GLM_FUNC_DECL tmat4x4<T> & operator*= (U const & s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x4<T> & operator*= (tmat4x4<U> const & m); GLM_FUNC_DECL tmat4x4<T> & operator*= (tmat4x4<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x4<T> & operator/= (U const & s); GLM_FUNC_DECL tmat4x4<T> & operator/= (U const & s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x4<T> & operator/= (tmat4x4<U> const & m); GLM_FUNC_DECL tmat4x4<T> & operator/= (tmat4x4<U> const & m);
GLM_FUNC_DECL tmat4x4<T> & operator++ (); GLM_FUNC_DECL tmat4x4<T> & operator++ ();
GLM_FUNC_DECL tmat4x4<T> & operator-- (); GLM_FUNC_DECL tmat4x4<T> & operator-- ();
}; };
// Binary operators // Binary operators
template <typename T> template <typename T>
tmat4x4<T> operator+ ( tmat4x4<T> operator+ (
tmat4x4<T> const & m, tmat4x4<T> const & m,
typename tmat4x4<T>::value_type const & s); typename tmat4x4<T>::value_type const & s);
template <typename T> template <typename T>
tmat4x4<T> operator+ ( tmat4x4<T> operator+ (
typename tmat4x4<T>::value_type const & s, typename tmat4x4<T>::value_type const & s,
tmat4x4<T> const & m); tmat4x4<T> const & m);
template <typename T> template <typename T>
tmat4x4<T> operator+ ( tmat4x4<T> operator+ (
tmat4x4<T> const & m1, tmat4x4<T> const & m1,
tmat4x4<T> const & m2); tmat4x4<T> const & m2);
template <typename T> template <typename T>
tmat4x4<T> operator- ( tmat4x4<T> operator- (
tmat4x4<T> const & m, tmat4x4<T> const & m,
typename tmat4x4<T>::value_type const & s); typename tmat4x4<T>::value_type const & s);
template <typename T> template <typename T>
tmat4x4<T> operator- ( tmat4x4<T> operator- (
typename tmat4x4<T>::value_type const & s, typename tmat4x4<T>::value_type const & s,
tmat4x4<T> const & m); tmat4x4<T> const & m);
template <typename T> template <typename T>
tmat4x4<T> operator- ( tmat4x4<T> operator- (
tmat4x4<T> const & m1, tmat4x4<T> const & m1,
tmat4x4<T> const & m2); tmat4x4<T> const & m2);
template <typename T> template <typename T>
tmat4x4<T> operator* ( tmat4x4<T> operator* (
tmat4x4<T> const & m, tmat4x4<T> const & m,
typename tmat4x4<T>::value_type const & s); typename tmat4x4<T>::value_type const & s);
template <typename T> template <typename T>
tmat4x4<T> operator* ( tmat4x4<T> operator* (
typename tmat4x4<T>::value_type const & s, typename tmat4x4<T>::value_type const & s,
tmat4x4<T> const & m); tmat4x4<T> const & m);
template <typename T> template <typename T>
typename tmat4x4<T>::col_type operator* ( typename tmat4x4<T>::col_type operator* (
tmat4x4<T> const & m, tmat4x4<T> const & m,
typename tmat4x4<T>::row_type const & v); typename tmat4x4<T>::row_type const & v);
template <typename T> template <typename T>
typename tmat4x4<T>::row_type operator* ( typename tmat4x4<T>::row_type operator* (
typename tmat4x4<T>::col_type const & v, typename tmat4x4<T>::col_type const & v,
tmat4x4<T> const & m); tmat4x4<T> const & m);
template <typename T> template <typename T>
tmat4x4<T> operator* ( tmat4x4<T> operator* (
tmat4x4<T> const & m1, tmat4x4<T> const & m1,
tmat4x4<T> const & m2); tmat4x4<T> const & m2);
template <typename T> template <typename T>
tmat4x4<T> operator/ ( tmat4x4<T> operator/ (
tmat4x4<T> const & m, tmat4x4<T> const & m,
typename tmat4x4<T>::value_type const & s); typename tmat4x4<T>::value_type const & s);
template <typename T> template <typename T>
tmat4x4<T> operator/ ( tmat4x4<T> operator/ (
typename tmat4x4<T>::value_type const & s, typename tmat4x4<T>::value_type const & s,
tmat4x4<T> const & m); tmat4x4<T> const & m);
template <typename T> template <typename T>
typename tmat4x4<T>::col_type operator/ ( typename tmat4x4<T>::col_type operator/ (
tmat4x4<T> const & m, tmat4x4<T> const & m,
typename tmat4x4<T>::row_type const & v); typename tmat4x4<T>::row_type const & v);
template <typename T> template <typename T>
typename tmat4x4<T>::row_type operator/ ( typename tmat4x4<T>::row_type operator/ (
typename tmat4x4<T>::col_type & v, typename tmat4x4<T>::col_type & v,
tmat4x4<T> const & m); tmat4x4<T> const & m);
template <typename T> template <typename T>
tmat4x4<T> operator/ ( tmat4x4<T> operator/ (
tmat4x4<T> const & m1, tmat4x4<T> const & m1,
tmat4x4<T> const & m2); tmat4x4<T> const & m2);
// Unary constant operators // Unary constant operators
template <typename T> template <typename T>
tmat4x4<T> const operator- ( tmat4x4<T> const operator- (
tmat4x4<T> const & m); tmat4x4<T> const & m);
template <typename T> template <typename T>
tmat4x4<T> const operator-- ( tmat4x4<T> const operator-- (
tmat4x4<T> const & m, int); tmat4x4<T> const & m, int);
template <typename T> template <typename T>
tmat4x4<T> const operator++ ( tmat4x4<T> const operator++ (
tmat4x4<T> const & m, int); tmat4x4<T> const & m, int);
} //namespace detail } //namespace detail
namespace core{ namespace core{
namespace type{ namespace type{
namespace precision
{
//! 4 columns of 4 components matrix of low precision floating-point numbers.
//! There is no guarantee on the actual precision.
//! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers
//! \ingroup core_precision
typedef detail::tmat4x4<lowp_float> lowp_mat4;
namespace precision //! 4 columns of 4 components matrix of medium precision floating-point numbers.
{ //! There is no guarantee on the actual precision.
//! 4 columns of 4 components matrix of low precision floating-point numbers. //! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers
//! There is no guarantee on the actual precision. //! \ingroup core_precision
//! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers typedef detail::tmat4x4<mediump_float> mediump_mat4;
//! \ingroup core_precision
typedef detail::tmat4x4<lowp_float> lowp_mat4;
//! 4 columns of 4 components matrix of medium precision floating-point numbers. //! 4 columns of 4 components matrix of high precision floating-point numbers.
//! There is no guarantee on the actual precision. //! There is no guarantee on the actual precision.
//! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers //! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers
//! \ingroup core_precision //! \ingroup core_precision
typedef detail::tmat4x4<mediump_float> mediump_mat4; typedef detail::tmat4x4<highp_float> highp_mat4;
//! 4 columns of 4 components matrix of high precision floating-point numbers. //! 4 columns of 4 components matrix of low precision floating-point numbers.
//! There is no guarantee on the actual precision. //! There is no guarantee on the actual precision.
//! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers //! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers
//! \ingroup core_precision //! \ingroup core_precision
typedef detail::tmat4x4<highp_float> highp_mat4; typedef detail::tmat4x4<lowp_float> lowp_mat4x4;
//! 4 columns of 4 components matrix of low precision floating-point numbers. //! 4 columns of 4 components matrix of medium precision floating-point numbers.
//! There is no guarantee on the actual precision. //! There is no guarantee on the actual precision.
//! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers //! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers
//! \ingroup core_precision //! \ingroup core_precision
typedef detail::tmat4x4<lowp_float> lowp_mat4x4; typedef detail::tmat4x4<mediump_float> mediump_mat4x4;
//! 4 columns of 4 components matrix of medium precision floating-point numbers. //! 4 columns of 4 components matrix of high precision floating-point numbers.
//! There is no guarantee on the actual precision. //! There is no guarantee on the actual precision.
//! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers //! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers
//! \ingroup core_precision //! \ingroup core_precision
typedef detail::tmat4x4<mediump_float> mediump_mat4x4; typedef detail::tmat4x4<highp_float> highp_mat4x4;
//! 4 columns of 4 components matrix of high precision floating-point numbers. }//namespace precision
//! There is no guarantee on the actual precision. }//namespace type
//! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers }//namespace core
//! \ingroup core_precision }//namespace glm
typedef detail::tmat4x4<highp_float> highp_mat4x4;
}
//namespace precision
}//namespace type
}//namespace core
} //namespace glm
#ifndef GLM_EXTERNAL_TEMPLATE #ifndef GLM_EXTERNAL_TEMPLATE
#include "type_mat4x4.inl" #include "type_mat4x4.inl"
#endif #endif//GLM_EXTERNAL_TEMPLATE
#endif //glm_core_type_mat4x4 #endif//glm_core_type_mat4x4

View File

@ -16,39 +16,33 @@
#include "type_size.hpp" #include "type_size.hpp"
#include "_swizzle.hpp" #include "_swizzle.hpp"
namespace glm namespace glm{
namespace detail
{ {
namespace test template <typename T> struct tref1;
template <typename T> struct tref2;
template <typename T> struct tref3;
template <typename T> struct tref4;
template <typename T> struct tvec1;
template <typename T> struct tvec2;
template <typename T> struct tvec3;
template <typename T> struct tvec4;
template <typename T>
struct tvec1
{ {
void main_vec1(); enum ctor{null};
}//namespace test
namespace detail typedef T value_type;
{ typedef std::size_t size_type;
template <typename T> struct tref1; GLM_FUNC_DECL size_type length() const;
template <typename T> struct tref2; static GLM_FUNC_DECL size_type value_size();
template <typename T> struct tref3;
template <typename T> struct tref4;
template <typename T> struct tvec1;
template <typename T> struct tvec2;
template <typename T> struct tvec3;
template <typename T> struct tvec4;
template <typename T> typedef tvec1<T> type;
struct tvec1 typedef tvec1<bool> bool_type;
{
enum ctor{null};
typedef T value_type; //////////////////////////////////////
typedef std::size_t size_type; // Data
GLM_FUNC_DECL size_type length() const;
static GLM_FUNC_DECL size_type value_size();
typedef tvec1<T> type;
typedef tvec1<bool> bool_type;
//////////////////////////////////////
// Data
# if(GLM_COMPONENT == GLM_COMPONENT_ONLY_XYZW) # if(GLM_COMPONENT == GLM_COMPONENT_ONLY_XYZW)
value_type x; value_type x;
@ -56,123 +50,123 @@ namespace glm
union {value_type x, r, s;}; union {value_type x, r, s;};
# endif//GLM_COMPONENT # endif//GLM_COMPONENT
////////////////////////////////////// //////////////////////////////////////
// Accesses // Accesses
GLM_FUNC_DECL value_type & operator[](size_type i); GLM_FUNC_DECL value_type & operator[](size_type i);
GLM_FUNC_DECL value_type const & operator[](size_type i) const; GLM_FUNC_DECL value_type const & operator[](size_type i) const;
////////////////////////////////////// //////////////////////////////////////
// Implicit basic constructors // Implicit basic constructors
GLM_FUNC_DECL tvec1(); GLM_FUNC_DECL tvec1();
GLM_FUNC_DECL tvec1(tvec1<T> const & v); GLM_FUNC_DECL tvec1(tvec1<T> const & v);
////////////////////////////////////// //////////////////////////////////////
// Explicit basic constructors // Explicit basic constructors
GLM_FUNC_DECL explicit tvec1( GLM_FUNC_DECL explicit tvec1(
ctor); ctor);
GLM_FUNC_DECL explicit tvec1( GLM_FUNC_DECL explicit tvec1(
value_type const & s); value_type const & s);
////////////////////////////////////// //////////////////////////////////////
// Swizzle constructors // Swizzle constructors
GLM_FUNC_DECL tvec1(tref1<T> const & r); GLM_FUNC_DECL tvec1(tref1<T> const & r);
////////////////////////////////////// //////////////////////////////////////
// Convertion scalar constructors // Convertion scalar constructors
//! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) //! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename U> template <typename U>
GLM_FUNC_DECL explicit tvec1(U const & s); GLM_FUNC_DECL explicit tvec1(U const & s);
////////////////////////////////////// //////////////////////////////////////
// Convertion vector constructors // Convertion vector constructors
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename U> template <typename U>
GLM_FUNC_DECL explicit tvec1(tvec2<U> const & v); GLM_FUNC_DECL explicit tvec1(tvec2<U> const & v);
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename U> template <typename U>
GLM_FUNC_DECL explicit tvec1(tvec3<U> const & v); GLM_FUNC_DECL explicit tvec1(tvec3<U> const & v);
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename U> template <typename U>
GLM_FUNC_DECL explicit tvec1(tvec4<U> const & v); GLM_FUNC_DECL explicit tvec1(tvec4<U> const & v);
////////////////////////////////////// //////////////////////////////////////
// Unary arithmetic operators // Unary arithmetic operators
GLM_FUNC_DECL tvec1<T> & operator= (tvec1<T> const & v); GLM_FUNC_DECL tvec1<T> & operator= (tvec1<T> const & v);
GLM_FUNC_DECL tvec1<T> & operator+=(value_type const & s); GLM_FUNC_DECL tvec1<T> & operator+=(value_type const & s);
GLM_FUNC_DECL tvec1<T> & operator+=(tvec1<T> const & v); GLM_FUNC_DECL tvec1<T> & operator+=(tvec1<T> const & v);
GLM_FUNC_DECL tvec1<T> & operator-=(value_type const & s); GLM_FUNC_DECL tvec1<T> & operator-=(value_type const & s);
GLM_FUNC_DECL tvec1<T> & operator-=(tvec1<T> const & v); GLM_FUNC_DECL tvec1<T> & operator-=(tvec1<T> const & v);
GLM_FUNC_DECL tvec1<T> & operator*=(value_type const & s); GLM_FUNC_DECL tvec1<T> & operator*=(value_type const & s);
GLM_FUNC_DECL tvec1<T> & operator*=(tvec1<T> const & v); GLM_FUNC_DECL tvec1<T> & operator*=(tvec1<T> const & v);
GLM_FUNC_DECL tvec1<T> & operator/=(value_type const & s); GLM_FUNC_DECL tvec1<T> & operator/=(value_type const & s);
GLM_FUNC_DECL tvec1<T> & operator/=(tvec1<T> const & v); GLM_FUNC_DECL tvec1<T> & operator/=(tvec1<T> const & v);
GLM_FUNC_DECL tvec1<T> & operator++(); GLM_FUNC_DECL tvec1<T> & operator++();
GLM_FUNC_DECL tvec1<T> & operator--(); GLM_FUNC_DECL tvec1<T> & operator--();
////////////////////////////////////// //////////////////////////////////////
// Unary bit operators // Unary bit operators
GLM_FUNC_DECL tvec1<T> & operator%=(value_type const & s); GLM_FUNC_DECL tvec1<T> & operator%=(value_type const & s);
GLM_FUNC_DECL tvec1<T> & operator%=(tvec1<T> const & v); GLM_FUNC_DECL tvec1<T> & operator%=(tvec1<T> const & v);
GLM_FUNC_DECL tvec1<T> & operator&=(value_type const & s); GLM_FUNC_DECL tvec1<T> & operator&=(value_type const & s);
GLM_FUNC_DECL tvec1<T> & operator&=(tvec1<T> const & v); GLM_FUNC_DECL tvec1<T> & operator&=(tvec1<T> const & v);
GLM_FUNC_DECL tvec1<T> & operator|=(value_type const & s); GLM_FUNC_DECL tvec1<T> & operator|=(value_type const & s);
GLM_FUNC_DECL tvec1<T> & operator|=(tvec1<T> const & v); GLM_FUNC_DECL tvec1<T> & operator|=(tvec1<T> const & v);
GLM_FUNC_DECL tvec1<T> & operator^=(value_type const & s); GLM_FUNC_DECL tvec1<T> & operator^=(value_type const & s);
GLM_FUNC_DECL tvec1<T> & operator^=(tvec1<T> const & v); GLM_FUNC_DECL tvec1<T> & operator^=(tvec1<T> const & v);
GLM_FUNC_DECL tvec1<T> & operator<<=(value_type const & s); GLM_FUNC_DECL tvec1<T> & operator<<=(value_type const & s);
GLM_FUNC_DECL tvec1<T> & operator<<=(tvec1<T> const & v); GLM_FUNC_DECL tvec1<T> & operator<<=(tvec1<T> const & v);
GLM_FUNC_DECL tvec1<T> & operator>>=(value_type const & s); GLM_FUNC_DECL tvec1<T> & operator>>=(value_type const & s);
GLM_FUNC_DECL tvec1<T> & operator>>=(tvec1<T> const & v); GLM_FUNC_DECL tvec1<T> & operator>>=(tvec1<T> const & v);
////////////////////////////////////// //////////////////////////////////////
// Swizzle operators // Swizzle operators
GLM_FUNC_DECL value_type swizzle(comp X) const; GLM_FUNC_DECL value_type swizzle(comp X) const;
GLM_FUNC_DECL tvec2<T> swizzle(comp X, comp Y) const; GLM_FUNC_DECL tvec2<T> swizzle(comp X, comp Y) const;
GLM_FUNC_DECL tvec3<T> swizzle(comp X, comp Y, comp Z) const; GLM_FUNC_DECL tvec3<T> swizzle(comp X, comp Y, comp Z) const;
GLM_FUNC_DECL tvec4<T> swizzle(comp X, comp Y, comp Z, comp W) const; GLM_FUNC_DECL tvec4<T> swizzle(comp X, comp Y, comp Z, comp W) const;
GLM_FUNC_DECL tref1<T> swizzle(comp X); GLM_FUNC_DECL tref1<T> swizzle(comp X);
}; };
template <typename T> template <typename T>
struct tref1 struct tref1
{ {
GLM_FUNC_DECL tref1(T & x); GLM_FUNC_DECL tref1(T & x);
GLM_FUNC_DECL tref1(tref1<T> const & r); GLM_FUNC_DECL tref1(tref1<T> const & r);
GLM_FUNC_DECL tref1(tvec1<T> const & v); GLM_FUNC_DECL tref1(tvec1<T> const & v);
GLM_FUNC_DECL tref1<T> & operator= (tref1<T> const & r); GLM_FUNC_DECL tref1<T> & operator= (tref1<T> const & r);
GLM_FUNC_DECL tref1<T> & operator= (tvec1<T> const & v); GLM_FUNC_DECL tref1<T> & operator= (tvec1<T> const & v);
T& x; T& x;
}; };
GLM_DETAIL_IS_VECTOR(tvec1); GLM_DETAIL_IS_VECTOR(tvec1);
typedef detail::tvec1<core::type::precision::highp_float> highp_vec1_t; typedef detail::tvec1<core::type::precision::highp_float> highp_vec1_t;
typedef detail::tvec1<core::type::precision::mediump_float> mediump_vec1_t; typedef detail::tvec1<core::type::precision::mediump_float> mediump_vec1_t;
typedef detail::tvec1<core::type::precision::lowp_float> lowp_vec1_t; typedef detail::tvec1<core::type::precision::lowp_float> lowp_vec1_t;
typedef detail::tvec1<core::type::precision::highp_int> highp_ivec1_t; typedef detail::tvec1<core::type::precision::highp_int> highp_ivec1_t;
typedef detail::tvec1<core::type::precision::mediump_int> mediump_ivec1_t; typedef detail::tvec1<core::type::precision::mediump_int> mediump_ivec1_t;
typedef detail::tvec1<core::type::precision::lowp_int> lowp_ivec1_t; typedef detail::tvec1<core::type::precision::lowp_int> lowp_ivec1_t;
typedef detail::tvec1<core::type::precision::highp_uint> highp_uvec1_t; typedef detail::tvec1<core::type::precision::highp_uint> highp_uvec1_t;
typedef detail::tvec1<core::type::precision::mediump_uint> mediump_uvec1_t; typedef detail::tvec1<core::type::precision::mediump_uint> mediump_uvec1_t;
typedef detail::tvec1<core::type::precision::lowp_uint> lowp_uvec1_t; typedef detail::tvec1<core::type::precision::lowp_uint> lowp_uvec1_t;
} //namespace detail }//namespace detail
}//namespace glm }//namespace glm
#ifndef GLM_EXTERNAL_TEMPLATE #ifndef GLM_EXTERNAL_TEMPLATE
#include "type_vec1.inl" #include "type_vec1.inl"
#endif #endif//GLM_EXTERNAL_TEMPLATE
#endif//glm_core_type_gentype1 #endif//glm_core_type_gentype1

View File

@ -16,251 +16,248 @@
#include "type_size.hpp" #include "type_size.hpp"
#include "_swizzle.hpp" #include "_swizzle.hpp"
namespace glm namespace glm{
namespace detail
{ {
namespace test template <typename T> struct tref2;
template <typename T> struct tref3;
template <typename T> struct tref4;
template <typename T> struct tvec3;
template <typename T> struct tvec4;
//! The basic 2D vector type.
//! \ingroup core_template
template <typename T>
struct tvec2
{ {
void main_vec2(); enum ctor{null};
}
//namespace test
namespace detail typedef T value_type;
{ typedef std::size_t size_type;
template <typename T> struct tref2; GLM_FUNC_DECL size_type length() const;
template <typename T> struct tref3; static GLM_FUNC_DECL size_type value_size();
template <typename T> struct tref4;
template <typename T> struct tvec3;
template <typename T> struct tvec4;
//! The basic 2D vector type. typedef tvec2<T> type;
//! \ingroup core_template typedef tvec2<bool> bool_type;
template <typename T>
struct tvec2
{
enum ctor{null};
typedef T value_type; //////////////////////////////////////
typedef std::size_t size_type; // Data
GLM_FUNC_DECL size_type length() const;
static GLM_FUNC_DECL size_type value_size();
typedef tvec2<T> type;
typedef tvec2<bool> bool_type;
//////////////////////////////////////
// Data
# if(GLM_COMPONENT == GLM_COMPONENT_ONLY_XYZW) # if(GLM_COMPONENT == GLM_COMPONENT_ONLY_XYZW)
value_type x, y; value_type x, y;
# elif(GLM_COMPONENT == GLM_COMPONENT_MS_EXT) # elif(GLM_COMPONENT == GLM_COMPONENT_MS_EXT)
union union
{ {
struct{value_type x, y;}; struct{value_type x, y;};
struct{value_type r, g;}; struct{value_type r, g;};
struct{value_type s, t;}; struct{value_type s, t;};
}; };
# else//(GLM_COMPONENT == GLM_COMPONENT_GLSL_NAMES) # else//(GLM_COMPONENT == GLM_COMPONENT_GLSL_NAMES)
union {value_type x, r, s;}; union {value_type x, r, s;};
union {value_type y, g, t;}; union {value_type y, g, t;};
# endif//GLM_COMPONENT # endif//GLM_COMPONENT
////////////////////////////////////// //////////////////////////////////////
// Accesses // Accesses
GLM_FUNC_DECL value_type & operator[](size_type i); GLM_FUNC_DECL value_type & operator[](size_type i);
GLM_FUNC_DECL value_type const & operator[](size_type i) const; GLM_FUNC_DECL value_type const & operator[](size_type i) const;
////////////////////////////////////// //////////////////////////////////////
// Implicit basic constructors // Implicit basic constructors
GLM_FUNC_DECL tvec2(); GLM_FUNC_DECL tvec2();
GLM_FUNC_DECL tvec2(tvec2<T> const & v); GLM_FUNC_DECL tvec2(tvec2<T> const & v);
////////////////////////////////////// //////////////////////////////////////
// Explicit basic constructors // Explicit basic constructors
GLM_FUNC_DECL explicit tvec2( GLM_FUNC_DECL explicit tvec2(
ctor); ctor);
GLM_FUNC_DECL explicit tvec2( GLM_FUNC_DECL explicit tvec2(
value_type const & s); value_type const & s);
GLM_FUNC_DECL explicit tvec2( GLM_FUNC_DECL explicit tvec2(
value_type const & s1, value_type const & s1,
value_type const & s2); value_type const & s2);
////////////////////////////////////// //////////////////////////////////////
// Swizzle constructors // Swizzle constructors
tvec2(tref2<T> const & r); tvec2(tref2<T> const & r);
////////////////////////////////////// //////////////////////////////////////
// Convertion constructors // Convertion constructors
//! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) //! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename U> template <typename U>
GLM_FUNC_DECL explicit tvec2( GLM_FUNC_DECL explicit tvec2(
U const & x); U const & x);
//! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) //! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename U, typename V> template <typename U, typename V>
GLM_FUNC_DECL explicit tvec2( GLM_FUNC_DECL explicit tvec2(
U const & x, U const & x,
V const & y); V const & y);
////////////////////////////////////// //////////////////////////////////////
// Convertion vector constructors // Convertion vector constructors
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename U> template <typename U>
GLM_FUNC_DECL explicit tvec2(tvec2<U> const & v); GLM_FUNC_DECL explicit tvec2(tvec2<U> const & v);
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename U> template <typename U>
GLM_FUNC_DECL explicit tvec2(tvec3<U> const & v); GLM_FUNC_DECL explicit tvec2(tvec3<U> const & v);
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename U> template <typename U>
GLM_FUNC_DECL explicit tvec2(tvec4<U> const & v); GLM_FUNC_DECL explicit tvec2(tvec4<U> const & v);
////////////////////////////////////// //////////////////////////////////////
// Unary arithmetic operators // Unary arithmetic operators
GLM_FUNC_DECL tvec2<T> & operator= (tvec2<T> const & v); GLM_FUNC_DECL tvec2<T> & operator= (tvec2<T> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T> & operator= (tvec2<U> const & v); GLM_FUNC_DECL tvec2<T> & operator= (tvec2<U> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T> & operator+=(U const & s); GLM_FUNC_DECL tvec2<T> & operator+=(U const & s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T> & operator+=(tvec2<U> const & v); GLM_FUNC_DECL tvec2<T> & operator+=(tvec2<U> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T> & operator-=(U const & s); GLM_FUNC_DECL tvec2<T> & operator-=(U const & s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T> & operator-=(tvec2<U> const & v); GLM_FUNC_DECL tvec2<T> & operator-=(tvec2<U> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T> & operator*=(U const & s); GLM_FUNC_DECL tvec2<T> & operator*=(U const & s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T> & operator*=(tvec2<U> const & v); GLM_FUNC_DECL tvec2<T> & operator*=(tvec2<U> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T> & operator/=(U const & s); GLM_FUNC_DECL tvec2<T> & operator/=(U const & s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T> & operator/=(tvec2<U> const & v); GLM_FUNC_DECL tvec2<T> & operator/=(tvec2<U> const & v);
GLM_FUNC_DECL tvec2<T> & operator++(); GLM_FUNC_DECL tvec2<T> & operator++();
GLM_FUNC_DECL tvec2<T> & operator--(); GLM_FUNC_DECL tvec2<T> & operator--();
////////////////////////////////////// //////////////////////////////////////
// Unary bit operators // Unary bit operators
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T> & operator%= (U const & s); GLM_FUNC_DECL tvec2<T> & operator%= (U const & s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T> & operator%= (tvec2<U> const & v); GLM_FUNC_DECL tvec2<T> & operator%= (tvec2<U> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T> & operator&= (U const & s); GLM_FUNC_DECL tvec2<T> & operator&= (U const & s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T> & operator&= (tvec2<U> const & v); GLM_FUNC_DECL tvec2<T> & operator&= (tvec2<U> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T> & operator|= (U const & s); GLM_FUNC_DECL tvec2<T> & operator|= (U const & s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T> & operator|= (tvec2<U> const & v); GLM_FUNC_DECL tvec2<T> & operator|= (tvec2<U> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T> & operator^= (U const & s); GLM_FUNC_DECL tvec2<T> & operator^= (U const & s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T> & operator^= (tvec2<U> const & v); GLM_FUNC_DECL tvec2<T> & operator^= (tvec2<U> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T> & operator<<=(U const & s); GLM_FUNC_DECL tvec2<T> & operator<<=(U const & s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T> & operator<<=(tvec2<U> const & v); GLM_FUNC_DECL tvec2<T> & operator<<=(tvec2<U> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T> & operator>>=(U const & s); GLM_FUNC_DECL tvec2<T> & operator>>=(U const & s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T> & operator>>=(tvec2<U> const & v); GLM_FUNC_DECL tvec2<T> & operator>>=(tvec2<U> const & v);
////////////////////////////////////// //////////////////////////////////////
// Swizzle operators // Swizzle operators
GLM_FUNC_DECL value_type swizzle(comp X) const; GLM_FUNC_DECL value_type swizzle(comp X) const;
GLM_FUNC_DECL tvec2<T> swizzle(comp X, comp Y) const; GLM_FUNC_DECL tvec2<T> swizzle(comp X, comp Y) const;
GLM_FUNC_DECL tvec3<T> swizzle(comp X, comp Y, comp Z) const; GLM_FUNC_DECL tvec3<T> swizzle(comp X, comp Y, comp Z) const;
GLM_FUNC_DECL tvec4<T> swizzle(comp X, comp Y, comp Z, comp W) const; GLM_FUNC_DECL tvec4<T> swizzle(comp X, comp Y, comp Z, comp W) const;
GLM_FUNC_DECL tref2<T> swizzle(comp X, comp Y); GLM_FUNC_DECL tref2<T> swizzle(comp X, comp Y);
}; };
template <typename T> template <typename T>
struct tref2 struct tref2
{
GLM_FUNC_DECL tref2(T & x, T & y);
GLM_FUNC_DECL tref2(tref2<T> const & r);
GLM_FUNC_DECL tref2(tvec2<T> const & v);
GLM_FUNC_DECL tref2<T> & operator= (tref2<T> const & r);
GLM_FUNC_DECL tref2<T> & operator= (tvec2<T> const & v);
T& x;
T& y;
};
GLM_DETAIL_IS_VECTOR(tvec2);
} //namespace detail
namespace core{
namespace type{
namespace precision
{ {
//! 2 components vector of high precision floating-point numbers. GLM_FUNC_DECL tref2(T & x, T & y);
//! There is no guarantee on the actual precision. GLM_FUNC_DECL tref2(tref2<T> const & r);
//! From GLSL 1.30.8 specification, section 4.5.2 Precision Qualifiers. GLM_FUNC_DECL tref2(tvec2<T> const & v);
//! \ingroup core_precision
typedef detail::tvec2<highp_float> highp_vec2;
//! 2 components vector of medium precision floating-point numbers.
//! There is no guarantee on the actual precision.
//! From GLSL 1.30.8 specification, section 4.5.2 Precision Qualifiers.
//! \ingroup core_precision
typedef detail::tvec2<mediump_float> mediump_vec2;
//! 2 components vector of low precision floating-point numbers.
//! There is no guarantee on the actual precision.
//! From GLSL 1.30.8 specification, section 4.5.2 Precision Qualifiers.
//! \ingroup core_precision
typedef detail::tvec2<lowp_float> lowp_vec2;
//! 2 components vector of high precision signed integer numbers. GLM_FUNC_DECL tref2<T> & operator= (tref2<T> const & r);
//! There is no guarantee on the actual precision. GLM_FUNC_DECL tref2<T> & operator= (tvec2<T> const & v);
//! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers.
//! \ingroup core_precision T& x;
typedef detail::tvec2<highp_int> highp_ivec2; T& y;
//! 2 components vector of medium precision signed integer numbers. };
//! There is no guarantee on the actual precision.
//! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers. GLM_DETAIL_IS_VECTOR(tvec2);
//! \ingroup core_precision
typedef detail::tvec2<mediump_int> mediump_ivec2; } //namespace detail
//! 2 components vector of low precision signed integer numbers.
//! There is no guarantee on the actual precision. namespace core{
//! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers. namespace type{
//! \ingroup core_precision namespace precision
typedef detail::tvec2<lowp_int> lowp_ivec2; {
//! 2 components vector of high precision floating-point numbers.
//! There is no guarantee on the actual precision.
//! From GLSL 1.30.8 specification, section 4.5.2 Precision Qualifiers.
//! \ingroup core_precision
typedef detail::tvec2<highp_float> highp_vec2;
//! 2 components vector of medium precision floating-point numbers.
//! There is no guarantee on the actual precision.
//! From GLSL 1.30.8 specification, section 4.5.2 Precision Qualifiers.
//! \ingroup core_precision
typedef detail::tvec2<mediump_float> mediump_vec2;
//! 2 components vector of low precision floating-point numbers.
//! There is no guarantee on the actual precision.
//! From GLSL 1.30.8 specification, section 4.5.2 Precision Qualifiers.
//! \ingroup core_precision
typedef detail::tvec2<lowp_float> lowp_vec2;
//! 2 components vector of high precision signed integer numbers.
//! There is no guarantee on the actual precision.
//! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers.
//! \ingroup core_precision
typedef detail::tvec2<highp_int> highp_ivec2;
//! 2 components vector of medium precision signed integer numbers.
//! There is no guarantee on the actual precision.
//! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers.
//! \ingroup core_precision
typedef detail::tvec2<mediump_int> mediump_ivec2;
//! 2 components vector of low precision signed integer numbers.
//! There is no guarantee on the actual precision.
//! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers.
//! \ingroup core_precision
typedef detail::tvec2<lowp_int> lowp_ivec2;
//! 2 components vector of high precision unsigned integer numbers. //! 2 components vector of high precision unsigned integer numbers.
//! There is no guarantee on the actual precision. //! There is no guarantee on the actual precision.
//! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers. //! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers.
//! \ingroup core_precision //! \ingroup core_precision
typedef detail::tvec2<highp_uint> highp_uvec2; typedef detail::tvec2<highp_uint> highp_uvec2;
//! 2 components vector of medium precision unsigned integer numbers.
//! There is no guarantee on the actual precision.
//! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers.
//! \ingroup core_precision
typedef detail::tvec2<mediump_uint> mediump_uvec2;
//! 2 components vector of low precision unsigned integer numbers.
//! There is no guarantee on the actual precision.
//! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers.
//! \ingroup core_precision
typedef detail::tvec2<lowp_uint> lowp_uvec2;
}
//namespace precision
}//namespace type //! 2 components vector of medium precision unsigned integer numbers.
}//namespace core //! There is no guarantee on the actual precision.
//! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers.
//! \ingroup core_precision
typedef detail::tvec2<mediump_uint> mediump_uvec2;
//! 2 components vector of low precision unsigned integer numbers.
//! There is no guarantee on the actual precision.
//! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers.
//! \ingroup core_precision
typedef detail::tvec2<lowp_uint> lowp_uvec2;
}//namespace precision
}//namespace type
}//namespace core
}//namespace glm }//namespace glm
#ifndef GLM_EXTERNAL_TEMPLATE #ifndef GLM_EXTERNAL_TEMPLATE
#include "type_vec2.inl" #include "type_vec2.inl"
#endif #endif//GLM_EXTERNAL_TEMPLATE
#endif//glm_core_type_gentype2 #endif//glm_core_type_gentype2

View File

@ -16,256 +16,254 @@
#include "type_size.hpp" #include "type_size.hpp"
#include "_swizzle.hpp" #include "_swizzle.hpp"
namespace glm namespace glm{
namespace detail
{ {
namespace test template <typename T> struct tref2;
{ template <typename T> struct tref3;
void main_vec3(); template <typename T> struct tref4;
}//namespace test template <typename T> struct tvec2;
template <typename T> struct tvec4;
namespace detail //! Basic 3D vector type.
{ //! \ingroup core_template
template <typename T> struct tref2; template <typename T>
template <typename T> struct tref3; struct tvec3
template <typename T> struct tref4; {
template <typename T> struct tvec2; enum ctor{null};
template <typename T> struct tvec4;
//! Basic 3D vector type. typedef T value_type;
//! \ingroup core_template typedef std::size_t size_type;
template <typename T> GLM_FUNC_DECL size_type length() const;
struct tvec3 static GLM_FUNC_DECL size_type value_size();
{
enum ctor{null};
typedef T value_type; typedef tvec3<T> type;
typedef std::size_t size_type; typedef tvec3<bool> bool_type;
GLM_FUNC_DECL size_type length() const;
static GLM_FUNC_DECL size_type value_size();
typedef tvec3<T> type; //////////////////////////////////////
typedef tvec3<bool> bool_type; // Data
////////////////////////////////////// # if(GLM_COMPONENT == GLM_COMPONENT_ONLY_XYZW)
// Data value_type x, y, z;
# elif(GLM_COMPONENT == GLM_COMPONENT_MS_EXT)
# if(GLM_COMPONENT == GLM_COMPONENT_ONLY_XYZW) union
value_type x, y, z;
# elif(GLM_COMPONENT == GLM_COMPONENT_MS_EXT)
union
{
struct{value_type x, y, z;};
struct{value_type r, g, b;};
struct{value_type s, t, p;};
};
# else//(GLM_COMPONENT == GLM_COMPONENT_GLSL_NAMES)
union {value_type x, r, s;};
union {value_type y, g, t;};
union {value_type z, b, p;};
# endif//GLM_COMPONENT
//////////////////////////////////////
// Accesses
GLM_FUNC_DECL value_type & operator[](size_type i);
GLM_FUNC_DECL value_type const & operator[](size_type i) const;
//////////////////////////////////////
// Implicit basic constructors
GLM_FUNC_DECL tvec3();
GLM_FUNC_DECL tvec3(tvec3<T> const & v);
//////////////////////////////////////
// Explicit basic constructors
GLM_FUNC_DECL explicit tvec3(
ctor);
GLM_FUNC_DECL explicit tvec3(
value_type const & s);
GLM_FUNC_DECL explicit tvec3(
value_type const & s1,
value_type const & s2,
value_type const & s3);
//////////////////////////////////////
// Swizzle constructors
GLM_FUNC_DECL tvec3(tref3<T> const & r);
//////////////////////////////////////
// Convertion scalar constructors
//! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename U>
GLM_FUNC_DECL explicit tvec3(
U const & x);
//! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename U, typename V, typename W>
GLM_FUNC_DECL explicit tvec3(
U const & x,
V const & y,
W const & z);
//////////////////////////////////////
// Convertion vector constructors
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename A, typename B>
GLM_FUNC_DECL explicit tvec3(tvec2<A> const & v, B const & s);
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename A, typename B>
GLM_FUNC_DECL explicit tvec3(A const & s, tvec2<B> const & v);
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename U>
GLM_FUNC_DECL explicit tvec3(tvec3<U> const & v);
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename U>
GLM_FUNC_DECL explicit tvec3(tvec4<U> const & v);
//////////////////////////////////////
// Unary arithmetic operators
GLM_FUNC_DECL tvec3<T> & operator= (tvec3<T> const & v);
template <typename U>
GLM_FUNC_DECL tvec3<T> & operator= (tvec3<U> const & v);
template <typename U>
GLM_FUNC_DECL tvec3<T> & operator+=(U const & s);
template <typename U>
GLM_FUNC_DECL tvec3<T> & operator+=(tvec3<U> const & v);
template <typename U>
GLM_FUNC_DECL tvec3<T> & operator-=(U const & s);
template <typename U>
GLM_FUNC_DECL tvec3<T> & operator-=(tvec3<U> const & v);
template <typename U>
GLM_FUNC_DECL tvec3<T> & operator*=(U const & s);
template <typename U>
GLM_FUNC_DECL tvec3<T> & operator*=(tvec3<U> const & v);
template <typename U>
GLM_FUNC_DECL tvec3<T> & operator/=(U const & s);
template <typename U>
GLM_FUNC_DECL tvec3<T> & operator/=(tvec3<U> const & v);
GLM_FUNC_DECL tvec3<T> & operator++();
GLM_FUNC_DECL tvec3<T> & operator--();
//////////////////////////////////////
// Unary bit operators
template <typename U>
GLM_FUNC_DECL tvec3<T> & operator%= (U const & s);
template <typename U>
GLM_FUNC_DECL tvec3<T> & operator%= (tvec3<U> const & v);
template <typename U>
GLM_FUNC_DECL tvec3<T> & operator&= (U const & s);
template <typename U>
GLM_FUNC_DECL tvec3<T> & operator&= (tvec3<U> const & v);
template <typename U>
GLM_FUNC_DECL tvec3<T> & operator|= (U const & s);
template <typename U>
GLM_FUNC_DECL tvec3<T> & operator|= (tvec3<U> const & v);
template <typename U>
GLM_FUNC_DECL tvec3<T> & operator^= (U const & s);
template <typename U>
GLM_FUNC_DECL tvec3<T> & operator^= (tvec3<U> const & v);
template <typename U>
GLM_FUNC_DECL tvec3<T> & operator<<=(U const & s);
template <typename U>
GLM_FUNC_DECL tvec3<T> & operator<<=(tvec3<U> const & v);
template <typename U>
GLM_FUNC_DECL tvec3<T> & operator>>=(U const & s);
template <typename U>
GLM_FUNC_DECL tvec3<T> & operator>>=(tvec3<U> const & v);
//////////////////////////////////////
// Swizzle operators
GLM_FUNC_DECL value_type swizzle(comp X) const;
GLM_FUNC_DECL tvec2<T> swizzle(comp X, comp Y) const;
GLM_FUNC_DECL tvec3<T> swizzle(comp X, comp Y, comp Z) const;
GLM_FUNC_DECL tvec4<T> swizzle(comp X, comp Y, comp Z, comp W) const;
GLM_FUNC_DECL tref3<T> swizzle(comp X, comp Y, comp Z);
};
template <typename T>
struct tref3
{ {
GLM_FUNC_DECL tref3(T & x, T & y, T & z); struct{value_type x, y, z;};
GLM_FUNC_DECL tref3(tref3<T> const & r); struct{value_type r, g, b;};
GLM_FUNC_DECL tref3(tvec3<T> const & v); struct{value_type s, t, p;};
GLM_FUNC_DECL tref3<T> & operator= (tref3<T> const & r);
GLM_FUNC_DECL tref3<T> & operator= (tvec3<T> const & v);
T & x;
T & y;
T & z;
}; };
# else//(GLM_COMPONENT == GLM_COMPONENT_GLSL_NAMES)
union {value_type x, r, s;};
union {value_type y, g, t;};
union {value_type z, b, p;};
# endif//GLM_COMPONENT
GLM_DETAIL_IS_VECTOR(tvec3); //////////////////////////////////////
} //namespace detail // Accesses
namespace core{ GLM_FUNC_DECL value_type & operator[](size_type i);
namespace type{ GLM_FUNC_DECL value_type const & operator[](size_type i) const;
namespace precision //////////////////////////////////////
// Implicit basic constructors
GLM_FUNC_DECL tvec3();
GLM_FUNC_DECL tvec3(tvec3<T> const & v);
//////////////////////////////////////
// Explicit basic constructors
GLM_FUNC_DECL explicit tvec3(
ctor);
GLM_FUNC_DECL explicit tvec3(
value_type const & s);
GLM_FUNC_DECL explicit tvec3(
value_type const & s1,
value_type const & s2,
value_type const & s3);
//////////////////////////////////////
// Swizzle constructors
GLM_FUNC_DECL tvec3(tref3<T> const & r);
//////////////////////////////////////
// Convertion scalar constructors
//! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename U>
GLM_FUNC_DECL explicit tvec3(
U const & x);
//! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename U, typename V, typename W>
GLM_FUNC_DECL explicit tvec3(
U const & x,
V const & y,
W const & z);
//////////////////////////////////////
// Convertion vector constructors
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename A, typename B>
GLM_FUNC_DECL explicit tvec3(tvec2<A> const & v, B const & s);
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename A, typename B>
GLM_FUNC_DECL explicit tvec3(A const & s, tvec2<B> const & v);
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename U>
GLM_FUNC_DECL explicit tvec3(tvec3<U> const & v);
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename U>
GLM_FUNC_DECL explicit tvec3(tvec4<U> const & v);
//////////////////////////////////////
// Unary arithmetic operators
GLM_FUNC_DECL tvec3<T> & operator= (tvec3<T> const & v);
template <typename U>
GLM_FUNC_DECL tvec3<T> & operator= (tvec3<U> const & v);
template <typename U>
GLM_FUNC_DECL tvec3<T> & operator+=(U const & s);
template <typename U>
GLM_FUNC_DECL tvec3<T> & operator+=(tvec3<U> const & v);
template <typename U>
GLM_FUNC_DECL tvec3<T> & operator-=(U const & s);
template <typename U>
GLM_FUNC_DECL tvec3<T> & operator-=(tvec3<U> const & v);
template <typename U>
GLM_FUNC_DECL tvec3<T> & operator*=(U const & s);
template <typename U>
GLM_FUNC_DECL tvec3<T> & operator*=(tvec3<U> const & v);
template <typename U>
GLM_FUNC_DECL tvec3<T> & operator/=(U const & s);
template <typename U>
GLM_FUNC_DECL tvec3<T> & operator/=(tvec3<U> const & v);
GLM_FUNC_DECL tvec3<T> & operator++();
GLM_FUNC_DECL tvec3<T> & operator--();
//////////////////////////////////////
// Unary bit operators
template <typename U>
GLM_FUNC_DECL tvec3<T> & operator%= (U const & s);
template <typename U>
GLM_FUNC_DECL tvec3<T> & operator%= (tvec3<U> const & v);
template <typename U>
GLM_FUNC_DECL tvec3<T> & operator&= (U const & s);
template <typename U>
GLM_FUNC_DECL tvec3<T> & operator&= (tvec3<U> const & v);
template <typename U>
GLM_FUNC_DECL tvec3<T> & operator|= (U const & s);
template <typename U>
GLM_FUNC_DECL tvec3<T> & operator|= (tvec3<U> const & v);
template <typename U>
GLM_FUNC_DECL tvec3<T> & operator^= (U const & s);
template <typename U>
GLM_FUNC_DECL tvec3<T> & operator^= (tvec3<U> const & v);
template <typename U>
GLM_FUNC_DECL tvec3<T> & operator<<=(U const & s);
template <typename U>
GLM_FUNC_DECL tvec3<T> & operator<<=(tvec3<U> const & v);
template <typename U>
GLM_FUNC_DECL tvec3<T> & operator>>=(U const & s);
template <typename U>
GLM_FUNC_DECL tvec3<T> & operator>>=(tvec3<U> const & v);
//////////////////////////////////////
// Swizzle operators
GLM_FUNC_DECL value_type swizzle(comp X) const;
GLM_FUNC_DECL tvec2<T> swizzle(comp X, comp Y) const;
GLM_FUNC_DECL tvec3<T> swizzle(comp X, comp Y, comp Z) const;
GLM_FUNC_DECL tvec4<T> swizzle(comp X, comp Y, comp Z, comp W) const;
GLM_FUNC_DECL tref3<T> swizzle(comp X, comp Y, comp Z);
};
template <typename T>
struct tref3
{ {
//! 3 components vector of high precision floating-point numbers. GLM_FUNC_DECL tref3(T & x, T & y, T & z);
//! There is no guarantee on the actual precision. GLM_FUNC_DECL tref3(tref3<T> const & r);
//! From GLSL 1.30.8 specification, section 4.5.2 Precision Qualifiers. GLM_FUNC_DECL tref3(tvec3<T> const & v);
//! \ingroup core_precision
typedef detail::tvec3<highp_float> highp_vec3;
//! 3 components vector of medium precision floating-point numbers.
//! There is no guarantee on the actual precision.
//! From GLSL 1.30.8 specification, section 4.5.2 Precision Qualifiers.
//! \ingroup core_precision
typedef detail::tvec3<mediump_float> mediump_vec3;
//! 3 components vector of low precision floating-point numbers.
//! There is no guarantee on the actual precision.
//! From GLSL 1.30.8 specification, section 4.5.2 Precision Qualifiers.
//! \ingroup core_precision
typedef detail::tvec3<lowp_float> lowp_vec3;
//! 3 components vector of high precision signed integer numbers. GLM_FUNC_DECL tref3<T> & operator= (tref3<T> const & r);
//! There is no guarantee on the actual precision. GLM_FUNC_DECL tref3<T> & operator= (tvec3<T> const & v);
//! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers.
//! \ingroup core_precision
typedef detail::tvec3<highp_int> highp_ivec3;
//! 3 components vector of medium precision signed integer numbers.
//! There is no guarantee on the actual precision.
//! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers.
//! \ingroup core_precision
typedef detail::tvec3<mediump_int> mediump_ivec3;
//! 3 components vector of low precision signed integer numbers.
//! There is no guarantee on the actual precision.
//! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers.
//! \ingroup core_precision
typedef detail::tvec3<lowp_int> lowp_ivec3;
//! 3 components vector of high precision unsigned integer numbers. T & x;
//! There is no guarantee on the actual precision. T & y;
//! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers. T & z;
//! \ingroup core_precision };
typedef detail::tvec3<highp_uint> highp_uvec3;
//! 3 components vector of medium precision unsigned integer numbers.
//! There is no guarantee on the actual precision.
//! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers.
//! \ingroup core_precision
typedef detail::tvec3<mediump_uint> mediump_uvec3;
//! 3 components vector of low precision unsigned integer numbers.
//! There is no guarantee on the actual precision.
//! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers.
//! \ingroup core_precision
typedef detail::tvec3<lowp_uint> lowp_uvec3;
}
//namespace precision
}//namespace type GLM_DETAIL_IS_VECTOR(tvec3);
}//namespace core } //namespace detail
namespace core{
namespace type{
namespace precision
{
//! 3 components vector of high precision floating-point numbers.
//! There is no guarantee on the actual precision.
//! From GLSL 1.30.8 specification, section 4.5.2 Precision Qualifiers.
//! \ingroup core_precision
typedef detail::tvec3<highp_float> highp_vec3;
//! 3 components vector of medium precision floating-point numbers.
//! There is no guarantee on the actual precision.
//! From GLSL 1.30.8 specification, section 4.5.2 Precision Qualifiers.
//! \ingroup core_precision
typedef detail::tvec3<mediump_float> mediump_vec3;
//! 3 components vector of low precision floating-point numbers.
//! There is no guarantee on the actual precision.
//! From GLSL 1.30.8 specification, section 4.5.2 Precision Qualifiers.
//! \ingroup core_precision
typedef detail::tvec3<lowp_float> lowp_vec3;
//! 3 components vector of high precision signed integer numbers.
//! There is no guarantee on the actual precision.
//! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers.
//! \ingroup core_precision
typedef detail::tvec3<highp_int> highp_ivec3;
//! 3 components vector of medium precision signed integer numbers.
//! There is no guarantee on the actual precision.
//! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers.
//! \ingroup core_precision
typedef detail::tvec3<mediump_int> mediump_ivec3;
//! 3 components vector of low precision signed integer numbers.
//! There is no guarantee on the actual precision.
//! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers.
//! \ingroup core_precision
typedef detail::tvec3<lowp_int> lowp_ivec3;
//! 3 components vector of high precision unsigned integer numbers.
//! There is no guarantee on the actual precision.
//! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers.
//! \ingroup core_precision
typedef detail::tvec3<highp_uint> highp_uvec3;
//! 3 components vector of medium precision unsigned integer numbers.
//! There is no guarantee on the actual precision.
//! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers.
//! \ingroup core_precision
typedef detail::tvec3<mediump_uint> mediump_uvec3;
//! 3 components vector of low precision unsigned integer numbers.
//! There is no guarantee on the actual precision.
//! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers.
//! \ingroup core_precision
typedef detail::tvec3<lowp_uint> lowp_uvec3;
}//namespace precision
}//namespace type
}//namespace core
}//namespace glm }//namespace glm
#ifndef GLM_EXTERNAL_TEMPLATE #ifndef GLM_EXTERNAL_TEMPLATE
#include "type_vec3.inl" #include "type_vec3.inl"
#endif #endif//GLM_EXTERNAL_TEMPLATE
#endif//glm_core_type_gentype3 #endif//glm_core_type_gentype3

View File

@ -16,275 +16,267 @@
#include "type_size.hpp" #include "type_size.hpp"
#include "_swizzle.hpp" #include "_swizzle.hpp"
namespace glm namespace glm{
namespace detail
{ {
namespace test template <typename T> struct tref2;
{ template <typename T> struct tref3;
void main_vec4(); template <typename T> struct tref4;
}//namespace test template <typename T> struct tvec2;
template <typename T> struct tvec3;
namespace detail ///Basic 4D vector type.
//! \ingroup core_template
template <typename T>
struct tvec4
{ {
template <typename T> struct tref2; enum ctor{null};
template <typename T> struct tref3;
template <typename T> struct tref4;
template <typename T> struct tvec2;
template <typename T> struct tvec3;
///Basic 4D vector type. typedef T value_type;
//! \ingroup core_template typedef std::size_t size_type;
template <typename T> GLM_FUNC_DECL size_type length() const;
struct tvec4 static GLM_FUNC_DECL size_type value_size();
typedef tvec4<T> type;
typedef tvec4<bool> bool_type;
//////////////////////////////////////
// Data
# if(GLM_COMPONENT == GLM_COMPONENT_ONLY_XYZW)
value_type x, y, z, w;
# elif(GLM_COMPONENT == GLM_COMPONENT_MS_EXT)
union
{ {
enum ctor{null}; struct{value_type x, y, z, w;};
struct{value_type r, g, b, a;};
typedef T value_type; struct{value_type s, t, p, q;};
typedef std::size_t size_type;
GLM_FUNC_DECL size_type length() const;
static GLM_FUNC_DECL size_type value_size();
typedef tvec4<T> type;
typedef tvec4<bool> bool_type;
//////////////////////////////////////
// Data
# if(GLM_COMPONENT == GLM_COMPONENT_ONLY_XYZW)
value_type x, y, z, w;
# elif(GLM_COMPONENT == GLM_COMPONENT_MS_EXT)
union
{
struct{value_type x, y, z, w;};
struct{value_type r, g, b, a;};
struct{value_type s, t, p, q;};
};
# else//(GLM_COMPONENT == GLM_COMPONENT_GLSL_NAMES)
union {value_type x, r, s;};
union {value_type y, g, t;};
union {value_type z, b, p;};
union {value_type w, a, q;};
# endif//GLM_COMPONENT
//////////////////////////////////////
// Accesses
GLM_FUNC_DECL value_type & operator[](size_type i);
GLM_FUNC_DECL value_type const & operator[](size_type i) const;
//////////////////////////////////////
// Implicit basic constructors
GLM_FUNC_DECL tvec4();
GLM_FUNC_DECL tvec4(type const & v);
//////////////////////////////////////
// Explicit basic constructors
GLM_FUNC_DECL explicit tvec4(
ctor);
GLM_FUNC_DECL explicit tvec4(
value_type const & s);
GLM_FUNC_DECL explicit tvec4(
value_type const & s0,
value_type const & s1,
value_type const & s2,
value_type const & s3);
//////////////////////////////////////
// Swizzle constructors
GLM_FUNC_DECL tvec4(tref4<T> const & r);
//////////////////////////////////////
// Convertion scalar constructors
//! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename U>
GLM_FUNC_DECL explicit tvec4(
U const & x);
//! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename A, typename B, typename C, typename D>
GLM_FUNC_DECL explicit tvec4(
A const & x,
B const & y,
C const & z,
D const & w);
//////////////////////////////////////
// Convertion vector constructors
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename A, typename B, typename C>
GLM_FUNC_DECL explicit tvec4(tvec2<A> const & v, B const & s1, C const & s2);
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename A, typename B, typename C>
GLM_FUNC_DECL explicit tvec4(A const & s1, tvec2<B> const & v, C const & s2);
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename A, typename B, typename C>
GLM_FUNC_DECL explicit tvec4(A const & s1, B const & s2, tvec2<C> const & v);
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename A, typename B>
GLM_FUNC_DECL explicit tvec4(tvec3<A> const & v, B const & s);
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename A, typename B>
GLM_FUNC_DECL explicit tvec4(A const & s, tvec3<B> const & v);
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename A, typename B>
GLM_FUNC_DECL explicit tvec4(tvec2<A> const & v1, tvec2<B> const & v2);
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename U>
GLM_FUNC_DECL explicit tvec4(tvec4<U> const & v);
//////////////////////////////////////
// Unary arithmetic operators
GLM_FUNC_DECL tvec4<T> & operator= (tvec4<T> const & v);
template <typename U>
GLM_FUNC_DECL tvec4<T> & operator= (tvec4<U> const & v);
template <typename U>
GLM_FUNC_DECL tvec4<T> & operator+=(U const & s);
template <typename U>
GLM_FUNC_DECL tvec4<T> & operator+=(tvec4<U> const & v);
template <typename U>
GLM_FUNC_DECL tvec4<T> & operator-=(U const & s);
template <typename U>
GLM_FUNC_DECL tvec4<T> & operator-=(tvec4<U> const & v);
template <typename U>
GLM_FUNC_DECL tvec4<T> & operator*=(U const & s);
template <typename U>
GLM_FUNC_DECL tvec4<T> & operator*=(tvec4<U> const & v);
template <typename U>
GLM_FUNC_DECL tvec4<T> & operator/=(U const & s);
template <typename U>
GLM_FUNC_DECL tvec4<T> & operator/=(tvec4<U> const & v);
GLM_FUNC_DECL tvec4<T> & operator++();
GLM_FUNC_DECL tvec4<T> & operator--();
//////////////////////////////////////
// Unary bit operators
template <typename U>
GLM_FUNC_DECL tvec4<T> & operator%= (U const & s);
template <typename U>
GLM_FUNC_DECL tvec4<T> & operator%= (tvec4<U> const & v);
template <typename U>
GLM_FUNC_DECL tvec4<T> & operator&= (U const & s);
template <typename U>
GLM_FUNC_DECL tvec4<T> & operator&= (tvec4<U> const & v);
template <typename U>
GLM_FUNC_DECL tvec4<T> & operator|= (U const & s);
template <typename U>
GLM_FUNC_DECL tvec4<T> & operator|= (tvec4<U> const & v);
template <typename U>
GLM_FUNC_DECL tvec4<T> & operator^= (U const & s);
template <typename U>
GLM_FUNC_DECL tvec4<T> & operator^= (tvec4<U> const & v);
template <typename U>
GLM_FUNC_DECL tvec4<T> & operator<<=(U const & s);
template <typename U>
GLM_FUNC_DECL tvec4<T> & operator<<=(tvec4<U> const & v);
template <typename U>
GLM_FUNC_DECL tvec4<T> & operator>>=(U const & s);
template <typename U>
GLM_FUNC_DECL tvec4<T> & operator>>=(tvec4<U> const & v);
//////////////////////////////////////
// Swizzle operators
GLM_FUNC_DECL value_type swizzle(comp X) const;
GLM_FUNC_DECL tvec2<T> swizzle(comp X, comp Y) const;
GLM_FUNC_DECL tvec3<T> swizzle(comp X, comp Y, comp Z) const;
GLM_FUNC_DECL tvec4<T> swizzle(comp X, comp Y, comp Z, comp W) const;
GLM_FUNC_DECL tref4<T> swizzle(comp X, comp Y, comp Z, comp W);
}; };
# else//(GLM_COMPONENT == GLM_COMPONENT_GLSL_NAMES)
union {value_type x, r, s;};
union {value_type y, g, t;};
union {value_type z, b, p;};
union {value_type w, a, q;};
# endif//GLM_COMPONENT
template <typename T> //////////////////////////////////////
struct tref4 // Accesses
{
GLM_FUNC_DECL tref4(T & x, T & y, T & z, T & w);
GLM_FUNC_DECL tref4(tref4<T> const & r);
GLM_FUNC_DECL tref4(tvec4<T> const & v);
GLM_FUNC_DECL tref4<T> & operator= (tref4<T> const & r); GLM_FUNC_DECL value_type & operator[](size_type i);
GLM_FUNC_DECL tref4<T> & operator= (tvec4<T> const & v); GLM_FUNC_DECL value_type const & operator[](size_type i) const;
T & x; //////////////////////////////////////
T & y; // Implicit basic constructors
T & z;
T & w;
};
GLM_DETAIL_IS_VECTOR(tvec4); GLM_FUNC_DECL tvec4();
} //namespace detail GLM_FUNC_DECL tvec4(type const & v);
namespace core{ //////////////////////////////////////
namespace type{ // Explicit basic constructors
////////////////////////// GLM_FUNC_DECL explicit tvec4(
// Float definition ctor);
GLM_FUNC_DECL explicit tvec4(
value_type const & s);
GLM_FUNC_DECL explicit tvec4(
value_type const & s0,
value_type const & s1,
value_type const & s2,
value_type const & s3);
namespace precision //////////////////////////////////////
// Swizzle constructors
GLM_FUNC_DECL tvec4(tref4<T> const & r);
//////////////////////////////////////
// Convertion scalar constructors
//! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename U>
GLM_FUNC_DECL explicit tvec4(
U const & x);
//! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename A, typename B, typename C, typename D>
GLM_FUNC_DECL explicit tvec4(
A const & x,
B const & y,
C const & z,
D const & w);
//////////////////////////////////////
// Convertion vector constructors
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename A, typename B, typename C>
GLM_FUNC_DECL explicit tvec4(tvec2<A> const & v, B const & s1, C const & s2);
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename A, typename B, typename C>
GLM_FUNC_DECL explicit tvec4(A const & s1, tvec2<B> const & v, C const & s2);
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename A, typename B, typename C>
GLM_FUNC_DECL explicit tvec4(A const & s1, B const & s2, tvec2<C> const & v);
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename A, typename B>
GLM_FUNC_DECL explicit tvec4(tvec3<A> const & v, B const & s);
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename A, typename B>
GLM_FUNC_DECL explicit tvec4(A const & s, tvec3<B> const & v);
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename A, typename B>
GLM_FUNC_DECL explicit tvec4(tvec2<A> const & v1, tvec2<B> const & v2);
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename U>
GLM_FUNC_DECL explicit tvec4(tvec4<U> const & v);
//////////////////////////////////////
// Unary arithmetic operators
GLM_FUNC_DECL tvec4<T> & operator= (tvec4<T> const & v);
template <typename U>
GLM_FUNC_DECL tvec4<T> & operator= (tvec4<U> const & v);
template <typename U>
GLM_FUNC_DECL tvec4<T> & operator+=(U const & s);
template <typename U>
GLM_FUNC_DECL tvec4<T> & operator+=(tvec4<U> const & v);
template <typename U>
GLM_FUNC_DECL tvec4<T> & operator-=(U const & s);
template <typename U>
GLM_FUNC_DECL tvec4<T> & operator-=(tvec4<U> const & v);
template <typename U>
GLM_FUNC_DECL tvec4<T> & operator*=(U const & s);
template <typename U>
GLM_FUNC_DECL tvec4<T> & operator*=(tvec4<U> const & v);
template <typename U>
GLM_FUNC_DECL tvec4<T> & operator/=(U const & s);
template <typename U>
GLM_FUNC_DECL tvec4<T> & operator/=(tvec4<U> const & v);
GLM_FUNC_DECL tvec4<T> & operator++();
GLM_FUNC_DECL tvec4<T> & operator--();
//////////////////////////////////////
// Unary bit operators
template <typename U>
GLM_FUNC_DECL tvec4<T> & operator%= (U const & s);
template <typename U>
GLM_FUNC_DECL tvec4<T> & operator%= (tvec4<U> const & v);
template <typename U>
GLM_FUNC_DECL tvec4<T> & operator&= (U const & s);
template <typename U>
GLM_FUNC_DECL tvec4<T> & operator&= (tvec4<U> const & v);
template <typename U>
GLM_FUNC_DECL tvec4<T> & operator|= (U const & s);
template <typename U>
GLM_FUNC_DECL tvec4<T> & operator|= (tvec4<U> const & v);
template <typename U>
GLM_FUNC_DECL tvec4<T> & operator^= (U const & s);
template <typename U>
GLM_FUNC_DECL tvec4<T> & operator^= (tvec4<U> const & v);
template <typename U>
GLM_FUNC_DECL tvec4<T> & operator<<=(U const & s);
template <typename U>
GLM_FUNC_DECL tvec4<T> & operator<<=(tvec4<U> const & v);
template <typename U>
GLM_FUNC_DECL tvec4<T> & operator>>=(U const & s);
template <typename U>
GLM_FUNC_DECL tvec4<T> & operator>>=(tvec4<U> const & v);
//////////////////////////////////////
// Swizzle operators
GLM_FUNC_DECL value_type swizzle(comp X) const;
GLM_FUNC_DECL tvec2<T> swizzle(comp X, comp Y) const;
GLM_FUNC_DECL tvec3<T> swizzle(comp X, comp Y, comp Z) const;
GLM_FUNC_DECL tvec4<T> swizzle(comp X, comp Y, comp Z, comp W) const;
GLM_FUNC_DECL tref4<T> swizzle(comp X, comp Y, comp Z, comp W);
};
template <typename T>
struct tref4
{ {
//! 4 components vector of high precision floating-point numbers. GLM_FUNC_DECL tref4(T & x, T & y, T & z, T & w);
//! There is no guarantee on the actual precision. GLM_FUNC_DECL tref4(tref4<T> const & r);
//! From GLSL 1.30.8 specification, section 4.5.2 Precision Qualifiers. GLM_FUNC_DECL tref4(tvec4<T> const & v);
//! \ingroup core_precision
typedef detail::tvec4<highp_float> highp_vec4;
//! 4 components vector of medium precision floating-point numbers.
//! There is no guarantee on the actual precision.
//! From GLSL 1.30.8 specification, section 4.5.2 Precision Qualifiers.
//! \ingroup core_precision
typedef detail::tvec4<mediump_float> mediump_vec4;
//! 4 components vector of low precision floating-point numbers.
//! There is no guarantee on the actual precision.
//! From GLSL 1.30.8 specification, section 4.5.2 Precision Qualifiers.
//! \ingroup core_precision
typedef detail::tvec4<lowp_float> lowp_vec4;
//! 4 components vector of high precision signed integer numbers. GLM_FUNC_DECL tref4<T> & operator= (tref4<T> const & r);
//! There is no guarantee on the actual precision. GLM_FUNC_DECL tref4<T> & operator= (tvec4<T> const & v);
//! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers.
//! \ingroup core_precision
typedef detail::tvec4<highp_int> highp_ivec4;
//! 4 components vector of medium precision signed integer numbers.
//! There is no guarantee on the actual precision.
//! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers.
//! \ingroup core_precision
typedef detail::tvec4<mediump_int> mediump_ivec4;
//! 4 components vector of low precision signed integer numbers.
//! There is no guarantee on the actual precision.
//! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers.
//! \ingroup core_precision
typedef detail::tvec4<lowp_int> lowp_ivec4;
//! 4 components vector of high precision unsigned integer numbers. T & x;
//! There is no guarantee on the actual precision. T & y;
//! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers. T & z;
//! \ingroup core_precision T & w;
typedef detail::tvec4<highp_uint> highp_uvec4; };
//! 4 components vector of medium precision unsigned integer numbers.
//! There is no guarantee on the actual precision.
//! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers.
//! \ingroup core_precision
typedef detail::tvec4<mediump_uint> mediump_uvec4;
//! 4 components vector of low precision unsigned integer numbers.
//! There is no guarantee on the actual precision.
//! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers.
//! \ingroup core_precision
typedef detail::tvec4<lowp_uint> lowp_uvec4;
}
//namespace precision
}//namespace type GLM_DETAIL_IS_VECTOR(tvec4);
}//namespace core }//namespace detail
using namespace core::type; namespace core{
namespace type{
namespace precision
{
//! 4 components vector of high precision floating-point numbers.
//! There is no guarantee on the actual precision.
//! From GLSL 1.30.8 specification, section 4.5.2 Precision Qualifiers.
//! \ingroup core_precision
typedef detail::tvec4<highp_float> highp_vec4;
//! 4 components vector of medium precision floating-point numbers.
//! There is no guarantee on the actual precision.
//! From GLSL 1.30.8 specification, section 4.5.2 Precision Qualifiers.
//! \ingroup core_precision
typedef detail::tvec4<mediump_float> mediump_vec4;
//! 4 components vector of low precision floating-point numbers.
//! There is no guarantee on the actual precision.
//! From GLSL 1.30.8 specification, section 4.5.2 Precision Qualifiers.
//! \ingroup core_precision
typedef detail::tvec4<lowp_float> lowp_vec4;
//! 4 components vector of high precision signed integer numbers.
//! There is no guarantee on the actual precision.
//! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers.
//! \ingroup core_precision
typedef detail::tvec4<highp_int> highp_ivec4;
//! 4 components vector of medium precision signed integer numbers.
//! There is no guarantee on the actual precision.
//! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers.
//! \ingroup core_precision
typedef detail::tvec4<mediump_int> mediump_ivec4;
//! 4 components vector of low precision signed integer numbers.
//! There is no guarantee on the actual precision.
//! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers.
//! \ingroup core_precision
typedef detail::tvec4<lowp_int> lowp_ivec4;
//! 4 components vector of high precision unsigned integer numbers.
//! There is no guarantee on the actual precision.
//! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers.
//! \ingroup core_precision
typedef detail::tvec4<highp_uint> highp_uvec4;
//! 4 components vector of medium precision unsigned integer numbers.
//! There is no guarantee on the actual precision.
//! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers.
//! \ingroup core_precision
typedef detail::tvec4<mediump_uint> mediump_uvec4;
//! 4 components vector of low precision unsigned integer numbers.
//! There is no guarantee on the actual precision.
//! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers.
//! \ingroup core_precision
typedef detail::tvec4<lowp_uint> lowp_uvec4;
}//namespace precision
}//namespace type
}//namespace core
}//namespace glm }//namespace glm
#ifndef GLM_EXTERNAL_TEMPLATE #ifndef GLM_EXTERNAL_TEMPLATE
#include "type_vec4.inl" #include "type_vec4.inl"
#endif #endif//GLM_EXTERNAL_TEMPLATE
#endif//glm_core_type_gentype4 #endif//glm_core_type_gentype4