~ubuntu-branches/ubuntu/trusty/blender/trusty-proposed

« back to all changes in this revision

Viewing changes to extern/bullet2/src/BulletCollision/BroadphaseCollision/btDbvt.h

  • Committer: Package Import Robot
  • Author(s): Matteo F. Vescovi
  • Date: 2013-08-14 10:43:49 UTC
  • mfrom: (14.2.19 sid)
  • Revision ID: package-import@ubuntu.com-20130814104349-t1d5mtwkphp12dyj
Tags: 2.68a-3
* Upload to unstable
* debian/: python3.3 Depends simplified
  - debian/control: python3.3 Depends dropped
    for blender-data package
  - 0001-blender_thumbnailer.patch refreshed
* debian/control: libavcodec b-dep versioning dropped

Show diffs side-by-side

added added

removed removed

Lines of Context:
57
57
// Specific methods implementation
58
58
 
59
59
//SSE gives errors on a MSVC 7.1
60
 
#if defined (BT_USE_SSE) && defined (_WIN32)
 
60
#if defined (BT_USE_SSE) //&& defined (_WIN32)
61
61
#define DBVT_SELECT_IMPL                DBVT_IMPL_SSE
62
62
#define DBVT_MERGE_IMPL                 DBVT_IMPL_SSE
63
63
#define DBVT_INT0_IMPL                  DBVT_IMPL_SSE
160
160
                btDbvtAabbMm& r);
161
161
        DBVT_INLINE friend bool                 NotEqual(       const btDbvtAabbMm& a,
162
162
                const btDbvtAabbMm& b);
 
163
    
 
164
    DBVT_INLINE btVector3&      tMins() { return(mi); }
 
165
        DBVT_INLINE btVector3&  tMaxs() { return(mx); }
 
166
    
163
167
private:
164
168
        DBVT_INLINE void                                AddSpan(const btVector3& d,btScalar& smi,btScalar& smx) const;
165
169
private:
320
324
        DBVT_PREFIX
321
325
                void            collideTV(      const btDbvtNode* root,
322
326
                const btDbvtVolume& volume,
323
 
                DBVT_IPOLICY);
 
327
                DBVT_IPOLICY) const;
324
328
        ///rayTest is a re-entrant ray test, and can be called in parallel as long as the btAlignedAlloc is thread-safe (uses locking etc)
325
329
        ///rayTest is slower than rayTestInternal, because it builds a local stack, using memory allocations, and it recomputes signs/rayDirectionInverses each time
326
330
        DBVT_PREFIX
519
523
#if     DBVT_INT0_IMPL == DBVT_IMPL_SSE
520
524
        const __m128    rt(_mm_or_ps(   _mm_cmplt_ps(_mm_load_ps(b.mx),_mm_load_ps(a.mi)),
521
525
                _mm_cmplt_ps(_mm_load_ps(a.mx),_mm_load_ps(b.mi))));
 
526
#if defined (_WIN32)
522
527
        const __int32*  pu((const __int32*)&rt);
 
528
#else
 
529
    const int*  pu((const int*)&rt);
 
530
#endif
523
531
        return((pu[0]|pu[1]|pu[2])==0);
524
532
#else
525
533
        return( (a.mi.x()<=b.mx.x())&&
568
576
                                                           const btDbvtAabbMm& b)
569
577
{
570
578
#if     DBVT_SELECT_IMPL == DBVT_IMPL_SSE
 
579
    
 
580
#if defined (_WIN32)
571
581
        static ATTRIBUTE_ALIGNED16(const unsigned __int32)      mask[]={0x7fffffff,0x7fffffff,0x7fffffff,0x7fffffff};
 
582
#else
 
583
    static ATTRIBUTE_ALIGNED16(const unsigned int)      mask[]={0x7fffffff,0x7fffffff,0x7fffffff,0x00000000 /*0x7fffffff*/};
 
584
#endif
572
585
        ///@todo: the intrinsic version is 11% slower
573
586
#if DBVT_USE_INTRINSIC_SSE
574
587
 
908
921
DBVT_PREFIX
909
922
inline void             btDbvt::collideTV(      const btDbvtNode* root,
910
923
                                                                  const btDbvtVolume& vol,
911
 
                                                                  DBVT_IPOLICY)
 
924
                                                                  DBVT_IPOLICY) const
912
925
{
913
926
        DBVT_CHECKTYPE
914
927
                if(root)