mirror of https://github.com/PrimeDecomp/prime.git
Better CVector3f::Cross; link CVector3f/CModVectorElement
Thanks @1superchip for the help
This commit is contained in:
parent
3a933dcd24
commit
539b269d01
|
@ -26512,7 +26512,7 @@ lbl_805AE630 = .sdata2:0x805AE630; // type:object size:0x4 data:float
|
|||
lbl_805AE634 = .sdata2:0x805AE634; // type:object size:0x4 data:float
|
||||
lbl_805AE638 = .sdata2:0x805AE638; // type:object size:0x4 data:float
|
||||
lbl_805AE63C = .sdata2:0x805AE63C; // type:object size:0x4 data:float
|
||||
lbl_805AE640 = .sdata2:0x805AE640; // type:object size:0x8 data:float
|
||||
lbl_805AE640 = .sdata2:0x805AE640; // type:object size:0x4 data:float
|
||||
lbl_805AE648 = .sdata2:0x805AE648; // type:object size:0x4 data:float
|
||||
lbl_805AE64C = .sdata2:0x805AE64C; // type:object size:0x4 data:float
|
||||
lbl_805AE650 = .sdata2:0x805AE650; // type:object size:0x4 data:float
|
||||
|
|
|
@ -919,7 +919,7 @@ config.libs = [
|
|||
Object(Matching, "Kyoto/Math/CVector2f.cpp"),
|
||||
Object(Matching, "Kyoto/Math/CVector2i.cpp"),
|
||||
Object(Matching, "Kyoto/Math/CVector3d.cpp"),
|
||||
Object(NonMatching, "Kyoto/Math/CVector3f.cpp"),
|
||||
Object(Matching, "Kyoto/Math/CVector3f.cpp"),
|
||||
Object(Matching, "Kyoto/Math/CVector3i.cpp"),
|
||||
Object(NonMatching, "Kyoto/Math/RMathUtils.cpp"),
|
||||
Object(Matching, "Kyoto/CCrc32.cpp"),
|
||||
|
@ -931,7 +931,7 @@ config.libs = [
|
|||
Object(Matching, "Kyoto/Particles/CColorElement.cpp"),
|
||||
Object(NonMatching, "Kyoto/Particles/CElementGen.cpp"),
|
||||
Object(Matching, "Kyoto/Particles/CIntElement.cpp"),
|
||||
Object(NonMatching, "Kyoto/Particles/CModVectorElement.cpp"),
|
||||
Object(Matching, "Kyoto/Particles/CModVectorElement.cpp"),
|
||||
Object(NonMatching, "Kyoto/Particles/CParticleDataFactory.cpp"),
|
||||
Object(Matching, "Kyoto/Particles/CParticleGen.cpp"),
|
||||
Object(Matching, "Kyoto/Particles/CParticleGlobals.cpp"),
|
||||
|
|
|
@ -24,9 +24,9 @@ public:
|
|||
CVector3f(CInputStream& in);
|
||||
void PutTo(COutputStream& out) const;
|
||||
|
||||
float GetX() const { return mX; }
|
||||
float GetY() const { return mY; }
|
||||
float GetZ() const { return mZ; }
|
||||
const float GetX() const { return mX; }
|
||||
const float GetY() const { return mY; }
|
||||
const float GetZ() const { return mZ; }
|
||||
|
||||
void SetX(float x) { mX = x; }
|
||||
void SetY(float y) { mY = y; }
|
||||
|
@ -55,12 +55,12 @@ public:
|
|||
}
|
||||
inline float MagSquared() const { return GetX() * GetX() + GetY() * GetY() + GetZ() * GetZ(); }
|
||||
static CVector3f Cross(const CVector3f& lhs, const CVector3f& rhs) {
|
||||
const float lX = lhs.mX;
|
||||
const float lY = lhs.mY;
|
||||
const float lZ = lhs.mZ;
|
||||
const float rX = rhs.mX;
|
||||
const float rY = rhs.mY;
|
||||
const float rZ = rhs.mZ;
|
||||
const float lX = lhs.GetX();
|
||||
const float lY = lhs.GetY();
|
||||
const float lZ = lhs.GetZ();
|
||||
const float rX = rhs.GetX();
|
||||
const float rY = rhs.GetY();
|
||||
const float rZ = rhs.GetZ();
|
||||
float z = lX * rY - rX * lY;
|
||||
float y = lZ * rX - rZ * lX;
|
||||
float x = lY * rZ - rY * lZ;
|
||||
|
|
|
@ -71,7 +71,7 @@ bool CVector3f::IsNotInf() const {
|
|||
return true;
|
||||
}
|
||||
|
||||
bool CVector3f::IsMagnitudeSafe() const { return IsNotInf() && MagSquared() >= 9.999999e-29f; }
|
||||
bool CVector3f::IsMagnitudeSafe() const { return IsNotInf() && MagSquared() >= 9.9999995e-29f; }
|
||||
|
||||
bool CVector3f::CanBeNormalized() const {
|
||||
int x = __HI(mX);
|
||||
|
|
|
@ -285,11 +285,10 @@ bool CMVESwirl::GetValue(int frame, CVector3f& pVel, CVector3f& pPos) const {
|
|||
xc_filterGain->GetValue(frame, c);
|
||||
x10_tangentialVelocity->GetValue(frame, d);
|
||||
|
||||
// CVector3f cross = ;
|
||||
pVel = c * (
|
||||
pVel = (
|
||||
b * CVector3f::Dot(b, pVel) +
|
||||
d * CVector3f::Cross(b, posToHelix)
|
||||
) + (1.f - c) * pVel;
|
||||
) * c + (1.f - c) * pVel;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue