From: Mikko Rasa Date: Mon, 14 Mar 2022 07:07:09 +0000 (+0200) Subject: Adapt to changes in mspmath X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=e1be82a4dfce8d90358c506f65be09da4dc9d5ec;p=libs%2Fgl.git Adapt to changes in mspmath --- diff --git a/source/core/matrix.cpp b/source/core/matrix.cpp index 54dbdff6..ff1e3af4 100644 --- a/source/core/matrix.cpp +++ b/source/core/matrix.cpp @@ -1,6 +1,6 @@ #include #include -#include +#include #include "matrix.h" using namespace std; @@ -44,17 +44,17 @@ float Matrix::operator[](unsigned i) const Matrix Matrix::translation(const Vector3 &t) { - return Geometry::AffineTransformation::translation(t).get_matrix(); + return Geometry::AffineTransform::translation(t).get_matrix(); } Matrix Matrix::rotation(const Angle &a, const Vector3 &x) { - return Geometry::AffineTransformation::rotation(a, x).get_matrix(); + return Geometry::AffineTransform::rotation(a, x).get_matrix(); } Matrix Matrix::scaling(const Vector3 &s) { - return Geometry::AffineTransformation::scaling(s).get_matrix(); + return Geometry::AffineTransform::scaling(s).get_matrix(); } Matrix Matrix::ortho(float l, float r, float b, float t, float n, float f) diff --git a/source/core/matrix.h b/source/core/matrix.h index 71531ef6..4a51ddce 100644 --- a/source/core/matrix.h +++ b/source/core/matrix.h @@ -2,16 +2,16 @@ #define MSP_GL_MATRIX_H_ #include -#include +#include #include "vector.h" namespace Msp { namespace GL { -class Matrix: public LinAl::SquareMatrix +class Matrix: public LinAl::Matrix { private: - typedef LinAl::SquareMatrix Base; + typedef LinAl::Matrix Base; typedef Geometry::Angle Angle; public: diff --git a/source/effects/environmentmap.cpp b/source/effects/environmentmap.cpp index 75905791..a59c1431 100644 --- a/source/effects/environmentmap.cpp +++ b/source/effects/environmentmap.cpp @@ -74,7 +74,7 @@ EnvironmentMap::EnvironmentMap(unsigned s, PixelFormat f, unsigned l, Renderable prefilter_shdata.uniform("roughness", 1.0f); } - shdata.uniform("env_world_matrix", LinAl::SquareMatrix::identity()); + shdata.uniform("env_world_matrix", LinAl::Matrix::identity()); } void EnvironmentMap::set_fixed_position(const Vector3 &p) diff --git a/source/render/renderer.cpp b/source/render/renderer.cpp index 2b1503ce..6bbfbbe0 100644 --- a/source/render/renderer.cpp +++ b/source/render/renderer.cpp @@ -362,7 +362,7 @@ void Renderer::apply_state() if(changed&MATRIX) { standard_shdata.uniform(world_obj_matrix_tag, state.model_matrix); - LinAl::SquareMatrix nm = state.model_matrix.block<3, 3>(0, 0); + LinAl::Matrix nm = state.model_matrix.block<3, 3>(0, 0); nm = transpose(invert(nm)); standard_shdata.uniform(world_obj_normal_matrix_tag, nm); changed &= ~MATRIX;