logging
parent
b5ea7a1e15
commit
7300f895bb
|
@ -1,6 +1,6 @@
|
||||||
cmake_minimum_required(VERSION 3.20)
|
cmake_minimum_required(VERSION 3.20)
|
||||||
include(cmake/color.cmake)
|
include(cmake/color.cmake)
|
||||||
set(BLT_VERSION 0.20.14)
|
set(BLT_VERSION 0.20.15)
|
||||||
set(BLT_TEST_VERSION 0.0.1)
|
set(BLT_TEST_VERSION 0.0.1)
|
||||||
|
|
||||||
set(BLT_TARGET BLT)
|
set(BLT_TARGET BLT)
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
namespace blt
|
namespace blt
|
||||||
{
|
{
|
||||||
|
|
||||||
template<typename Writer = blt::logging::logger, typename T, blt::u32 size>
|
template<typename T, blt::u32 size, typename CharT, typename Traits>
|
||||||
static inline Writer& operator<<(Writer& log, const blt::vec<T, size>& vec)
|
static inline std::basic_ostream<CharT, Traits>& operator<<(std::basic_ostream<CharT, Traits>& log, const blt::vec<T, size>& vec)
|
||||||
{
|
{
|
||||||
std::string type_string;
|
std::string type_string;
|
||||||
const auto tstr = blt::type_string<T>();
|
const auto tstr = blt::type_string<T>();
|
||||||
|
@ -45,8 +45,8 @@ namespace blt
|
||||||
return log;
|
return log;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename Writer = std::ostream>
|
template<typename CharT, typename Traits>
|
||||||
inline Writer& operator<<(Writer& out, const mat4x4& v)
|
inline std::basic_ostream<CharT, Traits>& operator<<(std::basic_ostream<CharT, Traits>& out, const mat4x4& v)
|
||||||
{
|
{
|
||||||
out << "Mat4x4(";
|
out << "Mat4x4(";
|
||||||
out << "{" << v.m00() << ", " << v.m01() << ", " << v.m02() << ", " << v.m03() << "},";
|
out << "{" << v.m00() << ", " << v.m01() << ", " << v.m02() << ", " << v.m03() << "},";
|
||||||
|
|
|
@ -175,6 +175,18 @@ namespace blt
|
||||||
return data[column][row] = value;
|
return data[column][row] = value;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Takes a value stored across a row, taking one from each column in the specified row
|
||||||
|
* @param row the row to extract from. defaults to the first row
|
||||||
|
*/
|
||||||
|
constexpr inline vec<T, columns> vec_from_column_row(blt::u32 row = 0)
|
||||||
|
{
|
||||||
|
vec<T, columns> ret;
|
||||||
|
for (blt::u32 j = 0; j < columns; j++)
|
||||||
|
ret[j] = data[j][row];
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Assign to this matrix from the row information in each column of a matrix
|
* Assign to this matrix from the row information in each column of a matrix
|
||||||
* Where columns can be assigned directly from each-other, row stored data must be assigned this way
|
* Where columns can be assigned directly from each-other, row stored data must be assigned this way
|
||||||
|
|
Loading…
Reference in New Issue