Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 3, 2011, 5:07:42 AM (14 years ago)
Author:
rgrieder
Message:

Updated Bullet from v2.77 to v2.78.
(I'm not going to make a branch for that since the update from 2.74 to 2.77 hasn't been tested that much either).

You will HAVE to do a complete RECOMPILE! I tested with MSVC and MinGW and they both threw linker errors at me.

Location:
code/trunk/src/external/bullet/BulletCollision/NarrowPhaseCollision
Files:
2 added
18 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/external/bullet/BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.cpp

    r8351 r8393  
    2323#include "btGjkPairDetector.h"
    2424#include "btPointCollector.h"
     25#include "BulletCollision/CollisionShapes/btStaticPlaneShape.h"
    2526
    2627
     
    2930:m_simplexSolver(simplexSolver),
    3031m_penetrationDepthSolver(penetrationDepthSolver),
    31 m_convexA(convexA),m_convexB(convexB)
    32 {
    33 }
     32m_convexA(convexA),m_convexB1(convexB),m_planeShape(0)
     33{
     34}
     35
     36
     37btContinuousConvexCollision::btContinuousConvexCollision( const btConvexShape*  convexA,const btStaticPlaneShape*       plane)
     38:m_simplexSolver(0),
     39m_penetrationDepthSolver(0),
     40m_convexA(convexA),m_convexB1(0),m_planeShape(plane)
     41{
     42}
     43
    3444
    3545/// This maximum should not be necessary. It allows for untested/degenerate cases in production code.
    3646/// You don't want your game ever to lock-up.
    3747#define MAX_ITERATIONS 64
     48
     49void btContinuousConvexCollision::computeClosestPoints( const btTransform& transA, const btTransform& transB,btPointCollector& pointCollector)
     50{
     51        if (m_convexB1)
     52        {
     53                m_simplexSolver->reset();
     54                btGjkPairDetector gjk(m_convexA,m_convexB1,m_convexA->getShapeType(),m_convexB1->getShapeType(),m_convexA->getMargin(),m_convexB1->getMargin(),m_simplexSolver,m_penetrationDepthSolver);               
     55                btGjkPairDetector::ClosestPointInput input;
     56                input.m_transformA = transA;
     57                input.m_transformB = transB;
     58                gjk.getClosestPoints(input,pointCollector,0);
     59        } else
     60        {
     61                //convex versus plane
     62                const btConvexShape* convexShape = m_convexA;
     63                const btStaticPlaneShape* planeShape = m_planeShape;
     64               
     65                bool hasCollision = false;
     66                const btVector3& planeNormal = planeShape->getPlaneNormal();
     67                const btScalar& planeConstant = planeShape->getPlaneConstant();
     68               
     69                btTransform convexWorldTransform = transA;
     70                btTransform convexInPlaneTrans;
     71                convexInPlaneTrans= transB.inverse() * convexWorldTransform;
     72                btTransform planeInConvex;
     73                planeInConvex= convexWorldTransform.inverse() * transB;
     74               
     75                btVector3 vtx = convexShape->localGetSupportingVertex(planeInConvex.getBasis()*-planeNormal);
     76
     77                btVector3 vtxInPlane = convexInPlaneTrans(vtx);
     78                btScalar distance = (planeNormal.dot(vtxInPlane) - planeConstant);
     79
     80                btVector3 vtxInPlaneProjected = vtxInPlane - distance*planeNormal;
     81                btVector3 vtxInPlaneWorld = transB * vtxInPlaneProjected;
     82                btVector3 normalOnSurfaceB = transB.getBasis() * planeNormal;
     83
     84                pointCollector.addContactPoint(
     85                        normalOnSurfaceB,
     86                        vtxInPlaneWorld,
     87                        distance);
     88        }
     89}
    3890
    3991bool    btContinuousConvexCollision::calcTimeOfImpact(
     
    4597{
    4698
    47         m_simplexSolver->reset();
    4899
    49100        /// compute linear and angular velocity for this interval, to interpolate
     
    54105
    55106        btScalar boundingRadiusA = m_convexA->getAngularMotionDisc();
    56         btScalar boundingRadiusB = m_convexB->getAngularMotionDisc();
     107        btScalar boundingRadiusB = m_convexB1?m_convexB1->getAngularMotionDisc():0.f;
    57108
    58109        btScalar maxAngularProjectedVelocity = angVelA.length() * boundingRadiusA + angVelB.length() * boundingRadiusB;
     
    65116
    66117
    67         btScalar radius = btScalar(0.001);
    68118
    69119        btScalar lambda = btScalar(0.);
     
    84134
    85135
    86         btTransform identityTrans;
    87         identityTrans.setIdentity();
    88 
    89         btSphereShape   raySphere(btScalar(0.0));
    90         raySphere.setMargin(btScalar(0.));
    91 
    92 
     136        btScalar radius = 0.001f;
    93137//      result.drawCoordSystem(sphereTr);
    94138
     
    96140
    97141        {
    98                
    99                 btGjkPairDetector gjk(m_convexA,m_convexB,m_convexA->getShapeType(),m_convexB->getShapeType(),m_convexA->getMargin(),m_convexB->getMargin(),m_simplexSolver,m_penetrationDepthSolver);         
    100                 btGjkPairDetector::ClosestPointInput input;
    101142       
    102                 //we don't use margins during CCD
    103         //      gjk.setIgnoreMargin(true);
    104 
    105                 input.m_transformA = fromA;
    106                 input.m_transformB = fromB;
    107                 gjk.getClosestPoints(input,pointCollector1,0);
     143                computeClosestPoints(fromA,fromB,pointCollector1);
    108144
    109145                hasResult = pointCollector1.m_hasResult;
     
    114150        {
    115151                btScalar dist;
    116                 dist = pointCollector1.m_distance;
     152                dist = pointCollector1.m_distance + result.m_allowedPenetration;
    117153                n = pointCollector1.m_normalOnBInWorld;
    118 
    119154                btScalar projectedLinearVelocity = relLinVel.dot(n);
    120                
     155                if ((projectedLinearVelocity+ maxAngularProjectedVelocity)<=SIMD_EPSILON)
     156                        return false;
     157
    121158                //not close enough
    122159                while (dist > radius)
     
    126163                                result.m_debugDrawer->drawSphere(c,0.2f,btVector3(1,1,1));
    127164                        }
    128                         numIter++;
    129                         if (numIter > maxIter)
    130                         {
    131                                 return false; //todo: report a failure
    132                         }
    133165                        btScalar dLambda = btScalar(0.);
    134166
    135167                        projectedLinearVelocity = relLinVel.dot(n);
    136168
    137                         //calculate safe moving fraction from distance / (linear+rotational velocity)
    138                        
    139                         //btScalar clippedDist  = GEN_min(angularConservativeRadius,dist);
    140                         //btScalar clippedDist  = dist;
    141169                       
    142170                        //don't report time of impact for motion away from the contact normal (or causes minor penetration)
     
    183211
    184212                        btPointCollector        pointCollector;
    185                         btGjkPairDetector gjk(m_convexA,m_convexB,m_simplexSolver,m_penetrationDepthSolver);
    186                         btGjkPairDetector::ClosestPointInput input;
    187                         input.m_transformA = interpolatedTransA;
    188                         input.m_transformB = interpolatedTransB;
    189                         gjk.getClosestPoints(input,pointCollector,0);
     213                        computeClosestPoints(interpolatedTransA,interpolatedTransB,pointCollector);
     214
    190215                        if (pointCollector.m_hasResult)
    191216                        {
    192                                 if (pointCollector.m_distance < btScalar(0.))
    193                                 {
    194                                         //degenerate ?!
    195                                         result.m_fraction = lastLambda;
    196                                         n = pointCollector.m_normalOnBInWorld;
    197                                         result.m_normal=n;//.setValue(1,1,1);// = n;
    198                                         result.m_hitPoint = pointCollector.m_pointInWorld;
    199                                         return true;
    200                                 }
     217                                dist = pointCollector.m_distance+result.m_allowedPenetration;
    201218                                c = pointCollector.m_pointInWorld;             
    202219                                n = pointCollector.m_normalOnBInWorld;
    203                                 dist = pointCollector.m_distance;
    204220                        } else
    205221                        {
    206                                 //??
    207                                 return false;
    208                         }
    209                        
    210 
     222                                result.reportFailure(-1, numIter);
     223                                return false;
     224                        }
     225
     226                        numIter++;
     227                        if (numIter > maxIter)
     228                        {
     229                                result.reportFailure(-2, numIter);
     230                                return false;
     231                        }
    211232                }
    212233       
    213                 if ((projectedLinearVelocity+ maxAngularProjectedVelocity)<=result.m_allowedPenetration)//SIMD_EPSILON)
    214                         return false;
    215                        
    216234                result.m_fraction = lambda;
    217235                result.m_normal = n;
     
    222240        return false;
    223241
    224 /*
    225 //todo:
    226         //if movement away from normal, discard result
    227         btVector3 move = transBLocalTo.getOrigin() - transBLocalFrom.getOrigin();
    228         if (result.m_fraction < btScalar(1.))
    229         {
    230                 if (move.dot(result.m_normal) <= btScalar(0.))
    231                 {
    232                 }
    233         }
    234 */
    235 
    236 }
     242}
     243
  • code/trunk/src/external/bullet/BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.h

    r5781 r8393  
    1515
    1616
    17 #ifndef CONTINUOUS_COLLISION_CONVEX_CAST_H
    18 #define CONTINUOUS_COLLISION_CONVEX_CAST_H
     17#ifndef BT_CONTINUOUS_COLLISION_CONVEX_CAST_H
     18#define BT_CONTINUOUS_COLLISION_CONVEX_CAST_H
    1919
    2020#include "btConvexCast.h"
     
    2222class btConvexPenetrationDepthSolver;
    2323class btConvexShape;
     24class btStaticPlaneShape;
    2425
    2526/// btContinuousConvexCollision implements angular and linear time of impact for convex objects.
     
    3233        btConvexPenetrationDepthSolver* m_penetrationDepthSolver;
    3334        const btConvexShape*    m_convexA;
    34         const btConvexShape*    m_convexB;
     35        //second object is either a convex or a plane (code sharing)
     36        const btConvexShape*    m_convexB1;
     37        const btStaticPlaneShape*       m_planeShape;
    3538
     39        void computeClosestPoints( const btTransform& transA, const btTransform& transB,struct btPointCollector& pointCollector);
    3640
    3741public:
    3842
    3943        btContinuousConvexCollision (const btConvexShape*       shapeA,const btConvexShape*     shapeB ,btSimplexSolverInterface* simplexSolver,btConvexPenetrationDepthSolver* penetrationDepthSolver);
     44
     45        btContinuousConvexCollision(const btConvexShape*        shapeA,const btStaticPlaneShape*        plane );
    4046
    4147        virtual bool    calcTimeOfImpact(
     
    4955};
    5056
    51 #endif //CONTINUOUS_COLLISION_CONVEX_CAST_H
    5257
     58#endif //BT_CONTINUOUS_COLLISION_CONVEX_CAST_H
     59
  • code/trunk/src/external/bullet/BulletCollision/NarrowPhaseCollision/btConvexCast.h

    r8351 r8393  
    1515
    1616
    17 #ifndef CONVEX_CAST_H
    18 #define CONVEX_CAST_H
     17#ifndef BT_CONVEX_CAST_H
     18#define BT_CONVEX_CAST_H
    1919
    2020#include "LinearMath/btTransform.h"
     
    4040                virtual void    DebugDraw(btScalar      fraction) {(void)fraction;}
    4141                virtual void    drawCoordSystem(const btTransform& trans) {(void)trans;}
    42 
     42                virtual void    reportFailure(int errNo, int numIterations) {(void)errNo;(void)numIterations;}
    4343                CastResult()
    4444                        :m_fraction(btScalar(BT_LARGE_FLOAT)),
     
    7171};
    7272
    73 #endif //CONVEX_CAST_H
     73#endif //BT_CONVEX_CAST_H
  • code/trunk/src/external/bullet/BulletCollision/NarrowPhaseCollision/btConvexPenetrationDepthSolver.h

    r8351 r8393  
    1515
    1616
    17 #ifndef __CONVEX_PENETRATION_DEPTH_H
    18 #define __CONVEX_PENETRATION_DEPTH_H
     17#ifndef BT_CONVEX_PENETRATION_DEPTH_H
     18#define BT_CONVEX_PENETRATION_DEPTH_H
    1919
    2020class btStackAlloc;
     
    3939
    4040};
    41 #endif //CONVEX_PENETRATION_DEPTH_H
     41#endif //BT_CONVEX_PENETRATION_DEPTH_H
    4242
  • code/trunk/src/external/bullet/BulletCollision/NarrowPhaseCollision/btDiscreteCollisionDetectorInterface.h

    r8351 r8393  
    1515
    1616
    17 #ifndef DISCRETE_COLLISION_DETECTOR1_INTERFACE_H
    18 #define DISCRETE_COLLISION_DETECTOR1_INTERFACE_H
     17#ifndef BT_DISCRETE_COLLISION_DETECTOR1_INTERFACE_H
     18#define BT_DISCRETE_COLLISION_DETECTOR1_INTERFACE_H
     19
    1920#include "LinearMath/btTransform.h"
    2021#include "LinearMath/btVector3.h"
     
    8788};
    8889
    89 #endif //DISCRETE_COLLISION_DETECTOR_INTERFACE1_H
     90#endif //BT_DISCRETE_COLLISION_DETECTOR1_INTERFACE_H
     91
  • code/trunk/src/external/bullet/BulletCollision/NarrowPhaseCollision/btGjkConvexCast.h

    r5781 r8393  
    1616
    1717
    18 #ifndef GJK_CONVEX_CAST_H
    19 #define GJK_CONVEX_CAST_H
     18#ifndef BT_GJK_CONVEX_CAST_H
     19#define BT_GJK_CONVEX_CAST_H
    2020
    2121#include "BulletCollision/CollisionShapes/btCollisionMargin.h"
     
    4848};
    4949
    50 #endif //GJK_CONVEX_CAST_H
     50#endif //BT_GJK_CONVEX_CAST_H
  • code/trunk/src/external/bullet/BulletCollision/NarrowPhaseCollision/btGjkEpa2.h

    r8351 r8393  
    2323GJK-EPA collision solver by Nathanael Presson, 2008
    2424*/
    25 #ifndef _68DA1F85_90B7_4bb0_A705_83B4040A75C6_
    26 #define _68DA1F85_90B7_4bb0_A705_83B4040A75C6_
     25#ifndef BT_GJK_EPA2_H
     26#define BT_GJK_EPA2_H
     27
    2728#include "BulletCollision/CollisionShapes/btConvexShape.h"
    2829
     
    7172};
    7273
    73 #endif
     74#endif //BT_GJK_EPA2_H
     75
  • code/trunk/src/external/bullet/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.cpp

    r8351 r8393  
    255255#endif //
    256256                       
    257                         m_cachedSeparatingAxis = newCachedSeparatingAxis;
    258257
    259258                        //redundant m_simplexSolver->compute_points(pointOnA, pointOnB);
     
    262261                        if (previousSquaredDistance - squaredDistance <= SIMD_EPSILON * previousSquaredDistance)
    263262                        {
    264                                 m_simplexSolver->backup_closest(m_cachedSeparatingAxis);
     263//                              m_simplexSolver->backup_closest(m_cachedSeparatingAxis);
    265264                                checkSimplex = true;
    266265                                m_degenerateSimplex = 12;
     
    268267                                break;
    269268                        }
     269
     270                        m_cachedSeparatingAxis = newCachedSeparatingAxis;
    270271
    271272                          //degeneracy, this is typically due to invalid/uninitialized worldtransforms for a btCollisionObject   
     
    295296                        {
    296297                                //do we need this backup_closest here ?
    297                                 m_simplexSolver->backup_closest(m_cachedSeparatingAxis);
     298//                              m_simplexSolver->backup_closest(m_cachedSeparatingAxis);
    298299                                m_degenerateSimplex = 13;
    299300                                break;
     
    304305                {
    305306                        m_simplexSolver->compute_points(pointOnA, pointOnB);
    306                         normalInB = pointOnA-pointOnB;
     307                        normalInB = m_cachedSeparatingAxis;
    307308                        btScalar lenSqr =m_cachedSeparatingAxis.length2();
    308309                       
  • code/trunk/src/external/bullet/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h

    r8351 r8393  
    1717
    1818
    19 #ifndef GJK_PAIR_DETECTOR_H
    20 #define GJK_PAIR_DETECTOR_H
     19#ifndef BT_GJK_PAIR_DETECTOR_H
     20#define BT_GJK_PAIR_DETECTOR_H
    2121
    2222#include "btDiscreteCollisionDetectorInterface.h"
     
    101101};
    102102
    103 #endif //GJK_PAIR_DETECTOR_H
     103#endif //BT_GJK_PAIR_DETECTOR_H
  • code/trunk/src/external/bullet/BulletCollision/NarrowPhaseCollision/btManifoldPoint.h

    r8351 r8393  
    1414*/
    1515
    16 #ifndef MANIFOLD_CONTACT_POINT_H
    17 #define MANIFOLD_CONTACT_POINT_H
     16#ifndef BT_MANIFOLD_CONTACT_POINT_H
     17#define BT_MANIFOLD_CONTACT_POINT_H
    1818
    1919#include "LinearMath/btVector3.h"
    2020#include "LinearMath/btTransformUtil.h"
    2121
    22 // Don't change following order of parameters
    23 ATTRIBUTE_ALIGNED16(struct) PfxConstraintRow {
    24         btScalar mNormal[3];
    25         btScalar mRhs;
    26         btScalar mJacDiagInv;
    27         btScalar mLowerLimit;
    28         btScalar mUpperLimit;
    29         btScalar mAccumImpulse;
    30 };
    31 
     22#ifdef PFX_USE_FREE_VECTORMATH
     23        #include "physics_effects/base_level/solver/pfx_constraint_row.h"
     24typedef sce::PhysicsEffects::PfxConstraintRow btConstraintRow;
     25#else
     26        // Don't change following order of parameters
     27        ATTRIBUTE_ALIGNED16(struct) btConstraintRow {
     28                btScalar m_normal[3];
     29                btScalar m_rhs;
     30                btScalar m_jacDiagInv;
     31                btScalar m_lowerLimit;
     32                btScalar m_upperLimit;
     33                btScalar m_accumImpulse;
     34        };
     35        typedef btConstraintRow PfxConstraintRow;
     36#endif //PFX_USE_FREE_VECTORMATH
    3237
    3338
     
    7277                                        m_lifeTime(0)
    7378                        {
    74                                 mConstraintRow[0].mAccumImpulse = 0.f;
    75                                 mConstraintRow[1].mAccumImpulse = 0.f;
    76                                 mConstraintRow[2].mAccumImpulse = 0.f;
     79                                mConstraintRow[0].m_accumImpulse = 0.f;
     80                                mConstraintRow[1].m_accumImpulse = 0.f;
     81                                mConstraintRow[2].m_accumImpulse = 0.f;
    7782                        }
    7883
     
    114119
    115120
    116                         PfxConstraintRow mConstraintRow[3];
     121                        btConstraintRow mConstraintRow[3];
    117122
    118123
     
    151156        };
    152157
    153 #endif //MANIFOLD_CONTACT_POINT_H
     158#endif //BT_MANIFOLD_CONTACT_POINT_H
  • code/trunk/src/external/bullet/BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.h

    r8351 r8393  
    1414*/
    1515
    16 #ifndef MINKOWSKI_PENETRATION_DEPTH_SOLVER_H
    17 #define MINKOWSKI_PENETRATION_DEPTH_SOLVER_H
     16#ifndef BT_MINKOWSKI_PENETRATION_DEPTH_SOLVER_H
     17#define BT_MINKOWSKI_PENETRATION_DEPTH_SOLVER_H
    1818
    1919#include "btConvexPenetrationDepthSolver.h"
     
    3737};
    3838
    39 #endif //MINKOWSKI_PENETRATION_DEPTH_SOLVER_H
     39#endif //BT_MINKOWSKI_PENETRATION_DEPTH_SOLVER_H
    4040
  • code/trunk/src/external/bullet/BulletCollision/NarrowPhaseCollision/btPersistentManifold.h

    r8351 r8393  
    1414*/
    1515
    16 #ifndef PERSISTENT_MANIFOLD_H
    17 #define PERSISTENT_MANIFOLD_H
     16#ifndef BT_PERSISTENT_MANIFOLD_H
     17#define BT_PERSISTENT_MANIFOLD_H
    1818
    1919
     
    3333extern ContactProcessedCallback gContactProcessedCallback;
    3434
    35 
     35//the enum starts at 1024 to avoid type conflicts with btTypedConstraint
    3636enum btContactManifoldTypes
    3737{
    38         BT_PERSISTENT_MANIFOLD_TYPE = 1,
    39         MAX_CONTACT_MANIFOLD_TYPE
     38        MIN_CONTACT_MANIFOLD_TYPE = 1024,
     39        BT_PERSISTENT_MANIFOLD_TYPE
    4040};
    4141
     
    147147                        //get rid of duplicated userPersistentData pointer
    148148                        m_pointCache[lastUsedIndex].m_userPersistentData = 0;
    149                         m_pointCache[lastUsedIndex].mConstraintRow[0].mAccumImpulse = 0.f;
    150                         m_pointCache[lastUsedIndex].mConstraintRow[1].mAccumImpulse = 0.f;
    151                         m_pointCache[lastUsedIndex].mConstraintRow[2].mAccumImpulse = 0.f;
     149                        m_pointCache[lastUsedIndex].mConstraintRow[0].m_accumImpulse = 0.f;
     150                        m_pointCache[lastUsedIndex].mConstraintRow[1].m_accumImpulse = 0.f;
     151                        m_pointCache[lastUsedIndex].mConstraintRow[2].m_accumImpulse = 0.f;
    152152
    153153                        m_pointCache[lastUsedIndex].m_appliedImpulse = 0.f;
     
    168168#ifdef MAINTAIN_PERSISTENCY
    169169                int     lifeTime = m_pointCache[insertIndex].getLifeTime();
    170                 btScalar        appliedImpulse = m_pointCache[insertIndex].mConstraintRow[0].mAccumImpulse;
    171                 btScalar        appliedLateralImpulse1 = m_pointCache[insertIndex].mConstraintRow[1].mAccumImpulse;
    172                 btScalar        appliedLateralImpulse2 = m_pointCache[insertIndex].mConstraintRow[2].mAccumImpulse;
     170                btScalar        appliedImpulse = m_pointCache[insertIndex].mConstraintRow[0].m_accumImpulse;
     171                btScalar        appliedLateralImpulse1 = m_pointCache[insertIndex].mConstraintRow[1].m_accumImpulse;
     172                btScalar        appliedLateralImpulse2 = m_pointCache[insertIndex].mConstraintRow[2].m_accumImpulse;
    173173//              bool isLateralFrictionInitialized = m_pointCache[insertIndex].m_lateralFrictionInitialized;
    174174               
     
    185185                m_pointCache[insertIndex].m_appliedImpulseLateral2 = appliedLateralImpulse2;
    186186               
    187                 m_pointCache[insertIndex].mConstraintRow[0].mAccumImpulse =  appliedImpulse;
    188                 m_pointCache[insertIndex].mConstraintRow[1].mAccumImpulse = appliedLateralImpulse1;
    189                 m_pointCache[insertIndex].mConstraintRow[2].mAccumImpulse = appliedLateralImpulse2;
     187                m_pointCache[insertIndex].mConstraintRow[0].m_accumImpulse =  appliedImpulse;
     188                m_pointCache[insertIndex].mConstraintRow[1].m_accumImpulse = appliedLateralImpulse1;
     189                m_pointCache[insertIndex].mConstraintRow[2].m_accumImpulse = appliedLateralImpulse2;
    190190
    191191
     
    200200        bool validContactDistance(const btManifoldPoint& pt) const
    201201        {
    202                 return pt.m_distance1 <= getContactBreakingThreshold();
     202                if (pt.m_lifeTime >1)
     203                {
     204                        return pt.m_distance1 <= getContactBreakingThreshold();
     205                }
     206                return pt.m_distance1 <= getContactProcessingThreshold();
     207       
    203208        }
    204209        /// calculated new worldspace coordinates and depth, and reject points that exceed the collision margin
     
    225230
    226231
    227 #endif //PERSISTENT_MANIFOLD_H
     232#endif //BT_PERSISTENT_MANIFOLD_H
  • code/trunk/src/external/bullet/BulletCollision/NarrowPhaseCollision/btPointCollector.h

    r8351 r8393  
    1414*/
    1515
    16 #ifndef POINT_COLLECTOR_H
    17 #define POINT_COLLECTOR_H
     16#ifndef BT_POINT_COLLECTOR_H
     17#define BT_POINT_COLLECTOR_H
    1818
    1919#include "btDiscreteCollisionDetectorInterface.h"
     
    6161};
    6262
    63 #endif //POINT_COLLECTOR_H
     63#endif //BT_POINT_COLLECTOR_H
    6464
  • code/trunk/src/external/bullet/BulletCollision/NarrowPhaseCollision/btRaycastCallback.cpp

    r5781 r8393  
    125125        m_convexShapeTo = convexShapeTo;
    126126        m_triangleToWorld = triangleToWorld;
    127         m_hitFraction = 1.0;
    128     m_triangleCollisionMargin = triangleCollisionMargin;
     127        m_hitFraction = 1.0f;
     128        m_triangleCollisionMargin = triangleCollisionMargin;
     129        m_allowedPenetration = 0.f;
    129130}
    130131
     
    149150        btConvexCast::CastResult castResult;
    150151        castResult.m_fraction = btScalar(1.);
     152        castResult.m_allowedPenetration = m_allowedPenetration;
    151153        if (convexCaster.calcTimeOfImpact(m_convexShapeFrom,m_convexShapeTo,m_triangleToWorld, m_triangleToWorld, castResult))
    152154        {
  • code/trunk/src/external/bullet/BulletCollision/NarrowPhaseCollision/btRaycastCallback.h

    r5781 r8393  
    1414*/
    1515
    16 #ifndef RAYCAST_TRI_CALLBACK_H
    17 #define RAYCAST_TRI_CALLBACK_H
     16#ifndef BT_RAYCAST_TRI_CALLBACK_H
     17#define BT_RAYCAST_TRI_CALLBACK_H
    1818
    1919#include "BulletCollision/CollisionShapes/btTriangleCallback.h"
     
    5959        btTransform m_triangleToWorld;
    6060        btScalar m_hitFraction;
    61     btScalar m_triangleCollisionMargin;
     61        btScalar m_triangleCollisionMargin;
     62        btScalar m_allowedPenetration;
    6263
    6364        btTriangleConvexcastCallback (const btConvexShape* convexShape, const btTransform& convexShapeFrom, const btTransform& convexShapeTo, const btTransform& triangleToWorld, const btScalar triangleCollisionMargin);
     
    6869};
    6970
    70 #endif //RAYCAST_TRI_CALLBACK_H
     71#endif //BT_RAYCAST_TRI_CALLBACK_H
    7172
  • code/trunk/src/external/bullet/BulletCollision/NarrowPhaseCollision/btSimplexSolverInterface.h

    r5781 r8393  
    1616
    1717
    18 #ifndef SIMPLEX_SOLVER_INTERFACE_H
    19 #define SIMPLEX_SOLVER_INTERFACE_H
     18#ifndef BT_SIMPLEX_SOLVER_INTERFACE_H
     19#define BT_SIMPLEX_SOLVER_INTERFACE_H
    2020
    2121#include "LinearMath/btVector3.h"
     
    6060};
    6161#endif
    62 #endif //SIMPLEX_SOLVER_INTERFACE_H
     62#endif //BT_SIMPLEX_SOLVER_INTERFACE_H
    6363
  • code/trunk/src/external/bullet/BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.h

    r5781 r8393  
    1515
    1616
    17 #ifndef SUBSIMPLEX_CONVEX_CAST_H
    18 #define SUBSIMPLEX_CONVEX_CAST_H
     17#ifndef BT_SUBSIMPLEX_CONVEX_CAST_H
     18#define BT_SUBSIMPLEX_CONVEX_CAST_H
    1919
    2020#include "btConvexCast.h"
     
    4848};
    4949
    50 #endif //SUBSIMPLEX_CONVEX_CAST_H
     50#endif //BT_SUBSIMPLEX_CONVEX_CAST_H
  • code/trunk/src/external/bullet/BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h

    r8351 r8393  
    1616
    1717
    18 #ifndef btVoronoiSimplexSolver_H
    19 #define btVoronoiSimplexSolver_H
     18#ifndef BT_VORONOI_SIMPLEX_SOLVER_H
     19#define BT_VORONOI_SIMPLEX_SOLVER_H
    2020
    2121#include "btSimplexSolverInterface.h"
     
    176176};
    177177
    178 #endif //VoronoiSimplexSolver
     178#endif //BT_VORONOI_SIMPLEX_SOLVER_H
     179
Note: See TracChangeset for help on using the changeset viewer.