|
From: <axl...@us...> - 2009-03-03 22:30:37
|
Revision: 175
http://hgengine.svn.sourceforge.net/hgengine/?rev=175&view=rev
Author: axlecrusher
Date: 2009-03-03 22:30:27 +0000 (Tue, 03 Mar 2009)
Log Message:
-----------
fix bounding box check
Modified Paths:
--------------
Mercury2/src/MercuryPlane.cpp
Modified: Mercury2/src/MercuryPlane.cpp
===================================================================
--- Mercury2/src/MercuryPlane.cpp 2009-03-03 21:44:02 UTC (rev 174)
+++ Mercury2/src/MercuryPlane.cpp 2009-03-03 22:30:27 UTC (rev 175)
@@ -19,9 +19,11 @@
x += ABS( extends.GetY() * m_normal.DotProduct( A2 ) );
x += ABS( extends.GetZ() * m_normal.DotProduct( A3 ) );
- float d = m_normal.DotProduct( m_center );
+ float d = m_normal.DotProduct( center+m_center );
+ if ( ABS(d) <= x ) //intersection
+ return false;
- return ABS( d ) > x;
+ return IsBehindPlane( center ); //if we don't intersect, just see what side we are on
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|