Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 8, 2009, 12:58:47 AM (16 years ago)
Author:
dafrick
Message:

Reverted to revision 2906 (because I'm too stupid to merge correctly, 2nd try will follow shortly. ;))

Location:
code/branches/questsystem5
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/questsystem5

  • code/branches/questsystem5/src/bullet/BulletCollision/BroadphaseCollision/btDbvt.h

    r2907 r2908  
    5858
    5959//SSE gives errors on a MSVC 7.1
    60 #ifdef BT_USE_SSE
     60#if (defined (WIN32) && (_MSC_VER) && _MSC_VER >= 1400) && (!defined (BT_USE_DOUBLE_PRECISION))
    6161#define DBVT_SELECT_IMPL                DBVT_IMPL_SSE
    6262#define DBVT_MERGE_IMPL                 DBVT_IMPL_SSE
     
    8383#define DBVT_PREFIX                                     template <typename T>
    8484#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;
    8686#else
    8787#define DBVT_VIRTUAL_DTOR(a)            virtual ~a() {}
     
    147147        DBVT_INLINE friend bool                 Intersect(      const btDbvtAabbMm& a,
    148148                const btDbvtAabbMm& b);
    149        
     149        DBVT_INLINE friend bool                 Intersect(      const btDbvtAabbMm& a,
     150                const btDbvtAabbMm& b,
     151                const btTransform& xform);
    150152        DBVT_INLINE friend bool                 Intersect(      const btDbvtAabbMm& a,
    151153                const btVector3& b);
     
    303305                  const btDbvtNode* root1,
    304306                  DBVT_IPOLICY);
    305 #if 0
     307
    306308        DBVT_PREFIX
    307309                void            collideTT(      const btDbvtNode* root0,
     
    315317                const btTransform& xform1,
    316318                DBVT_IPOLICY);
    317 #endif
    318 
    319319        DBVT_PREFIX
    320320                void            collideTV(      const btDbvtNode* root,
     
    531531}
    532532
    533 
     533//
     534DBVT_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}
    534548
    535549//
     
    835849}
    836850
    837 #if 0
     851
    838852//
    839853DBVT_PREFIX
     
    891905                }
    892906}
     907
    893908//
    894909DBVT_PREFIX
     
    902917        collideTT(root0,root1,xform,policy);
    903918}
    904 #endif
    905919
    906920//
Note: See TracChangeset for help on using the changeset viewer.