1.0.0 API documentation: vector_query.hpp Source File

| 1.0.0 API documentation

vector_query.hpp
Go to the documentation of this file.
1
13 #pragma once
14
15 // Dependency:
16 #include "../glm.hpp"
17 #include <cfloat>
18 #include <limits>
19
20 #ifndef GLM_ENABLE_EXPERIMENTAL
21 # error "GLM: GLM_GTX_vector_query is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
22 #elif GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
23 # pragma message("GLM: GLM_GTX_vector_query extension included")
24 #endif
25
26 namespace glm
27 {
30
33 template<length_t L, typename T, qualifier Q>
34 GLM_FUNC_DECL bool areCollinear(vec<L, T, Q> const& v0, vec<L, T, Q> const& v1, T const& epsilon);
35
38 template<length_t L, typename T, qualifier Q>
39 GLM_FUNC_DECL bool areOrthogonal(vec<L, T, Q> const& v0, vec<L, T, Q> const& v1, T const& epsilon);
40
43 template<length_t L, typename T, qualifier Q>
44 GLM_FUNC_DECL bool isNormalized(vec<L, T, Q> const& v, T const& epsilon);
45
48 template<length_t L, typename T, qualifier Q>
49 GLM_FUNC_DECL bool isNull(vec<L, T, Q> const& v, T const& epsilon);
50
53 template<length_t L, typename T, qualifier Q>
54 GLM_FUNC_DECL vec<L, bool, Q> isCompNull(vec<L, T, Q> const& v, T const& epsilon);
55
58 template<length_t L, typename T, qualifier Q>
59 GLM_FUNC_DECL bool areOrthonormal(vec<L, T, Q> const& v0, vec<L, T, Q> const& v1, T const& epsilon);
60
62 }// namespace glm
63
64 #include "vector_query.inl"
glm::areCollinear
GLM_FUNC_DECL bool areCollinear(vec< L, T, Q > const &v0, vec< L, T, Q > const &v1, T const &epsilon)
Check whether two vectors are collinears.
glm::isNormalized
GLM_FUNC_DECL bool isNormalized(vec< L, T, Q > const &v, T const &epsilon)
Check whether a vector is normalized.
glm::isCompNull
GLM_FUNC_DECL vec< L, bool, Q > isCompNull(vec< L, T, Q > const &v, T const &epsilon)
Check whether a each component of a vector is null.
glm::epsilon
GLM_FUNC_DECL GLM_CONSTEXPR genType epsilon()
Return the epsilon constant for floating point types.
glm::isNull
GLM_FUNC_DECL bool isNull(vec< L, T, Q > const &v, T const &epsilon)
Check whether a vector is null.
glm::areOrthogonal
GLM_FUNC_DECL bool areOrthogonal(vec< L, T, Q > const &v0, vec< L, T, Q > const &v1, T const &epsilon)
Check whether two vectors are orthogonals.
glm::areOrthonormal
GLM_FUNC_DECL bool areOrthonormal(vec< L, T, Q > const &v0, vec< L, T, Q > const &v1, T const &epsilon)
Check whether two vectors are orthonormal.