mirror of
https://github.com/g-truc/glm.git
synced 2025-04-07 06:25:00 +00:00
Merge branch '0.9.2' into noise
This commit is contained in:
commit
8432e064a8
28 changed files with 958 additions and 522 deletions
|
@ -3,8 +3,9 @@
|
|||
<glm copyright="Copyright © 2005 - 2011">
|
||||
<downloads>
|
||||
<section name="GLM - zip files">
|
||||
<download name="GLM 0.9.1.2" date="12/04/2010" size="3.4 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.2/glm-0.9.1.2.zip/download"/>
|
||||
<download name="GLM 0.9.1.1" date="17/03/2010" size="3.4 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.1/glm-0.9.1.1.zip/download"/>
|
||||
<download name="GLM 0.9.1.3" date="07/05/2010" size="3.4 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.3/glm-0.9.1.3.zip/download"/>
|
||||
<download name="GLM 0.9.1.2" date="12/04/2010" size="3.4 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.2/glm-0.9.1.2.zip/download"/>
|
||||
<download name="GLM 0.9.1.1" date="17/03/2010" size="3.4 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.1/glm-0.9.1.1.zip/download"/>
|
||||
<download name="GLM 0.9.1.0" date="03/03/2010" size="3.4 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.0/glm-0.9.1.0.zip/download"/>
|
||||
<download name="GLM 0.9.1.B" date="13/02/2010" size="3.4 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.B/glm-0.9.1.B.zip/download"/>
|
||||
<download name="GLM 0.9.0.8" date="13/02/2010" size="3.3 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.0.8/glm-0.9.0.8.zip/download"/>
|
||||
|
@ -61,8 +62,9 @@
|
|||
<download name="GLM 0.1.0.0" date="02/21/2005" size="29.2 KB" link="http://prdownloads.sourceforge.net/glf/glm-0.1-ur.zip?download"/>
|
||||
</section>
|
||||
<section name="GLM - 7z files">
|
||||
<download name="GLM 0.9.1.3" date="07/05/2011" size="2.1 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.3/glm-0.9.1.3.7z/download"/>
|
||||
<download name="GLM 0.9.1.2" date="12/04/2011" size="2.1 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.2/glm-0.9.1.2.7z/download"/>
|
||||
<download name="GLM 0.9.1.1" date="17/03/2011" size="2.1 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.1/glm-0.9.1.1.7z/download"/>
|
||||
<download name="GLM 0.9.1.1" date="17/03/2011" size="2.1 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.1/glm-0.9.1.1.7z/download"/>
|
||||
<download name="GLM 0.9.1.0" date="03/03/2011" size="2.1 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.0/glm-0.9.1.0.7z/download"/>
|
||||
<download name="GLM 0.9.1.B" date="13/02/2011" size="2.1 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.B/glm-0.9.1.B.7z/download"/>
|
||||
<download name="GLM 0.9.0.8" date="13/02/2011" size="1.9 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.0.8/glm-0.9.0.8.7z/download"/>
|
||||
|
@ -152,6 +154,16 @@
|
|||
</todo>
|
||||
|
||||
<page_news>
|
||||
<news index="0064" date="07/05/2011" title="GLM 0.9.1.3 released" image="goodies/logo.png" image-mini="image/logo-mini.png">
|
||||
<paragraph>
|
||||
Various bugs fixed with GLM 0.9.1.3.
|
||||
</paragraph>
|
||||
|
||||
<source type="Download" href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.3/glm-0.9.1.3.zip/download">GLM 0.9.1.3 (zip)</source>
|
||||
<source type="Download" href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.3/glm-0.9.1.3.7z/download">GLM 0.9.1.3 (7z)</source>
|
||||
<source type="Link" href="https://sourceforge.net/apps/trac/ogl-math/newticket">Submit a bug report</source>
|
||||
</news>
|
||||
|
||||
<news index="0063" date="15/04/2011" title="GLM 0.9.1.2 released" image="goodies/logo.png" image-mini="image/logo-mini.png">
|
||||
<paragraph>
|
||||
Bug fixes Only for GLM 0.9.1.2.
|
||||
|
|
|
@ -110,15 +110,15 @@ namespace detail
|
|||
|
||||
union uif32
|
||||
{
|
||||
uif32() :
|
||||
GLM_FUNC_QUALIFIER uif32() :
|
||||
i(0)
|
||||
{}
|
||||
|
||||
uif32(float f) :
|
||||
GLM_FUNC_QUALIFIER uif32(float f) :
|
||||
f(f)
|
||||
{}
|
||||
|
||||
uif32(unsigned int i) :
|
||||
GLM_FUNC_QUALIFIER uif32(unsigned int i) :
|
||||
i(i)
|
||||
{}
|
||||
|
||||
|
@ -128,15 +128,15 @@ namespace detail
|
|||
|
||||
union uif64
|
||||
{
|
||||
uif64() :
|
||||
GLM_FUNC_QUALIFIER uif64() :
|
||||
i(0)
|
||||
{}
|
||||
|
||||
uif64(double f) :
|
||||
GLM_FUNC_QUALIFIER uif64(double f) :
|
||||
f(f)
|
||||
{}
|
||||
|
||||
uif64(uint64 i) :
|
||||
GLM_FUNC_QUALIFIER uif64(uint64 i) :
|
||||
i(i)
|
||||
{}
|
||||
|
||||
|
|
|
@ -197,7 +197,7 @@ namespace glm
|
|||
|
||||
// imulExtended
|
||||
template <typename genIType>
|
||||
void imulExtended
|
||||
GLM_FUNC_QUALIFIER void imulExtended
|
||||
(
|
||||
genIType const & x,
|
||||
genIType const & y,
|
||||
|
@ -259,25 +259,21 @@ namespace glm
|
|||
|
||||
// bitfieldExtract
|
||||
template <typename genIUType>
|
||||
genIUType bitfieldExtract
|
||||
GLM_FUNC_QUALIFIER genIUType bitfieldExtract
|
||||
(
|
||||
genIUType const & Value,
|
||||
int const & Offset,
|
||||
int const & Bits
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<genIUType>::is_integer, "'bitfieldExtract' only accept integer values");
|
||||
assert(Offset + Bits <= sizeof(genIUType));
|
||||
int GenSize = int(sizeof(genIUType)) << int(3);
|
||||
|
||||
genIUType Result(0);
|
||||
if(std::numeric_limits<genIUType>::is_signed)
|
||||
Result |= (genIUType(1) << (sizeof(genIUType) * genIUType(8) - genIUType(1))) & (genIUType(1) << (Offset + Bits - genIUType(1)));
|
||||
assert(Offset + Bits <= GenSize);
|
||||
|
||||
genIUType Mask(0);
|
||||
for(int Bit = Offset; Bit < Bits; ++Bit)
|
||||
Mask |= (genIUType(1) << Bit);
|
||||
genIUType ShiftLeft = Bits ? Value << (GenSize - (Bits + Offset)) : genIUType(0);
|
||||
genIUType ShiftBack = ShiftLeft >> genIUType(GenSize - Bits);
|
||||
|
||||
return Result | ((Mask & Value) >> Offset);
|
||||
return ShiftBack;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
|
@ -340,7 +336,7 @@ namespace glm
|
|||
|
||||
genIUType Mask = 0;
|
||||
for(int Bit = Offset; Bit < Offset + Bits; ++Bit)
|
||||
Mask |= (genIUType(1) << Bit);
|
||||
Mask |= (1 << Bit);
|
||||
|
||||
return (Base & ~Mask) | (Insert & Mask);
|
||||
}
|
||||
|
@ -394,13 +390,14 @@ namespace glm
|
|||
template <typename genIUType>
|
||||
GLM_FUNC_QUALIFIER genIUType bitfieldReverse(genIUType const & Value)
|
||||
{
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<genIUType>::is_integer, "'bitfieldReverse' only accept integer values");
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_integer, "'bitRevert' only accept integer values");
|
||||
|
||||
genIUType Result = 0;
|
||||
for(std::size_t i = 0; i < sizeof(genIUType) * std::size_t(8); ++i)
|
||||
if(Value & (genIUType(1) << genIUType(i)))
|
||||
Result |= (genIUType(1) << (genIUType(sizeof(genIUType)) * genIUType(8)) - genIUType(1) - genIUType(i));
|
||||
return Result;
|
||||
genIUType Out = 0;
|
||||
std::size_t BitSize = sizeof(genIUType) * 8;
|
||||
for(std::size_t i = 0; i < BitSize; ++i)
|
||||
if(In & (genIUType(1) << i))
|
||||
Out |= genIUType(1) << (BitSize - 1 - i);
|
||||
return Out;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
|
@ -441,14 +438,14 @@ namespace glm
|
|||
|
||||
// bitCount
|
||||
template <typename genIUType>
|
||||
int bitCount(genIUType const & Value)
|
||||
GLM_FUNC_QUALIFIER int bitCount(genIUType const & Value)
|
||||
{
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<genIUType>::is_integer, "'bitCount' only accept integer values");
|
||||
|
||||
int Count = 0;
|
||||
for(std::size_t i = 0; i < sizeof(genIUType) * std::size_t(8); ++i)
|
||||
{
|
||||
if(Value & (genIUType(1) << i))
|
||||
if(Value & (1 << i))
|
||||
++Count;
|
||||
}
|
||||
return Count;
|
||||
|
|
|
@ -400,9 +400,11 @@
|
|||
// User defines: GLM_FORCE_INLINE GLM_FORCE_CUDA
|
||||
|
||||
#if(defined(GLM_FORCE_CUDA) || (defined(GLM_COMPILER) && (GLM_COMPILER >= GLM_COMPILER_CUDA30)))
|
||||
# define GLM_CUDA_QUALIFIER __device__ __host__
|
||||
# define GLM_CUDA_FUNC_DEF __device__ __host__
|
||||
# define GLM_CUDA_FUNC_DECL __device__ __host__
|
||||
#else
|
||||
# define GLM_CUDA_QUALIFIER
|
||||
# define GLM_CUDA_FUNC_DEF
|
||||
# define GLM_CUDA_FUNC_DECL
|
||||
#endif
|
||||
|
||||
#if(defined(GLM_FORCE_INLINE))
|
||||
|
@ -417,7 +419,8 @@
|
|||
# define GLM_INLINE inline
|
||||
#endif//defined(GLM_FORCE_INLINE)
|
||||
|
||||
#define GLM_FUNC_QUALIFIER GLM_CUDA_QUALIFIER GLM_INLINE
|
||||
#define GLM_FUNC_DECL GLM_CUDA_FUNC_DECL
|
||||
#define GLM_FUNC_QUALIFIER GLM_CUDA_FUNC_DEF GLM_INLINE
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Swizzle operators
|
||||
|
|
|
@ -46,7 +46,7 @@ namespace glm
|
|||
//! There is no guarantee on the actual precision.
|
||||
//! From GLSL 1.30.8 specification
|
||||
//! \ingroup core_precision
|
||||
typedef mediump_float_t mediump_float;
|
||||
typedef mediump_float_t mediump_float;
|
||||
//! High precision floating-point numbers.
|
||||
//! There is no guarantee on the actual precision.
|
||||
//! From GLSL 1.30.8 specification
|
||||
|
@ -58,7 +58,7 @@ namespace glm
|
|||
#if(!defined(GLM_PRECISION_HIGHP_FLOAT) && !defined(GLM_PRECISION_MEDIUMP_FLOAT) && !defined(GLM_PRECISION_LOWP_FLOAT))
|
||||
typedef precision::mediump_float float_t;
|
||||
#elif(defined(GLM_PRECISION_HIGHP_FLOAT) && !defined(GLM_PRECISION_MEDIUMP_FLOAT) && !defined(GLM_PRECISION_LOWP_FLOAT))
|
||||
typedef precision::highp_float float_t;
|
||||
typedef precision::highp_float float_t;
|
||||
#elif(!defined(GLM_PRECISION_HIGHP_FLOAT) && defined(GLM_PRECISION_MEDIUMP_FLOAT) && !defined(GLM_PRECISION_LOWP_FLOAT))
|
||||
typedef precision::mediump_float float_t;
|
||||
#elif(!defined(GLM_PRECISION_HIGHP_FLOAT) && !defined(GLM_PRECISION_MEDIUMP_FLOAT) && defined(GLM_PRECISION_LOWP_FLOAT))
|
||||
|
|
|
@ -33,30 +33,30 @@ namespace glm
|
|||
{
|
||||
public:
|
||||
// Constructors
|
||||
thalf();
|
||||
thalf(thalf const & s);
|
||||
GLM_FUNC_DECL thalf();
|
||||
GLM_FUNC_DECL thalf(thalf const & s);
|
||||
|
||||
template <typename U>
|
||||
explicit thalf(U const & s);
|
||||
GLM_FUNC_DECL explicit thalf(U const & s);
|
||||
|
||||
// Cast
|
||||
//operator float();
|
||||
operator float() const;
|
||||
GLM_FUNC_DECL operator float() const;
|
||||
//operator double();
|
||||
//operator double() const;
|
||||
|
||||
// Unary updatable operators
|
||||
thalf& operator= (thalf const & s);
|
||||
thalf& operator+=(thalf const & s);
|
||||
thalf& operator-=(thalf const & s);
|
||||
thalf& operator*=(thalf const & s);
|
||||
thalf& operator/=(thalf const & s);
|
||||
thalf& operator++();
|
||||
thalf& operator--();
|
||||
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--();
|
||||
|
||||
float toFloat() const{return toFloat32(data);}
|
||||
GLM_FUNC_DECL float toFloat() const{return toFloat32(data);}
|
||||
|
||||
hdata _data() const{return data;}
|
||||
GLM_FUNC_DECL hdata _data() const{return data;}
|
||||
|
||||
private:
|
||||
hdata data;
|
||||
|
|
|
@ -256,7 +256,7 @@ namespace detail
|
|||
|
||||
GLM_FUNC_QUALIFIER thalf::operator float() const
|
||||
{
|
||||
return toFloat();
|
||||
return toFloat32(this->data);
|
||||
}
|
||||
|
||||
//GLM_FUNC_QUALIFIER half::operator double()
|
||||
|
|
|
@ -45,15 +45,15 @@ namespace glm
|
|||
typedef std::size_t size_type;
|
||||
typedef tvec2<T> col_type;
|
||||
typedef tvec2<T> row_type;
|
||||
static size_type col_size();
|
||||
static size_type row_size();
|
||||
static GLM_FUNC_DECL size_type col_size();
|
||||
static GLM_FUNC_DECL size_type row_size();
|
||||
|
||||
typedef tmat2x2<T> type;
|
||||
typedef tmat2x2<T> transpose_type;
|
||||
|
||||
public:
|
||||
// Implementation detail
|
||||
tmat2x2<T> _inverse() const;
|
||||
GLM_FUNC_DECL tmat2x2<T> _inverse() const;
|
||||
|
||||
private:
|
||||
// Data
|
||||
|
@ -61,62 +61,62 @@ namespace glm
|
|||
|
||||
public:
|
||||
// Constructors
|
||||
tmat2x2();
|
||||
tmat2x2(
|
||||
GLM_FUNC_DECL tmat2x2();
|
||||
GLM_FUNC_DECL tmat2x2(
|
||||
tmat2x2 const & m);
|
||||
|
||||
explicit tmat2x2(
|
||||
GLM_FUNC_DECL explicit tmat2x2(
|
||||
ctor Null);
|
||||
explicit tmat2x2(
|
||||
GLM_FUNC_DECL explicit tmat2x2(
|
||||
value_type const & x);
|
||||
explicit tmat2x2(
|
||||
GLM_FUNC_DECL explicit tmat2x2(
|
||||
value_type const & x1, value_type const & y1,
|
||||
value_type const & x2, value_type const & y2);
|
||||
explicit tmat2x2(
|
||||
GLM_FUNC_DECL explicit tmat2x2(
|
||||
col_type const & v1,
|
||||
col_type const & v2);
|
||||
|
||||
// Conversions
|
||||
template <typename U>
|
||||
explicit tmat2x2(tmat2x2<U> const & m);
|
||||
GLM_FUNC_DECL explicit tmat2x2(tmat2x2<U> const & m);
|
||||
|
||||
explicit tmat2x2(tmat3x3<T> const & x);
|
||||
explicit tmat2x2(tmat4x4<T> const & x);
|
||||
explicit tmat2x2(tmat2x3<T> const & x);
|
||||
explicit tmat2x2(tmat3x2<T> const & x);
|
||||
explicit tmat2x2(tmat2x4<T> const & x);
|
||||
explicit tmat2x2(tmat4x2<T> const & x);
|
||||
explicit tmat2x2(tmat3x4<T> const & x);
|
||||
explicit tmat2x2(tmat4x3<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(tmat2x3<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(tmat4x2<T> const & x);
|
||||
GLM_FUNC_DECL explicit tmat2x2(tmat3x4<T> const & x);
|
||||
GLM_FUNC_DECL explicit tmat2x2(tmat4x3<T> const & x);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Accesses
|
||||
|
||||
col_type & operator[](size_type i);
|
||||
col_type const & operator[](size_type i) const;
|
||||
GLM_FUNC_DECL col_type & operator[](size_type i);
|
||||
GLM_FUNC_DECL col_type const & operator[](size_type i) const;
|
||||
|
||||
// Unary updatable operators
|
||||
tmat2x2<T> & operator=(tmat2x2<T> const & m);
|
||||
GLM_FUNC_DECL tmat2x2<T> & operator=(tmat2x2<T> const & m);
|
||||
template <typename U>
|
||||
tmat2x2<T> & operator=(tmat2x2<U> const & m);
|
||||
GLM_FUNC_DECL tmat2x2<T> & operator=(tmat2x2<U> const & m);
|
||||
template <typename U>
|
||||
tmat2x2<T> & operator+=(U const & s);
|
||||
GLM_FUNC_DECL tmat2x2<T> & operator+=(U const & s);
|
||||
template <typename U>
|
||||
tmat2x2<T> & operator+=(tmat2x2<U> const & m);
|
||||
GLM_FUNC_DECL tmat2x2<T> & operator+=(tmat2x2<U> const & m);
|
||||
template <typename U>
|
||||
tmat2x2<T> & operator-=(U const & s);
|
||||
GLM_FUNC_DECL tmat2x2<T> & operator-=(U const & s);
|
||||
template <typename U>
|
||||
tmat2x2<T> & operator-=(tmat2x2<U> const & m);
|
||||
GLM_FUNC_DECL tmat2x2<T> & operator-=(tmat2x2<U> const & m);
|
||||
template <typename U>
|
||||
tmat2x2<T> & operator*=(U const & s);
|
||||
GLM_FUNC_DECL tmat2x2<T> & operator*=(U const & s);
|
||||
template <typename U>
|
||||
tmat2x2<T> & operator*=(tmat2x2<U> const & m);
|
||||
GLM_FUNC_DECL tmat2x2<T> & operator*=(tmat2x2<U> const & m);
|
||||
template <typename U>
|
||||
tmat2x2<T> & operator/=(U const & s);
|
||||
GLM_FUNC_DECL tmat2x2<T> & operator/=(U const & s);
|
||||
template <typename U>
|
||||
tmat2x2<T> & operator/=(tmat2x2<U> const & m);
|
||||
tmat2x2<T> & operator++();
|
||||
tmat2x2<T> & operator--();
|
||||
GLM_FUNC_DECL tmat2x2<T> & operator/=(tmat2x2<U> const & m);
|
||||
GLM_FUNC_DECL tmat2x2<T> & operator++();
|
||||
GLM_FUNC_DECL tmat2x2<T> & operator--();
|
||||
};
|
||||
|
||||
// Binary operators
|
||||
|
|
|
@ -45,8 +45,8 @@ namespace glm
|
|||
typedef std::size_t size_type;
|
||||
typedef tvec3<T> col_type;
|
||||
typedef tvec2<T> row_type;
|
||||
static size_type col_size();
|
||||
static size_type row_size();
|
||||
static GLM_FUNC_DECL size_type col_size();
|
||||
static GLM_FUNC_DECL size_type row_size();
|
||||
|
||||
typedef tmat2x3<T> type;
|
||||
typedef tmat3x2<T> transpose_type;
|
||||
|
@ -57,58 +57,58 @@ namespace glm
|
|||
|
||||
public:
|
||||
// Constructors
|
||||
tmat2x3();
|
||||
tmat2x3(tmat2x3 const & m);
|
||||
GLM_FUNC_DECL tmat2x3();
|
||||
GLM_FUNC_DECL tmat2x3(tmat2x3 const & m);
|
||||
|
||||
explicit tmat2x3(
|
||||
GLM_FUNC_DECL explicit tmat2x3(
|
||||
ctor);
|
||||
explicit tmat2x3(
|
||||
GLM_FUNC_DECL explicit tmat2x3(
|
||||
value_type const & s);
|
||||
explicit tmat2x3(
|
||||
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);
|
||||
explicit tmat2x3(
|
||||
GLM_FUNC_DECL explicit tmat2x3(
|
||||
col_type const & v0,
|
||||
col_type const & v1);
|
||||
|
||||
// Conversion
|
||||
template <typename U>
|
||||
explicit tmat2x3(tmat2x3<U> const & m);
|
||||
GLM_FUNC_DECL explicit tmat2x3(tmat2x3<U> const & m);
|
||||
|
||||
explicit tmat2x3(tmat2x2<T> const & x);
|
||||
explicit tmat2x3(tmat3x3<T> const & x);
|
||||
explicit tmat2x3(tmat4x4<T> const & x);
|
||||
explicit tmat2x3(tmat2x4<T> const & x);
|
||||
explicit tmat2x3(tmat3x2<T> const & x);
|
||||
explicit tmat2x3(tmat3x4<T> const & x);
|
||||
explicit tmat2x3(tmat4x2<T> const & x);
|
||||
explicit tmat2x3(tmat4x3<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(tmat4x4<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(tmat3x4<T> const & x);
|
||||
GLM_FUNC_DECL explicit tmat2x3(tmat4x2<T> const & x);
|
||||
GLM_FUNC_DECL explicit tmat2x3(tmat4x3<T> const & x);
|
||||
|
||||
// Accesses
|
||||
col_type & operator[](size_type i);
|
||||
col_type const & operator[](size_type i) const;
|
||||
|
||||
// Unary updatable operators
|
||||
tmat2x3<T> & operator= (tmat2x3<T> const & m);
|
||||
GLM_FUNC_DECL tmat2x3<T> & operator= (tmat2x3<T> const & m);
|
||||
template <typename U>
|
||||
tmat2x3<T> & operator= (tmat2x3<U> const & m);
|
||||
GLM_FUNC_DECL tmat2x3<T> & operator= (tmat2x3<U> const & m);
|
||||
template <typename U>
|
||||
tmat2x3<T> & operator+= (U const & s);
|
||||
GLM_FUNC_DECL tmat2x3<T> & operator+= (U const & s);
|
||||
template <typename U>
|
||||
tmat2x3<T> & operator+= (tmat2x3<U> const & m);
|
||||
GLM_FUNC_DECL tmat2x3<T> & operator+= (tmat2x3<U> const & m);
|
||||
template <typename U>
|
||||
tmat2x3<T> & operator-= (U const & s);
|
||||
GLM_FUNC_DECL tmat2x3<T> & operator-= (U const & s);
|
||||
template <typename U>
|
||||
tmat2x3<T> & operator-= (tmat2x3<U> const & m);
|
||||
GLM_FUNC_DECL tmat2x3<T> & operator-= (tmat2x3<U> const & m);
|
||||
template <typename U>
|
||||
tmat2x3<T> & operator*= (U const & s);
|
||||
GLM_FUNC_DECL tmat2x3<T> & operator*= (U const & s);
|
||||
template <typename U>
|
||||
tmat2x3<T> & operator*= (tmat2x3<U> const & m);
|
||||
GLM_FUNC_DECL tmat2x3<T> & operator*= (tmat2x3<U> const & m);
|
||||
template <typename U>
|
||||
tmat2x3<T> & operator/= (U const & s);
|
||||
GLM_FUNC_DECL tmat2x3<T> & operator/= (U const & s);
|
||||
|
||||
tmat2x3<T> & operator++ ();
|
||||
tmat2x3<T> & operator-- ();
|
||||
GLM_FUNC_DECL tmat2x3<T> & operator++ ();
|
||||
GLM_FUNC_DECL tmat2x3<T> & operator-- ();
|
||||
};
|
||||
|
||||
// Binary operators
|
||||
|
|
|
@ -45,8 +45,8 @@ namespace glm
|
|||
typedef std::size_t size_type;
|
||||
typedef tvec4<T> col_type;
|
||||
typedef tvec2<T> row_type;
|
||||
static size_type col_size();
|
||||
static size_type row_size();
|
||||
static GLM_FUNC_DECL size_type col_size();
|
||||
static GLM_FUNC_DECL size_type row_size();
|
||||
|
||||
typedef tmat2x4<T> type;
|
||||
typedef tmat4x2<T> transpose_type;
|
||||
|
@ -57,58 +57,58 @@ namespace glm
|
|||
|
||||
public:
|
||||
// Constructors
|
||||
tmat2x4();
|
||||
tmat2x4(tmat2x4 const & m);
|
||||
GLM_FUNC_DECL tmat2x4();
|
||||
GLM_FUNC_DECL tmat2x4(tmat2x4 const & m);
|
||||
|
||||
explicit tmat2x4(
|
||||
GLM_FUNC_DECL explicit tmat2x4(
|
||||
ctor);
|
||||
explicit tmat2x4(
|
||||
GLM_FUNC_DECL explicit tmat2x4(
|
||||
value_type const & s);
|
||||
explicit tmat2x4(
|
||||
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);
|
||||
explicit tmat2x4(
|
||||
GLM_FUNC_DECL explicit tmat2x4(
|
||||
col_type const & v0,
|
||||
col_type const & v1);
|
||||
|
||||
// Conversion
|
||||
template <typename U>
|
||||
explicit tmat2x4(tmat2x4<U> const & m);
|
||||
GLM_FUNC_DECL explicit tmat2x4(tmat2x4<U> const & m);
|
||||
|
||||
explicit tmat2x4(tmat2x2<T> const & x);
|
||||
explicit tmat2x4(tmat3x3<T> const & x);
|
||||
explicit tmat2x4(tmat4x4<T> const & x);
|
||||
explicit tmat2x4(tmat2x3<T> const & x);
|
||||
explicit tmat2x4(tmat3x2<T> const & x);
|
||||
explicit tmat2x4(tmat3x4<T> const & x);
|
||||
explicit tmat2x4(tmat4x2<T> const & x);
|
||||
explicit tmat2x4(tmat4x3<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(tmat4x4<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(tmat3x4<T> const & x);
|
||||
GLM_FUNC_DECL explicit tmat2x4(tmat4x2<T> const & x);
|
||||
GLM_FUNC_DECL explicit tmat2x4(tmat4x3<T> const & x);
|
||||
|
||||
// Accesses
|
||||
col_type & operator[](size_type i);
|
||||
col_type const & operator[](size_type i) const;
|
||||
GLM_FUNC_DECL col_type & operator[](size_type i);
|
||||
GLM_FUNC_DECL col_type const & operator[](size_type i) const;
|
||||
|
||||
// Unary updatable operators
|
||||
tmat2x4<T>& operator= (tmat2x4<T> const & m);
|
||||
GLM_FUNC_DECL tmat2x4<T>& operator= (tmat2x4<T> const & m);
|
||||
template <typename U>
|
||||
tmat2x4<T>& operator= (tmat2x4<U> const & m);
|
||||
GLM_FUNC_DECL tmat2x4<T>& operator= (tmat2x4<U> const & m);
|
||||
template <typename U>
|
||||
tmat2x4<T>& operator+= (U const & s);
|
||||
GLM_FUNC_DECL tmat2x4<T>& operator+= (U const & s);
|
||||
template <typename U>
|
||||
tmat2x4<T>& operator+= (tmat2x4<U> const & m);
|
||||
GLM_FUNC_DECL tmat2x4<T>& operator+= (tmat2x4<U> const & m);
|
||||
template <typename U>
|
||||
tmat2x4<T>& operator-= (U const & s);
|
||||
GLM_FUNC_DECL tmat2x4<T>& operator-= (U const & s);
|
||||
template <typename U>
|
||||
tmat2x4<T>& operator-= (tmat2x4<U> const & m);
|
||||
GLM_FUNC_DECL tmat2x4<T>& operator-= (tmat2x4<U> const & m);
|
||||
template <typename U>
|
||||
tmat2x4<T>& operator*= (U const & s);
|
||||
GLM_FUNC_DECL tmat2x4<T>& operator*= (U const & s);
|
||||
template <typename U>
|
||||
tmat2x4<T>& operator*= (tmat2x4<U> const & m);
|
||||
GLM_FUNC_DECL tmat2x4<T>& operator*= (tmat2x4<U> const & m);
|
||||
template <typename U>
|
||||
tmat2x4<T>& operator/= (U const & s);
|
||||
GLM_FUNC_DECL tmat2x4<T>& operator/= (U const & s);
|
||||
|
||||
tmat2x4<T>& operator++ ();
|
||||
tmat2x4<T>& operator-- ();
|
||||
GLM_FUNC_DECL tmat2x4<T>& operator++ ();
|
||||
GLM_FUNC_DECL tmat2x4<T>& operator-- ();
|
||||
};
|
||||
|
||||
// Binary operators
|
||||
|
|
|
@ -45,8 +45,8 @@ namespace glm
|
|||
typedef std::size_t size_type;
|
||||
typedef tvec2<T> col_type;
|
||||
typedef tvec3<T> row_type;
|
||||
static size_type col_size();
|
||||
static size_type row_size();
|
||||
static GLM_FUNC_DECL size_type col_size();
|
||||
static GLM_FUNC_DECL size_type row_size();
|
||||
|
||||
typedef tmat3x2<T> type;
|
||||
typedef tmat2x3<T> transpose_type;
|
||||
|
@ -57,60 +57,60 @@ namespace glm
|
|||
|
||||
public:
|
||||
// Constructors
|
||||
tmat3x2();
|
||||
tmat3x2(tmat3x2 const & m);
|
||||
GLM_FUNC_DECL tmat3x2();
|
||||
GLM_FUNC_DECL tmat3x2(tmat3x2 const & m);
|
||||
|
||||
explicit tmat3x2(
|
||||
GLM_FUNC_DECL explicit tmat3x2(
|
||||
ctor);
|
||||
explicit tmat3x2(
|
||||
GLM_FUNC_DECL explicit tmat3x2(
|
||||
value_type const & s);
|
||||
explicit tmat3x2(
|
||||
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);
|
||||
explicit tmat3x2(
|
||||
GLM_FUNC_DECL explicit tmat3x2(
|
||||
col_type const & v0,
|
||||
col_type const & v1,
|
||||
col_type const & v2);
|
||||
|
||||
// Conversion
|
||||
template <typename U>
|
||||
explicit tmat3x2(tmat3x2<U> const & m);
|
||||
GLM_FUNC_DECL explicit tmat3x2(tmat3x2<U> const & m);
|
||||
|
||||
explicit tmat3x2(tmat2x2<T> const & x);
|
||||
explicit tmat3x2(tmat3x3<T> const & x);
|
||||
explicit tmat3x2(tmat4x4<T> const & x);
|
||||
explicit tmat3x2(tmat2x3<T> const & x);
|
||||
explicit tmat3x2(tmat2x4<T> const & x);
|
||||
explicit tmat3x2(tmat3x4<T> const & x);
|
||||
explicit tmat3x2(tmat4x2<T> const & x);
|
||||
explicit tmat3x2(tmat4x3<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(tmat4x4<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(tmat3x4<T> const & x);
|
||||
GLM_FUNC_DECL explicit tmat3x2(tmat4x2<T> const & x);
|
||||
GLM_FUNC_DECL explicit tmat3x2(tmat4x3<T> const & x);
|
||||
|
||||
// Accesses
|
||||
col_type & operator[](size_type i);
|
||||
col_type const & operator[](size_type i) const;
|
||||
GLM_FUNC_DECL col_type & operator[](size_type i);
|
||||
GLM_FUNC_DECL col_type const & operator[](size_type i) const;
|
||||
|
||||
// Unary updatable operators
|
||||
tmat3x2<T> & operator= (tmat3x2<T> const & m);
|
||||
GLM_FUNC_DECL tmat3x2<T> & operator= (tmat3x2<T> const & m);
|
||||
template <typename U>
|
||||
tmat3x2<T> & operator= (tmat3x2<U> const & m);
|
||||
GLM_FUNC_DECL tmat3x2<T> & operator= (tmat3x2<U> const & m);
|
||||
template <typename U>
|
||||
tmat3x2<T> & operator+= (U const & s);
|
||||
GLM_FUNC_DECL tmat3x2<T> & operator+= (U const & s);
|
||||
template <typename U>
|
||||
tmat3x2<T> & operator+= (tmat3x2<U> const & m);
|
||||
GLM_FUNC_DECL tmat3x2<T> & operator+= (tmat3x2<U> const & m);
|
||||
template <typename U>
|
||||
tmat3x2<T> & operator-= (U const & s);
|
||||
GLM_FUNC_DECL tmat3x2<T> & operator-= (U const & s);
|
||||
template <typename U>
|
||||
tmat3x2<T> & operator-= (tmat3x2<U> const & m);
|
||||
GLM_FUNC_DECL tmat3x2<T> & operator-= (tmat3x2<U> const & m);
|
||||
template <typename U>
|
||||
tmat3x2<T> & operator*= (U const & s);
|
||||
GLM_FUNC_DECL tmat3x2<T> & operator*= (U const & s);
|
||||
template <typename U>
|
||||
tmat3x2<T> & operator*= (tmat3x2<U> const & m);
|
||||
GLM_FUNC_DECL tmat3x2<T> & operator*= (tmat3x2<U> const & m);
|
||||
template <typename U>
|
||||
tmat3x2<T> & operator/= (U const & s);
|
||||
GLM_FUNC_DECL tmat3x2<T> & operator/= (U const & s);
|
||||
|
||||
tmat3x2<T> & operator++ ();
|
||||
tmat3x2<T> & operator-- ();
|
||||
GLM_FUNC_DECL tmat3x2<T> & operator++ ();
|
||||
GLM_FUNC_DECL tmat3x2<T> & operator-- ();
|
||||
};
|
||||
|
||||
// Binary operators
|
||||
|
|
|
@ -45,15 +45,15 @@ namespace glm
|
|||
typedef std::size_t size_type;
|
||||
typedef tvec3<T> col_type;
|
||||
typedef tvec3<T> row_type;
|
||||
static size_type col_size();
|
||||
static size_type row_size();
|
||||
static GLM_FUNC_DECL size_type col_size();
|
||||
static GLM_FUNC_DECL size_type row_size();
|
||||
|
||||
typedef tmat3x3<T> type;
|
||||
typedef tmat3x3<T> transpose_type;
|
||||
|
||||
public:
|
||||
// Implementation detail
|
||||
tmat3x3<T> _inverse() const;
|
||||
GLM_FUNC_DECL tmat3x3<T> _inverse() const;
|
||||
|
||||
private:
|
||||
// Data
|
||||
|
@ -61,61 +61,61 @@ namespace glm
|
|||
|
||||
public:
|
||||
// Constructors
|
||||
tmat3x3();
|
||||
tmat3x3(tmat3x3 const & m);
|
||||
GLM_FUNC_DECL tmat3x3();
|
||||
GLM_FUNC_DECL tmat3x3(tmat3x3 const & m);
|
||||
|
||||
explicit tmat3x3(
|
||||
GLM_FUNC_DECL explicit tmat3x3(
|
||||
ctor Null);
|
||||
explicit tmat3x3(
|
||||
GLM_FUNC_DECL explicit tmat3x3(
|
||||
value_type const & s);
|
||||
explicit tmat3x3(
|
||||
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);
|
||||
explicit tmat3x3(
|
||||
GLM_FUNC_DECL explicit tmat3x3(
|
||||
col_type const & v0,
|
||||
col_type const & v1,
|
||||
col_type const & v2);
|
||||
|
||||
// Conversions
|
||||
template <typename U>
|
||||
explicit tmat3x3(tmat3x3<U> const & m);
|
||||
GLM_FUNC_DECL explicit tmat3x3(tmat3x3<U> const & m);
|
||||
|
||||
explicit tmat3x3(tmat2x2<T> const & x);
|
||||
explicit tmat3x3(tmat4x4<T> const & x);
|
||||
explicit tmat3x3(tmat2x3<T> const & x);
|
||||
explicit tmat3x3(tmat3x2<T> const & x);
|
||||
explicit tmat3x3(tmat2x4<T> const & x);
|
||||
explicit tmat3x3(tmat4x2<T> const & x);
|
||||
explicit tmat3x3(tmat3x4<T> const & x);
|
||||
explicit tmat3x3(tmat4x3<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(tmat2x3<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(tmat4x2<T> const & x);
|
||||
GLM_FUNC_DECL explicit tmat3x3(tmat3x4<T> const & x);
|
||||
GLM_FUNC_DECL explicit tmat3x3(tmat4x3<T> const & x);
|
||||
|
||||
// Accesses
|
||||
col_type & operator[](size_type i);
|
||||
col_type const & operator[](size_type i) const;
|
||||
GLM_FUNC_DECL col_type & operator[](size_type i);
|
||||
GLM_FUNC_DECL col_type const & operator[](size_type i) const;
|
||||
|
||||
// Unary updatable operators
|
||||
tmat3x3<T>& operator= (tmat3x3<T> const & m);
|
||||
GLM_FUNC_DECL tmat3x3<T>& operator= (tmat3x3<T> const & m);
|
||||
template <typename U>
|
||||
tmat3x3<T>& operator= (tmat3x3<U> const & m);
|
||||
GLM_FUNC_DECL tmat3x3<T>& operator= (tmat3x3<U> const & m);
|
||||
template <typename U>
|
||||
tmat3x3<T>& operator+= (U const & s);
|
||||
GLM_FUNC_DECL tmat3x3<T>& operator+= (U const & s);
|
||||
template <typename U>
|
||||
tmat3x3<T>& operator+= (tmat3x3<U> const & m);
|
||||
GLM_FUNC_DECL tmat3x3<T>& operator+= (tmat3x3<U> const & m);
|
||||
template <typename U>
|
||||
tmat3x3<T>& operator-= (U const & s);
|
||||
GLM_FUNC_DECL tmat3x3<T>& operator-= (U const & s);
|
||||
template <typename U>
|
||||
tmat3x3<T>& operator-= (tmat3x3<U> const & m);
|
||||
GLM_FUNC_DECL tmat3x3<T>& operator-= (tmat3x3<U> const & m);
|
||||
template <typename U>
|
||||
tmat3x3<T>& operator*= (U const & s);
|
||||
GLM_FUNC_DECL tmat3x3<T>& operator*= (U const & s);
|
||||
template <typename U>
|
||||
tmat3x3<T>& operator*= (tmat3x3<U> const & m);
|
||||
GLM_FUNC_DECL tmat3x3<T>& operator*= (tmat3x3<U> const & m);
|
||||
template <typename U>
|
||||
tmat3x3<T>& operator/= (U const & s);
|
||||
GLM_FUNC_DECL tmat3x3<T>& operator/= (U const & s);
|
||||
template <typename U>
|
||||
tmat3x3<T>& operator/= (tmat3x3<U> const & m);
|
||||
tmat3x3<T>& operator++ ();
|
||||
tmat3x3<T>& operator-- ();
|
||||
GLM_FUNC_DECL tmat3x3<T>& operator/= (tmat3x3<U> const & m);
|
||||
GLM_FUNC_DECL tmat3x3<T>& operator++ ();
|
||||
GLM_FUNC_DECL tmat3x3<T>& operator-- ();
|
||||
};
|
||||
|
||||
// Binary operators
|
||||
|
|
|
@ -45,8 +45,8 @@ namespace glm
|
|||
typedef std::size_t size_type;
|
||||
typedef tvec4<T> col_type;
|
||||
typedef tvec3<T> row_type;
|
||||
static size_type col_size();
|
||||
static size_type row_size();
|
||||
static GLM_FUNC_DECL size_type col_size();
|
||||
static GLM_FUNC_DECL size_type row_size();
|
||||
|
||||
typedef tmat3x4<T> type;
|
||||
typedef tmat4x3<T> transpose_type;
|
||||
|
@ -57,60 +57,60 @@ namespace glm
|
|||
|
||||
public:
|
||||
// Constructors
|
||||
tmat3x4();
|
||||
tmat3x4(tmat3x4 const & m);
|
||||
GLM_FUNC_DECL tmat3x4();
|
||||
GLM_FUNC_DECL tmat3x4(tmat3x4 const & m);
|
||||
|
||||
explicit tmat3x4(
|
||||
GLM_FUNC_DECL explicit tmat3x4(
|
||||
ctor Null);
|
||||
explicit tmat3x4(
|
||||
GLM_FUNC_DECL explicit tmat3x4(
|
||||
value_type const & s);
|
||||
explicit tmat3x4(
|
||||
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);
|
||||
explicit tmat3x4(
|
||||
GLM_FUNC_DECL explicit tmat3x4(
|
||||
col_type const & v0,
|
||||
col_type const & v1,
|
||||
col_type const & v2);
|
||||
|
||||
// Conversion
|
||||
template <typename U>
|
||||
explicit tmat3x4(tmat3x4<U> const & m);
|
||||
GLM_FUNC_DECL explicit tmat3x4(tmat3x4<U> const & m);
|
||||
|
||||
explicit tmat3x4(tmat2x2<T> const & x);
|
||||
explicit tmat3x4(tmat3x3<T> const & x);
|
||||
explicit tmat3x4(tmat4x4<T> const & x);
|
||||
explicit tmat3x4(tmat2x3<T> const & x);
|
||||
explicit tmat3x4(tmat3x2<T> const & x);
|
||||
explicit tmat3x4(tmat2x4<T> const & x);
|
||||
explicit tmat3x4(tmat4x2<T> const & x);
|
||||
explicit tmat3x4(tmat4x3<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(tmat4x4<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(tmat2x4<T> const & x);
|
||||
GLM_FUNC_DECL explicit tmat3x4(tmat4x2<T> const & x);
|
||||
GLM_FUNC_DECL explicit tmat3x4(tmat4x3<T> const & x);
|
||||
|
||||
// Accesses
|
||||
col_type & operator[](size_type i);
|
||||
col_type const & operator[](size_type i) const;
|
||||
|
||||
// Unary updatable operators
|
||||
tmat3x4<T> & operator= (tmat3x4<T> const & m);
|
||||
GLM_FUNC_DECL tmat3x4<T> & operator= (tmat3x4<T> const & m);
|
||||
template <typename U>
|
||||
tmat3x4<T> & operator= (tmat3x4<U> const & m);
|
||||
GLM_FUNC_DECL tmat3x4<T> & operator= (tmat3x4<U> const & m);
|
||||
template <typename U>
|
||||
tmat3x4<T> & operator+= (U const & s);
|
||||
GLM_FUNC_DECL tmat3x4<T> & operator+= (U const & s);
|
||||
template <typename U>
|
||||
tmat3x4<T> & operator+= (tmat3x4<U> const & m);
|
||||
GLM_FUNC_DECL tmat3x4<T> & operator+= (tmat3x4<U> const & m);
|
||||
template <typename U>
|
||||
tmat3x4<T> & operator-= (U const & s);
|
||||
GLM_FUNC_DECL tmat3x4<T> & operator-= (U const & s);
|
||||
template <typename U>
|
||||
tmat3x4<T> & operator-= (tmat3x4<U> const & m);
|
||||
GLM_FUNC_DECL tmat3x4<T> & operator-= (tmat3x4<U> const & m);
|
||||
template <typename U>
|
||||
tmat3x4<T> & operator*= (U const & s);
|
||||
GLM_FUNC_DECL tmat3x4<T> & operator*= (U const & s);
|
||||
template <typename U>
|
||||
tmat3x4<T> & operator*= (tmat3x4<U> const & m);
|
||||
GLM_FUNC_DECL tmat3x4<T> & operator*= (tmat3x4<U> const & m);
|
||||
template <typename U>
|
||||
tmat3x4<T> & operator/= (U const & s);
|
||||
GLM_FUNC_DECL tmat3x4<T> & operator/= (U const & s);
|
||||
|
||||
tmat3x4<T> & operator++ ();
|
||||
tmat3x4<T> & operator-- ();
|
||||
GLM_FUNC_DECL tmat3x4<T> & operator++ ();
|
||||
GLM_FUNC_DECL tmat3x4<T> & operator-- ();
|
||||
};
|
||||
|
||||
// Binary operators
|
||||
|
|
|
@ -45,8 +45,8 @@ namespace glm
|
|||
typedef std::size_t size_type;
|
||||
typedef tvec2<T> col_type;
|
||||
typedef tvec4<T> row_type;
|
||||
static size_type col_size();
|
||||
static size_type row_size();
|
||||
static GLM_FUNC_DECL size_type col_size();
|
||||
static GLM_FUNC_DECL size_type row_size();
|
||||
|
||||
typedef tmat4x2<T> type;
|
||||
typedef tmat2x4<T> transpose_type;
|
||||
|
@ -57,19 +57,19 @@ namespace glm
|
|||
|
||||
public:
|
||||
// Constructors
|
||||
tmat4x2();
|
||||
tmat4x2(tmat4x2 const & m);
|
||||
GLM_FUNC_DECL tmat4x2();
|
||||
GLM_FUNC_DECL tmat4x2(tmat4x2 const & m);
|
||||
|
||||
explicit tmat4x2(
|
||||
GLM_FUNC_DECL explicit tmat4x2(
|
||||
ctor Null);
|
||||
explicit tmat4x2(
|
||||
GLM_FUNC_DECL explicit tmat4x2(
|
||||
value_type const & x);
|
||||
explicit tmat4x2(
|
||||
GLM_FUNC_DECL explicit tmat4x2(
|
||||
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);
|
||||
explicit tmat4x2(
|
||||
GLM_FUNC_DECL explicit tmat4x2(
|
||||
col_type const & v0,
|
||||
col_type const & v1,
|
||||
col_type const & v2,
|
||||
|
@ -77,42 +77,42 @@ namespace glm
|
|||
|
||||
// Conversions
|
||||
template <typename U>
|
||||
explicit tmat4x2(tmat4x2<U> const & m);
|
||||
GLM_FUNC_DECL explicit tmat4x2(tmat4x2<U> const & m);
|
||||
|
||||
explicit tmat4x2(tmat2x2<T> const & x);
|
||||
explicit tmat4x2(tmat3x3<T> const & x);
|
||||
explicit tmat4x2(tmat4x4<T> const & x);
|
||||
explicit tmat4x2(tmat2x3<T> const & x);
|
||||
explicit tmat4x2(tmat3x2<T> const & x);
|
||||
explicit tmat4x2(tmat2x4<T> const & x);
|
||||
explicit tmat4x2(tmat4x3<T> const & x);
|
||||
explicit tmat4x2(tmat3x4<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(tmat4x4<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(tmat2x4<T> const & x);
|
||||
GLM_FUNC_DECL explicit tmat4x2(tmat4x3<T> const & x);
|
||||
GLM_FUNC_DECL explicit tmat4x2(tmat3x4<T> const & x);
|
||||
|
||||
// Accesses
|
||||
col_type & operator[](size_type i);
|
||||
col_type const & operator[](size_type i) const;
|
||||
GLM_FUNC_DECL col_type & operator[](size_type i);
|
||||
GLM_FUNC_DECL col_type const & operator[](size_type i) const;
|
||||
|
||||
// Unary updatable operators
|
||||
tmat4x2<T>& operator= (tmat4x2<T> const & m);
|
||||
GLM_FUNC_DECL tmat4x2<T>& operator= (tmat4x2<T> const & m);
|
||||
template <typename U>
|
||||
tmat4x2<T>& operator= (tmat4x2<U> const & m);
|
||||
GLM_FUNC_DECL tmat4x2<T>& operator= (tmat4x2<U> const & m);
|
||||
template <typename U>
|
||||
tmat4x2<T>& operator+= (U const & s);
|
||||
GLM_FUNC_DECL tmat4x2<T>& operator+= (U const & s);
|
||||
template <typename U>
|
||||
tmat4x2<T>& operator+= (tmat4x2<U> const & m);
|
||||
GLM_FUNC_DECL tmat4x2<T>& operator+= (tmat4x2<U> const & m);
|
||||
template <typename U>
|
||||
tmat4x2<T>& operator-= (U const & s);
|
||||
GLM_FUNC_DECL tmat4x2<T>& operator-= (U const & s);
|
||||
template <typename U>
|
||||
tmat4x2<T>& operator-= (tmat4x2<U> const & m);
|
||||
GLM_FUNC_DECL tmat4x2<T>& operator-= (tmat4x2<U> const & m);
|
||||
template <typename U>
|
||||
tmat4x2<T>& operator*= (U const & s);
|
||||
GLM_FUNC_DECL tmat4x2<T>& operator*= (U const & s);
|
||||
template <typename U>
|
||||
tmat4x2<T>& operator*= (tmat4x2<U> const & m);
|
||||
GLM_FUNC_DECL tmat4x2<T>& operator*= (tmat4x2<U> const & m);
|
||||
template <typename U>
|
||||
tmat4x2<T>& operator/= (U const & s);
|
||||
GLM_FUNC_DECL tmat4x2<T>& operator/= (U const & s);
|
||||
|
||||
tmat4x2<T>& operator++ ();
|
||||
tmat4x2<T>& operator-- ();
|
||||
GLM_FUNC_DECL tmat4x2<T>& operator++ ();
|
||||
GLM_FUNC_DECL tmat4x2<T>& operator-- ();
|
||||
};
|
||||
|
||||
// Binary operators
|
||||
|
|
|
@ -45,8 +45,8 @@ namespace glm
|
|||
typedef std::size_t size_type;
|
||||
typedef tvec3<T> col_type;
|
||||
typedef tvec4<T> row_type;
|
||||
static size_type col_size();
|
||||
static size_type row_size();
|
||||
static GLM_FUNC_DECL size_type col_size();
|
||||
static GLM_FUNC_DECL size_type row_size();
|
||||
|
||||
typedef tmat4x3<T> type;
|
||||
typedef tmat3x4<T> transpose_type;
|
||||
|
@ -57,19 +57,19 @@ namespace glm
|
|||
|
||||
public:
|
||||
// Constructors
|
||||
tmat4x3();
|
||||
tmat4x3(tmat4x3 const & m);
|
||||
GLM_FUNC_DECL tmat4x3();
|
||||
GLM_FUNC_DECL tmat4x3(tmat4x3 const & m);
|
||||
|
||||
explicit tmat4x3(
|
||||
GLM_FUNC_DECL explicit tmat4x3(
|
||||
ctor Null);
|
||||
explicit tmat4x3(
|
||||
GLM_FUNC_DECL explicit tmat4x3(
|
||||
value_type const & x);
|
||||
explicit tmat4x3(
|
||||
GLM_FUNC_DECL explicit tmat4x3(
|
||||
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);
|
||||
explicit tmat4x3(
|
||||
GLM_FUNC_DECL explicit tmat4x3(
|
||||
col_type const & v0,
|
||||
col_type const & v1,
|
||||
col_type const & v2,
|
||||
|
@ -77,42 +77,42 @@ namespace glm
|
|||
|
||||
// Conversion
|
||||
template <typename U>
|
||||
explicit tmat4x3(tmat4x3<U> const & m);
|
||||
GLM_FUNC_DECL explicit tmat4x3(tmat4x3<U> const & m);
|
||||
|
||||
explicit tmat4x3(tmat2x2<T> const & x);
|
||||
explicit tmat4x3(tmat3x3<T> const & x);
|
||||
explicit tmat4x3(tmat4x4<T> const & x);
|
||||
explicit tmat4x3(tmat2x3<T> const & x);
|
||||
explicit tmat4x3(tmat3x2<T> const & x);
|
||||
explicit tmat4x3(tmat2x4<T> const & x);
|
||||
explicit tmat4x3(tmat4x2<T> const & x);
|
||||
explicit tmat4x3(tmat3x4<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(tmat4x4<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(tmat2x4<T> const & x);
|
||||
GLM_FUNC_DECL explicit tmat4x3(tmat4x2<T> const & x);
|
||||
GLM_FUNC_DECL explicit tmat4x3(tmat3x4<T> const & x);
|
||||
|
||||
// Accesses
|
||||
col_type & operator[](size_type i);
|
||||
col_type const & operator[](size_type i) const;
|
||||
|
||||
// Unary updatable operators
|
||||
tmat4x3<T> & operator= (tmat4x3<T> const & m);
|
||||
GLM_FUNC_DECL tmat4x3<T> & operator= (tmat4x3<T> const & m);
|
||||
template <typename U>
|
||||
tmat4x3<T> & operator= (tmat4x3<U> const & m);
|
||||
GLM_FUNC_DECL tmat4x3<T> & operator= (tmat4x3<U> const & m);
|
||||
template <typename U>
|
||||
tmat4x3<T> & operator+= (U const & s);
|
||||
GLM_FUNC_DECL tmat4x3<T> & operator+= (U const & s);
|
||||
template <typename U>
|
||||
tmat4x3<T> & operator+= (tmat4x3<U> const & m);
|
||||
GLM_FUNC_DECL tmat4x3<T> & operator+= (tmat4x3<U> const & m);
|
||||
template <typename U>
|
||||
tmat4x3<T> & operator-= (U const & s);
|
||||
GLM_FUNC_DECL tmat4x3<T> & operator-= (U const & s);
|
||||
template <typename U>
|
||||
tmat4x3<T> & operator-= (tmat4x3<U> const & m);
|
||||
GLM_FUNC_DECL tmat4x3<T> & operator-= (tmat4x3<U> const & m);
|
||||
template <typename U>
|
||||
tmat4x3<T> & operator*= (U const & s);
|
||||
GLM_FUNC_DECL tmat4x3<T> & operator*= (U const & s);
|
||||
template <typename U>
|
||||
tmat4x3<T> & operator*= (tmat4x3<U> const & m);
|
||||
GLM_FUNC_DECL tmat4x3<T> & operator*= (tmat4x3<U> const & m);
|
||||
template <typename U>
|
||||
tmat4x3<T> & operator/= (U const & s);
|
||||
GLM_FUNC_DECL tmat4x3<T> & operator/= (U const & s);
|
||||
|
||||
tmat4x3<T> & operator++ ();
|
||||
tmat4x3<T> & operator-- ();
|
||||
GLM_FUNC_DECL tmat4x3<T> & operator++ ();
|
||||
GLM_FUNC_DECL tmat4x3<T> & operator-- ();
|
||||
};
|
||||
|
||||
// Binary operators
|
||||
|
|
|
@ -45,15 +45,15 @@ namespace glm
|
|||
typedef std::size_t size_type;
|
||||
typedef tvec4<T> col_type;
|
||||
typedef tvec4<T> row_type;
|
||||
static size_type col_size();
|
||||
static size_type row_size();
|
||||
static GLM_FUNC_DECL size_type col_size();
|
||||
static GLM_FUNC_DECL size_type row_size();
|
||||
|
||||
typedef tmat4x4<T> type;
|
||||
typedef tmat4x4<T> transpose_type;
|
||||
|
||||
public:
|
||||
// Implementation detail
|
||||
tmat4x4<T> _inverse() const;
|
||||
GLM_FUNC_DECL tmat4x4<T> _inverse() const;
|
||||
|
||||
private:
|
||||
// Data
|
||||
|
@ -61,19 +61,19 @@ namespace glm
|
|||
|
||||
public:
|
||||
// Constructors
|
||||
tmat4x4();
|
||||
tmat4x4(tmat4x4 const & m);
|
||||
GLM_FUNC_DECL tmat4x4();
|
||||
GLM_FUNC_DECL tmat4x4(tmat4x4 const & m);
|
||||
|
||||
explicit tmat4x4(
|
||||
GLM_FUNC_DECL explicit tmat4x4(
|
||||
ctor Null);
|
||||
explicit tmat4x4(
|
||||
GLM_FUNC_DECL explicit tmat4x4(
|
||||
value_type const & x);
|
||||
explicit tmat4x4(
|
||||
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);
|
||||
explicit tmat4x4(
|
||||
GLM_FUNC_DECL explicit tmat4x4(
|
||||
col_type const & v0,
|
||||
col_type const & v1,
|
||||
col_type const & v2,
|
||||
|
@ -81,43 +81,43 @@ namespace glm
|
|||
|
||||
// Conversions
|
||||
template <typename U>
|
||||
explicit tmat4x4(tmat4x4<U> const & m);
|
||||
GLM_FUNC_DECL explicit tmat4x4(tmat4x4<U> const & m);
|
||||
|
||||
explicit tmat4x4(tmat2x2<T> const & x);
|
||||
explicit tmat4x4(tmat3x3<T> const & x);
|
||||
explicit tmat4x4(tmat2x3<T> const & x);
|
||||
explicit tmat4x4(tmat3x2<T> const & x);
|
||||
explicit tmat4x4(tmat2x4<T> const & x);
|
||||
explicit tmat4x4(tmat4x2<T> const & x);
|
||||
explicit tmat4x4(tmat3x4<T> const & x);
|
||||
explicit tmat4x4(tmat4x3<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(tmat2x3<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(tmat4x2<T> const & x);
|
||||
GLM_FUNC_DECL explicit tmat4x4(tmat3x4<T> const & x);
|
||||
GLM_FUNC_DECL explicit tmat4x4(tmat4x3<T> const & x);
|
||||
|
||||
// Accesses
|
||||
col_type & operator[](size_type i);
|
||||
col_type const & operator[](size_type i) const;
|
||||
GLM_FUNC_DECL col_type & operator[](size_type i);
|
||||
GLM_FUNC_DECL col_type const & operator[](size_type i) const;
|
||||
|
||||
// Unary updatable operators
|
||||
tmat4x4<T> & operator= (tmat4x4<T> const & m);
|
||||
GLM_FUNC_DECL tmat4x4<T> & operator= (tmat4x4<T> const & m);
|
||||
template <typename U>
|
||||
tmat4x4<T> & operator= (tmat4x4<U> const & m);
|
||||
GLM_FUNC_DECL tmat4x4<T> & operator= (tmat4x4<U> const & m);
|
||||
template <typename U>
|
||||
tmat4x4<T> & operator+= (U const & s);
|
||||
GLM_FUNC_DECL tmat4x4<T> & operator+= (U const & s);
|
||||
template <typename U>
|
||||
tmat4x4<T> & operator+= (tmat4x4<U> const & m);
|
||||
GLM_FUNC_DECL tmat4x4<T> & operator+= (tmat4x4<U> const & m);
|
||||
template <typename U>
|
||||
tmat4x4<T> & operator-= (U const & s);
|
||||
GLM_FUNC_DECL tmat4x4<T> & operator-= (U const & s);
|
||||
template <typename U>
|
||||
tmat4x4<T> & operator-= (tmat4x4<U> const & m);
|
||||
GLM_FUNC_DECL tmat4x4<T> & operator-= (tmat4x4<U> const & m);
|
||||
template <typename U>
|
||||
tmat4x4<T> & operator*= (U const & s);
|
||||
GLM_FUNC_DECL tmat4x4<T> & operator*= (U const & s);
|
||||
template <typename U>
|
||||
tmat4x4<T> & operator*= (tmat4x4<U> const & m);
|
||||
GLM_FUNC_DECL tmat4x4<T> & operator*= (tmat4x4<U> const & m);
|
||||
template <typename U>
|
||||
tmat4x4<T> & operator/= (U const & s);
|
||||
GLM_FUNC_DECL tmat4x4<T> & operator/= (U const & s);
|
||||
template <typename U>
|
||||
tmat4x4<T> & operator/= (tmat4x4<U> const & m);
|
||||
tmat4x4<T> & operator++ ();
|
||||
tmat4x4<T> & operator-- ();
|
||||
GLM_FUNC_DECL tmat4x4<T> & operator/= (tmat4x4<U> const & m);
|
||||
GLM_FUNC_DECL tmat4x4<T> & operator++ ();
|
||||
GLM_FUNC_DECL tmat4x4<T> & operator-- ();
|
||||
};
|
||||
|
||||
// Binary operators
|
||||
|
|
|
@ -41,7 +41,7 @@ namespace glm
|
|||
|
||||
typedef T value_type;
|
||||
typedef std::size_t size_type;
|
||||
static size_type value_size();
|
||||
static GLM_FUNC_DECL size_type value_size();
|
||||
|
||||
typedef tvec1<T> type;
|
||||
typedef tvec1<bool> bool_type;
|
||||
|
@ -58,99 +58,99 @@ namespace glm
|
|||
//////////////////////////////////////
|
||||
// Accesses
|
||||
|
||||
value_type & operator[](size_type i);
|
||||
value_type const & operator[](size_type i) const;
|
||||
GLM_FUNC_DECL value_type & operator[](size_type i);
|
||||
GLM_FUNC_DECL value_type const & operator[](size_type i) const;
|
||||
|
||||
//////////////////////////////////////
|
||||
// Implicit basic constructors
|
||||
|
||||
tvec1();
|
||||
tvec1(tvec1<T> const & v);
|
||||
GLM_FUNC_DECL tvec1();
|
||||
GLM_FUNC_DECL tvec1(tvec1<T> const & v);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Explicit basic constructors
|
||||
|
||||
explicit tvec1(
|
||||
GLM_FUNC_DECL explicit tvec1(
|
||||
ctor);
|
||||
explicit tvec1(
|
||||
GLM_FUNC_DECL explicit tvec1(
|
||||
value_type const & s);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Swizzle constructors
|
||||
|
||||
tvec1(tref1<T> const & r);
|
||||
GLM_FUNC_DECL tvec1(tref1<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>
|
||||
explicit tvec1(U const & s);
|
||||
GLM_FUNC_DECL explicit tvec1(U const & s);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Convertion vector constructors
|
||||
|
||||
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
template <typename U>
|
||||
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)
|
||||
template <typename U>
|
||||
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)
|
||||
template <typename U>
|
||||
explicit tvec1(tvec4<U> const & v);
|
||||
GLM_FUNC_DECL explicit tvec1(tvec4<U> const & v);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Unary arithmetic operators
|
||||
|
||||
tvec1<T> & operator= (tvec1<T> const & v);
|
||||
GLM_FUNC_DECL tvec1<T> & operator= (tvec1<T> const & v);
|
||||
|
||||
tvec1<T> & operator+=(value_type const & s);
|
||||
tvec1<T> & operator+=(tvec1<T> const & v);
|
||||
tvec1<T> & operator-=(value_type const & s);
|
||||
tvec1<T> & operator-=(tvec1<T> const & v);
|
||||
tvec1<T> & operator*=(value_type const & s);
|
||||
tvec1<T> & operator*=(tvec1<T> const & v);
|
||||
tvec1<T> & operator/=(value_type const & s);
|
||||
tvec1<T> & operator/=(tvec1<T> const & v);
|
||||
tvec1<T> & operator++();
|
||||
tvec1<T> & operator--();
|
||||
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-=(value_type const & s);
|
||||
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*=(tvec1<T> const & v);
|
||||
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++();
|
||||
GLM_FUNC_DECL tvec1<T> & operator--();
|
||||
|
||||
//////////////////////////////////////
|
||||
// Unary bit operators
|
||||
|
||||
tvec1<T> & operator%=(value_type const & s);
|
||||
tvec1<T> & operator%=(tvec1<T> const & v);
|
||||
tvec1<T> & operator&=(value_type const & s);
|
||||
tvec1<T> & operator&=(tvec1<T> const & v);
|
||||
tvec1<T> & operator|=(value_type const & s);
|
||||
tvec1<T> & operator|=(tvec1<T> const & v);
|
||||
tvec1<T> & operator^=(value_type const & s);
|
||||
tvec1<T> & operator^=(tvec1<T> const & v);
|
||||
tvec1<T> & operator<<=(value_type const & s);
|
||||
tvec1<T> & operator<<=(tvec1<T> const & v);
|
||||
tvec1<T> & operator>>=(value_type const & s);
|
||||
tvec1<T> & operator>>=(tvec1<T> const & v);
|
||||
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&=(value_type const & s);
|
||||
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|=(tvec1<T> const & v);
|
||||
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<<=(value_type const & s);
|
||||
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>>=(tvec1<T> const & v);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Swizzle operators
|
||||
|
||||
value_type swizzle(comp X) const;
|
||||
tvec2<T> swizzle(comp X, comp Y) const;
|
||||
tvec3<T> swizzle(comp X, comp Y, comp Z) const;
|
||||
tvec4<T> swizzle(comp X, comp Y, comp Z, comp W) const;
|
||||
tref1<T> swizzle(comp X);
|
||||
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 tref1<T> swizzle(comp X);
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct tref1
|
||||
{
|
||||
tref1(T & x);
|
||||
tref1(tref1<T> const & r);
|
||||
tref1(tvec1<T> const & v);
|
||||
GLM_FUNC_DECL tref1(T & x);
|
||||
GLM_FUNC_DECL tref1(tref1<T> const & r);
|
||||
GLM_FUNC_DECL tref1(tvec1<T> const & v);
|
||||
|
||||
tref1<T> & operator= (tref1<T> const & r);
|
||||
tref1<T> & operator= (tvec1<T> const & v);
|
||||
GLM_FUNC_DECL tref1<T> & operator= (tref1<T> const & r);
|
||||
GLM_FUNC_DECL tref1<T> & operator= (tvec1<T> const & v);
|
||||
|
||||
T& x;
|
||||
};
|
||||
|
|
|
@ -41,7 +41,7 @@ namespace glm
|
|||
|
||||
typedef T value_type;
|
||||
typedef std::size_t size_type;
|
||||
static size_type value_size();
|
||||
static GLM_FUNC_DECL size_type value_size();
|
||||
|
||||
typedef tvec2<T> type;
|
||||
typedef tvec2<bool> bool_type;
|
||||
|
@ -66,23 +66,23 @@ namespace glm
|
|||
//////////////////////////////////////
|
||||
// Accesses
|
||||
|
||||
value_type & operator[](size_type i);
|
||||
value_type const & operator[](size_type i) const;
|
||||
GLM_FUNC_DECL value_type & operator[](size_type i);
|
||||
GLM_FUNC_DECL value_type const & operator[](size_type i) const;
|
||||
|
||||
//////////////////////////////////////
|
||||
// Implicit basic constructors
|
||||
|
||||
tvec2();
|
||||
tvec2(tvec2<T> const & v);
|
||||
GLM_FUNC_DECL tvec2();
|
||||
GLM_FUNC_DECL tvec2(tvec2<T> const & v);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Explicit basic constructors
|
||||
|
||||
explicit tvec2(
|
||||
GLM_FUNC_DECL explicit tvec2(
|
||||
ctor);
|
||||
explicit tvec2(
|
||||
GLM_FUNC_DECL explicit tvec2(
|
||||
value_type const & s);
|
||||
explicit tvec2(
|
||||
GLM_FUNC_DECL explicit tvec2(
|
||||
value_type const & s1,
|
||||
value_type const & s2);
|
||||
|
||||
|
@ -96,11 +96,11 @@ namespace glm
|
|||
|
||||
//! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
template <typename U>
|
||||
explicit tvec2(
|
||||
GLM_FUNC_DECL explicit tvec2(
|
||||
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>
|
||||
explicit tvec2(
|
||||
GLM_FUNC_DECL explicit tvec2(
|
||||
U const & x,
|
||||
V const & y);
|
||||
|
||||
|
@ -109,87 +109,87 @@ namespace glm
|
|||
|
||||
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
template <typename U>
|
||||
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)
|
||||
template <typename U>
|
||||
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)
|
||||
template <typename U>
|
||||
explicit tvec2(tvec4<U> const & v);
|
||||
GLM_FUNC_DECL explicit tvec2(tvec4<U> const & v);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Unary arithmetic operators
|
||||
|
||||
tvec2<T> & operator= (tvec2<T> const & v);
|
||||
GLM_FUNC_DECL tvec2<T> & operator= (tvec2<T> const & v);
|
||||
template <typename U>
|
||||
tvec2<T> & operator= (tvec2<U> const & v);
|
||||
GLM_FUNC_DECL tvec2<T> & operator= (tvec2<U> const & v);
|
||||
|
||||
template <typename U>
|
||||
tvec2<T> & operator+=(U const & s);
|
||||
GLM_FUNC_DECL tvec2<T> & operator+=(U const & s);
|
||||
template <typename U>
|
||||
tvec2<T> & operator+=(tvec2<U> const & v);
|
||||
GLM_FUNC_DECL tvec2<T> & operator+=(tvec2<U> const & v);
|
||||
template <typename U>
|
||||
tvec2<T> & operator-=(U const & s);
|
||||
GLM_FUNC_DECL tvec2<T> & operator-=(U const & s);
|
||||
template <typename U>
|
||||
tvec2<T> & operator-=(tvec2<U> const & v);
|
||||
GLM_FUNC_DECL tvec2<T> & operator-=(tvec2<U> const & v);
|
||||
template <typename U>
|
||||
tvec2<T> & operator*=(U const & s);
|
||||
GLM_FUNC_DECL tvec2<T> & operator*=(U const & s);
|
||||
template <typename U>
|
||||
tvec2<T> & operator*=(tvec2<U> const & v);
|
||||
GLM_FUNC_DECL tvec2<T> & operator*=(tvec2<U> const & v);
|
||||
template <typename U>
|
||||
tvec2<T> & operator/=(U const & s);
|
||||
GLM_FUNC_DECL tvec2<T> & operator/=(U const & s);
|
||||
template <typename U>
|
||||
tvec2<T> & operator/=(tvec2<U> const & v);
|
||||
tvec2<T> & operator++();
|
||||
tvec2<T> & operator--();
|
||||
GLM_FUNC_DECL tvec2<T> & operator/=(tvec2<U> const & v);
|
||||
GLM_FUNC_DECL tvec2<T> & operator++();
|
||||
GLM_FUNC_DECL tvec2<T> & operator--();
|
||||
|
||||
//////////////////////////////////////
|
||||
// Unary bit operators
|
||||
|
||||
template <typename U>
|
||||
tvec2<T> & operator%= (U const & s);
|
||||
GLM_FUNC_DECL tvec2<T> & operator%= (U const & s);
|
||||
template <typename U>
|
||||
tvec2<T> & operator%= (tvec2<U> const & v);
|
||||
GLM_FUNC_DECL tvec2<T> & operator%= (tvec2<U> const & v);
|
||||
template <typename U>
|
||||
tvec2<T> & operator&= (U const & s);
|
||||
GLM_FUNC_DECL tvec2<T> & operator&= (U const & s);
|
||||
template <typename U>
|
||||
tvec2<T> & operator&= (tvec2<U> const & v);
|
||||
GLM_FUNC_DECL tvec2<T> & operator&= (tvec2<U> const & v);
|
||||
template <typename U>
|
||||
tvec2<T> & operator|= (U const & s);
|
||||
GLM_FUNC_DECL tvec2<T> & operator|= (U const & s);
|
||||
template <typename U>
|
||||
tvec2<T> & operator|= (tvec2<U> const & v);
|
||||
GLM_FUNC_DECL tvec2<T> & operator|= (tvec2<U> const & v);
|
||||
template <typename U>
|
||||
tvec2<T> & operator^= (U const & s);
|
||||
GLM_FUNC_DECL tvec2<T> & operator^= (U const & s);
|
||||
template <typename U>
|
||||
tvec2<T> & operator^= (tvec2<U> const & v);
|
||||
GLM_FUNC_DECL tvec2<T> & operator^= (tvec2<U> const & v);
|
||||
template <typename U>
|
||||
tvec2<T> & operator<<=(U const & s);
|
||||
GLM_FUNC_DECL tvec2<T> & operator<<=(U const & s);
|
||||
template <typename U>
|
||||
tvec2<T> & operator<<=(tvec2<U> const & v);
|
||||
GLM_FUNC_DECL tvec2<T> & operator<<=(tvec2<U> const & v);
|
||||
template <typename U>
|
||||
tvec2<T> & operator>>=(U const & s);
|
||||
GLM_FUNC_DECL tvec2<T> & operator>>=(U const & s);
|
||||
template <typename U>
|
||||
tvec2<T> & operator>>=(tvec2<U> const & v);
|
||||
GLM_FUNC_DECL tvec2<T> & operator>>=(tvec2<U> const & v);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Swizzle operators
|
||||
|
||||
value_type swizzle(comp X) const;
|
||||
tvec2<T> swizzle(comp X, comp Y) const;
|
||||
tvec3<T> swizzle(comp X, comp Y, comp Z) const;
|
||||
tvec4<T> swizzle(comp X, comp Y, comp Z, comp W) const;
|
||||
tref2<T> swizzle(comp X, comp Y);
|
||||
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 tref2<T> swizzle(comp X, comp Y);
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct tref2
|
||||
{
|
||||
tref2(T & x, T & y);
|
||||
tref2(tref2<T> const & r);
|
||||
tref2(tvec2<T> const & v);
|
||||
GLM_FUNC_DECL tref2(T & x, T & y);
|
||||
GLM_FUNC_DECL tref2(tref2<T> const & r);
|
||||
GLM_FUNC_DECL tref2(tvec2<T> const & v);
|
||||
|
||||
tref2<T> & operator= (tref2<T> const & r);
|
||||
tref2<T> & operator= (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;
|
||||
|
|
|
@ -40,7 +40,7 @@ namespace glm
|
|||
|
||||
typedef T value_type;
|
||||
typedef std::size_t size_type;
|
||||
static size_type value_size();
|
||||
static GLM_FUNC_DECL size_type value_size();
|
||||
|
||||
typedef tvec3<T> type;
|
||||
typedef tvec3<bool> bool_type;
|
||||
|
@ -66,23 +66,23 @@ namespace glm
|
|||
//////////////////////////////////////
|
||||
// Accesses
|
||||
|
||||
value_type & operator[](size_type i);
|
||||
value_type const & operator[](size_type i) const;
|
||||
GLM_FUNC_DECL value_type & operator[](size_type i);
|
||||
GLM_FUNC_DECL value_type const & operator[](size_type i) const;
|
||||
|
||||
//////////////////////////////////////
|
||||
// Implicit basic constructors
|
||||
|
||||
tvec3();
|
||||
tvec3(tvec3<T> const & v);
|
||||
GLM_FUNC_DECL tvec3();
|
||||
GLM_FUNC_DECL tvec3(tvec3<T> const & v);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Explicit basic constructors
|
||||
|
||||
explicit tvec3(
|
||||
GLM_FUNC_DECL explicit tvec3(
|
||||
ctor);
|
||||
explicit tvec3(
|
||||
GLM_FUNC_DECL explicit tvec3(
|
||||
value_type const & s);
|
||||
explicit tvec3(
|
||||
GLM_FUNC_DECL explicit tvec3(
|
||||
value_type const & s1,
|
||||
value_type const & s2,
|
||||
value_type const & s3);
|
||||
|
@ -90,18 +90,18 @@ namespace glm
|
|||
//////////////////////////////////////
|
||||
// Swizzle constructors
|
||||
|
||||
tvec3(tref3<T> const & r);
|
||||
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>
|
||||
explicit tvec3(
|
||||
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>
|
||||
explicit tvec3(
|
||||
GLM_FUNC_DECL explicit tvec3(
|
||||
U const & x,
|
||||
V const & y,
|
||||
W const & z);
|
||||
|
@ -111,90 +111,90 @@ namespace glm
|
|||
|
||||
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
template <typename A, typename B>
|
||||
explicit tvec3(tvec2<A> const & v, B const & s);
|
||||
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>
|
||||
explicit tvec3(A const & s, tvec2<B> const & v);
|
||||
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>
|
||||
explicit tvec3(tvec3<U> const & v);
|
||||
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>
|
||||
explicit tvec3(tvec4<U> const & v);
|
||||
GLM_FUNC_DECL explicit tvec3(tvec4<U> const & v);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Unary arithmetic operators
|
||||
|
||||
tvec3<T> & operator= (tvec3<T> const & v);
|
||||
GLM_FUNC_DECL tvec3<T> & operator= (tvec3<T> const & v);
|
||||
template <typename U>
|
||||
tvec3<T> & operator= (tvec3<U> const & v);
|
||||
GLM_FUNC_DECL tvec3<T> & operator= (tvec3<U> const & v);
|
||||
|
||||
template <typename U>
|
||||
tvec3<T> & operator+=(U const & s);
|
||||
GLM_FUNC_DECL tvec3<T> & operator+=(U const & s);
|
||||
template <typename U>
|
||||
tvec3<T> & operator+=(tvec3<U> const & v);
|
||||
GLM_FUNC_DECL tvec3<T> & operator+=(tvec3<U> const & v);
|
||||
template <typename U>
|
||||
tvec3<T> & operator-=(U const & s);
|
||||
GLM_FUNC_DECL tvec3<T> & operator-=(U const & s);
|
||||
template <typename U>
|
||||
tvec3<T> & operator-=(tvec3<U> const & v);
|
||||
GLM_FUNC_DECL tvec3<T> & operator-=(tvec3<U> const & v);
|
||||
template <typename U>
|
||||
tvec3<T> & operator*=(U const & s);
|
||||
GLM_FUNC_DECL tvec3<T> & operator*=(U const & s);
|
||||
template <typename U>
|
||||
tvec3<T> & operator*=(tvec3<U> const & v);
|
||||
GLM_FUNC_DECL tvec3<T> & operator*=(tvec3<U> const & v);
|
||||
template <typename U>
|
||||
tvec3<T> & operator/=(U const & s);
|
||||
GLM_FUNC_DECL tvec3<T> & operator/=(U const & s);
|
||||
template <typename U>
|
||||
tvec3<T> & operator/=(tvec3<U> const & v);
|
||||
tvec3<T> & operator++();
|
||||
tvec3<T> & operator--();
|
||||
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>
|
||||
tvec3<T> & operator%= (U const & s);
|
||||
GLM_FUNC_DECL tvec3<T> & operator%= (U const & s);
|
||||
template <typename U>
|
||||
tvec3<T> & operator%= (tvec3<U> const & v);
|
||||
GLM_FUNC_DECL tvec3<T> & operator%= (tvec3<U> const & v);
|
||||
template <typename U>
|
||||
tvec3<T> & operator&= (U const & s);
|
||||
GLM_FUNC_DECL tvec3<T> & operator&= (U const & s);
|
||||
template <typename U>
|
||||
tvec3<T> & operator&= (tvec3<U> const & v);
|
||||
GLM_FUNC_DECL tvec3<T> & operator&= (tvec3<U> const & v);
|
||||
template <typename U>
|
||||
tvec3<T> & operator|= (U const & s);
|
||||
GLM_FUNC_DECL tvec3<T> & operator|= (U const & s);
|
||||
template <typename U>
|
||||
tvec3<T> & operator|= (tvec3<U> const & v);
|
||||
GLM_FUNC_DECL tvec3<T> & operator|= (tvec3<U> const & v);
|
||||
template <typename U>
|
||||
tvec3<T> & operator^= (U const & s);
|
||||
GLM_FUNC_DECL tvec3<T> & operator^= (U const & s);
|
||||
template <typename U>
|
||||
tvec3<T> & operator^= (tvec3<U> const & v);
|
||||
GLM_FUNC_DECL tvec3<T> & operator^= (tvec3<U> const & v);
|
||||
template <typename U>
|
||||
tvec3<T> & operator<<=(U const & s);
|
||||
GLM_FUNC_DECL tvec3<T> & operator<<=(U const & s);
|
||||
template <typename U>
|
||||
tvec3<T> & operator<<=(tvec3<U> const & v);
|
||||
GLM_FUNC_DECL tvec3<T> & operator<<=(tvec3<U> const & v);
|
||||
template <typename U>
|
||||
tvec3<T> & operator>>=(U const & s);
|
||||
GLM_FUNC_DECL tvec3<T> & operator>>=(U const & s);
|
||||
template <typename U>
|
||||
tvec3<T> & operator>>=(tvec3<U> const & v);
|
||||
GLM_FUNC_DECL tvec3<T> & operator>>=(tvec3<U> const & v);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Swizzle operators
|
||||
|
||||
value_type swizzle(comp X) const;
|
||||
tvec2<T> swizzle(comp X, comp Y) const;
|
||||
tvec3<T> swizzle(comp X, comp Y, comp Z) const;
|
||||
tvec4<T> swizzle(comp X, comp Y, comp Z, comp W) const;
|
||||
tref3<T> swizzle(comp X, comp Y, comp Z);
|
||||
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
|
||||
{
|
||||
tref3(T & x, T & y, T & z);
|
||||
tref3(tref3<T> const & r);
|
||||
tref3(tvec3<T> const & v);
|
||||
GLM_FUNC_DECL tref3(T & x, T & y, T & z);
|
||||
GLM_FUNC_DECL tref3(tref3<T> const & r);
|
||||
GLM_FUNC_DECL tref3(tvec3<T> const & v);
|
||||
|
||||
tref3<T> & operator= (tref3<T> const & r);
|
||||
tref3<T> & operator= (tvec3<T> const & v);
|
||||
GLM_FUNC_DECL tref3<T> & operator= (tref3<T> const & r);
|
||||
GLM_FUNC_DECL tref3<T> & operator= (tvec3<T> const & v);
|
||||
|
||||
T & x;
|
||||
T & y;
|
||||
|
|
|
@ -40,7 +40,7 @@ namespace glm
|
|||
|
||||
typedef T value_type;
|
||||
typedef std::size_t size_type;
|
||||
static size_type value_size();
|
||||
static GLM_FUNC_DECL size_type value_size();
|
||||
|
||||
typedef tvec4<T> type;
|
||||
typedef tvec4<bool> bool_type;
|
||||
|
@ -67,23 +67,23 @@ namespace glm
|
|||
//////////////////////////////////////
|
||||
// Accesses
|
||||
|
||||
value_type & operator[](size_type i);
|
||||
value_type const & operator[](size_type i) const;
|
||||
GLM_FUNC_DECL value_type & operator[](size_type i);
|
||||
GLM_FUNC_DECL value_type const & operator[](size_type i) const;
|
||||
|
||||
//////////////////////////////////////
|
||||
// Implicit basic constructors
|
||||
|
||||
tvec4();
|
||||
tvec4(type const & v);
|
||||
GLM_FUNC_DECL tvec4();
|
||||
GLM_FUNC_DECL tvec4(type const & v);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Explicit basic constructors
|
||||
|
||||
explicit tvec4(
|
||||
GLM_FUNC_DECL explicit tvec4(
|
||||
ctor);
|
||||
explicit tvec4(
|
||||
GLM_FUNC_DECL explicit tvec4(
|
||||
value_type const & s);
|
||||
explicit tvec4(
|
||||
GLM_FUNC_DECL explicit tvec4(
|
||||
value_type const & s0,
|
||||
value_type const & s1,
|
||||
value_type const & s2,
|
||||
|
@ -92,18 +92,18 @@ namespace glm
|
|||
//////////////////////////////////////
|
||||
// Swizzle constructors
|
||||
|
||||
tvec4(tref4<T> const & r);
|
||||
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>
|
||||
explicit tvec4(
|
||||
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>
|
||||
explicit tvec4(
|
||||
GLM_FUNC_DECL explicit tvec4(
|
||||
A const & x,
|
||||
B const & y,
|
||||
C const & z,
|
||||
|
@ -114,99 +114,99 @@ namespace glm
|
|||
|
||||
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
template <typename A, typename B, typename C>
|
||||
explicit tvec4(tvec2<A> const & v, B const & s1, C const & s2);
|
||||
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>
|
||||
explicit tvec4(A const & s1, tvec2<B> const & v, C const & s2);
|
||||
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>
|
||||
explicit tvec4(A const & s1, B const & s2, tvec2<C> const & v);
|
||||
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>
|
||||
explicit tvec4(tvec3<A> const & v, B const & s);
|
||||
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>
|
||||
explicit tvec4(A const & s, tvec3<B> const & v);
|
||||
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>
|
||||
explicit tvec4(tvec2<A> const & v1, tvec2<B> const & v2);
|
||||
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>
|
||||
explicit tvec4(tvec4<U> const & v);
|
||||
GLM_FUNC_DECL explicit tvec4(tvec4<U> const & v);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Unary arithmetic operators
|
||||
|
||||
tvec4<T> & operator= (tvec4<T> const & v);
|
||||
GLM_FUNC_DECL tvec4<T> & operator= (tvec4<T> const & v);
|
||||
template <typename U>
|
||||
tvec4<T> & operator= (tvec4<U> const & v);
|
||||
GLM_FUNC_DECL tvec4<T> & operator= (tvec4<U> const & v);
|
||||
|
||||
template <typename U>
|
||||
tvec4<T> & operator+=(U const & s);
|
||||
GLM_FUNC_DECL tvec4<T> & operator+=(U const & s);
|
||||
template <typename U>
|
||||
tvec4<T> & operator+=(tvec4<U> const & v);
|
||||
GLM_FUNC_DECL tvec4<T> & operator+=(tvec4<U> const & v);
|
||||
template <typename U>
|
||||
tvec4<T> & operator-=(U const & s);
|
||||
GLM_FUNC_DECL tvec4<T> & operator-=(U const & s);
|
||||
template <typename U>
|
||||
tvec4<T> & operator-=(tvec4<U> const & v);
|
||||
GLM_FUNC_DECL tvec4<T> & operator-=(tvec4<U> const & v);
|
||||
template <typename U>
|
||||
tvec4<T> & operator*=(U const & s);
|
||||
GLM_FUNC_DECL tvec4<T> & operator*=(U const & s);
|
||||
template <typename U>
|
||||
tvec4<T> & operator*=(tvec4<U> const & v);
|
||||
GLM_FUNC_DECL tvec4<T> & operator*=(tvec4<U> const & v);
|
||||
template <typename U>
|
||||
tvec4<T> & operator/=(U const & s);
|
||||
GLM_FUNC_DECL tvec4<T> & operator/=(U const & s);
|
||||
template <typename U>
|
||||
tvec4<T> & operator/=(tvec4<U> const & v);
|
||||
tvec4<T> & operator++();
|
||||
tvec4<T> & operator--();
|
||||
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>
|
||||
tvec4<T> & operator%= (U const & s);
|
||||
GLM_FUNC_DECL tvec4<T> & operator%= (U const & s);
|
||||
template <typename U>
|
||||
tvec4<T> & operator%= (tvec4<U> const & v);
|
||||
GLM_FUNC_DECL tvec4<T> & operator%= (tvec4<U> const & v);
|
||||
template <typename U>
|
||||
tvec4<T> & operator&= (U const & s);
|
||||
GLM_FUNC_DECL tvec4<T> & operator&= (U const & s);
|
||||
template <typename U>
|
||||
tvec4<T> & operator&= (tvec4<U> const & v);
|
||||
GLM_FUNC_DECL tvec4<T> & operator&= (tvec4<U> const & v);
|
||||
template <typename U>
|
||||
tvec4<T> & operator|= (U const & s);
|
||||
GLM_FUNC_DECL tvec4<T> & operator|= (U const & s);
|
||||
template <typename U>
|
||||
tvec4<T> & operator|= (tvec4<U> const & v);
|
||||
GLM_FUNC_DECL tvec4<T> & operator|= (tvec4<U> const & v);
|
||||
template <typename U>
|
||||
tvec4<T> & operator^= (U const & s);
|
||||
GLM_FUNC_DECL tvec4<T> & operator^= (U const & s);
|
||||
template <typename U>
|
||||
tvec4<T> & operator^= (tvec4<U> const & v);
|
||||
GLM_FUNC_DECL tvec4<T> & operator^= (tvec4<U> const & v);
|
||||
template <typename U>
|
||||
tvec4<T> & operator<<=(U const & s);
|
||||
GLM_FUNC_DECL tvec4<T> & operator<<=(U const & s);
|
||||
template <typename U>
|
||||
tvec4<T> & operator<<=(tvec4<U> const & v);
|
||||
GLM_FUNC_DECL tvec4<T> & operator<<=(tvec4<U> const & v);
|
||||
template <typename U>
|
||||
tvec4<T> & operator>>=(U const & s);
|
||||
GLM_FUNC_DECL tvec4<T> & operator>>=(U const & s);
|
||||
template <typename U>
|
||||
tvec4<T> & operator>>=(tvec4<U> const & v);
|
||||
GLM_FUNC_DECL tvec4<T> & operator>>=(tvec4<U> const & v);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Swizzle operators
|
||||
|
||||
value_type swizzle(comp X) const;
|
||||
tvec2<T> swizzle(comp X, comp Y) const;
|
||||
tvec3<T> swizzle(comp X, comp Y, comp Z) const;
|
||||
tvec4<T> swizzle(comp X, comp Y, comp Z, comp W) const;
|
||||
tref4<T> swizzle(comp X, comp Y, comp Z, comp W);
|
||||
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
|
||||
{
|
||||
tref4(T & x, T & y, T & z, T & w);
|
||||
tref4(tref4<T> const & r);
|
||||
tref4(tvec4<T> const & v);
|
||||
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);
|
||||
|
||||
tref4<T> & operator= (tref4<T> const & r);
|
||||
tref4<T> & operator= (tvec4<T> const & v);
|
||||
GLM_FUNC_DECL tref4<T> & operator= (tref4<T> const & r);
|
||||
GLM_FUNC_DECL tref4<T> & operator= (tvec4<T> const & v);
|
||||
|
||||
T & x;
|
||||
T & y;
|
||||
|
|
|
@ -48,6 +48,7 @@
|
|||
#include "./gtx/intersect.hpp"
|
||||
#include "./gtx/log_base.hpp"
|
||||
#include "./gtx/matrix_cross_product.hpp"
|
||||
#include "./gtx/matrix_interpolation.hpp"
|
||||
#include "./gtx/matrix_major_storage.hpp"
|
||||
#include "./gtx/matrix_operation.hpp"
|
||||
#include "./gtx/matrix_query.hpp"
|
||||
|
|
73
glm/gtx/matrix_interpolation.hpp
Normal file
73
glm/gtx/matrix_interpolation.hpp
Normal file
|
@ -0,0 +1,73 @@
|
|||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net)
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Created : 2011-03-05
|
||||
// Updated : 2011-03-05
|
||||
// Licence : This source is under MIT License
|
||||
// File : glm/gtx/matrix_interpolation.hpp
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Dependency:
|
||||
// - GLM core
|
||||
// - GLM_GTX_matric_interpolation
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// This extension has been written by Ghenadii Ursachi (the.asteroth@gmail.com)
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef glm_gtx_matrix_interpolation
|
||||
#define glm_gtx_matrix_interpolation
|
||||
|
||||
// Dependency:
|
||||
//#include "../glm.hpp"
|
||||
|
||||
#if(defined(GLM_MESSAGES) && !defined(glm_ext))
|
||||
# pragma message("GLM: GLM_GTX_matrix_interpolation extension included")
|
||||
#endif
|
||||
|
||||
namespace glm
|
||||
{
|
||||
namespace test{
|
||||
void main_gtx_transform();
|
||||
}//namespace test
|
||||
|
||||
namespace gtx{
|
||||
//! GLM_GTX_matrix_interpolation extension: Add transformation matrices
|
||||
namespace matrix_interpolation
|
||||
{
|
||||
/// \addtogroup gtx_matrix_interpolation
|
||||
///@{
|
||||
|
||||
//! Get the axis and angle of the rotation from a matrix.
|
||||
//! From GLM_GTX_matrix_interpolation extension.
|
||||
template <typename T>
|
||||
void axisAngle(
|
||||
detail::tmat4x4<T> const & mat,
|
||||
detail::tvec3<T> & axis,
|
||||
T & angle);
|
||||
|
||||
//! Build a matrix from axis and angle.
|
||||
//! From GLM_GTX_matrix_interpolation extension.
|
||||
template <typename T>
|
||||
detail::tmat4x4<T> axisAngleMatrix(
|
||||
detail::tvec3<T> const & axis,
|
||||
T const angle);
|
||||
|
||||
//! Build a interpolation of 4 * 4 matrixes.
|
||||
//! From GLM_GTX_matrix_interpolation extension.
|
||||
//! Warning! works only with rotation and/or translation matrixes, scale will generate unexpected results.
|
||||
template <typename T>
|
||||
detail::tmat4x4<T> interpolate(
|
||||
detail::tmat4x4<T> const & m1,
|
||||
detail::tmat4x4<T> const & m2,
|
||||
T const delta);
|
||||
|
||||
///@}
|
||||
|
||||
}//namespace matrix_interpolation
|
||||
}//namespace gtx
|
||||
}//namespace glm
|
||||
|
||||
#include "matrix_interpolation.inl"
|
||||
|
||||
namespace glm{using namespace gtx::matrix_interpolation;}
|
||||
|
||||
#endif//glm_gtx_transform
|
117
glm/gtx/matrix_interpolation.inl
Normal file
117
glm/gtx/matrix_interpolation.inl
Normal file
|
@ -0,0 +1,117 @@
|
|||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net)
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Created : 2011-03-05
|
||||
// Updated : 2011-03-05
|
||||
// Licence : This source is under MIT License
|
||||
// File : glm/gtx/matrix_interpolation.inl
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
namespace glm{
|
||||
namespace gtx{
|
||||
namespace matrix_interpolation
|
||||
{
|
||||
template <typename T>
|
||||
GLM_FUNC_QUALIFIER void axisAngle(
|
||||
detail::tmat4x4<T> const & mat,
|
||||
detail::tvec3<T> & axis,
|
||||
T & angle)
|
||||
{
|
||||
T epsilon = (T)0.01;
|
||||
T epsilon2 = (T)0.1;
|
||||
|
||||
if ((fabs(mat[1][0] - mat[0][1]) < epsilon) && (fabs(mat[2][0] - mat[0][2]) < epsilon) && (fabs(mat[2][1] - mat[1][2]) < epsilon)) {
|
||||
if ((fabs(mat[1][0] + mat[0][1]) < epsilon2) && (fabs(mat[2][0] + mat[0][2]) < epsilon2) && (fabs(mat[2][1] + mat[1][2]) < epsilon2) && (fabs(mat[0][0] + mat[1][1] + mat[2][2] - (T)3.0) < epsilon2)) {
|
||||
angle = (T)0.0;
|
||||
axis.x = (T)1.0;
|
||||
axis.y = (T)0.0;
|
||||
axis.z = (T)0.0;
|
||||
return;
|
||||
}
|
||||
angle = M_1_PI;
|
||||
T xx = (mat[0][0] + (T)1.0) / (T)2.0;
|
||||
T yy = (mat[1][1] + (T)1.0) / (T)2.0;
|
||||
T zz = (mat[2][2] + (T)1.0) / (T)2.0;
|
||||
T xy = (mat[1][0] + mat[0][1]) / (T)4.0;
|
||||
T xz = (mat[2][0] + mat[0][2]) / (T)4.0;
|
||||
T yz = (mat[2][1] + mat[1][2]) / (T)4.0;
|
||||
if ((xx > yy) && (xx > zz)) {
|
||||
if (xx < epsilon) {
|
||||
axis.x = (T)0.0;
|
||||
axis.y = (T)0.7071;
|
||||
axis.z = (T)0.7071;
|
||||
} else {
|
||||
axis.x = sqrt(xx);
|
||||
axis.y = xy / axis.x;
|
||||
axis.z = xz / axis.x;
|
||||
}
|
||||
} else if (yy > zz) {
|
||||
if (yy < epsilon) {
|
||||
axis.x = (T)0.7071;
|
||||
axis.y = (T)0.0;
|
||||
axis.z = (T)0.7071;
|
||||
} else {
|
||||
axis.y = sqrt(yy);
|
||||
axis.x = xy / axis.y;
|
||||
axis.z = yz / axis.y;
|
||||
}
|
||||
} else {
|
||||
if (zz < epsilon) {
|
||||
axis.x = (T)0.7071;
|
||||
axis.y = (T)0.7071;
|
||||
axis.z = (T)0.0;
|
||||
} else {
|
||||
axis.z = sqrt(zz);
|
||||
axis.x = xz / axis.z;
|
||||
axis.y = yz / axis.z;
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
T s = sqrt((mat[2][1] - mat[1][2]) * (mat[2][1] - mat[1][2]) + (mat[2][0] - mat[0][2]) * (mat[2][0] - mat[0][2]) + (mat[1][0] - mat[0][1]) * (mat[1][0] - mat[0][1]));
|
||||
if (glm::abs(s) < T(0.001))
|
||||
s = (T)1.0;
|
||||
angle = acos((mat[0][0] + mat[1][1] + mat[2][2] - (T)1.0) / (T)2.0);
|
||||
axis.x = (mat[1][2] - mat[2][1]) / s;
|
||||
axis.y = (mat[2][0] - mat[0][2]) / s;
|
||||
axis.z = (mat[0][1] - mat[1][0]) / s;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
GLM_FUNC_QUALIFIER detail::tmat4x4<T> axisAngleMatrix(
|
||||
detail::tvec3<T> const & axis,
|
||||
T const angle)
|
||||
{
|
||||
T c = cos(angle);
|
||||
T s = sin(angle);
|
||||
T t = T(1) - c;
|
||||
detail::tvec3<T> n = normalize(axis);
|
||||
|
||||
return detail::tmat4x4<T>(
|
||||
t * n.x * n.x + c, t * n.x * n.y + n.z * s, t * n.x * n.z - n.y * s, T(0),
|
||||
t * n.x * n.y - n.z * s, t * n.y * n.y + c, t * n.y * n.z + n.x * s, T(0),
|
||||
t * n.x * n.z + n.y * s, t * n.y * n.z - n.x * s, t * n.z * n.z + c, T(0),
|
||||
T(0), T(0), T(0), T(1)
|
||||
);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
GLM_FUNC_QUALIFIER detail::tmat4x4<T> interpolate(
|
||||
detail::tmat4x4<T> const & m1,
|
||||
detail::tmat4x4<T> const & m2,
|
||||
T const delta)
|
||||
{
|
||||
detail::tmat4x4<T> dltRotation = m2 * transpose(m1);
|
||||
detail::tvec3<T> dltAxis;
|
||||
T dltAngle;
|
||||
axisAngle(dltRotation, dltAxis, dltAngle);
|
||||
detail::tmat4x4<T> out = axisAngleMatrix(dltAxis, dltAngle * delta) * rotationMatrix(m1);
|
||||
out[3][0] = m1[3][0] + delta * (m2[3][0] - m1[3][0]);
|
||||
out[3][1] = m1[3][1] + delta * (m2[3][1] - m1[3][1]);
|
||||
out[3][2] = m1[3][2] + delta * (m2[3][2] - m1[3][2]);
|
||||
return out;
|
||||
}
|
||||
|
||||
}//namespace transform
|
||||
}//namespace gtx
|
||||
}//namespace glm
|
|
@ -13,6 +13,11 @@ GLM is a header only library, there is nothing to build, just include it.
|
|||
More informations in GLM manual:
|
||||
http://glm.g-truc.net/glm-0.9.1.pdf
|
||||
|
||||
================================================================================
|
||||
GLM 0.9.1.3: 2010-05-07
|
||||
--------------------------------------------------------------------------------
|
||||
- Fixed bugs
|
||||
|
||||
================================================================================
|
||||
GLM 0.9.1.2: 2010-04-15
|
||||
--------------------------------------------------------------------------------
|
||||
|
|
|
@ -118,7 +118,7 @@ namespace bitRevert
|
|||
else if(Data64[i].Result == FAIL && !Compare)
|
||||
continue;
|
||||
|
||||
std::cout << "glm::bitfieldReverse test fail on test " << i << std::endl;
|
||||
std::cout << "glm::bitRevert test fail on test " << i << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -2,16 +2,36 @@
|
|||
// OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net)
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Created : 2008-08-31
|
||||
// Updated : 2008-08-31
|
||||
// Updated : 2011-05-06
|
||||
// Licence : This source is under MIT License
|
||||
// File : test/core/type_float.cpp
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <glm/glm.hpp>
|
||||
|
||||
int test_float_size()
|
||||
{
|
||||
return
|
||||
sizeof(glm::float_t) != sizeof(glm::lowp_float) &&
|
||||
sizeof(glm::float_t) != sizeof(glm::mediump_float) &&
|
||||
sizeof(glm::float_t) != sizeof(glm::highp_float);
|
||||
}
|
||||
|
||||
int test_float_precision()
|
||||
{
|
||||
return (
|
||||
sizeof(glm::lowp_float) <= sizeof(glm::mediump_float) &&
|
||||
sizeof(glm::mediump_float) <= sizeof(glm::highp_float)) ? 0 : 1;
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
return -1;
|
||||
int Error = 0;
|
||||
|
||||
Error += test_float_size();
|
||||
Error += test_float_precision();
|
||||
|
||||
return Error;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -2,14 +2,51 @@
|
|||
// OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net)
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Created : 2008-08-31
|
||||
// Updated : 2008-08-31
|
||||
// Updated : 2011-05-06
|
||||
// Licence : This source is under MIT License
|
||||
// File : test/core/type_int.cpp
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <glm/glm.hpp>
|
||||
|
||||
int test_int_size()
|
||||
{
|
||||
return
|
||||
sizeof(glm::int_t) != sizeof(glm::lowp_int) &&
|
||||
sizeof(glm::int_t) != sizeof(glm::mediump_int) &&
|
||||
sizeof(glm::int_t) != sizeof(glm::highp_int);
|
||||
}
|
||||
|
||||
int test_uint_size()
|
||||
{
|
||||
return
|
||||
sizeof(glm::uint_t) != sizeof(glm::lowp_uint) &&
|
||||
sizeof(glm::uint_t) != sizeof(glm::mediump_uint) &&
|
||||
sizeof(glm::uint_t) != sizeof(glm::highp_uint);
|
||||
}
|
||||
|
||||
int test_int_precision()
|
||||
{
|
||||
return (
|
||||
sizeof(glm::lowp_int) <= sizeof(glm::mediump_int) &&
|
||||
sizeof(glm::mediump_int) <= sizeof(glm::highp_int)) ? 0 : 1;
|
||||
}
|
||||
|
||||
int test_uint_precision()
|
||||
{
|
||||
return (
|
||||
sizeof(glm::lowp_uint) <= sizeof(glm::mediump_uint) &&
|
||||
sizeof(glm::mediump_uint) <= sizeof(glm::highp_uint)) ? 0 : 1;
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
return -1;
|
||||
int Error = 0;
|
||||
|
||||
Error += test_int_size();
|
||||
Error += test_int_precision();
|
||||
Error += test_uint_size();
|
||||
Error += test_uint_precision();
|
||||
|
||||
return Error;
|
||||
}
|
||||
|
|
|
@ -2,18 +2,189 @@
|
|||
// OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net)
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Created : 2010-09-16
|
||||
// Updated : 2010-09-16
|
||||
// Updated : 2011-05-06
|
||||
// Licence : This source is under MIT licence
|
||||
// File : test/gtc/matrix_transform.cpp
|
||||
// File : test/gtc/type_precision.cpp
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#define GLM_MESSAGES
|
||||
#include <glm/glm.hpp>
|
||||
#include <glm/gtc/matrix_transform.hpp>
|
||||
#include <glm/gtc/type_precision.hpp>
|
||||
|
||||
/*
|
||||
//typedef i8 i8vec1; //!< \brief 8bit signed integer scalar. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tvec2<i8> i8vec2; //!< \brief 8bit signed integer vector of 2 components. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tvec3<i8> i8vec3; //!< \brief 8bit signed integer vector of 3 components. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tvec4<i8> i8vec4; //!< \brief 8bit signed integer vector of 4 components. (from GLM_GTC_type_precision extension)
|
||||
|
||||
//typedef i16 i16vec1; //!< \brief 16bit signed integer scalar. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tvec2<i16> i16vec2; //!< \brief 16bit signed integer vector of 2 components. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tvec3<i16> i16vec3; //!< \brief 16bit signed integer vector of 3 components. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tvec4<i16> i16vec4; //!< \brief 16bit signed integer vector of 4 components. (from GLM_GTC_type_precision extension)
|
||||
|
||||
//typedef i32 i32vec1; //!< \brief 32bit signed integer scalar. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tvec2<i32> i32vec2; //!< \brief 32bit signed integer vector of 2 components. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tvec3<i32> i32vec3; //!< \brief 32bit signed integer vector of 3 components. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tvec4<i32> i32vec4; //!< \brief 32bit signed integer vector of 4 components. (from GLM_GTC_type_precision extension)
|
||||
|
||||
//typedef i64 i64vec1; //!< \brief 32bit signed integer scalar. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tvec2<i64> i64vec2; //!< \brief 64bit signed integer vector of 2 components. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tvec3<i64> i64vec3; //!< \brief 64bit signed integer vector of 3 components. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tvec4<i64> i64vec4; //!< \brief 64bit signed integer vector of 4 components. (from GLM_GTC_type_precision extension)
|
||||
|
||||
/////////////////////////////
|
||||
// Unsigned int vector types
|
||||
|
||||
|
||||
//typedef u8 u8vec1; //!< \brief 8bit unsigned integer scalar. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tvec2<u8> u8vec2; //!< \brief 8bit unsigned integer vector of 2 components. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tvec3<u8> u8vec3; //!< \brief 8bit unsigned integer vector of 3 components. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tvec4<u8> u8vec4; //!< \brief 8bit unsigned integer vector of 4 components. (from GLM_GTC_type_precision extension)
|
||||
|
||||
//typedef u16 u16vec1; //!< \brief 16bit unsigned integer scalar. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tvec2<u16> u16vec2; //!< \brief 16bit unsigned integer vector of 2 components. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tvec3<u16> u16vec3; //!< \brief 16bit unsigned integer vector of 3 components. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tvec4<u16> u16vec4; //!< \brief 16bit unsigned integer vector of 4 components. (from GLM_GTC_type_precision extension)
|
||||
|
||||
//typedef u32 u32vec1; //!< \brief 32bit unsigned integer scalar. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tvec2<u32> u32vec2; //!< \brief 32bit unsigned integer vector of 2 components. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tvec3<u32> u32vec3; //!< \brief 32bit unsigned integer vector of 3 components. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tvec4<u32> u32vec4; //!< \brief 32bit unsigned integer vector of 4 components. (from GLM_GTC_type_precision extension)
|
||||
|
||||
//typedef u64 u64vec1; //!< \brief 64bit unsigned integer scalar. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tvec2<u64> u64vec2; //!< \brief 64bit unsigned integer vector of 2 components. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tvec3<u64> u64vec3; //!< \brief 64bit unsigned integer vector of 3 components. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tvec4<u64> u64vec4; //!< \brief 64bit unsigned integer vector of 4 components. (from GLM_GTC_type_precision extension)
|
||||
|
||||
//typedef f16 f16vec1; //!< \brief Half-precision floating-point scalar. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tvec2<f16> f16vec2; //!< \brief Half-precision floating-point vector of 2 components. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tvec3<f16> f16vec3; //!< \brief Half-precision floating-point vector of 3 components. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tvec4<f16> f16vec4; //!< \brief Half-precision floating-point vector of 4 components. (from GLM_GTC_type_precision extension)
|
||||
|
||||
//typedef f32 f32vec1; //!< \brief Single-precision floating-point scalar. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tvec2<f32> f32vec2; //!< \brief Single-precision floating-point vector of 2 components. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tvec3<f32> f32vec3; //!< \brief Single-precision floating-point vector of 3 components. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tvec4<f32> f32vec4; //!< \brief Single-precision floating-point vector of 4 components. (from GLM_GTC_type_precision extension)
|
||||
|
||||
//typedef f64 f64vec1; //!< \brief Single-precision floating-point scalar. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tvec2<f64> f64vec2; //!< \brief Double-precision floating-point vector of 2 components. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tvec3<f64> f64vec3; //!< \brief Double-precision floating-point vector of 3 components. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tvec4<f64> f64vec4; //!< \brief Double-precision floating-point vector of 4 components. (from GLM_GTC_type_precision extension)
|
||||
|
||||
//////////////////////
|
||||
// Float matrix types
|
||||
|
||||
//typedef f32 fmat1; //!< \brief Single-precision floating-point scalar. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat2x2<f32> fmat2; //!< \brief Single-precision floating-point 2x2 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat3x3<f32> fmat3; //!< \brief Single-precision floating-point 3x3 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat4x4<f32> fmat4; //!< \brief Single-precision floating-point 4x4 matrix. (from GLM_GTC_type_precision extension)
|
||||
|
||||
//typedef f32 fmat1x1; //!< \brief Single-precision floating-point scalar. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat2x2<f32> fmat2x2; //!< \brief Single-precision floating-point 2x2 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat2x3<f32> fmat2x3; //!< \brief Single-precision floating-point 2x3 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat2x4<f32> fmat2x4; //!< \brief Single-precision floating-point 2x4 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat3x2<f32> fmat3x2; //!< \brief Single-precision floating-point 3x2 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat3x3<f32> fmat3x3; //!< \brief Single-precision floating-point 3x3 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat3x4<f32> fmat3x4; //!< \brief Single-precision floating-point 3x4 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat4x2<f32> fmat4x2; //!< \brief Single-precision floating-point 4x2 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat4x3<f32> fmat4x3; //!< \brief Single-precision floating-point 4x3 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat4x4<f32> fmat4x4; //!< \brief Single-precision floating-point 4x4 matrix. (from GLM_GTC_type_precision extension)
|
||||
|
||||
//typedef f16 f16mat1; //!< \brief Half-precision floating-point scalar. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat2x2<f16> f16mat2; //!< \brief Half-precision floating-point 2x2 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat3x3<f16> f16mat3; //!< \brief Half-precision floating-point 3x3 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat4x4<f16> f16mat4; //!< \brief Half-precision floating-point 4x4 matrix. (from GLM_GTC_type_precision extension)
|
||||
|
||||
//typedef f16 f16mat1x1; //!< \brief Half-precision floating-point scalar. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat2x2<f16> f16mat2x2; //!< \brief Half-precision floating-point 2x2 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat2x3<f16> f16mat2x3; //!< \brief Half-precision floating-point 2x3 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat2x4<f16> f16mat2x4; //!< \brief Half-precision floating-point 2x4 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat3x2<f16> f16mat3x2; //!< \brief Half-precision floating-point 3x2 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat3x3<f16> f16mat3x3; //!< \brief Half-precision floating-point 3x3 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat3x4<f16> f16mat3x4; //!< \brief Half-precision floating-point 3x4 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat4x2<f16> f16mat4x2; //!< \brief Half-precision floating-point 4x2 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat4x3<f16> f16mat4x3; //!< \brief Half-precision floating-point 4x3 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat4x4<f16> f16mat4x4; //!< \brief Half-precision floating-point 4x4 matrix. (from GLM_GTC_type_precision extension)
|
||||
|
||||
//typedef f32 f32mat1; //!< \brief Single-precision floating-point scalar. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat2x2<f32> f32mat2; //!< \brief Single-precision floating-point 2x2 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat3x3<f32> f32mat3; //!< \brief Single-precision floating-point 3x3 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat4x4<f32> f32mat4; //!< \brief Single-precision floating-point 4x4 matrix. (from GLM_GTC_type_precision extension)
|
||||
|
||||
//typedef f32 f32mat1x1; //!< \brief Single-precision floating-point scalar. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat2x2<f32> f32mat2x2; //!< \brief Single-precision floating-point 2x2 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat2x3<f32> f32mat2x3; //!< \brief Single-precision floating-point 2x3 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat2x4<f32> f32mat2x4; //!< \brief Single-precision floating-point 2x4 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat3x2<f32> f32mat3x2; //!< \brief Single-precision floating-point 3x2 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat3x3<f32> f32mat3x3; //!< \brief Single-precision floating-point 3x3 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat3x4<f32> f32mat3x4; //!< \brief Single-precision floating-point 3x4 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat4x2<f32> f32mat4x2; //!< \brief Single-precision floating-point 4x2 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat4x3<f32> f32mat4x3; //!< \brief Single-precision floating-point 4x3 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat4x4<f32> f32mat4x4; //!< \brief Single-precision floating-point 4x4 matrix. (from GLM_GTC_type_precision extension)
|
||||
|
||||
//typedef f64 f64mat1; //!< \brief Double-precision floating-point scalar. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat2x2<f64> f64mat2; //!< \brief Double-precision floating-point 2x2 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat3x3<f64> f64mat3; //!< \brief Double-precision floating-point 3x3 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat4x4<f64> f64mat4; //!< \brief Double-precision floating-point 4x4 matrix. (from GLM_GTC_type_precision extension)
|
||||
|
||||
//typedef f64 f64mat1x1; //!< \brief Double-precision floating-point scalar. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat2x2<f64> f64mat2x2; //!< \brief Double-precision floating-point 2x2 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat2x3<f64> f64mat2x3; //!< \brief Double-precision floating-point 2x3 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat2x4<f64> f64mat2x4; //!< \brief Double-precision floating-point 2x4 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat3x2<f64> f64mat3x2; //!< \brief Double-precision floating-point 3x2 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat3x3<f64> f64mat3x3; //!< \brief Double-precision floating-point 3x3 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat3x4<f64> f64mat3x4; //!< \brief Double-precision floating-point 3x4 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat4x2<f64> f64mat4x2; //!< \brief Double-precision floating-point 4x2 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat4x3<f64> f64mat4x3; //!< \brief Double-precision floating-point 4x3 matrix. (from GLM_GTC_type_precision extension)
|
||||
typedef detail::tmat4x4<f64> f64mat4x4; //!< \brief Double-precision floating-point 4x4 matrix. (from GLM_GTC_type_precision extension)
|
||||
*/
|
||||
static int test_scalar_size()
|
||||
{
|
||||
return !(
|
||||
sizeof(glm::int8) == 1 &&
|
||||
sizeof(glm::int16) == 2 &&
|
||||
sizeof(glm::int32) == 4 &&
|
||||
sizeof(glm::int64) == 8 &&
|
||||
sizeof(glm::uint8) == 1 &&
|
||||
sizeof(glm::uint16) == 2 &&
|
||||
sizeof(glm::uint32) == 4 &&
|
||||
sizeof(glm::uint64) == 8 &&
|
||||
sizeof(glm::float16) == 2 &&
|
||||
sizeof(glm::float32) == 4 &&
|
||||
sizeof(glm::float64) == 8);
|
||||
}
|
||||
|
||||
static int test_ivec_size()
|
||||
{
|
||||
return !(
|
||||
sizeof(glm::i8vec2) == 2 &&
|
||||
sizeof(glm::i8vec3) == 3 &&
|
||||
sizeof(glm::i8vec4) == 4 &&
|
||||
sizeof(glm::i16vec2) == 4 &&
|
||||
sizeof(glm::i16vec3) == 6 &&
|
||||
sizeof(glm::i16vec4) == 8 &&
|
||||
sizeof(glm::i32vec2) == 8 &&
|
||||
sizeof(glm::i32vec3) == 12 &&
|
||||
sizeof(glm::i32vec4) == 16 &&
|
||||
sizeof(glm::i64vec2) == 16 &&
|
||||
sizeof(glm::i64vec3) == 24 &&
|
||||
sizeof(glm::i64vec4) == 32);
|
||||
}
|
||||
|
||||
static int test_quat_size()
|
||||
{
|
||||
return !(
|
||||
sizeof(glm::f16quat) == 8 &&
|
||||
sizeof(glm::f32quat) == 16 &&
|
||||
sizeof(glm::f64quat) == 32);
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
int Failed = 0;
|
||||
|
||||
return Failed;
|
||||
int Error = 0;
|
||||
Error += test_scalar_size();
|
||||
//Error += test_mat_size();
|
||||
Error += test_ivec_size();
|
||||
Error += test_quat_size();
|
||||
return Error;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue