Added not function

This commit is contained in:
Christophe Riccio
2014-10-24 21:22:24 +02:00
parent 72a2f49834
commit bf9e4458b6
5 changed files with 50 additions and 10 deletions

View File

@@ -132,6 +132,20 @@ namespace glm
template <precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL vecType<bool, P> not_(vecType<bool, P> const & v);
# if GLM_COMPILER & GLM_COMPILER_VC && GLM_COMPILER >= GLM_COMPILER_VC12
/// Returns the component-wise logical complement of x.
/// /!\ Because of language incompatibilities between C++ and GLSL, GLM defines the function not but not_ instead.
///
/// @tparam vecType Boolean vector types.
///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/not.xml">GLSL not man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>
template <precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL vecType<bool, P> not(vecType<bool, P> const & v){return not_(v);}
# endif
/// @}
}//namespace glm

View File

@@ -33,8 +33,6 @@ namespace glm
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER vecType<bool, P> lessThan(vecType<T, P> const & x, vecType<T, P> const & y)
{
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || std::numeric_limits<T>::is_integer,
"Invalid template instantiation of 'lessThan', GLM vector types required floating-point or integer value types vectors");
assert(detail::component_count(x) == detail::component_count(y));
vecType<bool, P> Result(uninitialize);
@@ -47,8 +45,6 @@ namespace glm
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER vecType<bool, P> lessThanEqual(vecType<T, P> const & x, vecType<T, P> const & y)
{
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || std::numeric_limits<T>::is_integer,
"Invalid template instantiation of 'lessThanEqual', GLM vector types required floating-point or integer value types vectors");
assert(detail::component_count(x) == detail::component_count(y));
vecType<bool, P> Result(uninitialize);
@@ -60,8 +56,6 @@ namespace glm
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER vecType<bool, P> greaterThan(vecType<T, P> const & x, vecType<T, P> const & y)
{
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || std::numeric_limits<T>::is_integer,
"Invalid template instantiation of 'greaterThan', GLM vector types required floating-point or integer value types vectors");
assert(detail::component_count(x) == detail::component_count(y));
vecType<bool, P> Result(uninitialize);
@@ -73,8 +67,6 @@ namespace glm
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER vecType<bool, P> greaterThanEqual(vecType<T, P> const & x, vecType<T, P> const & y)
{
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || std::numeric_limits<T>::is_integer,
"Invalid template instantiation of 'greaterThanEqual', GLM vector types required floating-point or integer value types vectors");
assert(detail::component_count(x) == detail::component_count(y));
vecType<bool, P> Result(uninitialize);

View File

@@ -391,7 +391,7 @@
# define GLM_LANG (GLM_LANG_CXX98 | GLM_LANG_CXXMS_FLAG)
# endif
# else
# if(GLM_COMPILER >= GLM_COMPILER_VC10
# if GLM_COMPILER >= GLM_COMPILER_VC10
# define GLM_LANG GLM_LANG_CXX0X
# else
# define GLM_LANG GLM_LANG_CXX98