Changeset 2907 for code/branches/questsystem5/src/bullet/BulletCollision/BroadphaseCollision/btDbvt.h
- Timestamp:
- Apr 8, 2009, 12:36:08 AM (16 years ago)
- Location:
- code/branches/questsystem5
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/questsystem5
- Property svn:mergeinfo changed
-
code/branches/questsystem5/src/bullet/BulletCollision/BroadphaseCollision/btDbvt.h
r2662 r2907 58 58 59 59 //SSE gives errors on a MSVC 7.1 60 #if (defined (WIN32) && (_MSC_VER) && _MSC_VER >= 1400) && (!defined (BT_USE_DOUBLE_PRECISION))60 #ifdef BT_USE_SSE 61 61 #define DBVT_SELECT_IMPL DBVT_IMPL_SSE 62 62 #define DBVT_MERGE_IMPL DBVT_IMPL_SSE … … 83 83 #define DBVT_PREFIX template <typename T> 84 84 #define DBVT_IPOLICY T& policy 85 #define DBVT_CHECKTYPE static const ICollide& typechecker=*(T*) 0;85 #define DBVT_CHECKTYPE static const ICollide& typechecker=*(T*)1;(void)typechecker; 86 86 #else 87 87 #define DBVT_VIRTUAL_DTOR(a) virtual ~a() {} … … 147 147 DBVT_INLINE friend bool Intersect( const btDbvtAabbMm& a, 148 148 const btDbvtAabbMm& b); 149 DBVT_INLINE friend bool Intersect( const btDbvtAabbMm& a, 150 const btDbvtAabbMm& b, 151 const btTransform& xform); 149 152 150 DBVT_INLINE friend bool Intersect( const btDbvtAabbMm& a, 153 151 const btVector3& b); … … 305 303 const btDbvtNode* root1, 306 304 DBVT_IPOLICY); 307 305 #if 0 308 306 DBVT_PREFIX 309 307 void collideTT( const btDbvtNode* root0, … … 317 315 const btTransform& xform1, 318 316 DBVT_IPOLICY); 317 #endif 318 319 319 DBVT_PREFIX 320 320 void collideTV( const btDbvtNode* root, … … 531 531 } 532 532 533 // 534 DBVT_INLINE bool Intersect( const btDbvtAabbMm& a, 535 const btDbvtAabbMm& b, 536 const btTransform& xform) 537 { 538 const btVector3 d0=xform*b.Center()-a.Center(); 539 const btVector3 d1=d0*xform.getBasis(); 540 btScalar s0[2]={0,0}; 541 btScalar s1[2]={dot(xform.getOrigin(),d0),s1[0]}; 542 a.AddSpan(d0,s0[0],s0[1]); 543 b.AddSpan(d1,s1[0],s1[1]); 544 if(s0[0]>(s1[1])) return(false); 545 if(s0[1]<(s1[0])) return(false); 546 return(true); 547 } 533 548 534 549 535 // … … 849 835 } 850 836 851 837 #if 0 852 838 // 853 839 DBVT_PREFIX … … 905 891 } 906 892 } 907 908 893 // 909 894 DBVT_PREFIX … … 917 902 collideTT(root0,root1,xform,policy); 918 903 } 904 #endif 919 905 920 906 //
Note: See TracChangeset
for help on using the changeset viewer.