diff --git a/.gitignore b/.gitignore index f4aa2549..ec55f089 100644 --- a/.gitignore +++ b/.gitignore @@ -48,3 +48,7 @@ Makefile # Misc. *.log + +# local build(s) +build* + diff --git a/glm/gtx/io.hpp b/glm/gtx/io.hpp index a52ab9c0..96632b2d 100644 --- a/glm/gtx/io.hpp +++ b/glm/gtx/io.hpp @@ -1,7 +1,7 @@ /////////////////////////////////////////////////////////////////////////////////// /// OpenGL Mathematics (glm.g-truc.net) /// -/// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net) +/// Copyright (c) 2005 - 2016 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 @@ -26,10 +26,11 @@ /// /// @ref gtx_io /// @file glm/gtx/io.hpp -/// @date 2013-11-22 / 2014-11-25 +/// @date 2013-11-22 / 2016-03-14 /// @author Jan P Springer (regnirpsj@gmail.com) /// /// @see core (dependence) +/// @see gtc_matrix_access (dependence) /// @see gtc_quaternion (dependence) /// /// @defgroup gtx_io GLM_GTX_io @@ -41,7 +42,7 @@ /// based on howard hinnant's std::chrono io proposal /// [http://home.roadrunner.com/~hinnant/bloomington/chrono_io.html] /// -/// needs to be included to use these functionalities. +/// needs to be included to use these functionalities. /////////////////////////////////////////////////////////////////////////////////// #pragma once @@ -214,17 +215,9 @@ namespace glm template GLM_FUNC_DECL std::basic_ostream& operator<<(std::basic_ostream&, tmat4x4 const&); - template - GLM_FUNC_DECL std::basic_ostream & operator<<( - std::basic_ostream &, - std::pair const, - tmat4x4 const> const &); - - template - GLM_FUNC_DECL std::basic_ostream & operator<<( - std::basic_ostream &, - std::pair, - tmat4x4 > const &); + template + GLM_FUNC_DECL std::basic_ostream & operator<<(std::basic_ostream &, + std::pair const, tmat4x4 const> const &); /// @} }//namespace glm diff --git a/glm/gtx/io.inl b/glm/gtx/io.inl index 92c68732..5556e0cc 100644 --- a/glm/gtx/io.inl +++ b/glm/gtx/io.inl @@ -1,7 +1,7 @@ /////////////////////////////////////////////////////////////////////////////////// /// OpenGL Mathematics (glm.g-truc.net) /// -/// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net) +/// Copyright (c) 2005 - 2016 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 @@ -26,60 +26,60 @@ /// /// @ref gtx_io /// @file glm/gtx/io.inl -/// @date 2013-11-22 / 2014-11-25 +/// @date 2013-11-22 / 2016-03-14 /// @author Jan P Springer (regnirpsj@gmail.com) /////////////////////////////////////////////////////////////////////////////////////////////////// -#include // std::setfill<>, std::fixed, std::setprecision, std::right, std::setw -#include // std::basic_ostream<> +#include // std::fixed, std::setfill<>, std::setprecision, std::right, std::setw +#include // std::basic_ostream<> +#include "../gtc/matrix_access.hpp" // glm::col, glm::row +#include "../gtx/type_trait.hpp" // glm::type<> namespace glm{ namespace io { template - /* explicit */ GLM_FUNC_QUALIFIER - format_punct::format_punct(size_t a) - : std::locale::facet(a), - formatted (true), - precision (3), - width (1 + 4 + 1 + precision), - separator (','), - delim_left ('['), - delim_right (']'), - space (' '), - newline ('\n'), - order (row_major) + GLM_FUNC_QUALIFIER format_punct::format_punct(size_t a) + : std::locale::facet(a) + , formatted(true) + , precision(3) + , width(1 + 4 + 1 + precision) + , separator(',') + , delim_left('[') + , delim_right(']') + , space(' ') + , newline('\n') + , order(column_major) {} template - /* explicit */ GLM_FUNC_QUALIFIER - format_punct::format_punct(format_punct const& a) - : std::locale::facet(0), - formatted (a.formatted), - precision (a.precision), - width (a.width), - separator (a.separator), - delim_left (a.delim_left), - delim_right (a.delim_right), - space (a.space), - newline (a.newline), - order (a.order) + GLM_FUNC_QUALIFIER format_punct::format_punct(format_punct const& a) + : std::locale::facet(0) + , formatted(a.formatted) + , precision(a.precision) + , width(a.width) + , separator(a.separator) + , delim_left(a.delim_left) + , delim_right(a.delim_right) + , space(a.space) + , newline(a.newline) + , order(a.order) {} template std::locale::id format_punct::id; template - /* explicit */ GLM_FUNC_QUALIFIER basic_state_saver::basic_state_saver(std::basic_ios& a) - : state_ (a), - flags_ (a.flags()), - precision_(a.precision()), - width_ (a.width()), - fill_ (a.fill()), - locale_ (a.getloc()) + GLM_FUNC_QUALIFIER basic_state_saver::basic_state_saver(std::basic_ios& a) + : state_(a) + , flags_(a.flags()) + , precision_(a.precision()) + , width_(a.width()) + , fill_(a.fill()) + , locale_(a.getloc()) {} template - GLM_FUNC_QUALIFIER basic_state_saver::~basic_state_saver() + GLM_FUNC_QUALIFIER basic_state_saver::~basic_state_saver() { state_.imbue(locale_); state_.fill(fill_); @@ -89,7 +89,7 @@ namespace io } template - /* explicit */ GLM_FUNC_QUALIFIER basic_format_saver::basic_format_saver(std::basic_ios& a) + GLM_FUNC_QUALIFIER basic_format_saver::basic_format_saver(std::basic_ios& a) : bss_(a) { a.imbue(std::locale(a.getloc(), new format_punct(get_facet >(a)))); @@ -97,19 +97,19 @@ namespace io template GLM_FUNC_QUALIFIER - basic_format_saver::~basic_format_saver() + basic_format_saver::~basic_format_saver() {} - /* explicit */ GLM_FUNC_QUALIFIER precision::precision(unsigned a) + GLM_FUNC_QUALIFIER precision::precision(unsigned a) : value(a) {} - /* explicit */ GLM_FUNC_QUALIFIER width::width(unsigned a) + GLM_FUNC_QUALIFIER width::width(unsigned a) : value(a) {} template - /* explicit */ GLM_FUNC_QUALIFIER delimeter::delimeter(CTy a, CTy b, CTy c) + GLM_FUNC_QUALIFIER delimeter::delimeter(CTy a, CTy b, CTy c) : value() { value[0] = a; @@ -117,34 +117,30 @@ namespace io value[2] = c; } - /* explicit */ GLM_FUNC_QUALIFIER - order::order(order_type a) + GLM_FUNC_QUALIFIER order::order(order_type a) : value(a) {} template - GLM_FUNC_QUALIFIER FTy const& get_facet(std::basic_ios& ios) + GLM_FUNC_QUALIFIER FTy const& get_facet(std::basic_ios& ios) { - if (!std::has_facet(ios.getloc())) { - ios.imbue(std::locale(ios.getloc(), new FTy)); - } + if(!std::has_facet(ios.getloc())) + ios.imbue(std::locale(ios.getloc(), new FTy)); return std::use_facet(ios.getloc()); } template - GLM_FUNC_QUALIFIER std::basic_ios& formatted(std::basic_ios& ios) + GLM_FUNC_QUALIFIER std::basic_ios& formatted(std::basic_ios& ios) { const_cast&>(get_facet >(ios)).formatted = true; - return ios; } template - GLM_FUNC_QUALIFIER std::basic_ios& unformatted(std::basic_ios& ios) + GLM_FUNC_QUALIFIER std::basic_ios& unformatted(std::basic_ios& ios) { const_cast&>(get_facet >(ios)).formatted = false; - return ios; } @@ -152,7 +148,6 @@ namespace io GLM_FUNC_QUALIFIER std::basic_ostream& operator<<(std::basic_ostream& os, precision const& a) { const_cast&>(get_facet >(os)).precision = a.value; - return os; } @@ -160,12 +155,11 @@ namespace io GLM_FUNC_QUALIFIER std::basic_ostream& operator<<(std::basic_ostream& os, width const& a) { const_cast&>(get_facet >(os)).width = a.value; - return os; } template - std::basic_ostream& operator<<(std::basic_ostream& os, delimeter const& a) + GLM_FUNC_QUALIFIER std::basic_ostream& operator<<(std::basic_ostream& os, delimeter const& a) { format_punct & fmt(const_cast&>(get_facet >(os))); @@ -180,462 +174,281 @@ namespace io GLM_FUNC_QUALIFIER std::basic_ostream& operator<<(std::basic_ostream& os, order const& a) { const_cast&>(get_facet >(os)).order = a.value; - return os; } } // namespace io - template - GLM_FUNC_QUALIFIER std::basic_ostream& operator<<(std::basic_ostream& os, tquat const& a) +namespace detail +{ + template class V, typename T, precision P> + GLM_FUNC_QUALIFIER std::basic_ostream& + print_vector_on(std::basic_ostream& os, V const& a) { - typename std::basic_ostream::sentry const cerberus(os); + typename std::basic_ostream::sentry const cerberus(os); if(cerberus) { io::format_punct const & fmt(io::get_facet >(os)); + length_t const& components(type::components); + if(fmt.formatted) { io::basic_state_saver const bss(os); - os << std::fixed - << std::right - << std::setprecision(fmt.precision) - << std::setfill(fmt.space) - << fmt.delim_left - << std::setw(fmt.width) << a.w << fmt.separator - << std::setw(fmt.width) << a.x << fmt.separator - << std::setw(fmt.width) << a.y << fmt.separator - << std::setw(fmt.width) << a.z - << fmt.delim_right; + os << std::fixed << std::right << std::setprecision(fmt.precision) << std::setfill(fmt.space) << fmt.delim_left; + + for(length_t i(0); i < components; ++i) + { + os << std::setw(fmt.width) << a[i]; + if(components-1 != i) + os << fmt.separator; + } + + os << fmt.delim_right; } else { - os << a.w << fmt.space << a.x << fmt.space << a.y << fmt.space << a.z; + for(length_t i(0); i < components; ++i) + { + os << a[i]; + + if(components-1 != i) + os << fmt.space; + } } } return os; } +}//namespace detail template - GLM_FUNC_QUALIFIER std::basic_ostream& operator<<(std::basic_ostream& os, tvec1 const& a) - { - typename std::basic_ostream::sentry const cerberus(os); + GLM_FUNC_QUALIFIER std::basic_ostream& operator<<(std::basic_ostream& os, tquat const& a) + { + return detail::print_vector_on(os, a); + } - if(cerberus) - { - io::format_punct const & fmt(io::get_facet >(os)); - - if(fmt.formatted) - { - io::basic_state_saver const bss(os); - - os << std::fixed - << std::right - << std::setprecision(fmt.precision) - << std::setfill(fmt.space) - << fmt.delim_left - << std::setw(fmt.width) << a.x - << fmt.delim_right; - } - else - { - os << a.x; - } - } - - return os; - } + template + GLM_FUNC_QUALIFIER std::basic_ostream& operator<<(std::basic_ostream& os, tvec1 const& a) + { + return detail::print_vector_on(os, a); + } template GLM_FUNC_QUALIFIER std::basic_ostream& operator<<(std::basic_ostream& os, tvec2 const& a) { - typename std::basic_ostream::sentry const cerberus(os); - - if(cerberus) - { - io::format_punct const & fmt(io::get_facet >(os)); - - if(fmt.formatted) - { - io::basic_state_saver const bss(os); - - os << std::fixed - << std::right - << std::setprecision(fmt.precision) - << std::setfill(fmt.space) - << fmt.delim_left - << std::setw(fmt.width) << a.x << fmt.separator - << std::setw(fmt.width) << a.y - << fmt.delim_right; - } - else - { - os << a.x << fmt.space << a.y; - } - } - - return os; + return detail::print_vector_on(os, a); } template GLM_FUNC_QUALIFIER std::basic_ostream& operator<<(std::basic_ostream& os, tvec3 const& a) { - typename std::basic_ostream::sentry const cerberus(os); - - if(cerberus) - { - io::format_punct const & fmt(io::get_facet >(os)); - - if(fmt.formatted) - { - io::basic_state_saver const bss(os); - - os << std::fixed - << std::right - << std::setprecision(fmt.precision) - << std::setfill(fmt.space) - << fmt.delim_left - << std::setw(fmt.width) << a.x << fmt.separator - << std::setw(fmt.width) << a.y << fmt.separator - << std::setw(fmt.width) << a.z - << fmt.delim_right; - } - else - { - os << a.x << fmt.space << a.y << fmt.space << a.z; - } - } - - return os; + return detail::print_vector_on(os, a); } template GLM_FUNC_QUALIFIER std::basic_ostream& operator<<(std::basic_ostream& os, tvec4 const& a) { - typename std::basic_ostream::sentry const cerberus(os); - - if(cerberus) - { - io::format_punct const & fmt(io::get_facet >(os)); - - if(fmt.formatted) - { - io::basic_state_saver const bss(os); - - os << std::fixed - << std::right - << std::setprecision(fmt.precision) - << std::setfill(fmt.space) - << fmt.delim_left - << std::setw(fmt.width) << a.x << fmt.separator - << std::setw(fmt.width) << a.y << fmt.separator - << std::setw(fmt.width) << a.z << fmt.separator - << std::setw(fmt.width) << a.w - << fmt.delim_right; - } - else - { - os << a.x << fmt.space << a.y << fmt.space << a.z << fmt.space << a.w; - } - } - - return os; + return detail::print_vector_on(os, a); } - template - GLM_FUNC_QUALIFIER std::basic_ostream& operator<<(std::basic_ostream& os, tmat2x2 const& a) +namespace detail +{ + template class M, typename T, precision P> + GLM_FUNC_QUALIFIER std::basic_ostream& + print_matrix_on(std::basic_ostream& os, M const& a) { typename std::basic_ostream::sentry const cerberus(os); if(cerberus) { io::format_punct const & fmt(io::get_facet >(os)); - tmat2x2 m(a); - if(io::row_major == fmt.order) - m = transpose(a); + length_t const& cols(type::cols); + length_t const& rows(type::rows); if(fmt.formatted) { - os << fmt.newline - << fmt.delim_left << m[0] << fmt.newline - << fmt.space << m[1] << fmt.delim_right; + os << fmt.newline << fmt.delim_left; + + switch(fmt.order) + { + case io::column_major: + { + for(length_t i(0); i < rows; ++i) + { + if (0 != i) + os << fmt.space; + + os << row(a, i); + + if(rows-1 != i) + os << fmt.newline; + } + } + break; + + case io::row_major: + { + for(length_t i(0); i < cols; ++i) + { + if(0 != i) + os << fmt.space; + + os << column(a, i); + + if(cols-1 != i) + os << fmt.newline; + } + } + break; + } + + os << fmt.delim_right; } else { - os << m[0] << fmt.space << m[1]; + switch (fmt.order) + { + case io::column_major: + { + for(length_t i(0); i < cols; ++i) + { + os << column(a, i); + + if(cols - 1 != i) + os << fmt.space; + } + } + break; + + case io::row_major: + { + for (length_t i(0); i < rows; ++i) + { + os << row(a, i); + + if (rows-1 != i) + os << fmt.space; + } + } + break; + } } } return os; } +}//namespace detail + + template + GLM_FUNC_QUALIFIER std::basic_ostream& operator<<(std::basic_ostream& os, tmat2x2 const& a) + { + return detail::print_matrix_on(os, a); + } template GLM_FUNC_QUALIFIER std::basic_ostream& operator<<(std::basic_ostream& os, tmat2x3 const& a) { - typename std::basic_ostream::sentry const cerberus(os); - - if(cerberus) - { - io::format_punct const & fmt(io::get_facet >(os)); - tmat3x2 m(a); - - if(io::row_major == fmt.order) - m = transpose(a); - - if(fmt.formatted) - { - os << fmt.newline - << fmt.delim_left << m[0] << fmt.newline - << fmt.space << m[1] << fmt.newline - << fmt.space << m[2] << fmt.delim_right; - } - else - { - os << m[0] << fmt.space << m[1] << fmt.space << m[2]; - } - } - - return os; + return detail::print_matrix_on(os, a); } template GLM_FUNC_QUALIFIER std::basic_ostream& operator<<(std::basic_ostream& os, tmat2x4 const& a) { - typename std::basic_ostream::sentry const cerberus(os); - - if(cerberus) - { - io::format_punct const & fmt(io::get_facet >(os)); - tmat4x2 m(a); - - if(io::row_major == fmt.order) - m = transpose(a); - - - if(fmt.formatted) - { - os << fmt.newline - << fmt.delim_left << m[0] << fmt.newline - << fmt.space << m[1] << fmt.newline - << fmt.space << m[2] << fmt.newline - << fmt.space << m[3] << fmt.delim_right; - } - else - { - os << m[0] << fmt.space << m[1] << fmt.space << m[2] << fmt.space << m[3]; - } - } - - return os; + return detail::print_matrix_on(os, a); } template GLM_FUNC_QUALIFIER std::basic_ostream& operator<<(std::basic_ostream& os, tmat3x2 const& a) { - typename std::basic_ostream::sentry const cerberus(os); - - if(cerberus) - { - io::format_punct const & fmt(io::get_facet >(os)); - tmat2x3 m(a); - - if(io::row_major == fmt.order) - m = transpose(a); - - if(fmt.formatted) - { - os << fmt.newline - << fmt.delim_left << m[0] << fmt.newline - << fmt.space << m[1] << fmt.delim_right; - } - else - { - os << m[0] << fmt.space << m[1]; - } - } - - return os; + return detail::print_matrix_on(os, a); } template GLM_FUNC_QUALIFIER std::basic_ostream& operator<<(std::basic_ostream& os, tmat3x3 const& a) { - typename std::basic_ostream::sentry const cerberus(os); - - if(cerberus) - { - io::format_punct const & fmt(io::get_facet >(os)); - tmat3x3 m(a); - - if(io::row_major == fmt.order) - m = transpose(a); - - if(fmt.formatted) - { - os << fmt.newline - << fmt.delim_left << m[0] << fmt.newline - << fmt.space << m[1] << fmt.newline - << fmt.space << m[2] << fmt.delim_right; - } - else - { - os << m[0] << fmt.space << m[1] << fmt.space << m[2]; - } - } - - return os; + return detail::print_matrix_on(os, a); } template GLM_FUNC_QUALIFIER std::basic_ostream & operator<<(std::basic_ostream& os, tmat3x4 const& a) { - typename std::basic_ostream::sentry const cerberus(os); - - if(cerberus) - { - io::format_punct const & fmt(io::get_facet >(os)); - tmat4x3 m(a); - - if(io::row_major == fmt.order) - m = transpose(a); - - if (fmt.formatted) - { - os << fmt.newline - << fmt.delim_left << m[0] << fmt.newline - << fmt.space << m[1] << fmt.newline - << fmt.space << m[2] << fmt.newline - << fmt.space << m[3] << fmt.delim_right; - } - else - { - os << m[0] << fmt.space << m[1] << fmt.space << m[2] << fmt.space << m[3]; - } - } - - return os; + return detail::print_matrix_on(os, a); } template GLM_FUNC_QUALIFIER std::basic_ostream & operator<<(std::basic_ostream& os, tmat4x2 const& a) { - typename std::basic_ostream::sentry const cerberus(os); - - if(cerberus) - { - io::format_punct const & fmt(io::get_facet >(os)); - tmat2x4 m(a); - - if(io::row_major == fmt.order) - m = transpose(a); - - if (fmt.formatted) - { - os << fmt.newline - << fmt.delim_left << m[0] << fmt.newline - << fmt.space << m[1] << fmt.delim_right; - } - else - { - os << m[0] << fmt.space << m[1]; - } - } - - return os; + return detail::print_matrix_on(os, a); } template GLM_FUNC_QUALIFIER std::basic_ostream & operator<<(std::basic_ostream& os, tmat4x3 const& a) { - typename std::basic_ostream::sentry const cerberus(os); - - if(cerberus) - { - io::format_punct const & fmt(io::get_facet >(os)); - tmat3x4 m(a); - - if(io::row_major == fmt.order) - m = transpose(a); - - if(fmt.formatted) - { - os << fmt.newline - << fmt.delim_left << m[0] << fmt.newline - << fmt.space << m[1] << fmt.newline - << fmt.space << m[2] << fmt.delim_right; - } - else - { - os << m[0] << fmt.space << m[1] << fmt.space << m[2]; - } - } - - return os; + return detail::print_matrix_on(os, a); } template GLM_FUNC_QUALIFIER std::basic_ostream & operator<<(std::basic_ostream& os, tmat4x4 const& a) { - typename std::basic_ostream::sentry const cerberus(os); - - if(cerberus) - { - io::format_punct const & fmt(io::get_facet >(os)); - tmat4x4 m(a); - - if (io::row_major == fmt.order) - m = transpose(a); - - if(fmt.formatted) - { - os << fmt.newline - << fmt.delim_left << m[0] << fmt.newline - << fmt.space << m[1] << fmt.newline - << fmt.space << m[2] << fmt.newline - << fmt.space << m[3] << fmt.delim_right; - } - else - { - os << m[0] << fmt.space << m[1] << fmt.space << m[2] << fmt.space << m[3]; - } - } - - return os; + return detail::print_matrix_on(os, a); } - template - GLM_FUNC_QUALIFIER std::basic_ostream& operator<<( - std::basic_ostream & os, - std::pair const, tmat4x4 const> const& a) +namespace detail +{ + template class M, typename T, precision P> + GLM_FUNC_QUALIFIER std::basic_ostream& + print_matrix_pair_on(std::basic_ostream& os, std::pair const, M const> const& a) { typename std::basic_ostream::sentry const cerberus(os); if(cerberus) { - io::format_punct const & fmt(io::get_facet >(os)); - tmat4x4 ml(a.first); - tmat4x4 mr(a.second); - - if(io::row_major == fmt.order) - { - ml = transpose(a.first); - mr = transpose(a.second); - } + io::format_punct const& fmt(io::get_facet >(os)); + M const& ml(a.first); + M const& mr(a.second); + length_t const& cols(type::cols); + length_t const& rows(type::rows); if(fmt.formatted) { - CTy const & l(fmt.delim_left); - CTy const & r(fmt.delim_right); - CTy const & s(fmt.space); + os << fmt.newline << fmt.delim_left; - os << fmt.newline - << l << ml[0] << s << s << l << mr[0] << fmt.newline - << s << ml[1] << s << s << s << mr[1] << fmt.newline - << s << ml[2] << s << s << s << mr[2] << fmt.newline - << s << ml[3] << r << s << s << mr[3] << r; + switch(fmt.order) + { + case io::column_major: + { + for(length_t i(0); i < rows; ++i) + { + if(0 != i) + os << fmt.space; + + os << row(ml, i) << ((rows-1 != i) ? fmt.space : fmt.delim_right) << fmt.space << ((0 != i) ? fmt.space : fmt.delim_left) << row(mr, i); + + if(rows-1 != i) + os << fmt.newline; + } + } + break; + case io::row_major: + { + for(length_t i(0); i < cols; ++i) + { + if(0 != i) + os << fmt.space; + + os << column(ml, i) << ((cols-1 != i) ? fmt.space : fmt.delim_right) << fmt.space << ((0 != i) ? fmt.space : fmt.delim_left) << column(mr, i); + + if(cols-1 != i) + os << fmt.newline; + } + } + break; + } + + os << fmt.delim_right; } else { @@ -645,12 +458,14 @@ namespace io return os; } +}//namespace detail template - GLM_FUNC_QUALIFIER std::basic_ostream& operator<<( - std::basic_ostream & os, - std::pair, tmat4x4 > const& a) + GLM_FUNC_QUALIFIER std::basic_ostream& operator<<( + std::basic_ostream & os, + std::pair const, + tmat4x4 const> const& a) { - return operator<<(os, static_cast const, tmat4x4 const> const&>(a)); + return detail::print_matrix_pair_on(os, a); } }//namespace glm diff --git a/glm/gtx/type_trait.hpp b/glm/gtx/type_trait.hpp index 1875b1a0..ceb671b3 100644 --- a/glm/gtx/type_trait.hpp +++ b/glm/gtx/type_trait.hpp @@ -24,198 +24,255 @@ /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN /// THE SOFTWARE. /// -/// @ref gtx_type_info -/// @file glm/gtx/type_info.hpp +/// @ref gtx_type_trait +/// @file glm/gtx/type_trait.hpp /// @date 2016-03-12 / 2016-03-12 /// @author Christophe Riccio /// /// @see core (dependence) /// -/// @defgroup gtx_type_info GLM_GTX_type_info +/// @defgroup gtx_type_trait GLM_GTX_type_trait /// @ingroup gtx /// -/// @brief Defines aligned types. +/// @brief Defines traits for each type. /// -/// need to be included to use these functionalities. +/// need to be included to use these functionalities. /////////////////////////////////////////////////////////////////////////////////// #pragma once // Dependency: -#include "../detail/precision.hpp" -#include "../detail/setup.hpp" +#include "../detail/type_vec2.hpp" +#include "../detail/type_vec3.hpp" +#include "../detail/type_vec4.hpp" +#include "../detail/type_mat2x2.hpp" +#include "../detail/type_mat2x3.hpp" +#include "../detail/type_mat2x4.hpp" +#include "../detail/type_mat3x2.hpp" +#include "../detail/type_mat3x3.hpp" +#include "../detail/type_mat3x4.hpp" +#include "../detail/type_mat4x2.hpp" +#include "../detail/type_mat4x3.hpp" +#include "../detail/type_mat4x4.hpp" +#include "../gtc/quaternion.hpp" +#include "../gtx/dual_quaternion.hpp" #if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) -# pragma message("GLM: GLM_GTX_type_info extension included") +# pragma message("GLM: GLM_GTX_type_trait extension included") #endif namespace glm { - /// @addtogroup gtx_type_info + /// @addtogroup gtx_type_trait /// @{ - template struct tvec1; - template struct tvec2; - template struct tvec3; - template struct tvec4; - - template struct tmat2x2; - template struct tmat2x3; - template struct tmat2x4; - template struct tmat3x2; - template struct tmat3x3; - template struct tmat3x4; - template struct tmat4x2; - template struct tmat4x3; - template struct tmat4x4; - - template struct tquat; - template struct tdualquat; - - template