Halfway match CAABox; continue CBallCamera

Former-commit-id: 602109d8f0
This commit is contained in:
2022-09-29 19:55:38 -04:00
parent 8f3807da18
commit 1f56cefe8c
41 changed files with 1023 additions and 173 deletions

View File

@@ -3,41 +3,73 @@
#include "Kyoto/Math/CVector3f.hpp"
class CInputStream;
class CLineSeg;
class CPlane;
class CTransform4f;
class CTri;
class CAABox {
public:
// CAABox() {
// // TODO
// }
CAABox(const CVector3f& min, const CVector3f& max); // : min(min), max(max) {}
enum EBoxEdgeId {
kE_Z0,
kE_X0,
kE_Z1,
kE_X1,
kE_Z2,
kE_X2,
kE_Z3,
kE_X3,
kE_Y0,
kE_Y1,
kE_Y2,
kE_Y3,
};
enum EBoxFaceId {
kF_YMin,
kF_YMax,
kF_XMin,
kF_XMax,
kF_ZMax,
kF_ZMin,
};
CAABox(const CVector3f& min, const CVector3f& max);
CAABox(f32 minX, f32 minY, f32 minZ, f32 maxX, f32 maxY, f32 maxZ)
: min(minX, minY, minZ), max(maxX, maxY, maxZ) {}
CAABox(CInputStream& in);
// CAABox(const CAABox& other)
// : minX(other.minX)
// , minY(other.minY)
// , minZ(other.minZ)
// , maxX(other.maxX)
// , maxY(other.maxY)
// , maxZ(other.maxZ) {}
// : min(other.min)
// , max(other.max) {}
CAABox& operator=(const CAABox&);
// CAABox& operator=(const CAABox& other) {
// min = other.min;
// max = other.max;
// return *this;
// }
CLineSeg GetEdge(EBoxEdgeId edge) const;
CTri GetTri(EBoxFaceId face, int windOffset) const;
CVector3f ClosestPointAlongVector(const CVector3f& vec) const;
// FurthestPointAlongVector__6CAABoxCFRC9CVector3f global
CVector3f FurthestPointAlongVector(const CVector3f& vec) const;
const CVector3f& GetMinPoint() const { return min; }
const CVector3f& GetMaxPoint() const { return max; }
// GetCenterPoint__6CAABoxCFv global
// GetPoint__6CAABoxCFi global
// Include__6CAABoxFRC9CVector3f weak
// Include__6CAABoxFRC6CAABox weak
// AccumulateBounds__6CAABoxFRC9CVector3f global
void AccumulateBounds(const CVector3f&);
// bool Invalid__6CAABoxCFv global
// PointInside__6CAABoxCFRC9CVector3f global
// InsidePlane__6CAABoxCFRC6CPlane global
// DoBoundsOverlap__6CAABoxCFRC6CAABox global
bool DoBoundsOverlap(const CAABox&) const;
// GetVolume__6CAABoxCFv global
// GetBooleanIntersection__6CAABoxCFRC6CAABox global
// Inside__6CAABoxCFRC6CAABox global
// ClampToBox__6CAABoxCFRC9CVector3f global
bool Inside(const CAABox& other) const;
bool InsidePlane(const CPlane& plane) const;
CVector3f ClampToBox(const CVector3f& vec) const;
// GetTri__6CAABoxCFQ26CAABox10EBoxFaceIdi global
// DistanceBetween__6CAABoxFRC6CAABoxRC6CAABox global
CAABox GetTransformedAABox(const CTransform4f& xf) const;
// GetPointA__6CAABoxCFv weak
// GetPointB__6CAABoxCFv weak
@@ -54,8 +86,6 @@ public:
// GetTri__6CAABoxCFii weak
// GetEdge__6CAABoxCFi weak
// GetTransformedAABox__6CAABoxCFRC12CTransform4f
static const CAABox& Identity() { return mskNullBox; }
static const CAABox& MakeMaxInvertedBox() { return mskInvertedBox; }
// MakeNullBox__6CAABoxFv ??