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/btStaticPlaneShape.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
    2222///The btStaticPlaneShape simulates an infinite non-moving (static) collision plane.
    23 class btStaticPlaneShape : public btConcaveShape
     23ATTRIBUTE_ALIGNED16(class) btStaticPlaneShape : public btConcaveShape
    2424{
    2525protected:
     
    5959        virtual const char*     getName()const {return "STATICPLANE";}
    6060
     61        virtual int     calculateSerializeBufferSize() const;
     62
     63        ///fills the dataBuffer and returns the struct name (and 0 on failure)
     64        virtual const char*     serialize(void* dataBuffer, btSerializer* serializer) const;
     65
    6166
    6267};
    6368
     69///do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
     70struct  btStaticPlaneShapeData
     71{
     72        btCollisionShapeData    m_collisionShapeData;
     73
     74        btVector3FloatData      m_localScaling;
     75        btVector3FloatData      m_planeNormal;
     76        float                   m_planeConstant;
     77        char    m_pad[4];
     78};
     79
     80
     81SIMD_FORCE_INLINE       int     btStaticPlaneShape::calculateSerializeBufferSize() const
     82{
     83        return sizeof(btStaticPlaneShapeData);
     84}
     85
     86///fills the dataBuffer and returns the struct name (and 0 on failure)
     87SIMD_FORCE_INLINE       const char*     btStaticPlaneShape::serialize(void* dataBuffer, btSerializer* serializer) const
     88{
     89        btStaticPlaneShapeData* planeData = (btStaticPlaneShapeData*) dataBuffer;
     90        btCollisionShape::serialize(&planeData->m_collisionShapeData,serializer);
     91
     92        m_localScaling.serializeFloat(planeData->m_localScaling);
     93        m_planeNormal.serializeFloat(planeData->m_planeNormal);
     94        planeData->m_planeConstant = float(m_planeConstant);
     95               
     96        return "btStaticPlaneShapeData";
     97}
     98
     99
    64100#endif //STATIC_PLANE_SHAPE_H
     101
     102
     103
Note: See TracChangeset for help on using the changeset viewer.