Changeset 8284 for code/branches/kicklib2/src/external/bullet/BulletCollision/CollisionShapes/btStaticPlaneShape.h
- Timestamp:
- Apr 21, 2011, 6:58:23 PM (14 years ago)
- Location:
- code/branches/kicklib2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/kicklib2
- Property svn:mergeinfo changed
-
code/branches/kicklib2/src/external/bullet/BulletCollision/CollisionShapes/btStaticPlaneShape.h
r5781 r8284 1 1 /* 2 2 Bullet Continuous Collision Detection and Physics Library 3 Copyright (c) 2003-200 6 Erwin Coumans http://continuousphysics.com/Bullet/3 Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org 4 4 5 5 This software is provided 'as-is', without any express or implied warranty. … … 21 21 22 22 ///The btStaticPlaneShape simulates an infinite non-moving (static) collision plane. 23 classbtStaticPlaneShape : public btConcaveShape23 ATTRIBUTE_ALIGNED16(class) btStaticPlaneShape : public btConcaveShape 24 24 { 25 25 protected: … … 59 59 virtual const char* getName()const {return "STATICPLANE";} 60 60 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 61 66 62 67 }; 63 68 69 ///do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64 70 struct 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 81 SIMD_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) 87 SIMD_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 64 100 #endif //STATIC_PLANE_SHAPE_H 101 102 103
Note: See TracChangeset
for help on using the changeset viewer.