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/btCollisionShape.h

    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.
     
    2121#include "LinearMath/btMatrix3x3.h"
    2222#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" //for the shape types
     23class btSerializer;
     24
    2325
    2426///The btCollisionShape class provides an interface for collision shapes that can be shared among btCollisionObjects.
     
    4749        virtual btScalar        getAngularMotionDisc() const;
    4850
    49         virtual btScalar        getContactBreakingThreshold() const;
     51        virtual btScalar        getContactBreakingThreshold(btScalar defaultContactThresholdFactor) const;
    5052
    5153
     
    5456        void calculateTemporalAabb(const btTransform& curTrans,const btVector3& linvel,const btVector3& angvel,btScalar timeStep, btVector3& temporalAabbMin,btVector3& temporalAabbMax) const;
    5557
    56 #ifndef __SPU__
     58
    5759
    5860        SIMD_FORCE_INLINE bool  isPolyhedral() const
     
    6163        }
    6264
     65        SIMD_FORCE_INLINE bool  isConvex2d() const
     66        {
     67                return btBroadphaseProxy::isConvex2d(getShapeType());
     68        }
     69
    6370        SIMD_FORCE_INLINE bool  isConvex() const
    6471        {
    6572                return btBroadphaseProxy::isConvex(getShapeType());
     73        }
     74        SIMD_FORCE_INLINE bool  isNonMoving() const
     75        {
     76                return btBroadphaseProxy::isNonMoving(getShapeType());
    6677        }
    6778        SIMD_FORCE_INLINE bool  isConcave() const
     
    7485        }
    7586
     87        SIMD_FORCE_INLINE bool  isSoftBody() const
     88        {
     89                return btBroadphaseProxy::isSoftBody(getShapeType());
     90        }
     91
    7692        ///isInfinite is used to catch simulation error (aabb check)
    7793        SIMD_FORCE_INLINE bool isInfinite() const
     
    8096        }
    8197
    82        
     98#ifndef __SPU__
    8399        virtual void    setLocalScaling(const btVector3& scaling) =0;
    84100        virtual const btVector3& getLocalScaling() const =0;
     
    107123        }
    108124
     125        virtual int     calculateSerializeBufferSize() const;
     126
     127        ///fills the dataBuffer and returns the struct name (and 0 on failure)
     128        virtual const char*     serialize(void* dataBuffer, btSerializer* serializer) const;
     129
     130        virtual void    serializeSingleShape(btSerializer* serializer) const;
     131
    109132};     
     133
     134///do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
     135struct  btCollisionShapeData
     136{
     137        char    *m_name;
     138        int             m_shapeType;
     139        char    m_padding[4];
     140};
     141
     142SIMD_FORCE_INLINE       int     btCollisionShape::calculateSerializeBufferSize() const
     143{
     144        return sizeof(btCollisionShapeData);
     145}
     146
     147
    110148
    111149#endif //COLLISION_SHAPE_H
Note: See TracChangeset for help on using the changeset viewer.