Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Feb 27, 2011, 7:43:24 AM (14 years ago)
Author:
rgrieder
Message:

Updated Bullet Physics Engine from v2.74 to v2.77

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/kicklib/src/external/bullet/BulletCollision/CollisionShapes/btPolyhedralConvexShape.cpp

    r5781 r7983  
    11/*
    22Bullet Continuous Collision Detection and Physics Library
    3 Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
     3Copyright (c) 2003-2009 Erwin Coumans  http://bulletphysics.org
    44
    55This software is provided 'as-is', without any express or implied warranty.
     
    1616#include "BulletCollision/CollisionShapes/btPolyhedralConvexShape.h"
    1717
    18 btPolyhedralConvexShape::btPolyhedralConvexShape() :btConvexInternalShape(),
    19 m_localAabbMin(1,1,1),
    20 m_localAabbMax(-1,-1,-1),
    21 m_isLocalAabbValid(false),
    22 m_optionalHull(0)
     18btPolyhedralConvexShape::btPolyhedralConvexShape() :btConvexInternalShape()
    2319{
    2420
     
    2824btVector3       btPolyhedralConvexShape::localGetSupportingVertexWithoutMargin(const btVector3& vec0)const
    2925{
     26
     27
     28        btVector3 supVec(0,0,0);
     29#ifndef __SPU__
    3030        int i;
    31         btVector3 supVec(0,0,0);
    32 
    33         btScalar maxDot(btScalar(-1e30));
     31        btScalar maxDot(btScalar(-BT_LARGE_FLOAT));
    3432
    3533        btVector3 vec = vec0;
     
    5856        }
    5957
     58       
     59#endif //__SPU__
    6060        return supVec;
     61}
    6162
    62 }
     63
    6364
    6465void    btPolyhedralConvexShape::batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const
    6566{
     67#ifndef __SPU__
    6668        int i;
    6769
     
    7173        for (i=0;i<numVectors;i++)
    7274        {
    73                 supportVerticesOut[i][3] = btScalar(-1e30);
     75                supportVerticesOut[i][3] = btScalar(-BT_LARGE_FLOAT);
    7476        }
    7577
     
    9193                }
    9294        }
     95#endif //__SPU__
    9396}
    9497
     
    97100void    btPolyhedralConvexShape::calculateLocalInertia(btScalar mass,btVector3& inertia) const
    98101{
     102#ifndef __SPU__
    99103        //not yet, return box inertia
    100104
     
    116120
    117121        inertia = scaledmass * (btVector3(y2+z2,x2+z2,x2+y2));
    118 
     122#endif //__SPU__
    119123}
    120124
    121125
    122126
    123 void btPolyhedralConvexShape::getAabb(const btTransform& trans,btVector3& aabbMin,btVector3& aabbMax) const
    124 {
    125         getNonvirtualAabb(trans,aabbMin,aabbMax,getMargin());
    126 }
    127 
    128 
    129 
    130 void    btPolyhedralConvexShape::setLocalScaling(const btVector3& scaling)
     127void    btPolyhedralConvexAabbCachingShape::setLocalScaling(const btVector3& scaling)
    131128{
    132129        btConvexInternalShape::setLocalScaling(scaling);
     
    134131}
    135132
    136 void    btPolyhedralConvexShape::recalcLocalAabb()
     133btPolyhedralConvexAabbCachingShape::btPolyhedralConvexAabbCachingShape()
     134:btPolyhedralConvexShape(),
     135m_localAabbMin(1,1,1),
     136m_localAabbMax(-1,-1,-1),
     137m_isLocalAabbValid(false)
     138{
     139}
     140
     141void btPolyhedralConvexAabbCachingShape::getAabb(const btTransform& trans,btVector3& aabbMin,btVector3& aabbMax) const
     142{
     143        getNonvirtualAabb(trans,aabbMin,aabbMax,getMargin());
     144}
     145
     146void    btPolyhedralConvexAabbCachingShape::recalcLocalAabb()
    137147{
    138148        m_isLocalAabbValid = true;
     
    182192}
    183193
    184 
    185 
Note: See TracChangeset for help on using the changeset viewer.