Remove is_vector

This commit is contained in:
Christophe Riccio 2014-01-04 13:47:30 +01:00
parent b96a26e9e2
commit 9edd8aacf0
6 changed files with 0 additions and 42 deletions

View File

@ -106,8 +106,6 @@ namespace glm
vecType<T, P> const & y
)
{
//GLM_STATIC_ASSERT(detail::is_vector<vecType<T, P> >::_YES,
// "Invalid template instantiation of 'equal', GLM vector types required");
assert(x.length() == y.length());
typename vecType<bool, P>::bool_type Result(vecType<bool, P>::_null);
@ -123,8 +121,6 @@ namespace glm
vecType<T, P> const & y
)
{
//GLM_STATIC_ASSERT(detail::is_vector<vecType<T, P> >::_YES,
// "Invalid template instantiation of 'notEqual', GLM vector types required");
assert(x.length() == y.length());
typename vecType<bool, P>::bool_type Result(vecType<bool, P>::_null);
@ -136,9 +132,6 @@ namespace glm
template <precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER bool any(vecType<bool, P> const & v)
{
//GLM_STATIC_ASSERT(detail::is_vector<vecType<bool, P> >::_YES,
// "Invalid template instantiation of 'any', GLM boolean vector types required");
bool Result = false;
for(int i = 0; i < v.length(); ++i)
Result = Result || v[i];
@ -148,9 +141,6 @@ namespace glm
template <precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER bool all(vecType<bool, P> const & v)
{
//GLM_STATIC_ASSERT(detail::is_vector<vecType<bool, P> >::_YES,
// "Invalid template instantiation of 'all', GLM boolean vector types required");
bool Result = true;
for(int i = 0; i < v.length(); ++i)
Result = Result && v[i];
@ -160,9 +150,6 @@ namespace glm
template <precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER vecType<bool, P> not_(vecType<bool, P> const & v)
{
//GLM_STATIC_ASSERT(detail::is_vector<vecType<bool, P> >::_YES,
// "Invalid template instantiation of 'not_', GLM vector types required");
typename vecType<bool, P>::bool_type Result(vecType<bool, P>::_null);
for(int i = 0; i < v.length(); ++i)
Result[i] = !v[i];

View File

@ -39,27 +39,6 @@ namespace detail
template <typename T, precision P> struct tvec2;
template <typename T, precision P> struct tvec3;
template <typename T, precision P> struct tvec4;
template <typename T>
struct is_vector
{
enum is_vector_enum
{
_YES = 0,
_NO = 1
};
};
# define GLM_DETAIL_IS_VECTOR(TYPE) \
template <typename T, precision P> \
struct is_vector<TYPE<T, P> > \
{ \
enum is_vector_enum \
{ \
_YES = 1, \
_NO = 0 \
}; \
}
}//namespace detail
typedef detail::tvec1<float, highp> highp_vec1_t;

View File

@ -184,8 +184,6 @@ namespace detail
GLM_FUNC_DECL tvec1<T, P> & operator>>=(tvec1<U, P> const & v);
};
GLM_DETAIL_IS_VECTOR(tvec1);
}//namespace detail
}//namespace glm

View File

@ -217,8 +217,6 @@ namespace detail
GLM_FUNC_DECL tvec2<T, P> & operator>>=(tvec2<U, P> const & v);
};
GLM_DETAIL_IS_VECTOR(tvec2);
template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator+(tvec2<T, P> const & v, T const & s);

View File

@ -235,8 +235,6 @@ namespace detail
GLM_FUNC_DECL tvec3<T, P> & operator>>=(tvec3<U, P> const & v);
};
GLM_DETAIL_IS_VECTOR(tvec3);
template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator+(tvec3<T, P> const & v, T const & s);

View File

@ -272,8 +272,6 @@ namespace detail
GLM_FUNC_DECL tvec4<T, P> & operator>>=(tvec4<U, P> const & v);
};
GLM_DETAIL_IS_VECTOR(tvec4);
template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator+(tvec4<T, P> const & v, T const & s);