Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 21, 2011, 6:58:23 PM (14 years ago)
Author:
rgrieder
Message:

Merged revisions 7978 - 8096 from kicklib to kicklib2.

Location:
code/branches/kicklib2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/kicklib2

  • code/branches/kicklib2/src/external/bullet/BulletCollision/CollisionShapes/btCompoundShape.h

    r5781 r8284  
    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.