summaryrefslogtreecommitdiffhomepage
path: root/Opcode/OPC_OBBCollider.cpp
diff options
context:
space:
mode:
authorFWoltermann@gmail.com <FWoltermann@gmail.com@076cb2c4-205e-83fd-5cf3-1be9aa105544>2011-12-08 16:00:07 +0000
committerFWoltermann@gmail.com <FWoltermann@gmail.com@076cb2c4-205e-83fd-5cf3-1be9aa105544>2011-12-08 16:00:07 +0000
commit78e29455c5cb4acce769498a5a32be6a3c6085b4 (patch)
treec71549e69f306cfc302d4c76b48cf99afd7f2f76 /Opcode/OPC_OBBCollider.cpp
parente33e19d0587146859d48a134ec9fd94e7b7ba5cd (diff)
downloadstarshatter-78e29455c5cb4acce769498a5a32be6a3c6085b4.zip
starshatter-78e29455c5cb4acce769498a5a32be6a3c6085b4.tar.gz
starshatter-78e29455c5cb4acce769498a5a32be6a3c6085b4.tar.bz2
Fixing up faulty references to class "Point" to "IcePoint"
Diffstat (limited to 'Opcode/OPC_OBBCollider.cpp')
-rw-r--r--Opcode/OPC_OBBCollider.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/Opcode/OPC_OBBCollider.cpp b/Opcode/OPC_OBBCollider.cpp
index a784339..d8cf63f 100644
--- a/Opcode/OPC_OBBCollider.cpp
+++ b/Opcode/OPC_OBBCollider.cpp
@@ -308,7 +308,7 @@ BOOL OBBCollider::InitQuery(OBBCache& cache, const OBB& box, const Matrix4x4* wo
{
for(udword j=0;j<3;j++)
{
- // Epsilon value prevents floating-point inaccuracies (strategy borrowed from RAPID)
+ // Epsilon value prevents floating-IcePoint inaccuracies (strategy borrowed from RAPID)
mAR.m[i][j] = 1e-6f + fabsf(mRBoxToModel.m[i][j]);
}
}
@@ -343,7 +343,7 @@ BOOL OBBCollider::InitQuery(OBBCache& cache, const OBB& box, const Matrix4x4* wo
* \return true if the OBB contains the whole box
*/
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-inline_ BOOL OBBCollider::OBBContainsBox(const Point& bc, const Point& be)
+inline_ BOOL OBBCollider::OBBContainsBox(const IcePoint& bc, const IcePoint& be)
{
// I assume if all 8 box vertices are inside the OBB, so does the whole box.
// Sounds ok but maybe there's a better way?
@@ -354,7 +354,7 @@ inline_ BOOL OBBCollider::OBBContainsBox(const Point& bc, const Point& be)
f = p.x * mRModelToBox.m[0][1] + p.y * mRModelToBox.m[1][1] + p.z * mRModelToBox.m[2][1]; if(f>mB0.y || f<mB1.y) return FALSE;\
f = p.x * mRModelToBox.m[0][2] + p.y * mRModelToBox.m[1][2] + p.z * mRModelToBox.m[2][2]; if(f>mB0.z || f<mB1.z) return FALSE;
- Point p;
+ IcePoint p;
float f;
TEST_PT(be.x, be.y, be.z)
@@ -466,8 +466,8 @@ void OBBCollider::_Collide(const AABBQuantizedNode* node)
{
// Dequantize box
const QuantizedAABB& Box = node->mAABB;
- const Point Center(float(Box.mCenter[0]) * mCenterCoeff.x, float(Box.mCenter[1]) * mCenterCoeff.y, float(Box.mCenter[2]) * mCenterCoeff.z);
- const Point Extents(float(Box.mExtents[0]) * mExtentsCoeff.x, float(Box.mExtents[1]) * mExtentsCoeff.y, float(Box.mExtents[2]) * mExtentsCoeff.z);
+ const IcePoint Center(float(Box.mCenter[0]) * mCenterCoeff.x, float(Box.mCenter[1]) * mCenterCoeff.y, float(Box.mCenter[2]) * mCenterCoeff.z);
+ const IcePoint Extents(float(Box.mExtents[0]) * mExtentsCoeff.x, float(Box.mExtents[1]) * mExtentsCoeff.y, float(Box.mExtents[2]) * mExtentsCoeff.z);
// Perform OBB-AABB overlap test
if(!BoxBoxOverlap(Extents, Center)) return;
@@ -498,8 +498,8 @@ void OBBCollider::_CollideNoPrimitiveTest(const AABBQuantizedNode* node)
{
// Dequantize box
const QuantizedAABB& Box = node->mAABB;
- const Point Center(float(Box.mCenter[0]) * mCenterCoeff.x, float(Box.mCenter[1]) * mCenterCoeff.y, float(Box.mCenter[2]) * mCenterCoeff.z);
- const Point Extents(float(Box.mExtents[0]) * mExtentsCoeff.x, float(Box.mExtents[1]) * mExtentsCoeff.y, float(Box.mExtents[2]) * mExtentsCoeff.z);
+ const IcePoint Center(float(Box.mCenter[0]) * mCenterCoeff.x, float(Box.mCenter[1]) * mCenterCoeff.y, float(Box.mCenter[2]) * mCenterCoeff.z);
+ const IcePoint Extents(float(Box.mExtents[0]) * mExtentsCoeff.x, float(Box.mExtents[1]) * mExtentsCoeff.y, float(Box.mExtents[2]) * mExtentsCoeff.z);
// Perform OBB-AABB overlap test
if(!BoxBoxOverlap(Extents, Center)) return;
@@ -574,8 +574,8 @@ void OBBCollider::_Collide(const AABBQuantizedNoLeafNode* node)
{
// Dequantize box
const QuantizedAABB& Box = node->mAABB;
- const Point Center(float(Box.mCenter[0]) * mCenterCoeff.x, float(Box.mCenter[1]) * mCenterCoeff.y, float(Box.mCenter[2]) * mCenterCoeff.z);
- const Point Extents(float(Box.mExtents[0]) * mExtentsCoeff.x, float(Box.mExtents[1]) * mExtentsCoeff.y, float(Box.mExtents[2]) * mExtentsCoeff.z);
+ const IcePoint Center(float(Box.mCenter[0]) * mCenterCoeff.x, float(Box.mCenter[1]) * mCenterCoeff.y, float(Box.mCenter[2]) * mCenterCoeff.z);
+ const IcePoint Extents(float(Box.mExtents[0]) * mExtentsCoeff.x, float(Box.mExtents[1]) * mExtentsCoeff.y, float(Box.mExtents[2]) * mExtentsCoeff.z);
// Perform OBB-AABB overlap test
if(!BoxBoxOverlap(Extents, Center)) return;
@@ -601,8 +601,8 @@ void OBBCollider::_CollideNoPrimitiveTest(const AABBQuantizedNoLeafNode* node)
{
// Dequantize box
const QuantizedAABB& Box = node->mAABB;
- const Point Center(float(Box.mCenter[0]) * mCenterCoeff.x, float(Box.mCenter[1]) * mCenterCoeff.y, float(Box.mCenter[2]) * mCenterCoeff.z);
- const Point Extents(float(Box.mExtents[0]) * mExtentsCoeff.x, float(Box.mExtents[1]) * mExtentsCoeff.y, float(Box.mExtents[2]) * mExtentsCoeff.z);
+ const IcePoint Center(float(Box.mCenter[0]) * mCenterCoeff.x, float(Box.mCenter[1]) * mCenterCoeff.y, float(Box.mCenter[2]) * mCenterCoeff.z);
+ const IcePoint Extents(float(Box.mExtents[0]) * mExtentsCoeff.x, float(Box.mExtents[1]) * mExtentsCoeff.y, float(Box.mExtents[2]) * mExtentsCoeff.z);
// Perform OBB-AABB overlap test
if(!BoxBoxOverlap(Extents, Center)) return;