mirror of
https://github.com/g-truc/glm.git
synced 2024-11-29 11:24:35 +00:00
vector/matrix component length() static #565
This commit is contained in:
parent
297b050693
commit
a80ae23568
@ -69,7 +69,7 @@ namespace glm
|
|||||||
// -- Accesses --
|
// -- Accesses --
|
||||||
|
|
||||||
typedef length_t length_type;
|
typedef length_t length_type;
|
||||||
GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const;
|
GLM_FUNC_DECL static length_type length(){return 2;}
|
||||||
|
|
||||||
GLM_FUNC_DECL col_type & operator[](length_type i);
|
GLM_FUNC_DECL col_type & operator[](length_type i);
|
||||||
GLM_FUNC_DECL col_type const & operator[](length_type i) const;
|
GLM_FUNC_DECL col_type const & operator[](length_type i) const;
|
||||||
|
@ -154,12 +154,6 @@ namespace glm
|
|||||||
|
|
||||||
// -- Accesses --
|
// -- Accesses --
|
||||||
|
|
||||||
template <typename T, precision P>
|
|
||||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat2x2<T, P>::length_type tmat2x2<T, P>::length() const
|
|
||||||
{
|
|
||||||
return 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER typename tmat2x2<T, P>::col_type & tmat2x2<T, P>::operator[](typename tmat2x2<T, P>::length_type i)
|
GLM_FUNC_QUALIFIER typename tmat2x2<T, P>::col_type & tmat2x2<T, P>::operator[](typename tmat2x2<T, P>::length_type i)
|
||||||
{
|
{
|
||||||
|
@ -70,7 +70,7 @@ namespace glm
|
|||||||
// -- Accesses --
|
// -- Accesses --
|
||||||
|
|
||||||
typedef length_t length_type;
|
typedef length_t length_type;
|
||||||
GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const;
|
GLM_FUNC_DECL static length_type length(){return 2;}
|
||||||
|
|
||||||
GLM_FUNC_DECL col_type & operator[](length_type i);
|
GLM_FUNC_DECL col_type & operator[](length_type i);
|
||||||
GLM_FUNC_DECL col_type const & operator[](length_type i) const;
|
GLM_FUNC_DECL col_type const & operator[](length_type i) const;
|
||||||
|
@ -154,12 +154,6 @@ namespace glm
|
|||||||
|
|
||||||
// -- Accesses --
|
// -- Accesses --
|
||||||
|
|
||||||
template <typename T, precision P>
|
|
||||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat2x3<T, P>::length_type tmat2x3<T, P>::length() const
|
|
||||||
{
|
|
||||||
return 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER typename tmat2x3<T, P>::col_type & tmat2x3<T, P>::operator[](typename tmat2x3<T, P>::length_type i)
|
GLM_FUNC_QUALIFIER typename tmat2x3<T, P>::col_type & tmat2x3<T, P>::operator[](typename tmat2x3<T, P>::length_type i)
|
||||||
{
|
{
|
||||||
|
@ -72,7 +72,7 @@ namespace glm
|
|||||||
// -- Accesses --
|
// -- Accesses --
|
||||||
|
|
||||||
typedef length_t length_type;
|
typedef length_t length_type;
|
||||||
GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const;
|
GLM_FUNC_DECL static length_type length(){return 2;}
|
||||||
|
|
||||||
GLM_FUNC_DECL col_type & operator[](length_type i);
|
GLM_FUNC_DECL col_type & operator[](length_type i);
|
||||||
GLM_FUNC_DECL col_type const & operator[](length_type i) const;
|
GLM_FUNC_DECL col_type const & operator[](length_type i) const;
|
||||||
|
@ -155,12 +155,6 @@ namespace glm
|
|||||||
|
|
||||||
// -- Accesses --
|
// -- Accesses --
|
||||||
|
|
||||||
template <typename T, precision P>
|
|
||||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat2x4<T, P>::length_type tmat2x4<T, P>::length() const
|
|
||||||
{
|
|
||||||
return 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER typename tmat2x4<T, P>::col_type & tmat2x4<T, P>::operator[](typename tmat2x4<T, P>::length_type i)
|
GLM_FUNC_QUALIFIER typename tmat2x4<T, P>::col_type & tmat2x4<T, P>::operator[](typename tmat2x4<T, P>::length_type i)
|
||||||
{
|
{
|
||||||
|
@ -77,7 +77,7 @@ namespace glm
|
|||||||
// -- Accesses --
|
// -- Accesses --
|
||||||
|
|
||||||
typedef length_t length_type;
|
typedef length_t length_type;
|
||||||
GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const;
|
GLM_FUNC_DECL static length_type length(){return 3;}
|
||||||
|
|
||||||
GLM_FUNC_DECL col_type & operator[](length_type i);
|
GLM_FUNC_DECL col_type & operator[](length_type i);
|
||||||
GLM_FUNC_DECL col_type const & operator[](length_type i) const;
|
GLM_FUNC_DECL col_type const & operator[](length_type i) const;
|
||||||
|
@ -184,12 +184,6 @@ namespace glm
|
|||||||
|
|
||||||
// -- Accesses --
|
// -- Accesses --
|
||||||
|
|
||||||
template <typename T, precision P>
|
|
||||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat3x2<T, P>::length_type tmat3x2<T, P>::length() const
|
|
||||||
{
|
|
||||||
return 3;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER typename tmat3x2<T, P>::col_type & tmat3x2<T, P>::operator[](typename tmat3x2<T, P>::length_type i)
|
GLM_FUNC_QUALIFIER typename tmat3x2<T, P>::col_type & tmat3x2<T, P>::operator[](typename tmat3x2<T, P>::length_type i)
|
||||||
{
|
{
|
||||||
|
@ -76,7 +76,7 @@ namespace glm
|
|||||||
// -- Accesses --
|
// -- Accesses --
|
||||||
|
|
||||||
typedef length_t length_type;
|
typedef length_t length_type;
|
||||||
GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const;
|
GLM_FUNC_DECL static length_type length(){return 3;}
|
||||||
|
|
||||||
GLM_FUNC_DECL col_type & operator[](length_type i);
|
GLM_FUNC_DECL col_type & operator[](length_type i);
|
||||||
GLM_FUNC_DECL col_type const & operator[](length_type i) const;
|
GLM_FUNC_DECL col_type const & operator[](length_type i) const;
|
||||||
|
@ -186,12 +186,6 @@ namespace glm
|
|||||||
|
|
||||||
// -- Accesses --
|
// -- Accesses --
|
||||||
|
|
||||||
template <typename T, precision P>
|
|
||||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat3x3<T, P>::length_type tmat3x3<T, P>::length() const
|
|
||||||
{
|
|
||||||
return 3;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER typename tmat3x3<T, P>::col_type & tmat3x3<T, P>::operator[](typename tmat3x3<T, P>::length_type i)
|
GLM_FUNC_QUALIFIER typename tmat3x3<T, P>::col_type & tmat3x3<T, P>::operator[](typename tmat3x3<T, P>::length_type i)
|
||||||
{
|
{
|
||||||
|
@ -77,7 +77,7 @@ namespace glm
|
|||||||
// -- Accesses --
|
// -- Accesses --
|
||||||
|
|
||||||
typedef length_t length_type;
|
typedef length_t length_type;
|
||||||
GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const;
|
GLM_FUNC_DECL static length_type length(){return 3;}
|
||||||
|
|
||||||
GLM_FUNC_DECL col_type & operator[](length_type i);
|
GLM_FUNC_DECL col_type & operator[](length_type i);
|
||||||
GLM_FUNC_DECL col_type const & operator[](length_type i) const;
|
GLM_FUNC_DECL col_type const & operator[](length_type i) const;
|
||||||
|
@ -184,12 +184,6 @@ namespace glm
|
|||||||
|
|
||||||
// -- Accesses --
|
// -- Accesses --
|
||||||
|
|
||||||
template <typename T, precision P>
|
|
||||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat3x4<T, P>::length_type tmat3x4<T, P>::length() const
|
|
||||||
{
|
|
||||||
return 3;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER typename tmat3x4<T, P>::col_type & tmat3x4<T, P>::operator[](typename tmat3x4<T, P>::length_type i)
|
GLM_FUNC_QUALIFIER typename tmat3x4<T, P>::col_type & tmat3x4<T, P>::operator[](typename tmat3x4<T, P>::length_type i)
|
||||||
{
|
{
|
||||||
|
@ -82,7 +82,7 @@ namespace glm
|
|||||||
// -- Accesses --
|
// -- Accesses --
|
||||||
|
|
||||||
typedef length_t length_type;
|
typedef length_t length_type;
|
||||||
GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const;
|
GLM_FUNC_DECL static length_type length(){return 4;}
|
||||||
|
|
||||||
GLM_FUNC_DECL col_type & operator[](length_type i);
|
GLM_FUNC_DECL col_type & operator[](length_type i);
|
||||||
GLM_FUNC_DECL col_type const & operator[](length_type i) const;
|
GLM_FUNC_DECL col_type const & operator[](length_type i) const;
|
||||||
|
@ -213,12 +213,6 @@ namespace glm
|
|||||||
|
|
||||||
// -- Accesses --
|
// -- Accesses --
|
||||||
|
|
||||||
template <typename T, precision P>
|
|
||||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat4x2<T, P>::length_type tmat4x2<T, P>::length() const
|
|
||||||
{
|
|
||||||
return 4;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER typename tmat4x2<T, P>::col_type & tmat4x2<T, P>::operator[](typename tmat4x2<T, P>::length_type i)
|
GLM_FUNC_QUALIFIER typename tmat4x2<T, P>::col_type & tmat4x2<T, P>::operator[](typename tmat4x2<T, P>::length_type i)
|
||||||
{
|
{
|
||||||
|
@ -82,7 +82,7 @@ namespace glm
|
|||||||
// -- Accesses --
|
// -- Accesses --
|
||||||
|
|
||||||
typedef length_t length_type;
|
typedef length_t length_type;
|
||||||
GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const;
|
GLM_FUNC_DECL static length_type length(){return 4;}
|
||||||
|
|
||||||
GLM_FUNC_DECL col_type & operator[](length_type i);
|
GLM_FUNC_DECL col_type & operator[](length_type i);
|
||||||
GLM_FUNC_DECL col_type const & operator[](length_type i) const;
|
GLM_FUNC_DECL col_type const & operator[](length_type i) const;
|
||||||
|
@ -206,12 +206,6 @@ namespace glm
|
|||||||
|
|
||||||
// -- Accesses --
|
// -- Accesses --
|
||||||
|
|
||||||
template <typename T, precision P>
|
|
||||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat4x3<T, P>::length_type tmat4x3<T, P>::length() const
|
|
||||||
{
|
|
||||||
return 4;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER typename tmat4x3<T, P>::col_type & tmat4x3<T, P>::operator[](typename tmat4x3<T, P>::length_type i)
|
GLM_FUNC_QUALIFIER typename tmat4x3<T, P>::col_type & tmat4x3<T, P>::operator[](typename tmat4x3<T, P>::length_type i)
|
||||||
{
|
{
|
||||||
|
@ -81,7 +81,7 @@ namespace glm
|
|||||||
// -- Accesses --
|
// -- Accesses --
|
||||||
|
|
||||||
typedef length_t length_type;
|
typedef length_t length_type;
|
||||||
GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const;
|
GLM_FUNC_DECL static length_type length(){return 4;}
|
||||||
|
|
||||||
GLM_FUNC_DECL col_type & operator[](length_type i);
|
GLM_FUNC_DECL col_type & operator[](length_type i);
|
||||||
GLM_FUNC_DECL col_type const & operator[](length_type i) const;
|
GLM_FUNC_DECL col_type const & operator[](length_type i) const;
|
||||||
|
@ -236,12 +236,6 @@ namespace glm
|
|||||||
|
|
||||||
// -- Accesses --
|
// -- Accesses --
|
||||||
|
|
||||||
template <typename T, precision P>
|
|
||||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat4x4<T, P>::length_type tmat4x4<T, P>::length() const
|
|
||||||
{
|
|
||||||
return 4;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER typename tmat4x4<T, P>::col_type & tmat4x4<T, P>::operator[](typename tmat4x4<T, P>::length_type i)
|
GLM_FUNC_QUALIFIER typename tmat4x4<T, P>::col_type & tmat4x4<T, P>::operator[](typename tmat4x4<T, P>::length_type i)
|
||||||
{
|
{
|
||||||
|
@ -75,7 +75,7 @@ namespace glm
|
|||||||
|
|
||||||
/// Return the count of components of the vector
|
/// Return the count of components of the vector
|
||||||
typedef length_t length_type;
|
typedef length_t length_type;
|
||||||
GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const;
|
GLM_FUNC_DECL static length_type length(){return 1;}
|
||||||
|
|
||||||
GLM_FUNC_DECL T & operator[](length_type i);
|
GLM_FUNC_DECL T & operator[](length_type i);
|
||||||
GLM_FUNC_DECL T const & operator[](length_type i) const;
|
GLM_FUNC_DECL T const & operator[](length_type i) const;
|
||||||
|
@ -66,12 +66,6 @@ namespace glm
|
|||||||
|
|
||||||
// -- Component accesses --
|
// -- Component accesses --
|
||||||
|
|
||||||
template <typename T, precision P>
|
|
||||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tvec1<T, P>::length_type tvec1<T, P>::length() const
|
|
||||||
{
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER T & tvec1<T, P>::operator[](typename tvec1<T, P>::length_type i)
|
GLM_FUNC_QUALIFIER T & tvec1<T, P>::operator[](typename tvec1<T, P>::length_type i)
|
||||||
{
|
{
|
||||||
|
@ -76,7 +76,7 @@ namespace glm
|
|||||||
|
|
||||||
/// Return the count of components of the vector
|
/// Return the count of components of the vector
|
||||||
typedef length_t length_type;
|
typedef length_t length_type;
|
||||||
GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const;
|
GLM_FUNC_DECL GLM_CONSTEXPR length_type length(){return 2;}
|
||||||
|
|
||||||
GLM_FUNC_DECL T & operator[](length_type i);
|
GLM_FUNC_DECL T & operator[](length_type i);
|
||||||
GLM_FUNC_DECL T const & operator[](length_type i) const;
|
GLM_FUNC_DECL T const & operator[](length_type i) const;
|
||||||
|
@ -97,12 +97,6 @@ namespace glm
|
|||||||
|
|
||||||
// -- Component accesses --
|
// -- Component accesses --
|
||||||
|
|
||||||
template <typename T, precision P>
|
|
||||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tvec2<T, P>::length_type tvec2<T, P>::length() const
|
|
||||||
{
|
|
||||||
return 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER T & tvec2<T, P>::operator[](typename tvec2<T, P>::length_type i)
|
GLM_FUNC_QUALIFIER T & tvec2<T, P>::operator[](typename tvec2<T, P>::length_type i)
|
||||||
{
|
{
|
||||||
|
@ -76,7 +76,7 @@ namespace glm
|
|||||||
|
|
||||||
/// Return the count of components of the vector
|
/// Return the count of components of the vector
|
||||||
typedef length_t length_type;
|
typedef length_t length_type;
|
||||||
GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const;
|
GLM_FUNC_DECL static length_type length(){return 3;}
|
||||||
|
|
||||||
GLM_FUNC_DECL T & operator[](length_type i);
|
GLM_FUNC_DECL T & operator[](length_type i);
|
||||||
GLM_FUNC_DECL T const & operator[](length_type i) const;
|
GLM_FUNC_DECL T const & operator[](length_type i) const;
|
||||||
|
@ -139,12 +139,6 @@ namespace glm
|
|||||||
|
|
||||||
// -- Component accesses --
|
// -- Component accesses --
|
||||||
|
|
||||||
template <typename T, precision P>
|
|
||||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tvec3<T, P>::length_type tvec3<T, P>::length() const
|
|
||||||
{
|
|
||||||
return 3;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER T & tvec3<T, P>::operator[](typename tvec3<T, P>::length_type i)
|
GLM_FUNC_QUALIFIER T & tvec3<T, P>::operator[](typename tvec3<T, P>::length_type i)
|
||||||
{
|
{
|
||||||
|
@ -71,7 +71,7 @@ namespace glm
|
|||||||
|
|
||||||
typedef length_t length_type;
|
typedef length_t length_type;
|
||||||
/// Return the count of components of a quaternion
|
/// Return the count of components of a quaternion
|
||||||
GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const;
|
GLM_FUNC_DECL static length_type length(){return 4;}
|
||||||
|
|
||||||
GLM_FUNC_DECL T & operator[](length_type i);
|
GLM_FUNC_DECL T & operator[](length_type i);
|
||||||
GLM_FUNC_DECL T const & operator[](length_type i) const;
|
GLM_FUNC_DECL T const & operator[](length_type i) const;
|
||||||
|
@ -67,12 +67,6 @@ namespace detail
|
|||||||
|
|
||||||
// -- Component accesses --
|
// -- Component accesses --
|
||||||
|
|
||||||
template <typename T, precision P>
|
|
||||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tquat<T, P>::length_type tquat<T, P>::length() const
|
|
||||||
{
|
|
||||||
return 4;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER T & tquat<T, P>::operator[](typename tquat<T, P>::length_type i)
|
GLM_FUNC_QUALIFIER T & tquat<T, P>::operator[](typename tquat<T, P>::length_type i)
|
||||||
{
|
{
|
||||||
|
@ -46,7 +46,7 @@ namespace glm
|
|||||||
|
|
||||||
typedef length_t length_type;
|
typedef length_t length_type;
|
||||||
/// Return the count of components of a dual quaternion
|
/// Return the count of components of a dual quaternion
|
||||||
GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const;
|
GLM_FUNC_DECL static length_type length(){return 2;}
|
||||||
|
|
||||||
GLM_FUNC_DECL part_type & operator[](length_type i);
|
GLM_FUNC_DECL part_type & operator[](length_type i);
|
||||||
GLM_FUNC_DECL part_type const & operator[](length_type i) const;
|
GLM_FUNC_DECL part_type const & operator[](length_type i) const;
|
||||||
|
@ -8,12 +8,6 @@ namespace glm
|
|||||||
{
|
{
|
||||||
// -- Component accesses --
|
// -- Component accesses --
|
||||||
|
|
||||||
template <typename T, precision P>
|
|
||||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tdualquat<T, P>::length_type tdualquat<T, P>::length() const
|
|
||||||
{
|
|
||||||
return 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER typename tdualquat<T, P>::part_type & tdualquat<T, P>::operator[](typename tdualquat<T, P>::length_type i)
|
GLM_FUNC_QUALIFIER typename tdualquat<T, P>::part_type & tdualquat<T, P>::operator[](typename tdualquat<T, P>::length_type i)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user