GLM  0.9.5
Functions
Vector Relational Functions

Functions

template<precision P, template< typename, precision > class vecType>
GLM_FUNC_DECL bool all (vecType< bool, P > const &v)
 
template<precision P, template< typename, precision > class vecType>
GLM_FUNC_DECL bool any (vecType< bool, P > const &v)
 
template<typename T , precision P, template< typename, precision > class vecType>
GLM_FUNC_DECL vecType< T, P >
::bool_type 
greaterThan (vecType< T, P > const &x, vecType< T, P > const &y)
 
template<typename T , precision P, template< typename, precision > class vecType>
GLM_FUNC_DECL vecType< T, P >
::bool_type 
greaterThanEqual (vecType< T, P > const &x, vecType< T, P > const &y)
 
template<typename T , precision P, template< typename, precision > class vecType>
GLM_FUNC_DECL vecType< T, P >
::bool_type 
lessThanEqual (vecType< T, P > const &x, vecType< T, P > const &y)
 
template<precision P, template< typename, precision > class vecType>
GLM_FUNC_DECL vecType< bool, P > not_ (vecType< bool, P > const &v)
 
template<typename T , precision P, template< typename, precision > class vecType>
GLM_FUNC_DECL vecType< T, P >
::bool_type 
notEqual (vecType< T, P > const &x, vecType< T, P > const &y)
 

Detailed Description

Relational and equality operators (<, <=, >, >=, ==, !=) are defined to operate on scalars and produce scalar Boolean results.

For vector results, use the following built-in functions.

In all cases, the sizes of all the input and return vectors for any particular call must match.

Function Documentation

GLM_FUNC_DECL bool glm::all ( vecType< bool, P > const &  v)

Returns true if all components of x are true.

Template Parameters
vecTypeBoolean vector types.
See Also
GLSL all man page
GLSL 4.20.8 specification, section 8.7 Vector Relational Functions
GLM_FUNC_DECL bool glm::any ( vecType< bool, P > const &  v)

Returns true if any component of x is true.

Template Parameters
vecTypeBoolean vector types.
See Also
GLSL any man page
GLSL 4.20.8 specification, section 8.7 Vector Relational Functions
GLM_FUNC_DECL vecType<T, P>::bool_type glm::greaterThan ( vecType< T, P > const &  x,
vecType< T, P > const &  y 
)

Returns the component-wise comparison of result x > y.

Template Parameters
vecTypeFloating-point or integer vector types.
See Also
GLSL greaterThan man page
GLSL 4.20.8 specification, section 8.7 Vector Relational Functions
GLM_FUNC_DECL vecType<T, P>::bool_type glm::greaterThanEqual ( vecType< T, P > const &  x,
vecType< T, P > const &  y 
)

Returns the component-wise comparison of result x >= y.

Template Parameters
vecTypeFloating-point or integer vector types.
See Also
GLSL greaterThanEqual man page
GLSL 4.20.8 specification, section 8.7 Vector Relational Functions
GLM_FUNC_DECL vecType<T, P>::bool_type glm::lessThanEqual ( vecType< T, P > const &  x,
vecType< T, P > const &  y 
)

Returns the component-wise comparison result of x < y.

Template Parameters
vecTypeFloating-point or integer vector types.
See Also
GLSL lessThan man page
GLSL 4.20.8 specification, section 8.7 Vector Relational Functions Returns the component-wise comparison of result x <= y.
Template Parameters
vecTypeFloating-point or integer vector types.
See Also
GLSL lessThanEqual man page
GLSL 4.20.8 specification, section 8.7 Vector Relational Functions
GLM_FUNC_DECL vecType<bool, P> glm::not_ ( vecType< bool, P > const &  v)

Returns the component-wise logical complement of x.

/!\ Because of language incompatibilities between C++ and GLSL, GLM defines the function not but not_ instead.

Template Parameters
vecTypeBoolean vector types.
See Also
GLSL not man page
GLSL 4.20.8 specification, section 8.7 Vector Relational Functions
GLM_FUNC_DECL vecType<T, P>::bool_type glm::notEqual ( vecType< T, P > const &  x,
vecType< T, P > const &  y 
)

Returns the component-wise comparison of result x == y.

Template Parameters
vecTypeFloating-point, integer or boolean vector types.
See Also
GLSL equal man page
GLSL 4.20.8 specification, section 8.7 Vector Relational Functions Returns the component-wise comparison of result x != y.
Template Parameters
vecTypeFloating-point, integer or boolean vector types.
See Also
GLSL notEqual man page
GLSL 4.20.8 specification, section 8.7 Vector Relational Functions