Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 20, 2008, 5:40:38 PM (16 years ago)
Author:
rgrieder
Message:

Downgraded Bullet to latest tagged version: 2.72
That should give us more stability.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/physics/src/bullet/BulletCollision/BroadphaseCollision/btDbvtBroadphase.h

    r1963 r1972  
    3232
    3333#if DBVT_BP_PROFILE
    34 #define DBVT_BP_PROFILING_RATE  256
    35 #include "LinearMath/btQuickprof.h"
     34        #define DBVT_BP_PROFILING_RATE  256
     35        #include "LinearMath/btQuickprof.h"
    3636#endif
    3737
     
    4141struct btDbvtProxy : btBroadphaseProxy
    4242{
    43         /* Fields               */
    44         //btDbvtAabbMm  aabb;
    45         btDbvtNode*             leaf;
    46         btDbvtProxy*    links[2];
    47         int                             stage;
    48         /* ctor                 */
    49         btDbvtProxy(const btVector3& aabbMin,const btVector3& aabbMax,void* userPtr,short int collisionFilterGroup, short int collisionFilterMask) :
    50         btBroadphaseProxy(aabbMin,aabbMax,userPtr,collisionFilterGroup,collisionFilterMask)
     43/* Fields               */
     44btDbvtAabbMm    aabb;
     45btDbvtNode*             leaf;
     46btDbvtProxy*    links[2];
     47int                             stage;
     48/* ctor                 */
     49btDbvtProxy(void* userPtr,short int collisionFilterGroup, short int collisionFilterMask) :
     50        btBroadphaseProxy(userPtr,collisionFilterGroup,collisionFilterMask)
    5151        {
    52                 links[0]=links[1]=0;
     52        links[0]=links[1]=0;
    5353        }
    5454};
     
    6161struct  btDbvtBroadphase : btBroadphaseInterface
    6262{
    63         /* Config               */
    64         enum    {
     63/* Config               */
     64enum    {
    6565                DYNAMIC_SET                     =       0,      /* Dynamic set index    */
    6666                FIXED_SET                       =       1,      /* Fixed set index              */
    6767                STAGECOUNT                      =       2       /* Number of stages             */
    68         };
    69         /* Fields               */
    70         btDbvt                                  m_sets[2];                                      // Dbvt sets
    71         btDbvtProxy*                    m_stageRoots[STAGECOUNT+1];     // Stages list
    72         btOverlappingPairCache* m_paircache;                            // Pair cache
    73         btScalar                                m_prediction;                           // Velocity prediction
    74         int                                             m_stageCurrent;                         // Current stage
    75         int                                             m_fupdates;                                     // % of fixed updates per frame
    76         int                                             m_dupdates;                                     // % of dynamic updates per frame
    77         int                                             m_cupdates;                                     // % of cleanup updates per frame
    78         int                                             m_newpairs;                                     // Number of pairs created
    79         int                                             m_fixedleft;                            // Fixed optimization left
    80         unsigned                                m_updates_call;                         // Number of updates call
    81         unsigned                                m_updates_done;                         // Number of updates done
    82         btScalar                                m_updates_ratio;                        // m_updates_done/m_updates_call
    83         int                                             m_pid;                                          // Parse id
    84         int                                             m_cid;                                          // Cleanup index
    85         int                                             m_gid;                                          // Gen id
    86         bool                                    m_releasepaircache;                     // Release pair cache on delete
    87         bool                                    m_deferedcollide;                       // Defere dynamic/static collision to collide call
    88         bool                                    m_needcleanup;                          // Need to run cleanup?
     68                };
     69/* Fields               */
     70btDbvt                                  m_sets[2];                                      // Dbvt sets
     71btDbvtProxy*                    m_stageRoots[STAGECOUNT+1];     // Stages list
     72btOverlappingPairCache* m_paircache;                            // Pair cache
     73btScalar                                m_prediction;                           // Velocity prediction
     74int                                             m_stageCurrent;                         // Current stage
     75int                                             m_fupdates;                                     // % of fixed updates per frame
     76int                                             m_dupdates;                                     // % of dynamic updates per frame
     77int                                             m_cupdates;                                     // % of cleanup updates per frame
     78int                                             m_newpairs;                                     // Number of pairs created
     79int                                             m_fixedleft;                            // Fixed optimization left
     80unsigned                                m_updates_call;                         // Number of updates call
     81unsigned                                m_updates_done;                         // Number of updates done
     82btScalar                                m_updates_ratio;                        // m_updates_done/m_updates_call
     83int                                             m_pid;                                          // Parse id
     84int                                             m_cid;                                          // Cleanup index
     85int                                             m_gid;                                          // Gen id
     86bool                                    m_releasepaircache;                     // Release pair cache on delete
     87bool                                    m_deferedcollide;                       // Defere dynamic/static collision to collide call
     88bool                                    m_needcleanup;                          // Need to run cleanup?
    8989#if DBVT_BP_PROFILE
    90         btClock                                 m_clock;
    91         struct  {
     90btClock                                 m_clock;
     91struct  {
    9292                unsigned long           m_total;
    9393                unsigned long           m_ddcollide;
     
    9595                unsigned long           m_cleanup;
    9696                unsigned long           m_jobcount;
    97         }                               m_profiling;
     97                }                               m_profiling;
    9898#endif
    99         /* Methods              */
    100         btDbvtBroadphase(btOverlappingPairCache* paircache=0);
    101         ~btDbvtBroadphase();
    102         void                                                    collide(btDispatcher* dispatcher);
    103         void                                                    optimize();
    104         /* btBroadphaseInterface Implementation */
    105         btBroadphaseProxy*                              createProxy(const btVector3& aabbMin,const btVector3& aabbMax,int shapeType,void* userPtr,short int collisionFilterGroup,short int collisionFilterMask,btDispatcher* dispatcher,void* multiSapProxy);
    106         void                                                    destroyProxy(btBroadphaseProxy* proxy,btDispatcher* dispatcher);
    107         void                                                    setAabb(btBroadphaseProxy* proxy,const btVector3& aabbMin,const btVector3& aabbMax,btDispatcher* dispatcher);
    108         virtual void    rayTest(const btVector3& rayFrom,const btVector3& rayTo, btBroadphaseRayCallback& rayCallback);
    109 
    110         virtual void    getAabb(btBroadphaseProxy* proxy,btVector3& aabbMin, btVector3& aabbMax ) const;
    111         void                                                    calculateOverlappingPairs(btDispatcher* dispatcher);
    112         btOverlappingPairCache*                 getOverlappingPairCache();
    113         const btOverlappingPairCache*   getOverlappingPairCache() const;
    114         void                                                    getBroadphaseAabb(btVector3& aabbMin,btVector3& aabbMax) const;
    115         void                                                    printStats();
    116         static void                                             benchmark(btBroadphaseInterface*);
     99/* Methods              */
     100btDbvtBroadphase(btOverlappingPairCache* paircache=0);
     101~btDbvtBroadphase();
     102void                                                    collide(btDispatcher* dispatcher);
     103void                                                    optimize();
     104/* btBroadphaseInterface Implementation */
     105btBroadphaseProxy*                              createProxy(const btVector3& aabbMin,const btVector3& aabbMax,int shapeType,void* userPtr,short int collisionFilterGroup,short int collisionFilterMask,btDispatcher* dispatcher,void* multiSapProxy);
     106void                                                    destroyProxy(btBroadphaseProxy* proxy,btDispatcher* dispatcher);
     107void                                                    setAabb(btBroadphaseProxy* proxy,const btVector3& aabbMin,const btVector3& aabbMax,btDispatcher* dispatcher);
     108void                                                    calculateOverlappingPairs(btDispatcher* dispatcher);
     109btOverlappingPairCache*                 getOverlappingPairCache();
     110const btOverlappingPairCache*   getOverlappingPairCache() const;
     111void                                                    getBroadphaseAabb(btVector3& aabbMin,btVector3& aabbMax) const;
     112void                                                    printStats();
     113static void                                             benchmark(btBroadphaseInterface*);
    117114};
    118115
Note: See TracChangeset for help on using the changeset viewer.