]> git.tdb.fi Git - libs/gl.git/commitdiff
Adapt to changes in mspmath
authorMikko Rasa <tdb@tdb.fi>
Mon, 14 Mar 2022 07:07:09 +0000 (09:07 +0200)
committerMikko Rasa <tdb@tdb.fi>
Mon, 14 Mar 2022 07:07:09 +0000 (09:07 +0200)
source/core/matrix.cpp
source/core/matrix.h
source/effects/environmentmap.cpp
source/render/renderer.cpp

index 54dbdff6ca0c2355105a523c54352c543bb13458..ff1e3af49c3a0fd8cd1280c3e6b37e1078179c8e 100644 (file)
@@ -1,6 +1,6 @@
 #include <cmath>
 #include <stdexcept>
-#include <msp/geometry/affinetransformation.h>
+#include <msp/geometry/affinetransform.h>
 #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<float, 3>::translation(t).get_matrix();
+       return Geometry::AffineTransform<float, 3>::translation(t).get_matrix();
 }
 
 Matrix Matrix::rotation(const Angle &a, const Vector3 &x)
 {
-       return Geometry::AffineTransformation<float, 3>::rotation(a, x).get_matrix();
+       return Geometry::AffineTransform<float, 3>::rotation(a, x).get_matrix();
 }
 
 Matrix Matrix::scaling(const Vector3 &s)
 {
-       return Geometry::AffineTransformation<float, 3>::scaling(s).get_matrix();
+       return Geometry::AffineTransform<float, 3>::scaling(s).get_matrix();
 }
 
 Matrix Matrix::ortho(float l, float r, float b, float t, float n, float f)
index 71531ef68b2e4d17abd27fa7bed70be7154edcbd..4a51ddce65da8af12b2c1efd04e9ed10d08027d4 100644 (file)
@@ -2,16 +2,16 @@
 #define MSP_GL_MATRIX_H_
 
 #include <msp/geometry/angle.h>
-#include <msp/linal/squarematrix.h>
+#include <msp/linal/matrix.h>
 #include "vector.h"
 
 namespace Msp {
 namespace GL {
 
-class Matrix: public LinAl::SquareMatrix<float, 4>
+class Matrix: public LinAl::Matrix<float, 4, 4>
 {
 private:
-       typedef LinAl::SquareMatrix<float, 4> Base;
+       typedef LinAl::Matrix<float, 4, 4> Base;
        typedef Geometry::Angle<float> Angle;
 
 public:
index 7590579192b868951014adfa8072f71de493ba1a..a59c14315faf20a6b7ac0ac107835ed59176e9cc 100644 (file)
@@ -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<float, 3>::identity());
+       shdata.uniform("env_world_matrix", LinAl::Matrix<float, 3, 3>::identity());
 }
 
 void EnvironmentMap::set_fixed_position(const Vector3 &p)
index 2b1503ce23c847b025b75325e2b7e2cb13960a53..6bbfbbe0d0785628b89d1ec7c84608b2f0905b93 100644 (file)
@@ -362,7 +362,7 @@ void Renderer::apply_state()
        if(changed&MATRIX)
        {
                standard_shdata.uniform(world_obj_matrix_tag, state.model_matrix);
-               LinAl::SquareMatrix<float, 3> nm = state.model_matrix.block<3, 3>(0, 0);
+               LinAl::Matrix<float, 3, 3> nm = state.model_matrix.block<3, 3>(0, 0);
                nm = transpose(invert(nm));
                standard_shdata.uniform(world_obj_normal_matrix_tag, nm);
                changed &= ~MATRIX;