Fixed length function for half vec* types

This commit is contained in:
Christophe Riccio
2011-09-18 19:28:48 +01:00
parent 38837a888d
commit 0c7dadef8e
3 changed files with 109 additions and 0 deletions

View File

@@ -28,6 +28,7 @@ namespace detail
typedef thalf value_type;
typedef std::size_t size_type;
static size_type value_size();
GLM_FUNC_DECL size_type length() const;
typedef tvec2<thalf> type;
typedef tvec2<bool> bool_type;
@@ -120,6 +121,7 @@ namespace detail
typedef thalf value_type;
typedef std::size_t size_type;
static size_type value_size();
GLM_FUNC_DECL size_type length() const;
typedef tvec3<thalf> type;
typedef tvec3<bool> bool_type;
@@ -216,6 +218,7 @@ namespace detail
typedef thalf value_type;
typedef std::size_t size_type;
static size_type value_size();
GLM_FUNC_DECL size_type length() const;
typedef tvec4<thalf> type;
typedef tvec4<bool> bool_type;

View File

@@ -20,6 +20,11 @@ GLM_FUNC_QUALIFIER tvec2<thalf>::size_type tvec2<thalf>::value_size()
return 2;
}
GLM_FUNC_QUALIFIER typename tvec2<thalf>::size_type tvec2<thalf>::length() const
{
return 2;
}
//////////////////////////////////////
// Accesses
@@ -288,6 +293,11 @@ GLM_FUNC_QUALIFIER tvec3<thalf>::size_type tvec3<thalf>::value_size()
return 3;
}
GLM_FUNC_QUALIFIER typename tvec3<thalf>::size_type tvec3<thalf>::length() const
{
return 3;
}
//////////////////////////////////////
// Accesses
@@ -600,6 +610,12 @@ GLM_FUNC_QUALIFIER tvec4<thalf>::size_type tvec4<thalf>::value_size()
return 4;
}
GLM_FUNC_QUALIFIER typename tvec4<thalf>::size_type tvec4<thalf>::length() const
{
return 4;
}
//////////////////////////////////////
// Accesses