summaryrefslogtreecommitdiffhomepage
path: root/Opcode/OPC_RayCollider.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_RayCollider.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_RayCollider.cpp')
-rw-r--r--Opcode/OPC_RayCollider.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/Opcode/OPC_RayCollider.cpp b/Opcode/OPC_RayCollider.cpp
index 92c5a9b..875ae12 100644
--- a/Opcode/OPC_RayCollider.cpp
+++ b/Opcode/OPC_RayCollider.cpp
@@ -26,7 +26,7 @@
* - d = distance between P0 and P1
* - Origin = P0
* - Direction = (P1 - P0) / d = normalized direction vector
- * - A parameter t such as a point P on the line (P0,P1) is P = Origin + t * Direction
+ * - A parameter t such as a IcePoint P on the line (P0,P1) is P = Origin + t * Direction
* - t = 0 --> P = P0
* - t = d --> P = P1
*
@@ -34,8 +34,8 @@
*
* struct Ray
* {
- * Point Origin;
- * Point Direction;
+ * IcePoint Origin;
+ * IcePoint Direction;
* };
*
* But it actually maps three different things:
@@ -178,7 +178,7 @@ using namespace Opcode;
/* Perform ray-tri overlap test and return */ \
if(RayTriOverlap(*VP.Vertex[0], *VP.Vertex[1], *VP.Vertex[2])) \
{ \
- /* Intersection point is valid if dist < segment's length */ \
+ /* Intersection IcePoint is valid if dist < segment's length */ \
/* We know dist>0 so we can use integers */ \
if(IR(mStabbedFace.mDistance)<IR(mMaxDist)) \
{ \
@@ -392,8 +392,8 @@ BOOL RayCollider::InitQuery(const Ray& world_ray, const Matrix4x4* world, udword
// Perform ray-cached tri overlap test
if(RayTriOverlap(*VP.Vertex[0], *VP.Vertex[1], *VP.Vertex[2]))
{
- // Intersection point is valid if:
- // - distance is positive (else it can just be a face behind the orig point)
+ // Intersection IcePoint is valid if:
+ // - distance is positive (else it can just be a face behind the orig IcePoint)
// - distance is smaller than a given max distance (useful for shadow feelers)
// if(mStabbedFace.mDistance>0.0f && mStabbedFace.mDistance<mMaxDist)
if(IR(mStabbedFace.mDistance)<IR(mMaxDist)) // The other test is already performed in RayTriOverlap
@@ -519,8 +519,8 @@ void RayCollider::_SegmentStab(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 Segment-AABB overlap test
if(!SegmentAABBOverlap(Center, Extents)) return;
@@ -575,8 +575,8 @@ void RayCollider::_SegmentStab(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 Segment-AABB overlap test
if(!SegmentAABBOverlap(Center, Extents)) return;
@@ -606,7 +606,7 @@ void RayCollider::_SegmentStab(const AABBQuantizedNoLeafNode* node)
void RayCollider::_SegmentStab(const AABBTreeNode* node, Container& box_indices)
{
// Test the box against the segment
- Point Center, Extents;
+ IcePoint Center, Extents;
node->GetAABB()->GetCenter(Center);
node->GetAABB()->GetExtents(Extents);
if(!SegmentAABBOverlap(Center, Extents)) return;
@@ -657,8 +657,8 @@ void RayCollider::_RayStab(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 Ray-AABB overlap test
if(!RayAABBOverlap(Center, Extents)) return;
@@ -713,8 +713,8 @@ void RayCollider::_RayStab(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 Ray-AABB overlap test
if(!RayAABBOverlap(Center, Extents)) return;
@@ -744,7 +744,7 @@ void RayCollider::_RayStab(const AABBQuantizedNoLeafNode* node)
void RayCollider::_RayStab(const AABBTreeNode* node, Container& box_indices)
{
// Test the box against the ray
- Point Center, Extents;
+ IcePoint Center, Extents;
node->GetAABB()->GetCenter(Center);
node->GetAABB()->GetExtents(Extents);
if(!RayAABBOverlap(Center, Extents)) return;