#include <cmath>
#include <stdexcept>
-#include <msp/geometry/affinetransformation.h>
+#include <msp/geometry/affinetransform.h>
#include "matrix.h"
using namespace std;
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)
#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:
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)
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;