Added declarations for missing constructors

This commit is contained in:
Christophe Riccio 2011-06-01 10:02:02 +01:00
parent 07ec8c95b2
commit 35ed096cc8
10 changed files with 208 additions and 26 deletions

View File

@ -79,7 +79,7 @@ namespace glm
col_type const & v2);
//////////////////////////////////////
// Convertion constructors
// Conversions
template <typename U>
GLM_FUNC_DECL explicit tmat2x2(
U const & x);
@ -89,13 +89,13 @@ namespace glm
U const & x1, V const & y1,
M const & x2, N const & y2);
//template <typename U, typename V, typename M, typename N>
//GLM_FUNC_DECL explicit tmat2x2(
// tvec2<U, V> const & v1,
// tvec2<M, N> const & v2);
template <typename U, typename V>
GLM_FUNC_DECL explicit tmat2x2(
tvec2<U> const & v1,
tvec2<V> const & v2);
//////////////////////////////////////
// Conversions
// Matrix conversions
template <typename U>
GLM_FUNC_DECL explicit tmat2x2(tmat2x2<U> const & m);

View File

@ -133,17 +133,17 @@ namespace detail
this->value[1] = col_type(value_type(x2), value_type(y2));
}
//template <typename T>
//template <typename U, typename V, typename M, typename N>
//GLM_FUNC_DECL tmat2x2<T>::tmat2x2
//(
// tvec2<U, V> const & v1,
// tvec2<M, N> const & v2
//)
//{
// this->value[0] = col_type(v1);
// this->value[1] = col_type(v2);
//}
template <typename T>
template <typename U, typename V>
GLM_FUNC_DECL tmat2x2<T>::tmat2x2
(
tvec2<U> const & v1,
tvec2<V> const & v2
)
{
this->value[0] = col_type(v1);
this->value[1] = col_type(v2);
}
//////////////////////////////////////////////////////////////
// mat2x2 conversions

View File

@ -71,7 +71,25 @@ namespace glm
col_type const & v0,
col_type const & v1);
// Conversion
//////////////////////////////////////
// Conversions
template <typename U>
GLM_FUNC_DECL explicit tmat2x3(
U const & x);
template <typename X1, typename Y1, typename Z1, typename X2, typename Y2, typename Z2>
GLM_FUNC_DECL explicit tmat2x3(
X1 const & x1, Y1 const & y1, Z1 const & z1,
X2 const & x2, Y2 const & y2, Z2 const & z2);
template <typename U, typename V>
GLM_FUNC_DECL explicit tmat2x3(
tvec3<U> const & v1,
tvec3<V> const & v2);
//////////////////////////////////////
// Matrix conversion
template <typename U>
GLM_FUNC_DECL explicit tmat2x3(tmat2x3<U> const & m);

View File

@ -71,7 +71,28 @@ namespace glm
col_type const & v0,
col_type const & v1);
// Conversion
//////////////////////////////////////
// Conversions
template <typename U>
GLM_FUNC_DECL explicit tmat2x4(
U const & x);
template
<
typename X1, typename Y1, typename Z1, typename W1,
typename X2, typename Y2, typename Z2, typename W2
>
GLM_FUNC_DECL explicit tmat2x4(
X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1,
X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2,);
template <typename U, typename V>
GLM_FUNC_DECL explicit tmat2x4(
tvec4<U> const & v1,
tvec4<V> const & v2);
//////////////////////////////////////
// Matrix conversions
template <typename U>
GLM_FUNC_DECL explicit tmat2x4(tmat2x4<U> const & m);

View File

@ -73,7 +73,30 @@ namespace glm
col_type const & v1,
col_type const & v2);
// Conversion
//////////////////////////////////////
// Conversions
template <typename U>
GLM_FUNC_DECL explicit tmat3x2(
U const & x);
template
<
typename X1, typename Y1,
typename X2, typename Y2,
typename X3, typename Y3
>
GLM_FUNC_DECL explicit tmat3x2(
X1 const & x1, Y1 const & y1,
X2 const & x2, Y2 const & y2,
X3 const & x3, Y3 const & y3);
template <typename V1, typename V2, typename V3>
GLM_FUNC_DECL explicit tmat3x2(
tvec2<V1> const & v1,
tvec2<V2> const & v2,
tvec2<V3> const & v3);
// Matrix conversions
template <typename U>
GLM_FUNC_DECL explicit tmat3x2(tmat3x2<U> const & m);

View File

