alot more changes here added some matrix functions
most of the point3 and point4 is now converted over to simd functions
matrix now has a lot done by simd but transpose/normal/affine inverse/ inverse still to do
This commit is contained in:
marauder2k7 2026-02-25 20:36:53 +00:00
parent 8908bbe462
commit fb986e375d
5 changed files with 336 additions and 44 deletions

View file

@ -396,7 +396,7 @@ inline MatrixF& MatrixF::transpose()
inline MatrixF& MatrixF::scale(const Point3F& p)
{
m_matF_scale(m,p);
math_backend::float_mat4x4::scale(m,p);
return *this;
}
@ -419,7 +419,7 @@ inline MatrixF& MatrixF::mul( const MatrixF &a )
AssertFatal(&a != this, "MatrixF::mul - a.mul(a) is invalid!");
MatrixF tempThis(*this);
m_matF_x_matF(tempThis, a, *this);
math_backend::float_mat4x4::multiply_mat4(tempThis, a, *this);
return (*this);
}
@ -428,7 +428,7 @@ inline MatrixF& MatrixF::mulL( const MatrixF &a )
AssertFatal(&a != this, "MatrixF::mulL - a.mul(a) is invalid!");
MatrixF tempThis(*this);
m_matF_x_matF(a, tempThis, *this);
math_backend::float_mat4x4::multiply_mat4(a, tempThis, *this);
return (*this);
}
@ -436,7 +436,7 @@ inline MatrixF& MatrixF::mul( const MatrixF &a, const MatrixF &b )
{ // a * b -> M
AssertFatal((&a != this) && (&b != this), "MatrixF::mul - a.mul(a, b) a.mul(b, a) a.mul(a, a) is invalid!");
m_matF_x_matF(a, b, *this);
math_backend::float_mat4x4::multiply_mat4(a, b, *this);
return (*this);
}
@ -461,36 +461,36 @@ inline MatrixF& MatrixF::mul(const MatrixF &a, const F32 b)
inline void MatrixF::mul( Point4F& p ) const
{
Point4F temp;
m_matF_x_point4F(*this, &p.x, &temp.x);
math_backend::float_mat4x4::multiply_float4(*this, &p.x, &temp.x);
p = temp;
}
inline void MatrixF::mulP( Point3F& p) const
{
// M * p -> d
Point3F d;
m_matF_x_point3F(*this, &p.x, &d.x);
p = d;
Point3F temp;
math_backend::float_mat4x4::multiply_float3(*this, &p.x, &temp.x);
p = temp;
}
inline void MatrixF::mulP( const Point3F &p, Point3F *d) const
{
// M * p -> d
m_matF_x_point3F(*this, &p.x, &d->x);
math_backend::float_mat4x4::multiply_float3(*this, &p.x, &d->x);
}
inline void MatrixF::mulV( VectorF& v) const
{
// M * v -> v
VectorF temp;
m_matF_x_vectorF(*this, &v.x, &temp.x);
math_backend::float_mat4x4::multiply_vector(*this, &v.x, &temp.x);
v = temp;
}
inline void MatrixF::mulV( const VectorF &v, Point3F *d) const
{
// M * v -> d
m_matF_x_vectorF(*this, &v.x, &d->x);
math_backend::float_mat4x4::multiply_vector(*this, &v.x, &d->x);
}
inline void MatrixF::mul(Box3F& b) const