mirror of
https://github.com/zeldaret/ss
synced 2026-09-01 09:32:58 -04:00
Formatting + dtk Update
This commit is contained in:
@@ -9,8 +9,7 @@ namespace EGG {
|
||||
struct Matrix34f {
|
||||
Matrix34f() {}
|
||||
/* 8049acd0 */
|
||||
Matrix34f(f32 xx, f32 xy, f32 xz, f32 xw, f32 yx, f32 yy, f32 yz, f32 yw, f32 zx, f32 zy,
|
||||
f32 zz, f32 zw);
|
||||
Matrix34f(f32 xx, f32 xy, f32 xz, f32 xw, f32 yx, f32 yy, f32 yz, f32 yw, f32 zx, f32 zy, f32 zz, f32 zw);
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
f32 operator()(int i, int j) const {
|
||||
@@ -26,6 +25,8 @@ struct Matrix34f {
|
||||
return arr[i];
|
||||
}
|
||||
|
||||
/* */ void rotateBaseX(Vector3f &, Matrix34f &);
|
||||
/* */ void rotateVectorChange(Vector3f &, Vector3f &, Matrix34f &);
|
||||
/* 8049ac70 */ void inverseTo(Matrix34f &to) const;
|
||||
/* 8049ac80 */ void inverseTransposeTo(Matrix34f &to) const;
|
||||
/* 8049ac90 */ void makeIdentity();
|
||||
@@ -41,7 +42,7 @@ struct Matrix34f {
|
||||
/* */ void makeT(const Vector3f &t);
|
||||
/* 8049ae90 */ void fromQuat(const Quatf &q);
|
||||
/* 8049af40 */ void toQuat(Quatf &q) const;
|
||||
/* 8049b250 */ void slerpTo(const Matrix34f &, Matrix34f &, f32) const;
|
||||
/* 8049b250 */ void slerpTo(const Matrix34f &, Matrix34f &, f32);
|
||||
/* */ void copyTo16(f32 *pf) const;
|
||||
/* 8049b2d0 */ void setAxisRotation(const Vector3f &, f32);
|
||||
/* */ Vector3f multVector(const Vector3f &vec) const;
|
||||
|
||||
@@ -9,7 +9,7 @@ struct Quatf : Vector3f {
|
||||
Quatf() {}
|
||||
Quatf(f32 f, Vector3f v) : w(f), Vector3f(v) {}
|
||||
|
||||
// ~Quatf() {}
|
||||
~Quatf() {}
|
||||
|
||||
friend Quatf operator*(const Quatf &q, const Vector3f &vec) {
|
||||
Vector3f crossed = q.cross(vec);
|
||||
@@ -46,13 +46,10 @@ struct Quatf : Vector3f {
|
||||
/* 8049bbb0 */ void makeVectorRotation(Vector3f &, Vector3f &);
|
||||
|
||||
f32 dot(const Quatf &q) const {
|
||||
return q.Vector3f::dot(q) + w * q.w;
|
||||
}
|
||||
f32 squaredLength() const {
|
||||
return w * w + x * x + y * y + z * z;
|
||||
return w * w + q.x * q.x + q.y * q.y + q.z * q.z;
|
||||
}
|
||||
f32 length() const {
|
||||
return Math<f32>::sqrt(squaredLength());
|
||||
return Math<f32>::sqrt(dot(*this));
|
||||
}
|
||||
void multScalar(f32 s) {
|
||||
w *= s;
|
||||
|
||||
@@ -83,12 +83,11 @@ struct Vector3f : public nw4r::math::VEC3 {
|
||||
return x * v.x + y * v.y + z * v.z;
|
||||
}
|
||||
Vector3f cross(const Vector3f &b) const { // cross__Q23EGG8Vector3fCFRCQ23EGG8Vector3f
|
||||
Vector3f v;
|
||||
|
||||
f32 _x = (y * b.z) - (z * b.y);
|
||||
f32 _y = (z * b.x) - (x * b.z);
|
||||
f32 _z = (x * b.y) - (y * b.x);
|
||||
v.set(_x, _y, _z);
|
||||
return v;
|
||||
return Vector3f(_x, _y, _z);
|
||||
}
|
||||
f32 squaredLength() const {
|
||||
return (x * x + y * y + z * z);
|
||||
@@ -132,4 +131,4 @@ public:
|
||||
/* 805767f0 */ static const Vector3s ez;
|
||||
};
|
||||
|
||||
} // namespace EGG
|
||||
} // namespace EGG
|
||||
|
||||
Reference in New Issue
Block a user