Changeset 2908 for code/branches/questsystem5/src/bullet/BulletCollision/BroadphaseCollision/btDbvt.h
- Timestamp:
- Apr 8, 2009, 12:58:47 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
r2907 r2908 58 58 59 59 //SSE gives errors on a MSVC 7.1 60 #if def BT_USE_SSE60 #if (defined (WIN32) && (_MSC_VER) && _MSC_VER >= 1400) && (!defined (BT_USE_DOUBLE_PRECISION)) 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*) 1;(void)typechecker;85 #define DBVT_CHECKTYPE static const ICollide& typechecker=*(T*)0; 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 149 DBVT_INLINE friend bool Intersect( const btDbvtAabbMm& a, 150 const btDbvtAabbMm& b, 151 const btTransform& xform); 150 152 DBVT_INLINE friend bool Intersect( const btDbvtAabbMm& a, 151 153 const btVector3& b); … … 303 305 const btDbvtNode* root1, 304 306 DBVT_IPOLICY); 305 #if 0 307 306 308 DBVT_PREFIX 307 309 void collideTT( const btDbvtNode* root0, … … 315 317 const btTransform& xform1, 316 318 DBVT_IPOLICY); 317 #endif318 319 319 DBVT_PREFIX 320 320 void collideTV( const btDbvtNode* root, … … 531 531 } 532 532 533 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 } 534 548 535 549 // … … 835 849 } 836 850 837 #if 0 851 838 852 // 839 853 DBVT_PREFIX … … 891 905 } 892 906 } 907 893 908 // 894 909 DBVT_PREFIX … … 902 917 collideTT(root0,root1,xform,policy); 903 918 } 904 #endif905 919 906 920 //
Note: See TracChangeset
for help on using the changeset viewer.