From 74c6854fd8dcbaee736ac0421805ff1e03c4a1e2 Mon Sep 17 00:00:00 2001 From: iamn1ck Date: Sun, 19 Feb 2017 07:00:34 -0600 Subject: -quadtree and opengl rendering are now in the master branch ! -using sdl_rect for location and size ended up being not so great due to it not having floats, so we reverted back to using location -much, much refractoring is now needed --- inc/glm/detail/intrinsic_vector_relational.inl | 366 +++++++++++++++++++++++++ 1 file changed, 366 insertions(+) create mode 100644 inc/glm/detail/intrinsic_vector_relational.inl (limited to 'inc/glm/detail/intrinsic_vector_relational.inl') diff --git a/inc/glm/detail/intrinsic_vector_relational.inl b/inc/glm/detail/intrinsic_vector_relational.inl new file mode 100644 index 0000000..4b23082 --- /dev/null +++ b/inc/glm/detail/intrinsic_vector_relational.inl @@ -0,0 +1,366 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/detail/intrinsic_vector_relational.inl +/// @date 2009-06-09 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// +// +//// lessThan +//template +//GLM_FUNC_QUALIFIER typename tvec2::bool_type lessThan +//( +// tvec2 const & x, +// tvec2 const & y +//) +//{ +// GLM_STATIC_ASSERT( +// detail::type::is_float || +// detail::type::is_int || +// detail::type::is_uint); +// +// return typename tvec2::bool_type(x.x < y.x, x.y < y.y); +//} +// +//template +//GLM_FUNC_QUALIFIER typename tvec3::bool_type lessThan +//( +// tvec3 const & x, +// tvec3 const & y +//) +//{ +// GLM_STATIC_ASSERT( +// detail::type::is_float || +// detail::type::is_int || +// detail::type::is_uint); +// +// return typename tvec3::bool_type(x.x < y.x, x.y < y.y, x.z < y.z); +//} +// +//template +//GLM_FUNC_QUALIFIER typename tvec4::bool_type lessThan +//( +// tvec4 const & x, +// tvec4 const & y +//) +//{ +// GLM_STATIC_ASSERT( +// detail::type::is_float || +// detail::type::is_int || +// detail::type::is_uint); +// +// return typename tvec4::bool_type(x.x < y.x, x.y < y.y, x.z < y.z, x.w < y.w); +//} +// +//// lessThanEqual +//template +//GLM_FUNC_QUALIFIER typename tvec2::bool_type lessThanEqual +//( +// tvec2 const & x, +// tvec2 const & y +//) +//{ +// GLM_STATIC_ASSERT( +// detail::type::is_float || +// detail::type::is_int || +// detail::type::is_uint); +// +// return typename tvec2::bool_type(x.x <= y.x, x.y <= y.y); +//} +// +//template +//GLM_FUNC_QUALIFIER typename tvec3::bool_type lessThanEqual +//( +// tvec3 const & x, +// tvec3 const & y +//) +//{ +// GLM_STATIC_ASSERT( +// detail::type::is_float || +// detail::type::is_int || +// detail::type::is_uint); +// +// return typename tvec3::bool_type(x.x <= y.x, x.y <= y.y, x.z <= y.z); +//} +// +//template +//GLM_FUNC_QUALIFIER typename tvec4::bool_type lessThanEqual +//( +// tvec4 const & x, +// tvec4 const & y +//) +//{ +// GLM_STATIC_ASSERT( +// detail::type::is_float || +// detail::type::is_int || +// detail::type::is_uint); +// +// return typename tvec4::bool_type(x.x <= y.x, x.y <= y.y, x.z <= y.z, x.w <= y.w); +//} +// +//// greaterThan +//template +//GLM_FUNC_QUALIFIER typename tvec2::bool_type greaterThan +//( +// tvec2 const & x, +// tvec2 const & y +//) +//{ +// GLM_STATIC_ASSERT( +// detail::type::is_float || +// detail::type::is_int || +// detail::type::is_uint); +// +// return typename tvec2::bool_type(x.x > y.x, x.y > y.y); +//} +// +//template +//GLM_FUNC_QUALIFIER typename tvec3::bool_type greaterThan +//( +// tvec3 const & x, +// tvec3 const & y +//) +//{ +// GLM_STATIC_ASSERT( +// detail::type::is_float || +// detail::type::is_int || +// detail::type::is_uint); +// +// return typename tvec3::bool_type(x.x > y.x, x.y > y.y, x.z > y.z); +//} +// +//template +//GLM_FUNC_QUALIFIER typename tvec4::bool_type greaterThan +//( +// tvec4 const & x, +// tvec4 const & y +//) +//{ +// GLM_STATIC_ASSERT( +// detail::type::is_float || +// detail::type::is_int || +// detail::type::is_uint); +// +// return typename tvec4::bool_type(x.x > y.x, x.y > y.y, x.z > y.z, x.w > y.w); +//} +// +//// greaterThanEqual +//template +//GLM_FUNC_QUALIFIER typename tvec2::bool_type greaterThanEqual +//( +// tvec2 const & x, +// tvec2 const & y +//) +//{ +// GLM_STATIC_ASSERT( +// detail::type::is_float || +// detail::type::is_int || +// detail::type::is_uint); +// +// return typename tvec2::bool_type(x.x >= y.x, x.y >= y.y); +//} +// +//template +//GLM_FUNC_QUALIFIER typename tvec3::bool_type greaterThanEqual +//( +// tvec3 const & x, +// tvec3 const & y +//) +//{ +// GLM_STATIC_ASSERT( +// detail::type::is_float || +// detail::type::is_int || +// detail::type::is_uint); +// +// return typename tvec3::bool_type(x.x >= y.x, x.y >= y.y, x.z >= y.z); +//} +// +//template +//GLM_FUNC_QUALIFIER typename tvec4::bool_type greaterThanEqual +//( +// tvec4 const & x, +// tvec4 const & y +//) +//{ +// GLM_STATIC_ASSERT( +// detail::type::is_float || +// detail::type::is_int || +// detail::type::is_uint); +// +// return typename tvec4::bool_type(x.x >= y.x, x.y >= y.y, x.z >= y.z, x.w >= y.w); +//} +// +//// equal +//template +//GLM_FUNC_QUALIFIER typename tvec2::bool_type equal +//( +// tvec2 const & x, +// tvec2 const & y +//) +//{ +// GLM_STATIC_ASSERT( +// detail::type::is_float || +// detail::type::is_int || +// detail::type::is_uint || +// detail::type::is_bool); +// +// return typename tvec2::bool_type(x.x == y.x, x.y == y.y); +//} +// +//template +//GLM_FUNC_QUALIFIER typename tvec3::bool_type equal +//( +// tvec3 const & x, +// tvec3 const & y +//) +//{ +// GLM_STATIC_ASSERT( +// detail::type::is_float || +// detail::type::is_int || +// detail::type::is_uint || +// detail::type::is_bool); +// +// return typename tvec3::bool_type(x.x == y.x, x.y == y.y, x.z == y.z); +//} +// +//template +//GLM_FUNC_QUALIFIER typename tvec4::bool_type equal +//( +// tvec4 const & x, +// tvec4 const & y +//) +//{ +// GLM_STATIC_ASSERT( +// detail::type::is_float || +// detail::type::is_int || +// detail::type::is_uint || +// detail::type::is_bool); +// +// return typename tvec4::bool_type(x.x == y.x, x.y == y.y, x.z == y.z, x.w == y.w); +//} +// +//// notEqual +//template +//GLM_FUNC_QUALIFIER typename tvec2::bool_type notEqual +//( +// tvec2 const & x, +// tvec2 const & y +//) +//{ +// GLM_STATIC_ASSERT( +// detail::type::is_float || +// detail::type::is_int || +// detail::type::is_uint || +// detail::type::is_bool); +// +// return typename tvec2::bool_type(x.x != y.x, x.y != y.y); +//} +// +//template +//GLM_FUNC_QUALIFIER typename tvec3::bool_type notEqual +//( +// tvec3 const & x, +// tvec3 const & y +//) +//{ +// GLM_STATIC_ASSERT( +// detail::type::is_float || +// detail::type::is_int || +// detail::type::is_uint || +// detail::type::is_bool); +// +// return typename tvec3::bool_type(x.x != y.x, x.y != y.y, x.z != y.z); +//} +// +//template +//GLM_FUNC_QUALIFIER typename tvec4::bool_type notEqual +//( +// tvec4 const & x, +// tvec4 const & y +//) +//{ +// GLM_STATIC_ASSERT( +// detail::type::is_float || +// detail::type::is_int || +// detail::type::is_uint || +// detail::type::is_bool); +// +// return typename tvec4::bool_type(x.x != y.x, x.y != y.y, x.z != y.z, x.w != y.w); +//} +// +//// any +//GLM_FUNC_QUALIFIER bool any(tvec2 const & x) +//{ +// return x.x || x.y; +//} +// +//GLM_FUNC_QUALIFIER bool any(tvec3 const & x) +//{ +// return x.x || x.y || x.z; +//} +// +//GLM_FUNC_QUALIFIER bool any(tvec4 const & x) +//{ +// return x.x || x.y || x.z || x.w; +//} +// +//// all +//GLM_FUNC_QUALIFIER bool all(const tvec2& x) +//{ +// return x.x && x.y; +//} +// +//GLM_FUNC_QUALIFIER bool all(const tvec3& x) +//{ +// return x.x && x.y && x.z; +//} +// +//GLM_FUNC_QUALIFIER bool all(const tvec4& x) +//{ +// return x.x && x.y && x.z && x.w; +//} +// +//// not +//GLM_FUNC_QUALIFIER tvec2::bool_type not_ +//( +// tvec2 const & v +//) +//{ +// return tvec2::bool_type(!v.x, !v.y); +//} +// +//GLM_FUNC_QUALIFIER tvec3::bool_type not_ +//( +// tvec3 const & v +//) +//{ +// return tvec3::bool_type(!v.x, !v.y, !v.z); +//} +// +//GLM_FUNC_QUALIFIER tvec4::bool_type not_ +//( +// tvec4 const & v +//) +//{ +// return tvec4::bool_type(!v.x, !v.y, !v.z, !v.w); +//} \ No newline at end of file -- cgit v1.2.3