Added length member function

This commit is contained in:
Christophe Riccio 2011-05-08 01:36:13 +01:00
parent 43de372d73
commit ecc167d0f2
8 changed files with 28 additions and 0 deletions

View File

@ -41,6 +41,7 @@ namespace glm
typedef T value_type;
typedef std::size_t size_type;
GLM_FUNC_DECL size_type length() const;
static GLM_FUNC_DECL size_type value_size();
typedef tvec1<T> type;

View File

@ -11,6 +11,12 @@ namespace glm
{
namespace detail
{
template <typename T>
GLM_FUNC_QUALIFIER typename tvec1<T>::size_type tvec1<T>::length() const
{
return 1;
}
template <typename T>
GLM_FUNC_QUALIFIER typename tvec1<T>::size_type tvec1<T>::value_size()
{

View File

@ -41,6 +41,7 @@ namespace glm
typedef T value_type;
typedef std::size_t size_type;
GLM_FUNC_DECL size_type length() const;
static GLM_FUNC_DECL size_type value_size();
typedef tvec2<T> type;

View File

@ -11,6 +11,12 @@ namespace glm
{
namespace detail
{
template <typename T>
GLM_FUNC_QUALIFIER typename tvec2<T>::size_type tvec2<T>::length() const
{
return 2;
}
template <typename T>
GLM_FUNC_QUALIFIER typename tvec2<T>::size_type tvec2<T>::value_size()
{

View File

@ -40,6 +40,7 @@ namespace glm
typedef T value_type;
typedef std::size_t size_type;
GLM_FUNC_DECL size_type length() const;
static GLM_FUNC_DECL size_type value_size();
typedef tvec3<T> type;

View File

@ -11,6 +11,12 @@ namespace glm
{
namespace detail
{
template <typename T>
GLM_FUNC_QUALIFIER typename tvec3<T>::size_type tvec3<T>::length() const
{
return 3;
}
template <typename T>
GLM_FUNC_QUALIFIER typename tvec3<T>::size_type tvec3<T>::value_size()
{

View File

@ -40,6 +40,7 @@ namespace glm
typedef T value_type;
typedef std::size_t size_type;
GLM_FUNC_DECL size_type length() const;
static GLM_FUNC_DECL size_type value_size();
typedef tvec4<T> type;

View File

@ -11,6 +11,12 @@ namespace glm
{
namespace detail
{
template <typename T>
GLM_FUNC_QUALIFIER typename tvec4<T>::size_type tvec4<T>::length() const
{
return 4;
}
template <typename T>
GLM_FUNC_QUALIFIER typename tvec4<T>::size_type tvec4<T>::value_size()
{