mirror of
https://github.com/PrimeDecomp/prime.git
synced 2025-12-11 19:43:58 +00:00
@@ -8,6 +8,7 @@ public:
|
||||
CAABox() {
|
||||
// TODO
|
||||
}
|
||||
CAABox(const CVector3f& min, const CVector3f& max);// : min(min), max(max) {}
|
||||
|
||||
static CAABox mskInvertedBox;
|
||||
static CAABox mskNullBox;
|
||||
|
||||
@@ -101,13 +101,34 @@ inline bool operator!=(const CVector3f& lhs, const CVector3f& rhs) {
|
||||
return lhs.GetX() != rhs.GetX() || lhs.GetY() != rhs.GetY() || lhs.GetZ() != rhs.GetZ();
|
||||
}
|
||||
inline CVector3f operator-(const CVector3f& lhs, const CVector3f& rhs) {
|
||||
return CVector3f(lhs.GetX() - rhs.GetX(), lhs.GetY() - rhs.GetY(), lhs.GetZ() - rhs.GetZ());
|
||||
f32 x = lhs.GetX() - rhs.GetX();
|
||||
f32 y = lhs.GetY() - rhs.GetY();
|
||||
f32 z = lhs.GetZ() - rhs.GetZ();
|
||||
return CVector3f(x, y, z);
|
||||
}
|
||||
inline CVector3f operator+(const CVector3f& lhs, const CVector3f& rhs) {
|
||||
return CVector3f(lhs.GetX() + rhs.GetX(), lhs.GetY() + rhs.GetY(), lhs.GetZ() + rhs.GetZ());
|
||||
f32 x = lhs.GetX() + rhs.GetX();
|
||||
f32 y = lhs.GetY() + rhs.GetY();
|
||||
f32 z = lhs.GetZ() + rhs.GetZ();
|
||||
return CVector3f(x, y, z);
|
||||
}
|
||||
inline CVector3f operator*(const CVector3f& vec, f32 f) {
|
||||
f32 x = vec.GetX() * f;
|
||||
f32 y = vec.GetY() * f;
|
||||
f32 z = vec.GetZ() * f;
|
||||
return CVector3f(x, y, z);
|
||||
}
|
||||
inline CVector3f operator/(const CVector3f& vec, f32 f) {
|
||||
f32 x = vec.GetX() / f;
|
||||
f32 y = vec.GetY() / f;
|
||||
f32 z = vec.GetZ() / f;
|
||||
return CVector3f(x, y, z);
|
||||
}
|
||||
inline CVector3f operator-(const CVector3f& vec) {
|
||||
f32 x = -vec.GetX();
|
||||
f32 y = -vec.GetY();
|
||||
f32 z = -vec.GetZ();
|
||||
return CVector3f(x, y, z);
|
||||
}
|
||||
inline CVector3f operator*(const CVector3f& vec, f32 f) { return CVector3f(vec.GetX() * f, vec.GetY() * f, vec.GetZ() * f); }
|
||||
inline CVector3f operator/(const CVector3f& vec, f32 f) { return CVector3f(vec.GetX() / f, vec.GetY() / f, vec.GetZ() / f); }
|
||||
inline CVector3f operator-(const CVector3f& vec) { return CVector3f(-vec.GetX(), -vec.GetY(), -vec.GetZ()); }
|
||||
|
||||
#endif // __CVECTOR3F_HPP__
|
||||
|
||||
Reference in New Issue
Block a user