@ -77,8 +77,31 @@ namespace glm
col_type const & v1,
col_type const & v2);
//////////////////////////////////////
// Conversions
template <typename U>
GLM_FUNC_DECL explicit tmat3x3(
U const & x);
template
<
typename X1, typename Y1, typename Z1,
typename X2, typename Y2, typename Z2,
typename X3, typename Y3, typename Z3
>
GLM_FUNC_DECL explicit tmat3x3(
X1 const & x1, Y1 const & y1, Z1 const & z1,
X2 const & x2, Y2 const & y2, Z2 const & z2,
X3 const & x3, Y3 const & y3, Z3 const & z3);
template <typename V1, typename V2, typename V3>
GLM_FUNC_DECL explicit tmat3x3(
tvec3<V1> const & v1,
tvec3<V2> const & v2,
tvec3<V3> const & v3);
// Matrix conversions
template <typename U>
GLM_FUNC_DECL explicit tmat3x3(tmat3x3<U> const & m);
GLM_FUNC_DECL explicit tmat3x3(tmat2x2<T> const & x);

View File

@ -73,7 +73,30 @@ namespace glm
col_type const & v1,
col_type const & v2);
// Conversion
//////////////////////////////////////
// Conversions
template <typename U>
GLM_FUNC_DECL explicit tmat3x4(
U const & x);
template
<
typename X1, typename Y1, typename Z1, typename W1,
typename X2, typename Y2, typename Z2, typename W2,
typename X3, typename Y3, typename Z3, typename W3
>
GLM_FUNC_DECL explicit tmat3x4(
X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1,
X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2,
X3 const & x3, Y3 const & y3, Z3 const & z3, W3 const & w3);
template <typename V1, typename V2, typename V3>
GLM_FUNC_DECL explicit tmat3x4(
tvec4<V1> const & v1,
tvec4<V2> const & v2,
tvec4<V3> const & v3);
// Matrix conversion
template <typename U>
GLM_FUNC_DECL explicit tmat3x4(tmat3x4<U> const & m);

View File

@ -75,8 +75,34 @@ namespace glm
col_type const & v2,
col_type const & v3);
//////////////////////////////////////
// Conversions
template <typename U>
GLM_FUNC_DECL explicit tmat4x2(
U const & x);
template
<
typename X1, typename Y1,
typename X2, typename Y2,
typename X3, typename Y3,
typename X4, typename Y4
>
GLM_FUNC_DECL explicit tmat4x2(
X1 const & x1, Y1 const & y1,
X2 const & x2, Y2 const & y2,
X3 const & x3, Y3 const & y3,
X4 const & x4, Y4 const & y4);
template <typename V1, typename V2, typename V3, typename V4>
GLM_FUNC_DECL explicit tmat4x2(
tvec2<V1> const & v1,
tvec2<V2> const & v2,
tvec2<V3> const & v3,
tvec2<V4> const & v4);
// Matrix conversions
template <typename U>
GLM_FUNC_DECL explicit tmat4x2(tmat4x2<U> const & m);
GLM_FUNC_DECL explicit tmat4x2(tmat2x2<T> const & x);

View File

@ -75,7 +75,31 @@ namespace glm
col_type const & v2,
col_type const & v3);
// Conversion
//////////////////////////////////////
// Conversions
template <typename U>
GLM_FUNC_DECL explicit tmat4x3(
U const & x);
template <
typename X1, typename Y1, typename Z1,
typename X2, typename Y2, typename Z2,
typename X3, typename Y3, typename Z3,
typename X4, typename Y4, typename Z4>
GLM_FUNC_DECL explicit tmat4x3(
X1 const & x1, Y1 const & y1, Z1 const & z1,
X2 const & x2, Y2 const & y2, Z2 const & z2,
X3 const & x3, Y3 const & y3, Z3 const & z3,
X4 const & x4, Y4 const & y4, Z4 const & z4);
template <typename V1, typename V2, typename V3, typename V4>
GLM_FUNC_DECL explicit tmat4x3(
tvec3<V1> const & v1,
tvec3<V2> const & v2,
tvec3<V3> const & v3,
tvec3<V4> const & v4);
// Matrix conversions
template <typename U>
GLM_FUNC_DECL explicit tmat4x3(tmat4x3<U> const & m);

View File

@ -79,8 +79,32 @@ namespace glm
col_type const & v2,
col_type const & v3);
//////////////////////////////////////
// Conversions
template <typename U>
GLM_FUNC_DECL explicit tmat4x4(
U const & x);
template <
typename X1, typename Y1, typename Z1,
typename X2, typename Y2, typename Z2,
typename X3, typename Y3, typename Z3,
typename X4, typename Y4, typename Z4>
GLM_FUNC_DECL explicit tmat4x4(
X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1,
X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2,
X3 const & x3, Y3 const & y3, Z3 const & z3, W3 const & w3,
X4 const & x4, Y4 const & y4, Z4 const & z4, W4 const & w4);
template <typename V1, typename V2, typename V3, typename V4>
GLM_FUNC_DECL explicit tmat4x4(
tvec4<V1> const & v1,
tvec4<V2> const & v2,
tvec4<V3> const & v3,
tvec4<V4> const & v4);
// Matrix conversions
template <typename U>
GLM_FUNC_DECL explicit tmat4x4(tmat4x4<U> const & m);
GLM_FUNC_DECL explicit tmat4x4(tmat2x2<T> const & x);