|
|
|
@ -10,11 +10,9 @@ |
|
|
|
|
#include <iomanip> // std::setfill<>, std::fixed, std::setprecision, std::right, std::setw |
|
|
|
|
#include <ostream> // std::basic_ostream<> |
|
|
|
|
|
|
|
|
|
namespace glm |
|
|
|
|
{ |
|
|
|
|
namespace glm{ |
|
|
|
|
namespace io |
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
template <typename CTy> |
|
|
|
|
/* explicit */ GLM_FUNC_QUALIFIER |
|
|
|
|
format_punct<CTy>::format_punct(size_t a) |
|
|
|
@ -48,8 +46,7 @@ namespace glm |
|
|
|
|
template <typename CTy> std::locale::id format_punct<CTy>::id; |
|
|
|
|
|
|
|
|
|
template <typename CTy, typename CTr> |
|
|
|
|
/* explicit */ GLM_FUNC_QUALIFIER |
|
|
|
|
basic_state_saver<CTy,CTr>::basic_state_saver(std::basic_ios<CTy,CTr>& a) |
|
|
|
|
/* explicit */ GLM_FUNC_QUALIFIER basic_state_saver<CTy,CTr>::basic_state_saver(std::basic_ios<CTy,CTr>& a) |
|
|
|
|
: state_ (a), |
|
|
|
|
flags_ (a.flags()), |
|
|
|
|
precision_(a.precision()), |
|
|
|
@ -59,8 +56,7 @@ namespace glm |
|
|
|
|
{} |
|
|
|
|
|
|
|
|
|
template <typename CTy, typename CTr> |
|
|
|
|
GLM_FUNC_QUALIFIER |
|
|
|
|
basic_state_saver<CTy,CTr>::~basic_state_saver() |
|
|
|
|
GLM_FUNC_QUALIFIER basic_state_saver<CTy,CTr>::~basic_state_saver() |
|
|
|
|
{ |
|
|
|
|
state_.imbue(locale_); |
|
|
|
|
state_.fill(fill_); |
|
|
|
@ -70,8 +66,7 @@ namespace glm |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template <typename CTy, typename CTr> |
|
|
|
|
/* explicit */ GLM_FUNC_QUALIFIER |
|
|
|
|
basic_format_saver<CTy,CTr>::basic_format_saver(std::basic_ios<CTy,CTr>& a) |
|
|
|
|
/* explicit */ GLM_FUNC_QUALIFIER basic_format_saver<CTy,CTr>::basic_format_saver(std::basic_ios<CTy,CTr>& a) |
|
|
|
|
: bss_(a) |
|
|
|
|
{ |
|
|
|
|
a.imbue(std::locale(a.getloc(), new format_punct<CTy>(get_facet<format_punct<CTy> >(a)))); |
|
|
|
@ -82,19 +77,16 @@ namespace glm |
|
|
|
|
basic_format_saver<CTy,CTr>::~basic_format_saver() |
|
|
|
|
{} |
|
|
|
|
|
|
|
|
|
/* explicit */ GLM_FUNC_QUALIFIER |
|
|
|
|
precision::precision(unsigned a) |
|
|
|
|
/* explicit */ GLM_FUNC_QUALIFIER precision::precision(unsigned a) |
|
|
|
|
: value(a) |
|
|
|
|
{} |
|
|
|
|
|
|
|
|
|
/* explicit */ GLM_FUNC_QUALIFIER |
|
|
|
|
width::width(unsigned a) |
|
|
|
|
/* explicit */ GLM_FUNC_QUALIFIER width::width(unsigned a) |
|
|
|
|
: value(a) |
|
|
|
|
{} |
|
|
|
|
|
|
|
|
|
template <typename CTy> |
|
|
|
|
/* explicit */ GLM_FUNC_QUALIFIER |
|
|
|
|
delimeter<CTy>::delimeter(CTy a, CTy b, CTy c) |
|
|
|
|
/* explicit */ GLM_FUNC_QUALIFIER delimeter<CTy>::delimeter(CTy a, CTy b, CTy c) |
|
|
|
|
: value() |
|
|
|
|
{ |
|
|
|
|
value[0] = a; |
|
|
|
@ -108,8 +100,7 @@ namespace glm |
|
|
|
|
{} |
|
|
|
|
|
|
|
|
|
template <typename FTy, typename CTy, typename CTr> |
|
|
|
|
GLM_FUNC_QUALIFIER FTy const& |
|
|
|
|
get_facet(std::basic_ios<CTy,CTr>& ios) |
|
|
|
|
GLM_FUNC_QUALIFIER FTy const& get_facet(std::basic_ios<CTy,CTr>& ios) |
|
|
|
|
{ |
|
|
|
|
if (!std::has_facet<FTy>(ios.getloc())) { |
|
|
|
|
ios.imbue(std::locale(ios.getloc(), new FTy)); |
|
|
|
@ -119,8 +110,7 @@ namespace glm |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template <typename CTy, typename CTr> |
|
|
|
|
GLM_FUNC_QUALIFIER std::basic_ios<CTy,CTr>& |
|
|
|
|
formatted(std::basic_ios<CTy,CTr>& ios) |
|
|
|
|
GLM_FUNC_QUALIFIER std::basic_ios<CTy,CTr>& formatted(std::basic_ios<CTy,CTr>& ios) |
|
|
|
|
{ |
|
|
|
|
const_cast<format_punct<CTy>&>(get_facet<format_punct<CTy> >(ios)).formatted = true; |
|
|
|
|
|
|
|
|
@ -128,8 +118,7 @@ namespace glm |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template <typename CTy, typename CTr> |
|
|
|
|
GLM_FUNC_QUALIFIER std::basic_ios<CTy,CTr>& |
|
|
|
|
unformatted(std::basic_ios<CTy,CTr>& ios) |
|
|
|
|
GLM_FUNC_QUALIFIER std::basic_ios<CTy,CTr>& unformatted(std::basic_ios<CTy,CTr>& ios) |
|
|
|
|
{ |
|
|
|
|
const_cast<format_punct<CTy>&>(get_facet<format_punct<CTy> >(ios)).formatted = false; |
|
|
|
|
|
|
|
|
@ -137,8 +126,7 @@ namespace glm |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template <typename CTy, typename CTr> |
|
|
|
|
GLM_FUNC_QUALIFIER std::basic_ostream<CTy, CTr>& |
|
|
|
|
operator<<(std::basic_ostream<CTy, CTr>& os, precision const& a) |
|
|
|
|
GLM_FUNC_QUALIFIER std::basic_ostream<CTy, CTr>& operator<<(std::basic_ostream<CTy, CTr>& os, precision const& a) |
|
|
|
|
{ |
|
|
|
|
const_cast<format_punct<CTy>&>(get_facet<format_punct<CTy> >(os)).precision = a.value; |
|
|
|
|
|
|
|
|
@ -146,8 +134,7 @@ namespace glm |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template <typename CTy, typename CTr> |
|
|
|
|
GLM_FUNC_QUALIFIER std::basic_ostream<CTy, CTr>& |
|
|
|
|
operator<<(std::basic_ostream<CTy, CTr>& os, width const& a) |
|
|
|
|
GLM_FUNC_QUALIFIER std::basic_ostream<CTy, CTr>& operator<<(std::basic_ostream<CTy, CTr>& os, width const& a) |
|
|
|
|
{ |
|
|
|
|
const_cast<format_punct<CTy>&>(get_facet<format_punct<CTy> >(os)).width = a.value; |
|
|
|
|
|
|
|
|
@ -155,8 +142,7 @@ namespace glm |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template <typename CTy, typename CTr> |
|
|
|
|
std::basic_ostream<CTy, CTr>& operator<<(std::basic_ostream<CTy, CTr>& os, |
|
|
|
|
delimeter<CTy> const& a) |
|
|
|
|
std::basic_ostream<CTy, CTr>& operator<<(std::basic_ostream<CTy, CTr>& os, delimeter<CTy> const& a) |
|
|
|
|
{ |
|
|
|
|
format_punct<CTy> & fmt(const_cast<format_punct<CTy>&>(get_facet<format_punct<CTy> >(os))); |
|
|
|
|
|
|
|
|
@ -168,28 +154,27 @@ namespace glm |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template <typename CTy, typename CTr> |
|
|
|
|
GLM_FUNC_QUALIFIER std::basic_ostream<CTy, CTr>& |
|
|
|
|
operator<<(std::basic_ostream<CTy, CTr>& os, order const& a) |
|
|
|
|
GLM_FUNC_QUALIFIER std::basic_ostream<CTy, CTr>& operator<<(std::basic_ostream<CTy, CTr>& os, order const& a) |
|
|
|
|
{ |
|
|
|
|
const_cast<format_punct<CTy>&>(get_facet<format_punct<CTy> >(os)).order = a.value; |
|
|
|
|
|
|
|
|
|
return os; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} // namespace io |
|
|
|
|
|
|
|
|
|
namespace detail { |
|
|
|
|
|
|
|
|
|
namespace detail |
|
|
|
|
{ |
|
|
|
|
template <typename CTy, typename CTr, typename T, precision P> |
|
|
|
|
GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& |
|
|
|
|
operator<<(std::basic_ostream<CTy,CTr>& os, tquat<T,P> const& a) |
|
|
|
|
GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, tquat<T,P> const& a) |
|
|
|
|
{ |
|
|
|
|
typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os); |
|
|
|
|
|
|
|
|
|
if (cerberus) { |
|
|
|
|
if(cerberus) |
|
|
|
|
{ |
|
|
|
|
io::format_punct<CTy> const & fmt(io::get_facet<io::format_punct<CTy> >(os)); |
|
|
|
|
|
|
|
|
|
if (fmt.formatted) { |
|
|
|
|
if(fmt.formatted) |
|
|
|
|
{ |
|
|
|
|
io::basic_state_saver<CTy> const bss(os); |
|
|
|
|
|
|
|
|
|
os << std::fixed |
|
|
|
@ -202,7 +187,9 @@ namespace glm |
|
|
|
|
<< std::setw(fmt.width) << a.y << fmt.separator |
|
|
|
|
<< std::setw(fmt.width) << a.z |
|
|
|
|
<< fmt.delim_right; |
|
|
|
|
} else { |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
os << a.w << fmt.space << a.x << fmt.space << a.y << fmt.space << a.z; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -211,15 +198,16 @@ namespace glm |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template <typename CTy, typename CTr, typename T, precision P> |
|
|
|
|
GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& |
|
|
|
|
operator<<(std::basic_ostream<CTy,CTr>& os, tvec2<T,P> const& a) |
|
|
|
|
GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, tvec2<T,P> const& a) |
|
|
|
|
{ |
|
|
|
|
typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os); |
|
|
|
|
|
|
|
|
|
if (cerberus) { |
|
|
|
|
if(cerberus) |
|
|
|
|
{ |
|
|
|
|
io::format_punct<CTy> const & fmt(io::get_facet<io::format_punct<CTy> >(os)); |
|
|
|
|
|
|
|
|
|
if (fmt.formatted) { |
|
|
|
|
if(fmt.formatted) |
|
|
|
|
{ |
|
|
|
|
io::basic_state_saver<CTy> const bss(os); |
|
|
|
|
|
|
|
|
|
os << std::fixed |
|
|
|
@ -230,7 +218,9 @@ namespace glm |
|
|
|
|
<< std::setw(fmt.width) << a.x << fmt.separator |
|
|
|
|
<< std::setw(fmt.width) << a.y |
|
|
|
|
<< fmt.delim_right; |
|
|
|
|
} else { |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
os << a.x << fmt.space << a.y; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -239,15 +229,16 @@ namespace glm |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template <typename CTy, typename CTr, typename T, precision P> |
|
|
|
|
GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& |
|
|
|
|
operator<<(std::basic_ostream<CTy,CTr>& os, tvec3<T,P> const& a) |
|
|
|
|
GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, tvec3<T,P> const& a) |
|
|
|
|
{ |
|
|
|
|
typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os); |
|
|
|
|
|
|
|
|
|
if (cerberus) { |
|
|
|
|
if(cerberus) |
|
|
|
|
{ |
|
|
|
|
io::format_punct<CTy> const & fmt(io::get_facet<io::format_punct<CTy> >(os)); |
|
|
|
|
|
|
|
|
|
if (fmt.formatted) { |
|
|
|
|
if(fmt.formatted) |
|
|
|
|
{ |
|
|
|
|
io::basic_state_saver<CTy> const bss(os); |
|
|
|
|
|
|
|
|
|
os << std::fixed |
|
|
|
@ -259,7 +250,9 @@ namespace glm |
|
|
|
|
<< std::setw(fmt.width) << a.y << fmt.separator |
|
|
|
|
<< std::setw(fmt.width) << a.z |
|
|
|
|
<< fmt.delim_right; |
|
|
|
|
} else { |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
os << a.x << fmt.space << a.y << fmt.space << a.z; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -268,15 +261,16 @@ namespace glm |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template <typename CTy, typename CTr, typename T, precision P> |
|
|
|
|
GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& |
|
|
|
|
operator<<(std::basic_ostream<CTy,CTr>& os, tvec4<T,P> const& a) |
|
|
|
|
GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, tvec4<T,P> const& a) |
|
|
|
|
{ |
|
|
|
|
typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os); |
|
|
|
|
|
|
|
|
|
if (cerberus) { |
|
|
|
|
if(cerberus) |
|
|
|
|
{ |
|
|
|
|
io::format_punct<CTy> const & fmt(io::get_facet<io::format_punct<CTy> >(os)); |
|
|
|
|
|
|
|
|
|
if (fmt.formatted) { |
|
|
|
|
if(fmt.formatted) |
|
|
|
|
{ |
|
|
|
|
io::basic_state_saver<CTy> const bss(os); |
|
|
|
|
|
|
|
|
|
os << std::fixed |
|
|
|
@ -289,7 +283,9 @@ namespace glm |
|
|
|
|
<< std::setw(fmt.width) << a.z << fmt.separator |
|
|
|
|
<< std::setw(fmt.width) << a.w |
|
|
|
|
<< fmt.delim_right; |
|
|
|
|
} else { |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
os << a.x << fmt.space << a.y << fmt.space << a.z << fmt.space << a.w; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -298,24 +294,26 @@ namespace glm |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template <typename CTy, typename CTr, typename T, precision P> |
|
|
|
|
GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& |
|
|
|
|
operator<<(std::basic_ostream<CTy,CTr>& os, tmat2x2<T,P> const& a) |
|
|
|
|
GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, tmat2x2<T,P> const& a) |
|
|
|
|
{ |
|
|
|
|
typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os); |
|
|
|
|
|
|
|
|
|
if (cerberus) { |
|
|
|
|
if(cerberus) |
|
|
|
|
{ |
|
|
|
|
io::format_punct<CTy> const & fmt(io::get_facet<io::format_punct<CTy> >(os)); |
|
|
|
|
tmat2x2<T,P> m(a); |
|
|
|
|
|
|
|
|
|
if (io::row_major == fmt.order) { |
|
|
|
|
if(io::row_major == fmt.order) |
|
|
|
|
m = transpose(a); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (fmt.formatted) { |
|
|
|
|
if(fmt.formatted) |
|
|
|
|
{ |
|
|
|
|
os << fmt.newline |
|
|
|
|
<< fmt.delim_left << m[0] << fmt.newline |
|
|
|
|
<< fmt.space << m[1] << fmt.delim_right; |
|
|
|
|
} else { |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
os << m[0] << fmt.space << m[1]; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -324,25 +322,27 @@ namespace glm |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template <typename CTy, typename CTr, typename T, precision P> |
|
|
|
|
GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& |
|
|
|
|
operator<<(std::basic_ostream<CTy,CTr>& os, tmat2x3<T,P> const& a) |
|
|
|
|
GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, tmat2x3<T,P> const& a) |
|
|
|
|
{ |
|
|
|
|
typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os); |
|
|
|
|
|
|
|
|
|
if (cerberus) { |
|
|
|
|
if(cerberus) |
|
|
|
|
{ |
|
|
|
|
io::format_punct<CTy> const & fmt(io::get_facet<io::format_punct<CTy> >(os)); |
|
|
|
|
tmat3x2<T,P> m(a); |
|
|
|
|
|
|
|
|
|
if (io::row_major == fmt.order) { |
|
|
|
|
if(io::row_major == fmt.order) |
|
|
|
|
m = transpose(a); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (fmt.formatted) { |
|
|
|
|
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 { |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
os << m[0] << fmt.space << m[1] << fmt.space << m[2]; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -351,26 +351,29 @@ namespace glm |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template <typename CTy, typename CTr, typename T, precision P> |
|
|
|
|
GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& |
|
|
|
|
operator<<(std::basic_ostream<CTy,CTr>& os, tmat2x4<T,P> const& a) |
|
|
|
|
GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, tmat2x4<T,P> const& a) |
|
|
|
|
{ |
|
|
|
|
typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os); |
|
|
|
|
|
|
|
|
|
if (cerberus) { |
|
|
|
|
if(cerberus) |
|
|
|
|
{ |
|
|
|
|
io::format_punct<CTy> const & fmt(io::get_facet<io::format_punct<CTy> >(os)); |
|
|
|
|
tmat4x2<T,P> m(a); |
|
|
|
|
|
|
|
|
|
if (io::row_major == fmt.order) { |
|
|
|
|
if(io::row_major == fmt.order) |
|
|
|
|
m = transpose(a); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (fmt.formatted) { |
|
|
|
|
|
|
|
|
|
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 { |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
os << m[0] << fmt.space << m[1] << fmt.space << m[2] << fmt.space << m[3]; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -379,24 +382,26 @@ namespace glm |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template <typename CTy, typename CTr, typename T, precision P> |
|
|
|
|
GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& |
|
|
|
|
operator<<(std::basic_ostream<CTy,CTr>& os, tmat3x2<T,P> const& a) |
|
|
|
|
GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, tmat3x2<T,P> const& a) |
|
|
|
|
{ |
|
|
|
|
typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os); |
|
|
|
|
|
|
|
|
|
if (cerberus) { |
|
|
|
|
if(cerberus) |
|
|
|
|
{ |
|
|
|
|
io::format_punct<CTy> const & fmt(io::get_facet<io::format_punct<CTy> >(os)); |
|
|
|
|
tmat2x3<T,P> m(a); |
|
|
|
|
|
|
|
|
|
if (io::row_major == fmt.order) { |
|
|
|
|
if(io::row_major == fmt.order) |
|
|
|
|
m = transpose(a); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (fmt.formatted) { |
|
|
|
|
if(fmt.formatted) |
|
|
|
|
{ |
|
|
|
|
os << fmt.newline |
|
|
|
|
<< fmt.delim_left << m[0] << fmt.newline |
|
|
|
|
<< fmt.space << m[1] << fmt.delim_right; |
|
|
|
|
} else { |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
os << m[0] << fmt.space << m[1]; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -405,25 +410,27 @@ namespace glm |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template <typename CTy, typename CTr, typename T, precision P> |
|
|
|
|
GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& |
|
|
|
|
operator<<(std::basic_ostream<CTy,CTr>& os, tmat3x3<T,P> const& a) |
|
|
|
|
GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, tmat3x3<T,P> const& a) |
|
|
|
|
{ |
|
|
|
|
typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os); |
|
|
|
|
|
|
|
|
|
if (cerberus) { |
|
|
|
|
if(cerberus) |
|
|
|
|
{ |
|
|
|
|
io::format_punct<CTy> const & fmt(io::get_facet<io::format_punct<CTy> >(os)); |
|
|
|
|
tmat3x3<T,P> m(a); |
|
|
|
|
|
|
|
|
|
if (io::row_major == fmt.order) { |
|
|
|
|
if(io::row_major == fmt.order) |
|
|
|
|
m = transpose(a); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (fmt.formatted) { |
|
|
|
|
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 { |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
os << m[0] << fmt.space << m[1] << fmt.space << m[2]; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -432,26 +439,28 @@ namespace glm |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template <typename CTy, typename CTr, typename T, precision P> |
|
|
|
|
GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& |
|
|
|
|
operator<<(std::basic_ostream<CTy,CTr>& os, tmat3x4<T,P> const& a) |
|
|
|
|
GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr> & operator<<(std::basic_ostream<CTy,CTr>& os, tmat3x4<T,P> const& a) |
|
|
|
|
{ |
|
|
|
|
typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os); |
|
|
|
|
|
|
|
|
|
if (cerberus) { |
|
|
|
|
if(cerberus) |
|
|
|
|
{ |
|
|
|
|
io::format_punct<CTy> const & fmt(io::get_facet<io::format_punct<CTy> >(os)); |
|
|
|
|
tmat4x3<T,P> m(a); |
|
|
|
|
|
|
|
|
|
if (io::row_major == fmt.order) { |
|
|
|
|
if(io::row_major == fmt.order) |
|
|
|
|
m = transpose(a); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (fmt.formatted) { |
|
|
|
|
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 { |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
os << m[0] << fmt.space << m[1] << fmt.space << m[2] << fmt.space << m[3]; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -460,24 +469,26 @@ namespace glm |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template <typename CTy, typename CTr, typename T, precision P> |
|
|
|
|
GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& |
|
|
|
|
operator<<(std::basic_ostream<CTy,CTr>& os, tmat4x2<T,P> const& a) |
|
|
|
|
GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr> & operator<<(std::basic_ostream<CTy,CTr>& os, tmat4x2<T,P> const& a) |
|
|
|
|
{ |
|
|
|
|
typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os); |
|
|
|
|
|
|
|
|
|
if (cerberus) { |
|
|
|
|
if(cerberus) |
|
|
|
|
{ |
|
|
|
|
io::format_punct<CTy> const & fmt(io::get_facet<io::format_punct<CTy> >(os)); |
|
|
|
|
tmat2x4<T,P> m(a); |
|
|
|
|
|
|
|
|
|
if (io::row_major == fmt.order) { |
|
|
|
|
if(io::row_major == fmt.order) |
|
|
|
|
m = transpose(a); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (fmt.formatted) { |
|
|
|
|
if (fmt.formatted) |
|
|
|
|
{ |
|
|
|
|
os << fmt.newline |
|
|
|
|
<< fmt.delim_left << m[0] << fmt.newline |
|
|
|
|
<< fmt.space << m[1] << fmt.delim_right; |
|
|
|
|
} else { |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
os << m[0] << fmt.space << m[1]; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -486,25 +497,27 @@ namespace glm |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template <typename CTy, typename CTr, typename T, precision P> |
|
|
|
|
GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& |
|
|
|
|
operator<<(std::basic_ostream<CTy,CTr>& os, tmat4x3<T,P> const& a) |
|
|
|
|
GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr> & operator<<(std::basic_ostream<CTy,CTr>& os, tmat4x3<T,P> const& a) |
|
|
|
|
{ |
|
|
|
|
typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os); |
|
|
|
|
|
|
|
|
|
if (cerberus) { |
|
|
|
|
if(cerberus) |
|
|
|
|
{ |
|
|
|
|
io::format_punct<CTy> const & fmt(io::get_facet<io::format_punct<CTy> >(os)); |
|
|
|
|
tmat3x4<T,P> m(a); |
|
|
|
|
|
|
|
|
|
if (io::row_major == fmt.order) { |
|
|
|
|
if(io::row_major == fmt.order) |
|
|
|
|
m = transpose(a); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (fmt.formatted) { |
|
|
|
|
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 { |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
os << m[0] << fmt.space << m[1] << fmt.space << m[2]; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -513,26 +526,28 @@ namespace glm |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template <typename CTy, typename CTr, typename T, precision P> |
|
|
|
|
GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& |
|
|
|
|
operator<<(std::basic_ostream<CTy,CTr>& os, tmat4x4<T,P> const& a) |
|
|
|
|
GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr> & operator<<(std::basic_ostream<CTy,CTr>& os, tmat4x4<T,P> const& a) |
|
|
|
|
{ |
|
|
|
|
typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os); |
|
|
|
|
|
|
|
|
|
if (cerberus) { |
|
|
|
|
if(cerberus) |
|
|
|
|
{ |
|
|
|
|
io::format_punct<CTy> const & fmt(io::get_facet<io::format_punct<CTy> >(os)); |
|
|
|
|
tmat4x4<T,P> m(a); |
|
|
|
|
|
|
|
|
|
if (io::row_major == fmt.order) { |
|
|
|
|
if (io::row_major == fmt.order) |
|
|
|
|
m = transpose(a); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (fmt.formatted) { |
|
|
|
|
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 { |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
os << m[0] << fmt.space << m[1] << fmt.space << m[2] << fmt.space << m[3]; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -541,23 +556,26 @@ namespace glm |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template <typename CTy, typename CTr, typename T, precision P> |
|
|
|
|
GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& |
|
|
|
|
operator<<(std::basic_ostream<CTy,CTr>& os, |
|
|
|
|
GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<( |
|
|
|
|
std::basic_ostream<CTy,CTr> & os, |
|
|
|
|
std::pair<tmat4x4<T,P> const, tmat4x4<T,P> const> const& a) |
|
|
|
|
{ |
|
|
|
|
typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os); |
|
|
|
|
|
|
|
|
|
if (cerberus) { |
|
|
|
|
if(cerberus) |
|
|
|
|
{ |
|
|
|
|
io::format_punct<CTy> const & fmt(io::get_facet<io::format_punct<CTy> >(os)); |
|
|
|
|
tmat4x4<T,P> ml(a.first); |
|
|
|
|
tmat4x4<T,P> mr(a.second); |
|
|
|
|
|
|
|
|
|
if (io::row_major == fmt.order) { |
|
|
|
|
if(io::row_major == fmt.order) |
|
|
|
|
{ |
|
|
|
|
ml = transpose(a.first); |
|
|
|
|
mr = transpose(a.second); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (fmt.formatted) { |
|
|
|
|
if(fmt.formatted) |
|
|
|
|
{ |
|
|
|
|
CTy const & l(fmt.delim_left); |
|
|
|
|
CTy const & r(fmt.delim_right); |
|
|
|
|
CTy const & s(fmt.space); |
|
|
|
@ -567,13 +585,14 @@ namespace glm |
|
|
|
|
<< 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; |
|
|
|
|
} else { |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
os << ml << fmt.space << mr; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return os; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}//namespace detail |
|
|
|
|
}//namespace glm |
|
|
|
|