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/btCompoundShape.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.
     
    6363        int                                                             m_updateRevision;
    6464
     65        btScalar        m_collisionMargin;
     66
     67protected:
     68        btVector3       m_localScaling;
     69
    6570public:
    6671        BT_DECLARE_ALIGNED_ALLOCATOR();
     
    117122        virtual void recalculateLocalAabb();
    118123
    119         virtual void    setLocalScaling(const btVector3& scaling)
    120         {
    121                 m_localScaling = scaling;
    122         }
     124        virtual void    setLocalScaling(const btVector3& scaling);
     125
    123126        virtual const btVector3& getLocalScaling() const
    124127        {
     
    141144        }
    142145
    143         //this is optional, but should make collision queries faster, by culling non-overlapping nodes
    144         void    createAabbTreeFromChildren();
    145146
    146147        btDbvt*                                                 getDynamicAabbTree()
     
    148149                return m_dynamicAabbTree;
    149150        }
     151
     152        void createAabbTreeFromChildren();
    150153
    151154        ///computes the exact moment of inertia and the transform from the coordinate system defined by the principal axes of the moment of inertia
     
    161164        }
    162165
    163 private:
    164         btScalar        m_collisionMargin;
    165 protected:
    166         btVector3       m_localScaling;
    167 
    168 };
     166        virtual int     calculateSerializeBufferSize() const;
     167
     168        ///fills the dataBuffer and returns the struct name (and 0 on failure)
     169        virtual const char*     serialize(void* dataBuffer, btSerializer* serializer) const;
     170
     171
     172};
     173
     174///do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
     175struct btCompoundShapeChildData
     176{
     177        btTransformFloatData    m_transform;
     178        btCollisionShapeData    *m_childShape;
     179        int                                             m_childShapeType;
     180        float                                   m_childMargin;
     181};
     182
     183///do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
     184struct  btCompoundShapeData
     185{
     186        btCollisionShapeData            m_collisionShapeData;
     187
     188        btCompoundShapeChildData        *m_childShapePtr;
     189
     190        int                                                     m_numChildShapes;
     191
     192        float   m_collisionMargin;
     193
     194};
     195
     196
     197SIMD_FORCE_INLINE       int     btCompoundShape::calculateSerializeBufferSize() const
     198{
     199        return sizeof(btCompoundShapeData);
     200}
     201
     202
     203
     204
    169205
    170206
Note: See TracChangeset for help on using the changeset viewer.