added serialization support for btCompoundShape, btCapsuleShapeX/Z, btCylinderShapeX,Z
make some serialization methods const prepare for constraint serialization
This commit is contained in:
@@ -88,6 +88,13 @@ public:
|
||||
m_implicitShapeDimensions = (unScaledImplicitShapeDimensionsWithMargin * m_localScaling) - oldMargin;
|
||||
|
||||
}
|
||||
|
||||
virtual int calculateSerializeBufferSize() const;
|
||||
|
||||
///fills the dataBuffer and returns the struct name (and 0 on failure)
|
||||
virtual const char* serialize(void* dataBuffer, btSerializer* serializer) const;
|
||||
|
||||
|
||||
};
|
||||
|
||||
///btCapsuleShapeX represents a capsule around the Z axis
|
||||
@@ -125,5 +132,30 @@ public:
|
||||
};
|
||||
|
||||
|
||||
struct btCapsuleShapeData
|
||||
{
|
||||
btConvexInternalShapeData m_convexInternalShapeData;
|
||||
|
||||
int m_upAxis;
|
||||
|
||||
char m_padding[4];
|
||||
};
|
||||
|
||||
SIMD_FORCE_INLINE int btCapsuleShape::calculateSerializeBufferSize() const
|
||||
{
|
||||
return sizeof(btCapsuleShapeData);
|
||||
}
|
||||
|
||||
///fills the dataBuffer and returns the struct name (and 0 on failure)
|
||||
SIMD_FORCE_INLINE const char* btCapsuleShape::serialize(void* dataBuffer, btSerializer* serializer) const
|
||||
{
|
||||
btCapsuleShapeData* shapeData = (btCapsuleShapeData*) dataBuffer;
|
||||
|
||||
btConvexInternalShape::serialize(&shapeData->m_convexInternalShapeData,serializer);
|
||||
|
||||
shapeData->m_upAxis = m_upAxis;
|
||||
|
||||
return "btCapsuleShapeData";
|
||||
}
|
||||
|
||||
#endif //BT_CAPSULE_SHAPE_H
|
||||
|
||||
@@ -118,7 +118,7 @@ public:
|
||||
return m_userPointer;
|
||||
}
|
||||
|
||||
virtual int calculateSerializeBufferSize();
|
||||
virtual int calculateSerializeBufferSize() const;
|
||||
|
||||
///fills the dataBuffer and returns the struct name (and 0 on failure)
|
||||
virtual const char* serialize(void* dataBuffer, btSerializer* serializer) const;
|
||||
@@ -133,7 +133,7 @@ struct btCollisionShapeData
|
||||
char m_padding[4];
|
||||
};
|
||||
|
||||
SIMD_FORCE_INLINE int btCollisionShape::calculateSerializeBufferSize()
|
||||
SIMD_FORCE_INLINE int btCollisionShape::calculateSerializeBufferSize() const
|
||||
{
|
||||
return sizeof(btCollisionShapeData);
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ subject to the following restrictions:
|
||||
#include "btCompoundShape.h"
|
||||
#include "btCollisionShape.h"
|
||||
#include "BulletCollision/BroadphaseCollision/btDbvt.h"
|
||||
#include "LinearMath/btSerializer.h"
|
||||
|
||||
btCompoundShape::btCompoundShape(bool enableDynamicAabbTree)
|
||||
: m_localAabbMin(btScalar(BT_LARGE_FLOAT),btScalar(BT_LARGE_FLOAT),btScalar(BT_LARGE_FLOAT)),
|
||||
@@ -278,5 +279,36 @@ void btCompoundShape::setLocalScaling(const btVector3& scaling)
|
||||
updateChildTransform(i, childTrans);
|
||||
recalculateLocalAabb();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
///fills the dataBuffer and returns the struct name (and 0 on failure)
|
||||
const char* btCompoundShape::serialize(void* dataBuffer, btSerializer* serializer) const
|
||||
{
|
||||
|
||||
btCompoundShapeData* shapeData = (btCompoundShapeData*) dataBuffer;
|
||||
btCollisionShape::serialize(&shapeData->m_collisionShapeData, serializer);
|
||||
|
||||
shapeData->m_collisionMargin = float(m_collisionMargin);
|
||||
shapeData->m_numChildShapes = m_children.size();
|
||||
shapeData->m_childShapePtr = 0;
|
||||
if (shapeData->m_numChildShapes)
|
||||
{
|
||||
btChunk* chunk = serializer->allocate(sizeof(btCompoundShapeChildData),shapeData->m_numChildShapes);
|
||||
btCompoundShapeChildData* memPtr = (btCompoundShapeChildData*)chunk->m_oldPtr;
|
||||
shapeData->m_childShapePtr = memPtr;
|
||||
|
||||
for (int i=0;i<shapeData->m_numChildShapes;i++,memPtr++)
|
||||
{
|
||||
memPtr->m_childMargin = float(m_children[i].m_childMargin);
|
||||
memPtr->m_childShape = (btCollisionShapeData*)m_children[i].m_childShape;
|
||||
memPtr->m_childShapeType = m_children[i].m_childShapeType;
|
||||
m_children[i].m_transform.serializeFloat(memPtr->m_transform);
|
||||
}
|
||||
serializer->finalizeChunk(chunk,"btCompoundShapeChildData",BT_ARRAY_CODE,chunk->m_oldPtr);
|
||||
}
|
||||
return "btCompoundShapeData";
|
||||
}
|
||||
|
||||
|
||||
@@ -62,6 +62,11 @@ ATTRIBUTE_ALIGNED16(class) btCompoundShape : public btCollisionShape
|
||||
///increment m_updateRevision when adding/removing/replacing child shapes, so that some caches can be updated
|
||||
int m_updateRevision;
|
||||
|
||||
btScalar m_collisionMargin;
|
||||
|
||||
protected:
|
||||
btVector3 m_localScaling;
|
||||
|
||||
public:
|
||||
BT_DECLARE_ALIGNED_ALLOCATOR();
|
||||
|
||||
@@ -158,13 +163,46 @@ public:
|
||||
return m_updateRevision;
|
||||
}
|
||||
|
||||
private:
|
||||
btScalar m_collisionMargin;
|
||||
protected:
|
||||
btVector3 m_localScaling;
|
||||
virtual int calculateSerializeBufferSize() const;
|
||||
|
||||
///fills the dataBuffer and returns the struct name (and 0 on failure)
|
||||
virtual const char* serialize(void* dataBuffer, btSerializer* serializer) const;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
struct btCompoundShapeChildData
|
||||
{
|
||||
btTransformFloatData m_transform;
|
||||
btCollisionShapeData *m_childShape;
|
||||
int m_childShapeType;
|
||||
float m_childMargin;
|
||||
};
|
||||
|
||||
|
||||
struct btCompoundShapeData
|
||||
{
|
||||
btCollisionShapeData m_collisionShapeData;
|
||||
|
||||
btCompoundShapeChildData *m_childShapePtr;
|
||||
|
||||
int m_numChildShapes;
|
||||
|
||||
float m_collisionMargin;
|
||||
|
||||
};
|
||||
|
||||
|
||||
SIMD_FORCE_INLINE int btCompoundShape::calculateSerializeBufferSize() const
|
||||
{
|
||||
return sizeof(btCompoundShapeData);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif //COMPOUND_SHAPE_H
|
||||
|
||||
@@ -89,7 +89,7 @@ public:
|
||||
///in case we receive negative scaling
|
||||
virtual void setLocalScaling(const btVector3& scaling);
|
||||
|
||||
virtual int calculateSerializeBufferSize();
|
||||
virtual int calculateSerializeBufferSize() const;
|
||||
|
||||
///fills the dataBuffer and returns the struct name (and 0 on failure)
|
||||
virtual const char* serialize(void* dataBuffer, btSerializer* serializer) const;
|
||||
@@ -110,7 +110,7 @@ struct btConvexHullShapeData
|
||||
};
|
||||
|
||||
|
||||
SIMD_FORCE_INLINE int btConvexHullShape::calculateSerializeBufferSize()
|
||||
SIMD_FORCE_INLINE int btConvexHullShape::calculateSerializeBufferSize() const
|
||||
{
|
||||
return sizeof(btConvexHullShapeData);
|
||||
}
|
||||
|
||||
@@ -110,7 +110,7 @@ public:
|
||||
btAssert(0);
|
||||
}
|
||||
|
||||
virtual int calculateSerializeBufferSize();
|
||||
virtual int calculateSerializeBufferSize() const;
|
||||
|
||||
///fills the dataBuffer and returns the struct name (and 0 on failure)
|
||||
virtual const char* serialize(void* dataBuffer, btSerializer* serializer) const;
|
||||
@@ -135,7 +135,7 @@ struct btConvexInternalShapeData
|
||||
|
||||
|
||||
|
||||
SIMD_FORCE_INLINE int btConvexInternalShape::calculateSerializeBufferSize()
|
||||
SIMD_FORCE_INLINE int btConvexInternalShape::calculateSerializeBufferSize() const
|
||||
{
|
||||
return sizeof(btConvexInternalShapeData);
|
||||
}
|
||||
|
||||
@@ -106,7 +106,10 @@ public:
|
||||
return "CylinderY";
|
||||
}
|
||||
|
||||
virtual int calculateSerializeBufferSize() const;
|
||||
|
||||
///fills the dataBuffer and returns the struct name (and 0 on failure)
|
||||
virtual const char* serialize(void* dataBuffer, btSerializer* serializer) const;
|
||||
|
||||
};
|
||||
|
||||
@@ -157,5 +160,33 @@ public:
|
||||
};
|
||||
|
||||
|
||||
struct btCylinderShapeData
|
||||
{
|
||||
btConvexInternalShapeData m_convexInternalShapeData;
|
||||
|
||||
int m_upAxis;
|
||||
|
||||
char m_padding[4];
|
||||
};
|
||||
|
||||
SIMD_FORCE_INLINE int btCylinderShape::calculateSerializeBufferSize() const
|
||||
{
|
||||
return sizeof(btCylinderShapeData);
|
||||
}
|
||||
|
||||
///fills the dataBuffer and returns the struct name (and 0 on failure)
|
||||
SIMD_FORCE_INLINE const char* btCylinderShape::serialize(void* dataBuffer, btSerializer* serializer) const
|
||||
{
|
||||
btCylinderShapeData* shapeData = (btCylinderShapeData*) dataBuffer;
|
||||
|
||||
btConvexInternalShape::serialize(&shapeData->m_convexInternalShapeData,serializer);
|
||||
|
||||
shapeData->m_upAxis = m_upAxis;
|
||||
|
||||
return "btCylinderShapeData";
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endif //CYLINDER_MINKOWSKI_H
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ public:
|
||||
return "MultiSphere";
|
||||
}
|
||||
|
||||
virtual int calculateSerializeBufferSize();
|
||||
virtual int calculateSerializeBufferSize() const;
|
||||
|
||||
///fills the dataBuffer and returns the struct name (and 0 on failure)
|
||||
virtual const char* serialize(void* dataBuffer, btSerializer* serializer) const;
|
||||
@@ -89,7 +89,7 @@ struct btMultiSphereShapeData
|
||||
|
||||
|
||||
|
||||
SIMD_FORCE_INLINE int btMultiSphereShape::calculateSerializeBufferSize()
|
||||
SIMD_FORCE_INLINE int btMultiSphereShape::calculateSerializeBufferSize() const
|
||||
{
|
||||
return sizeof(btMultiSphereShapeData);
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ class btStridingMeshInterface
|
||||
m_scaling = scaling;
|
||||
}
|
||||
|
||||
virtual int calculateSerializeBufferSize();
|
||||
virtual int calculateSerializeBufferSize() const;
|
||||
|
||||
///fills the dataBuffer and returns the struct name (and 0 on failure)
|
||||
virtual const char* serialize(void* dataBuffer, btSerializer* serializer) const;
|
||||
@@ -132,7 +132,7 @@ struct btStridingMeshInterfaceData
|
||||
|
||||
|
||||
|
||||
SIMD_FORCE_INLINE int btStridingMeshInterface::calculateSerializeBufferSize()
|
||||
SIMD_FORCE_INLINE int btStridingMeshInterface::calculateSerializeBufferSize() const
|
||||
{
|
||||
return sizeof(btStridingMeshInterfaceData);
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ public:
|
||||
//debugging
|
||||
virtual const char* getName()const {return "TRIANGLEMESH";}
|
||||
|
||||
virtual int calculateSerializeBufferSize();
|
||||
virtual int calculateSerializeBufferSize() const;
|
||||
|
||||
///fills the dataBuffer and returns the struct name (and 0 on failure)
|
||||
virtual const char* serialize(void* dataBuffer, btSerializer* serializer) const;
|
||||
@@ -101,7 +101,7 @@ struct btTriangleMeshShapeData
|
||||
};
|
||||
|
||||
|
||||
SIMD_FORCE_INLINE int btTriangleMeshShape::calculateSerializeBufferSize()
|
||||
SIMD_FORCE_INLINE int btTriangleMeshShape::calculateSerializeBufferSize() const
|
||||
{
|
||||
return sizeof(btTriangleMeshShapeData);
|
||||
}
|
||||
|
||||
@@ -503,6 +503,8 @@ public:
|
||||
|
||||
void serialize(struct btMatrix3x3Data& dataOut) const;
|
||||
|
||||
void serializeFloat(struct btMatrix3x3FloatData& dataOut) const;
|
||||
|
||||
void deSerialize(const struct btMatrix3x3Data& dataIn);
|
||||
|
||||
void deSerializeFloat(const struct btMatrix3x3FloatData& dataIn);
|
||||
@@ -650,12 +652,19 @@ struct btMatrix3x3DoubleData
|
||||
|
||||
|
||||
|
||||
|
||||
SIMD_FORCE_INLINE void btMatrix3x3::serialize(struct btMatrix3x3Data& dataOut) const
|
||||
{
|
||||
for (int i=0;i<3;i++)
|
||||
m_el[i].serialize(dataOut.m_el[i]);
|
||||
}
|
||||
|
||||
SIMD_FORCE_INLINE void btMatrix3x3::serializeFloat(struct btMatrix3x3FloatData& dataOut) const
|
||||
{
|
||||
for (int i=0;i<3;i++)
|
||||
m_el[i].serializeFloat(dataOut.m_el[i]);
|
||||
}
|
||||
|
||||
|
||||
SIMD_FORCE_INLINE void btMatrix3x3::deSerialize(const struct btMatrix3x3Data& dataIn)
|
||||
{
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
|
||||
unsigned char sBulletDNAstr64[]= {
|
||||
83,68,78,65,78,65,77,69,85,0,0,0,109,95,115,105,122,101,0,109,
|
||||
83,68,78,65,78,65,77,69,92,0,0,0,109,95,115,105,122,101,0,109,
|
||||
95,99,97,112,97,99,105,116,121,0,42,109,95,100,97,116,97,0,109,95,
|
||||
99,111,108,108,105,115,105,111,110,83,104,97,112,101,115,0,109,95,99,111,
|
||||
108,108,105,115,105,111,110,79,98,106,101,99,116,115,0,109,95,99,111,110,
|
||||
@@ -25,7 +24,12 @@ unsigned char sBulletDNAstr64[]= {
|
||||
0,109,95,110,117,109,86,101,114,116,105,99,101,115,0,42,109,95,109,101,
|
||||
115,104,80,97,114,116,115,80,116,114,0,109,95,115,99,97,108,105,110,103,
|
||||
0,109,95,110,117,109,77,101,115,104,80,97,114,116,115,0,109,95,109,101,
|
||||
115,104,73,110,116,101,114,102,97,99,101,0,42,109,95,117,110,115,99,97,
|
||||
115,104,73,110,116,101,114,102,97,99,101,0,109,95,116,114,97,110,115,102,
|
||||
111,114,109,0,42,109,95,99,104,105,108,100,83,104,97,112,101,0,109,95,
|
||||
99,104,105,108,100,83,104,97,112,101,84,121,112,101,0,109,95,99,104,105,
|
||||
108,100,77,97,114,103,105,110,0,42,109,95,99,104,105,108,100,83,104,97,
|
||||
112,101,80,116,114,0,109,95,110,117,109,67,104,105,108,100,83,104,97,112,
|
||||
101,115,0,109,95,117,112,65,120,105,115,0,42,109,95,117,110,115,99,97,
|
||||
108,101,100,80,111,105,110,116,115,70,108,111,97,116,80,116,114,0,42,109,
|
||||
95,117,110,115,99,97,108,101,100,80,111,105,110,116,115,68,111,117,98,108,
|
||||
101,80,116,114,0,109,95,110,117,109,85,110,115,99,97,108,101,100,80,111,
|
||||
@@ -75,7 +79,7 @@ unsigned char sBulletDNAstr64[]= {
|
||||
110,101,97,114,83,108,101,101,112,105,110,103,84,104,114,101,115,104,111,108,
|
||||
100,0,109,95,97,110,103,117,108,97,114,83,108,101,101,112,105,110,103,84,
|
||||
104,114,101,115,104,111,108,100,0,109,95,97,100,100,105,116,105,111,110,97,
|
||||
108,68,97,109,112,105,110,103,0,0,0,0,84,89,80,69,33,0,0,0,
|
||||
108,68,97,109,112,105,110,103,0,0,0,0,84,89,80,69,37,0,0,0,
|
||||
99,104,97,114,0,117,99,104,97,114,0,115,104,111,114,116,0,117,115,104,
|
||||
111,114,116,0,105,110,116,0,108,111,110,103,0,117,108,111,110,103,0,102,
|
||||
108,111,97,116,0,100,111,117,98,108,101,0,118,111,105,100,0,80,111,105,
|
||||
@@ -96,55 +100,62 @@ unsigned char sBulletDNAstr64[]= {
|
||||
68,97,116,97,0,98,116,77,101,115,104,80,97,114,116,68,97,116,97,0,
|
||||
98,116,83,116,114,105,100,105,110,103,77,101,115,104,73,110,116,101,114,102,
|
||||
97,99,101,68,97,116,97,0,98,116,84,114,105,97,110,103,108,101,77,101,
|
||||
115,104,83,104,97,112,101,68,97,116,97,0,98,116,67,111,110,118,101,120,
|
||||
72,117,108,108,83,104,97,112,101,68,97,116,97,0,98,116,67,111,108,108,
|
||||
105,115,105,111,110,79,98,106,101,99,116,68,111,117,98,108,101,68,97,116,
|
||||
97,0,98,116,67,111,108,108,105,115,105,111,110,79,98,106,101,99,116,70,
|
||||
108,111,97,116,68,97,116,97,0,98,116,82,105,103,105,100,66,111,100,121,
|
||||
70,108,111,97,116,68,97,116,97,0,98,116,82,105,103,105,100,66,111,100,
|
||||
121,68,111,117,98,108,101,68,97,116,97,0,84,76,69,78,1,0,1,0,
|
||||
2,0,2,0,4,0,4,0,4,0,4,0,8,0,0,0,16,0,48,0,
|
||||
16,0,16,0,32,0,48,0,96,0,64,0,-128,0,16,0,56,0,20,0,
|
||||
72,0,4,0,4,0,40,0,32,0,56,0,80,0,-40,1,8,1,-16,1,
|
||||
-88,3,0,0,83,84,82,67,23,0,0,0,10,0,3,0,4,0,0,0,
|
||||
4,0,1,0,9,0,2,0,11,0,3,0,10,0,3,0,10,0,4,0,
|
||||
10,0,5,0,12,0,2,0,9,0,6,0,9,0,7,0,13,0,1,0,
|
||||
7,0,8,0,14,0,1,0,8,0,8,0,15,0,1,0,13,0,9,0,
|
||||
16,0,1,0,14,0,9,0,17,0,2,0,15,0,10,0,13,0,11,0,
|
||||
18,0,2,0,16,0,10,0,14,0,11,0,19,0,3,0,9,0,12,0,
|
||||
4,0,13,0,0,0,14,0,20,0,5,0,19,0,15,0,13,0,16,0,
|
||||
13,0,17,0,7,0,18,0,4,0,19,0,21,0,2,0,13,0,20,0,
|
||||
7,0,21,0,22,0,4,0,20,0,22,0,21,0,23,0,4,0,24,0,
|
||||
0,0,14,0,23,0,1,0,4,0,25,0,24,0,2,0,2,0,26,0,
|
||||
2,0,25,0,25,0,6,0,13,0,27,0,14,0,28,0,23,0,29,0,
|
||||
24,0,30,0,4,0,31,0,4,0,32,0,26,0,4,0,25,0,33,0,
|
||||
13,0,34,0,4,0,35,0,0,0,14,0,27,0,4,0,19,0,15,0,
|
||||
26,0,36,0,7,0,18,0,0,0,14,0,28,0,5,0,20,0,22,0,
|
||||
13,0,37,0,14,0,38,0,4,0,39,0,0,0,40,0,29,0,24,0,
|
||||
9,0,41,0,9,0,42,0,19,0,43,0,9,0,44,0,18,0,45,0,
|
||||
18,0,46,0,14,0,47,0,14,0,48,0,14,0,49,0,8,0,50,0,
|
||||
8,0,51,0,8,0,52,0,8,0,53,0,8,0,54,0,8,0,55,0,
|
||||
8,0,56,0,4,0,57,0,4,0,58,0,4,0,59,0,4,0,60,0,
|
||||
4,0,61,0,4,0,62,0,4,0,63,0,0,0,14,0,30,0,23,0,
|
||||
9,0,41,0,9,0,42,0,19,0,43,0,9,0,44,0,17,0,45,0,
|
||||
17,0,46,0,13,0,47,0,13,0,48,0,13,0,49,0,7,0,50,0,
|
||||
7,0,51,0,7,0,52,0,7,0,53,0,7,0,54,0,7,0,55,0,
|
||||
7,0,56,0,4,0,57,0,4,0,58,0,4,0,59,0,4,0,60,0,
|
||||
4,0,61,0,4,0,62,0,4,0,63,0,31,0,21,0,30,0,64,0,
|
||||
15,0,65,0,13,0,66,0,13,0,67,0,13,0,68,0,13,0,69,0,
|
||||
13,0,70,0,13,0,71,0,13,0,72,0,13,0,73,0,13,0,74,0,
|
||||
7,0,75,0,7,0,76,0,7,0,77,0,7,0,78,0,7,0,79,0,
|
||||
7,0,80,0,7,0,81,0,7,0,82,0,7,0,83,0,4,0,84,0,
|
||||
32,0,22,0,29,0,64,0,16,0,65,0,14,0,66,0,14,0,67,0,
|
||||
14,0,68,0,14,0,69,0,14,0,70,0,14,0,71,0,14,0,72,0,
|
||||
14,0,73,0,14,0,74,0,8,0,75,0,8,0,76,0,8,0,77,0,
|
||||
8,0,78,0,8,0,79,0,8,0,80,0,8,0,81,0,8,0,82,0,
|
||||
8,0,83,0,4,0,84,0,0,0,14,0,};
|
||||
115,104,83,104,97,112,101,68,97,116,97,0,98,116,67,111,109,112,111,117,
|
||||
110,100,83,104,97,112,101,67,104,105,108,100,68,97,116,97,0,98,116,67,
|
||||
111,109,112,111,117,110,100,83,104,97,112,101,68,97,116,97,0,98,116,67,
|
||||
121,108,105,110,100,101,114,83,104,97,112,101,68,97,116,97,0,98,116,67,
|
||||
97,112,115,117,108,101,83,104,97,112,101,68,97,116,97,0,98,116,67,111,
|
||||
110,118,101,120,72,117,108,108,83,104,97,112,101,68,97,116,97,0,98,116,
|
||||
67,111,108,108,105,115,105,111,110,79,98,106,101,99,116,68,111,117,98,108,
|
||||
101,68,97,116,97,0,98,116,67,111,108,108,105,115,105,111,110,79,98,106,
|
||||
101,99,116,70,108,111,97,116,68,97,116,97,0,98,116,82,105,103,105,100,
|
||||
66,111,100,121,70,108,111,97,116,68,97,116,97,0,98,116,82,105,103,105,
|
||||
100,66,111,100,121,68,111,117,98,108,101,68,97,116,97,0,84,76,69,78,
|
||||
1,0,1,0,2,0,2,0,4,0,4,0,4,0,4,0,8,0,0,0,
|
||||
16,0,48,0,16,0,16,0,32,0,48,0,96,0,64,0,-128,0,16,0,
|
||||
56,0,20,0,72,0,4,0,4,0,40,0,32,0,56,0,80,0,32,0,
|
||||
64,0,64,0,80,0,-40,1,8,1,-16,1,-88,3,0,0,83,84,82,67,
|
||||
27,0,0,0,10,0,3,0,4,0,0,0,4,0,1,0,9,0,2,0,
|
||||
11,0,3,0,10,0,3,0,10,0,4,0,10,0,5,0,12,0,2,0,
|
||||
9,0,6,0,9,0,7,0,13,0,1,0,7,0,8,0,14,0,1,0,
|
||||
8,0,8,0,15,0,1,0,13,0,9,0,16,0,1,0,14,0,9,0,
|
||||
17,0,2,0,15,0,10,0,13,0,11,0,18,0,2,0,16,0,10,0,
|
||||
14,0,11,0,19,0,3,0,9,0,12,0,4,0,13,0,0,0,14,0,
|
||||
20,0,5,0,19,0,15,0,13,0,16,0,13,0,17,0,7,0,18,0,
|
||||
4,0,19,0,21,0,2,0,13,0,20,0,7,0,21,0,22,0,4,0,
|
||||
20,0,22,0,21,0,23,0,4,0,24,0,0,0,14,0,23,0,1,0,
|
||||
4,0,25,0,24,0,2,0,2,0,26,0,2,0,25,0,25,0,6,0,
|
||||
13,0,27,0,14,0,28,0,23,0,29,0,24,0,30,0,4,0,31,0,
|
||||
4,0,32,0,26,0,4,0,25,0,33,0,13,0,34,0,4,0,35,0,
|
||||
0,0,14,0,27,0,4,0,19,0,15,0,26,0,36,0,7,0,18,0,
|
||||
0,0,14,0,28,0,4,0,17,0,37,0,19,0,38,0,4,0,39,0,
|
||||
7,0,40,0,29,0,4,0,19,0,15,0,28,0,41,0,4,0,42,0,
|
||||
7,0,18,0,30,0,3,0,20,0,22,0,4,0,43,0,0,0,14,0,
|
||||
31,0,3,0,20,0,22,0,4,0,43,0,0,0,14,0,32,0,5,0,
|
||||
20,0,22,0,13,0,44,0,14,0,45,0,4,0,46,0,0,0,47,0,
|
||||
33,0,24,0,9,0,48,0,9,0,49,0,19,0,50,0,9,0,51,0,
|
||||
18,0,52,0,18,0,53,0,14,0,54,0,14,0,55,0,14,0,56,0,
|
||||
8,0,57,0,8,0,58,0,8,0,59,0,8,0,60,0,8,0,61,0,
|
||||
8,0,62,0,8,0,63,0,4,0,64,0,4,0,65,0,4,0,66,0,
|
||||
4,0,67,0,4,0,68,0,4,0,69,0,4,0,70,0,0,0,14,0,
|
||||
34,0,23,0,9,0,48,0,9,0,49,0,19,0,50,0,9,0,51,0,
|
||||
17,0,52,0,17,0,53,0,13,0,54,0,13,0,55,0,13,0,56,0,
|
||||
7,0,57,0,7,0,58,0,7,0,59,0,7,0,60,0,7,0,61,0,
|
||||
7,0,62,0,7,0,63,0,4,0,64,0,4,0,65,0,4,0,66,0,
|
||||
4,0,67,0,4,0,68,0,4,0,69,0,4,0,70,0,35,0,21,0,
|
||||
34,0,71,0,15,0,72,0,13,0,73,0,13,0,74,0,13,0,75,0,
|
||||
13,0,76,0,13,0,77,0,13,0,78,0,13,0,79,0,13,0,80,0,
|
||||
13,0,81,0,7,0,82,0,7,0,83,0,7,0,84,0,7,0,85,0,
|
||||
7,0,86,0,7,0,87,0,7,0,88,0,7,0,89,0,7,0,90,0,
|
||||
4,0,91,0,36,0,22,0,33,0,71,0,16,0,72,0,14,0,73,0,
|
||||
14,0,74,0,14,0,75,0,14,0,76,0,14,0,77,0,14,0,78,0,
|
||||
14,0,79,0,14,0,80,0,14,0,81,0,8,0,82,0,8,0,83,0,
|
||||
8,0,84,0,8,0,85,0,8,0,86,0,8,0,87,0,8,0,88,0,
|
||||
8,0,89,0,8,0,90,0,4,0,91,0,0,0,14,0,};
|
||||
int sBulletDNAlen64= sizeof(sBulletDNAstr64);
|
||||
|
||||
|
||||
unsigned char sBulletDNAstr[]= {
|
||||
83,68,78,65,78,65,77,69,85,0,0,0,109,95,115,105,122,101,0,109,
|
||||
83,68,78,65,78,65,77,69,92,0,0,0,109,95,115,105,122,101,0,109,
|
||||
95,99,97,112,97,99,105,116,121,0,42,109,95,100,97,116,97,0,109,95,
|
||||
99,111,108,108,105,115,105,111,110,83,104,97,112,101,115,0,109,95,99,111,
|
||||
108,108,105,115,105,111,110,79,98,106,101,99,116,115,0,109,95,99,111,110,
|
||||
@@ -169,7 +180,12 @@ unsigned char sBulletDNAstr[]= {
|
||||
0,109,95,110,117,109,86,101,114,116,105,99,101,115,0,42,109,95,109,101,
|
||||
115,104,80,97,114,116,115,80,116,114,0,109,95,115,99,97,108,105,110,103,
|
||||
0,109,95,110,117,109,77,101,115,104,80,97,114,116,115,0,109,95,109,101,
|
||||
115,104,73,110,116,101,114,102,97,99,101,0,42,109,95,117,110,115,99,97,
|
||||
115,104,73,110,116,101,114,102,97,99,101,0,109,95,116,114,97,110,115,102,
|
||||
111,114,109,0,42,109,95,99,104,105,108,100,83,104,97,112,101,0,109,95,
|
||||
99,104,105,108,100,83,104,97,112,101,84,121,112,101,0,109,95,99,104,105,
|
||||
108,100,77,97,114,103,105,110,0,42,109,95,99,104,105,108,100,83,104,97,
|
||||
112,101,80,116,114,0,109,95,110,117,109,67,104,105,108,100,83,104,97,112,
|
||||
101,115,0,109,95,117,112,65,120,105,115,0,42,109,95,117,110,115,99,97,
|
||||
108,101,100,80,111,105,110,116,115,70,108,111,97,116,80,116,114,0,42,109,
|
||||
95,117,110,115,99,97,108,101,100,80,111,105,110,116,115,68,111,117,98,108,
|
||||
101,80,116,114,0,109,95,110,117,109,85,110,115,99,97,108,101,100,80,111,
|
||||
@@ -219,7 +235,7 @@ unsigned char sBulletDNAstr[]= {
|
||||
110,101,97,114,83,108,101,101,112,105,110,103,84,104,114,101,115,104,111,108,
|
||||
100,0,109,95,97,110,103,117,108,97,114,83,108,101,101,112,105,110,103,84,
|
||||
104,114,101,115,104,111,108,100,0,109,95,97,100,100,105,116,105,111,110,97,
|
||||
108,68,97,109,112,105,110,103,0,0,0,0,84,89,80,69,33,0,0,0,
|
||||
108,68,97,109,112,105,110,103,0,0,0,0,84,89,80,69,37,0,0,0,
|
||||
99,104,97,114,0,117,99,104,97,114,0,115,104,111,114,116,0,117,115,104,
|
||||
111,114,116,0,105,110,116,0,108,111,110,103,0,117,108,111,110,103,0,102,
|
||||
108,111,97,116,0,100,111,117,98,108,101,0,118,111,105,100,0,80,111,105,
|
||||
@@ -240,48 +256,56 @@ unsigned char sBulletDNAstr[]= {
|
||||
68,97,116,97,0,98,116,77,101,115,104,80,97,114,116,68,97,116,97,0,
|
||||
98,116,83,116,114,105,100,105,110,103,77,101,115,104,73,110,116,101,114,102,
|
||||
97,99,101,68,97,116,97,0,98,116,84,114,105,97,110,103,108,101,77,101,
|
||||
115,104,83,104,97,112,101,68,97,116,97,0,98,116,67,111,110,118,101,120,
|
||||
72,117,108,108,83,104,97,112,101,68,97,116,97,0,98,116,67,111,108,108,
|
||||
105,115,105,111,110,79,98,106,101,99,116,68,111,117,98,108,101,68,97,116,
|
||||
97,0,98,116,67,111,108,108,105,115,105,111,110,79,98,106,101,99,116,70,
|
||||
108,111,97,116,68,97,116,97,0,98,116,82,105,103,105,100,66,111,100,121,
|
||||
70,108,111,97,116,68,97,116,97,0,98,116,82,105,103,105,100,66,111,100,
|
||||
121,68,111,117,98,108,101,68,97,116,97,0,84,76,69,78,1,0,1,0,
|
||||
2,0,2,0,4,0,4,0,4,0,4,0,8,0,0,0,12,0,36,0,
|
||||
8,0,16,0,32,0,48,0,96,0,64,0,-128,0,12,0,52,0,20,0,
|
||||
64,0,4,0,4,0,24,0,28,0,48,0,68,0,-56,1,-8,0,-32,1,
|
||||
-104,3,0,0,83,84,82,67,23,0,0,0,10,0,3,0,4,0,0,0,
|
||||
4,0,1,0,9,0,2,0,11,0,3,0,10,0,3,0,10,0,4,0,
|
||||
10,0,5,0,12,0,2,0,9,0,6,0,9,0,7,0,13,0,1,0,
|
||||
7,0,8,0,14,0,1,0,8,0,8,0,15,0,1,0,13,0,9,0,
|
||||
16,0,1,0,14,0,9,0,17,0,2,0,15,0,10,0,13,0,11,0,
|
||||
18,0,2,0,16,0,10,0,14,0,11,0,19,0,3,0,9,0,12,0,
|
||||
4,0,13,0,0,0,14,0,20,0,5,0,19,0,15,0,13,0,16,0,
|
||||
13,0,17,0,7,0,18,0,4,0,19,0,21,0,2,0,13,0,20,0,
|
||||
7,0,21,0,22,0,4,0,20,0,22,0,21,0,23,0,4,0,24,0,
|
||||
0,0,14,0,23,0,1,0,4,0,25,0,24,0,2,0,2,0,26,0,
|
||||
2,0,25,0,25,0,6,0,13,0,27,0,14,0,28,0,23,0,29,0,
|
||||
24,0,30,0,4,0,31,0,4,0,32,0,26,0,4,0,25,0,33,0,
|
||||
13,0,34,0,4,0,35,0,0,0,14,0,27,0,4,0,19,0,15,0,
|
||||
26,0,36,0,7,0,18,0,0,0,14,0,28,0,5,0,20,0,22,0,
|
||||
13,0,37,0,14,0,38,0,4,0,39,0,0,0,40,0,29,0,24,0,
|
||||
9,0,41,0,9,0,42,0,19,0,43,0,9,0,44,0,18,0,45,0,
|
||||
18,0,46,0,14,0,47,0,14,0,48,0,14,0,49,0,8,0,50,0,
|
||||
8,0,51,0,8,0,52,0,8,0,53,0,8,0,54,0,8,0,55,0,
|
||||
8,0,56,0,4,0,57,0,4,0,58,0,4,0,59,0,4,0,60,0,
|
||||
4,0,61,0,4,0,62,0,4,0,63,0,0,0,14,0,30,0,23,0,
|
||||
9,0,41,0,9,0,42,0,19,0,43,0,9,0,44,0,17,0,45,0,
|
||||
17,0,46,0,13,0,47,0,13,0,48,0,13,0,49,0,7,0,50,0,
|
||||
7,0,51,0,7,0,52,0,7,0,53,0,7,0,54,0,7,0,55,0,
|
||||
7,0,56,0,4,0,57,0,4,0,58,0,4,0,59,0,4,0,60,0,
|
||||
4,0,61,0,4,0,62,0,4,0,63,0,31,0,21,0,30,0,64,0,
|
||||
15,0,65,0,13,0,66,0,13,0,67,0,13,0,68,0,13,0,69,0,
|
||||
13,0,70,0,13,0,71,0,13,0,72,0,13,0,73,0,13,0,74,0,
|
||||
7,0,75,0,7,0,76,0,7,0,77,0,7,0,78,0,7,0,79,0,
|
||||
7,0,80,0,7,0,81,0,7,0,82,0,7,0,83,0,4,0,84,0,
|
||||
32,0,22,0,29,0,64,0,16,0,65,0,14,0,66,0,14,0,67,0,
|
||||
14,0,68,0,14,0,69,0,14,0,70,0,14,0,71,0,14,0,72,0,
|
||||
14,0,73,0,14,0,74,0,8,0,75,0,8,0,76,0,8,0,77,0,
|
||||
8,0,78,0,8,0,79,0,8,0,80,0,8,0,81,0,8,0,82,0,
|
||||
8,0,83,0,4,0,84,0,0,0,14,0,};
|
||||
115,104,83,104,97,112,101,68,97,116,97,0,98,116,67,111,109,112,111,117,
|
||||
110,100,83,104,97,112,101,67,104,105,108,100,68,97,116,97,0,98,116,67,
|
||||
111,109,112,111,117,110,100,83,104,97,112,101,68,97,116,97,0,98,116,67,
|
||||
121,108,105,110,100,101,114,83,104,97,112,101,68,97,116,97,0,98,116,67,
|
||||
97,112,115,117,108,101,83,104,97,112,101,68,97,116,97,0,98,116,67,111,
|
||||
110,118,101,120,72,117,108,108,83,104,97,112,101,68,97,116,97,0,98,116,
|
||||
67,111,108,108,105,115,105,111,110,79,98,106,101,99,116,68,111,117,98,108,
|
||||
101,68,97,116,97,0,98,116,67,111,108,108,105,115,105,111,110,79,98,106,
|
||||
101,99,116,70,108,111,97,116,68,97,116,97,0,98,116,82,105,103,105,100,
|
||||
66,111,100,121,70,108,111,97,116,68,97,116,97,0,98,116,82,105,103,105,
|
||||
100,66,111,100,121,68,111,117,98,108,101,68,97,116,97,0,84,76,69,78,
|
||||
1,0,1,0,2,0,2,0,4,0,4,0,4,0,4,0,8,0,0,0,
|
||||
12,0,36,0,8,0,16,0,32,0,48,0,96,0,64,0,-128,0,12,0,
|
||||
52,0,20,0,64,0,4,0,4,0,24,0,28,0,48,0,76,0,24,0,
|
||||
60,0,60,0,68,0,-56,1,-8,0,-32,1,-104,3,0,0,83,84,82,67,
|
||||
27,0,0,0,10,0,3,0,4,0,0,0,4,0,1,0,9,0,2,0,
|
||||
11,0,3,0,10,0,3,0,10,0,4,0,10,0,5,0,12,0,2,0,
|
||||
9,0,6,0,9,0,7,0,13,0,1,0,7,0,8,0,14,0,1,0,
|
||||
8,0,8,0,15,0,1,0,13,0,9,0,16,0,1,0,14,0,9,0,
|
||||
17,0,2,0,15,0,10,0,13,0,11,0,18,0,2,0,16,0,10,0,
|
||||
14,0,11,0,19,0,3,0,9,0,12,0,4,0,13,0,0,0,14,0,
|
||||
20,0,5,0,19,0,15,0,13,0,16,0,13,0,17,0,7,0,18,0,
|
||||
4,0,19,0,21,0,2,0,13,0,20,0,7,0,21,0,22,0,4,0,
|
||||
20,0,22,0,21,0,23,0,4,0,24,0,0,0,14,0,23,0,1,0,
|
||||
4,0,25,0,24,0,2,0,2,0,26,0,2,0,25,0,25,0,6,0,
|
||||
13,0,27,0,14,0,28,0,23,0,29,0,24,0,30,0,4,0,31,0,
|
||||
4,0,32,0,26,0,4,0,25,0,33,0,13,0,34,0,4,0,35,0,
|
||||
0,0,14,0,27,0,4,0,19,0,15,0,26,0,36,0,7,0,18,0,
|
||||
0,0,14,0,28,0,4,0,17,0,37,0,19,0,38,0,4,0,39,0,
|
||||
7,0,40,0,29,0,4,0,19,0,15,0,28,0,41,0,4,0,42,0,
|
||||
7,0,18,0,30,0,3,0,20,0,22,0,4,0,43,0,0,0,14,0,
|
||||
31,0,3,0,20,0,22,0,4,0,43,0,0,0,14,0,32,0,5,0,
|
||||
20,0,22,0,13,0,44,0,14,0,45,0,4,0,46,0,0,0,47,0,
|
||||
33,0,24,0,9,0,48,0,9,0,49,0,19,0,50,0,9,0,51,0,
|
||||
18,0,52,0,18,0,53,0,14,0,54,0,14,0,55,0,14,0,56,0,
|
||||
8,0,57,0,8,0,58,0,8,0,59,0,8,0,60,0,8,0,61,0,
|
||||
8,0,62,0,8,0,63,0,4,0,64,0,4,0,65,0,4,0,66,0,
|
||||
4,0,67,0,4,0,68,0,4,0,69,0,4,0,70,0,0,0,14,0,
|
||||
34,0,23,0,9,0,48,0,9,0,49,0,19,0,50,0,9,0,51,0,
|
||||
17,0,52,0,17,0,53,0,13,0,54,0,13,0,55,0,13,0,56,0,
|
||||
7,0,57,0,7,0,58,0,7,0,59,0,7,0,60,0,7,0,61,0,
|
||||
7,0,62,0,7,0,63,0,4,0,64,0,4,0,65,0,4,0,66,0,
|
||||
4,0,67,0,4,0,68,0,4,0,69,0,4,0,70,0,35,0,21,0,
|
||||
34,0,71,0,15,0,72,0,13,0,73,0,13,0,74,0,13,0,75,0,
|
||||
13,0,76,0,13,0,77,0,13,0,78,0,13,0,79,0,13,0,80,0,
|
||||
13,0,81,0,7,0,82,0,7,0,83,0,7,0,84,0,7,0,85,0,
|
||||
7,0,86,0,7,0,87,0,7,0,88,0,7,0,89,0,7,0,90,0,
|
||||
4,0,91,0,36,0,22,0,33,0,71,0,16,0,72,0,14,0,73,0,
|
||||
14,0,74,0,14,0,75,0,14,0,76,0,14,0,77,0,14,0,78,0,
|
||||
14,0,79,0,14,0,80,0,14,0,81,0,8,0,82,0,8,0,83,0,
|
||||
8,0,84,0,8,0,85,0,8,0,86,0,8,0,87,0,8,0,88,0,
|
||||
8,0,89,0,8,0,90,0,4,0,91,0,0,0,14,0,};
|
||||
int sBulletDNAlen= sizeof(sBulletDNAstr);
|
||||
|
||||
@@ -268,18 +268,18 @@ public:
|
||||
|
||||
if (VOID_IS_8)
|
||||
{
|
||||
//#if _WIN64
|
||||
#if _WIN64
|
||||
initDNA((const char*)sBulletDNAstr64,sBulletDNAlen64);
|
||||
//#else
|
||||
// btAssert(0);
|
||||
//#endif
|
||||
#else
|
||||
btAssert(0);
|
||||
#endif
|
||||
} else
|
||||
{
|
||||
//#ifndef _WIN64
|
||||
#ifndef _WIN64
|
||||
initDNA((const char*)sBulletDNAstr,sBulletDNAlen);
|
||||
//#else
|
||||
// btAssert(0);
|
||||
//#endif
|
||||
#else
|
||||
btAssert(0);
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -210,6 +210,8 @@ public:
|
||||
|
||||
void serialize(struct btTransformData& dataOut) const;
|
||||
|
||||
void serializeFloat(struct btTransformFloatData& dataOut) const;
|
||||
|
||||
void deSerialize(const struct btTransformData& dataIn);
|
||||
|
||||
void deSerializeDouble(const struct btTransformDoubleData& dataIn);
|
||||
@@ -270,6 +272,13 @@ SIMD_FORCE_INLINE void btTransform::serialize(btTransformData& dataOut) const
|
||||
m_origin.serialize(dataOut.m_origin);
|
||||
}
|
||||
|
||||
SIMD_FORCE_INLINE void btTransform::serializeFloat(btTransformFloatData& dataOut) const
|
||||
{
|
||||
m_basis.serializeFloat(dataOut.m_basis);
|
||||
m_origin.serializeFloat(dataOut.m_origin);
|
||||
}
|
||||
|
||||
|
||||
SIMD_FORCE_INLINE void btTransform::deSerialize(const btTransformData& dataIn)
|
||||
{
|
||||
m_basis.deSerialize(dataIn.m_basis);
|
||||
|
||||
Reference in New Issue
Block a user