add support for double precision and 64bit serialization (and compatibility between all versions)
fix some issue in serialization of nested array data add some tesing files
This commit is contained in:
@@ -34,6 +34,14 @@ struct btCollisionShapeData;
|
||||
|
||||
typedef btAlignedObjectArray<class btCollisionObject*> btCollisionObjectArray;
|
||||
|
||||
#ifdef BT_USE_DOUBLE_PRECISION
|
||||
#define btCollisionObjectData btCollisionObjectDoubleData
|
||||
#define btCollisionObjectDataName "btCollisionObjectDoubleData"
|
||||
#else
|
||||
#define btCollisionObjectData btCollisionObjectFloatData
|
||||
#define btCollisionObjectDataName "btCollisionObjectFloatData"
|
||||
#endif
|
||||
|
||||
|
||||
/// btCollisionObject can be used to manage collision detection objects.
|
||||
/// btCollisionObject maintains all information that is needed for a collision detection: Shape, Transform and AABB proxy.
|
||||
@@ -427,34 +435,67 @@ public:
|
||||
///using offsetof for m_vtablePadding might break some compilers, in that case define m_vtablePadding manually
|
||||
|
||||
///for serialization
|
||||
struct btCollisionObjectData
|
||||
struct btCollisionObjectDoubleData
|
||||
{
|
||||
btTransformData m_worldTransform;
|
||||
btTransformData m_interpolationWorldTransform;
|
||||
btVector3Data m_interpolationLinearVelocity;
|
||||
btVector3Data m_interpolationAngularVelocity;
|
||||
btVector3Data m_anisotropicFriction;
|
||||
int m_hasAnisotropicFriction;
|
||||
btScalar m_contactProcessingThreshold;
|
||||
void *m_broadphaseHandle;
|
||||
void *m_collisionShape;
|
||||
btCollisionShapeData *m_rootCollisionShape;
|
||||
void *m_userObjectPointer;
|
||||
|
||||
btTransformDoubleData m_worldTransform;
|
||||
btTransformDoubleData m_interpolationWorldTransform;
|
||||
btVector3DoubleData m_interpolationLinearVelocity;
|
||||
btVector3DoubleData m_interpolationAngularVelocity;
|
||||
btVector3DoubleData m_anisotropicFriction;
|
||||
double m_contactProcessingThreshold;
|
||||
double m_deactivationTime;
|
||||
double m_friction;
|
||||
double m_restitution;
|
||||
double m_hitFraction;
|
||||
double m_ccdSweptSphereRadius;
|
||||
double m_ccdMotionThreshold;
|
||||
|
||||
int m_hasAnisotropicFriction;
|
||||
int m_collisionFlags;
|
||||
int m_islandTag1;
|
||||
int m_companionId;
|
||||
int m_activationState1;
|
||||
btScalar m_deactivationTime;
|
||||
btScalar m_friction;
|
||||
btScalar m_restitution;
|
||||
int m_internalType;
|
||||
int m_checkCollideWith;
|
||||
char m_padding[4];
|
||||
};
|
||||
|
||||
struct btCollisionObjectFloatData
|
||||
{
|
||||
void *m_broadphaseHandle;
|
||||
void *m_collisionShape;
|
||||
btCollisionShapeData *m_rootCollisionShape;
|
||||
void *m_userObjectPointer;
|
||||
btScalar m_hitFraction;
|
||||
btScalar m_ccdSweptSphereRadius;
|
||||
btScalar m_ccdMotionThreshold;
|
||||
|
||||
btTransformFloatData m_worldTransform;
|
||||
btTransformFloatData m_interpolationWorldTransform;
|
||||
btVector3FloatData m_interpolationLinearVelocity;
|
||||
btVector3FloatData m_interpolationAngularVelocity;
|
||||
btVector3FloatData m_anisotropicFriction;
|
||||
float m_contactProcessingThreshold;
|
||||
float m_deactivationTime;
|
||||
float m_friction;
|
||||
float m_restitution;
|
||||
float m_hitFraction;
|
||||
float m_ccdSweptSphereRadius;
|
||||
float m_ccdMotionThreshold;
|
||||
|
||||
int m_hasAnisotropicFriction;
|
||||
int m_collisionFlags;
|
||||
int m_islandTag1;
|
||||
int m_companionId;
|
||||
int m_activationState1;
|
||||
int m_internalType;
|
||||
int m_checkCollideWith;
|
||||
};
|
||||
|
||||
|
||||
|
||||
SIMD_FORCE_INLINE int btCollisionObject::calculateSerializeBufferSize() const
|
||||
{
|
||||
return sizeof(btCollisionObjectData);
|
||||
@@ -491,7 +532,7 @@ SIMD_FORCE_INLINE const char* btCollisionObject::serialize(void* dataBuffer) con
|
||||
dataOut->m_ccdMotionThreshold = m_ccdMotionThreshold;
|
||||
dataOut->m_checkCollideWith = m_checkCollideWith;
|
||||
|
||||
return "btCollisionObjectData";
|
||||
return btCollisionObjectDataName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -189,22 +189,32 @@ bool btConvexHullShape::isInside(const btVector3& ,btScalar ) const
|
||||
///fills the dataBuffer and returns the struct name (and 0 on failure)
|
||||
const char* btConvexHullShape::serialize(void* dataBuffer, btSerializer* serializer) const
|
||||
{
|
||||
int szc = sizeof(btConvexHullShapeData);
|
||||
btConvexHullShapeData* shapeData = (btConvexHullShapeData*) dataBuffer;
|
||||
btConvexInternalShape::serialize(&shapeData->m_convexInternalShapeData, serializer);
|
||||
|
||||
int numElem = m_unscaledPoints.size();
|
||||
shapeData->m_numUnscaledPoints = numElem;
|
||||
shapeData->m_unscaledPointsPtr = numElem ? (btVector3Data*)&m_unscaledPoints[0]: 0;
|
||||
#ifdef BT_USE_DOUBLE_PRECISION
|
||||
shapeData->m_unscaledPointsFloatPtr = 0;
|
||||
shapeData->m_unscaledPointsDoublePtr = numElem ? (btVector3Data*)&m_unscaledPoints[0]: 0;
|
||||
#else
|
||||
shapeData->m_unscaledPointsFloatPtr = numElem ? (btVector3Data*)&m_unscaledPoints[0]: 0;
|
||||
shapeData->m_unscaledPointsDoublePtr = 0;
|
||||
#endif
|
||||
|
||||
if (numElem)
|
||||
{
|
||||
btChunk* chunk = serializer->allocate(sizeof(btVector3Data),numElem);
|
||||
int sz = sizeof(btVector3Data);
|
||||
int sz2 = sizeof(btVector3DoubleData);
|
||||
int sz3 = sizeof(btVector3FloatData);
|
||||
btChunk* chunk = serializer->allocate(sz,numElem);
|
||||
btVector3Data* memPtr = (btVector3Data*)chunk->m_oldPtr;
|
||||
for (int i=0;i<numElem;i++,memPtr++)
|
||||
{
|
||||
m_unscaledPoints[i].serialize(*memPtr);
|
||||
}
|
||||
serializer->finalizeChunk(chunk,"btVector3Data",BT_ARRAY_CODE,(void*)&m_unscaledPoints[0]);
|
||||
serializer->finalizeChunk(chunk,btVector3DataName,BT_ARRAY_CODE,(void*)&m_unscaledPoints[0]);
|
||||
}
|
||||
|
||||
return "btConvexHullShapeData";
|
||||
|
||||
@@ -101,12 +101,15 @@ struct btConvexHullShapeData
|
||||
{
|
||||
btConvexInternalShapeData m_convexInternalShapeData;
|
||||
|
||||
btVector3Data *m_unscaledPointsPtr;
|
||||
btVector3FloatData *m_unscaledPointsFloatPtr;
|
||||
btVector3DoubleData *m_unscaledPointsDoublePtr;
|
||||
|
||||
int m_numUnscaledPoints;
|
||||
char m_padding[4];
|
||||
char m_padding3[4];
|
||||
|
||||
};
|
||||
|
||||
|
||||
SIMD_FORCE_INLINE int btConvexHullShape::calculateSerializeBufferSize()
|
||||
{
|
||||
return sizeof(btConvexHullShapeData);
|
||||
|
||||
@@ -19,6 +19,7 @@ subject to the following restrictions:
|
||||
#include "btConvexShape.h"
|
||||
#include "LinearMath/btAabbUtil2.h"
|
||||
|
||||
|
||||
///The btConvexInternalShape is an internal base class, shared by most convex shape implementations.
|
||||
class btConvexInternalShape : public btConvexShape
|
||||
{
|
||||
@@ -118,19 +119,17 @@ public:
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
struct btConvexInternalShapeData
|
||||
{
|
||||
btCollisionShapeData m_collisionShapeData;
|
||||
|
||||
btVector3Data m_localScaling;
|
||||
btVector3FloatData m_localScaling;
|
||||
|
||||
btVector3Data m_implicitShapeDimensions;
|
||||
btVector3FloatData m_implicitShapeDimensions;
|
||||
|
||||
btScalar m_collisionMargin;
|
||||
float m_collisionMargin;
|
||||
|
||||
char m_padding[4];
|
||||
int m_padding;
|
||||
|
||||
};
|
||||
|
||||
@@ -147,9 +146,9 @@ SIMD_FORCE_INLINE const char* btConvexInternalShape::serialize(void* dataBuffer,
|
||||
btConvexInternalShapeData* shapeData = (btConvexInternalShapeData*) dataBuffer;
|
||||
btCollisionShape::serialize(&shapeData->m_collisionShapeData, serializer);
|
||||
|
||||
m_implicitShapeDimensions.serialize(shapeData->m_implicitShapeDimensions);
|
||||
m_localScaling.serialize(shapeData->m_localScaling);
|
||||
shapeData->m_collisionMargin = m_collisionMargin;
|
||||
m_implicitShapeDimensions.serializeFloat(shapeData->m_implicitShapeDimensions);
|
||||
m_localScaling.serializeFloat(shapeData->m_localScaling);
|
||||
shapeData->m_collisionMargin = float(m_collisionMargin);
|
||||
|
||||
return "btConvexInternalShapeData";
|
||||
}
|
||||
|
||||
@@ -155,8 +155,8 @@ const char* btMultiSphereShape::serialize(void* dataBuffer, btSerializer* serial
|
||||
btPositionAndRadius* memPtr = (btPositionAndRadius*)chunk->m_oldPtr;
|
||||
for (int i=0;i<numElem;i++,memPtr++)
|
||||
{
|
||||
m_localPositionArray[i].serialize(memPtr->m_pos);
|
||||
memPtr->m_radius = m_radiArray[i];
|
||||
m_localPositionArray[i].serializeFloat(memPtr->m_pos);
|
||||
memPtr->m_radius = float(m_radiArray[i]);
|
||||
}
|
||||
serializer->finalizeChunk(chunk,"btPositionAndRadius",BT_ARRAY_CODE,(void*)&m_localPositionArray[0]);
|
||||
}
|
||||
|
||||
@@ -21,6 +21,8 @@ subject to the following restrictions:
|
||||
#include "LinearMath/btAlignedObjectArray.h"
|
||||
#include "LinearMath/btAabbUtil2.h"
|
||||
|
||||
|
||||
|
||||
///The btMultiSphereShape represents the convex hull of a collection of spheres. You can create special capsules or other smooth volumes.
|
||||
///It is possible to animate the spheres for deformation, but call 'recalcLocalAabb' after changing any sphere position/radius
|
||||
class btMultiSphereShape : public btConvexInternalAabbCachingShape
|
||||
@@ -69,10 +71,11 @@ public:
|
||||
|
||||
};
|
||||
|
||||
|
||||
struct btPositionAndRadius
|
||||
{
|
||||
btVector3Data m_pos;
|
||||
btScalar m_radius;
|
||||
btVector3FloatData m_pos;
|
||||
float m_radius;
|
||||
};
|
||||
|
||||
struct btMultiSphereShapeData
|
||||
@@ -82,9 +85,10 @@ struct btMultiSphereShapeData
|
||||
btPositionAndRadius *m_localPositionArrayPtr;
|
||||
int m_localPositionArraySize;
|
||||
char m_padding[4];
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
SIMD_FORCE_INLINE int btMultiSphereShape::calculateSerializeBufferSize()
|
||||
{
|
||||
return sizeof(btMultiSphereShapeData);
|
||||
|
||||
@@ -327,6 +327,6 @@ const char* btStridingMeshInterface::serialize(void* dataBuffer, btSerializer* s
|
||||
}
|
||||
|
||||
|
||||
m_scaling.serialize(trimeshData->m_scaling);
|
||||
m_scaling.serializeFloat(trimeshData->m_scaling);
|
||||
return "btStridingMeshInterfaceData";
|
||||
}
|
||||
|
||||
@@ -22,6 +22,8 @@ subject to the following restrictions:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/// The btStridingMeshInterface is the interface class for high performance generic access to triangle meshes, used in combination with btBvhTriangleMeshShape and some other collision shapes.
|
||||
/// Using index striding of 3*sizeof(integer) it can use triangle arrays, using index striding of 1*sizeof(integer) it can handle triangle strips.
|
||||
/// It allows for sharing graphics and collision meshes. Also it provides locking/unlocking of graphics meshes that are in gpu memory.
|
||||
@@ -118,19 +120,18 @@ struct btMeshPartData
|
||||
int m_numVertices;
|
||||
};
|
||||
|
||||
|
||||
struct btStridingMeshInterfaceData
|
||||
{
|
||||
btMeshPartData *m_meshPartsPtr;
|
||||
|
||||
btVector3FloatData m_scaling;
|
||||
int m_numMeshParts;
|
||||
|
||||
btVector3Data m_scaling;
|
||||
|
||||
char m_padding[4];
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
SIMD_FORCE_INLINE int btStridingMeshInterface::calculateSerializeBufferSize()
|
||||
{
|
||||
return sizeof(btStridingMeshInterfaceData);
|
||||
|
||||
@@ -218,7 +218,7 @@ const char* btTriangleMeshShape::serialize(void* dataBuffer, btSerializer* seria
|
||||
|
||||
m_meshInterface->serialize(&trimeshData->m_meshInterface, serializer);
|
||||
|
||||
trimeshData->m_collisionMargin = m_collisionMargin;
|
||||
trimeshData->m_collisionMargin = float(m_collisionMargin);
|
||||
|
||||
return "btTriangleMeshShapeData";
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ subject to the following restrictions:
|
||||
#include "btStridingMeshInterface.h"
|
||||
|
||||
|
||||
|
||||
///The btTriangleMeshShape is an internal concave triangle mesh interface. Don't use this class directly, use btBvhTriangleMeshShape instead.
|
||||
class btTriangleMeshShape : public btConcaveShape
|
||||
{
|
||||
@@ -90,14 +91,16 @@ public:
|
||||
|
||||
struct btTriangleMeshShapeData
|
||||
{
|
||||
//btConcaveShapeData m_concaveShapeData;
|
||||
btCollisionShapeData m_collisionShapeData;
|
||||
|
||||
btStridingMeshInterfaceData m_meshInterface;
|
||||
|
||||
btScalar m_collisionMargin;
|
||||
float m_collisionMargin;
|
||||
|
||||
char m_padding[4];
|
||||
};
|
||||
|
||||
|
||||
SIMD_FORCE_INLINE int btTriangleMeshShape::calculateSerializeBufferSize()
|
||||
{
|
||||
return sizeof(btTriangleMeshShapeData);
|
||||
|
||||
@@ -67,7 +67,7 @@ protected:
|
||||
|
||||
bool m_useGhostObjectSweepTest;
|
||||
bool m_useWalkDirection;
|
||||
float m_velocityTimeInterval;
|
||||
btScalar m_velocityTimeInterval;
|
||||
int m_upAxis;
|
||||
|
||||
btVector3 computeReflectionDirection (const btVector3& direction, const btVector3& normal);
|
||||
|
||||
@@ -350,6 +350,6 @@ const char* btRigidBody::serialize(void* dataBuffer) const
|
||||
rbd->m_linearSleepingThreshold=m_linearSleepingThreshold;
|
||||
rbd->m_angularSleepingThreshold = m_angularSleepingThreshold;
|
||||
|
||||
return "btRigidBodyData";
|
||||
return btRigidBodyDataName;
|
||||
}
|
||||
|
||||
|
||||
@@ -29,6 +29,16 @@ class btTypedConstraint;
|
||||
extern btScalar gDeactivationTime;
|
||||
extern bool gDisableDeactivation;
|
||||
|
||||
#ifdef BT_USE_DOUBLE_PRECISION
|
||||
#define btRigidBodyData btRigidBodyDoubleData
|
||||
#define btRigidBodyDataName "btRigidBodyDoubleData"
|
||||
#else
|
||||
#define btRigidBodyData btRigidBodyFloatData
|
||||
#define btRigidBodyDataName "btRigidBodyFloatData"
|
||||
#endif //BT_USE_DOUBLE_PRECISION
|
||||
|
||||
|
||||
|
||||
|
||||
///The btRigidBody is the main class for rigid body objects. It is derived from btCollisionObject, so it keeps a pointer to a btCollisionShape.
|
||||
///It is recommended for performance and memory use to share btCollisionShape objects whenever possible.
|
||||
@@ -504,36 +514,55 @@ public:
|
||||
|
||||
//@todo add m_optionalMotionState and m_constraintRefs to btRigidBodyData
|
||||
///btRigidBodyData is used for btRigidBody serialization
|
||||
struct btRigidBodyData
|
||||
struct btRigidBodyFloatData
|
||||
{
|
||||
btCollisionObjectData m_collisionObjectData;
|
||||
btCollisionObjectFloatData m_collisionObjectData;
|
||||
btMatrix3x3FloatData m_invInertiaTensorWorld;
|
||||
btVector3FloatData m_linearVelocity;
|
||||
btVector3FloatData m_angularVelocity;
|
||||
btVector3FloatData m_angularFactor;
|
||||
btVector3FloatData m_linearFactor;
|
||||
btVector3FloatData m_gravity;
|
||||
btVector3FloatData m_gravity_acceleration;
|
||||
btVector3FloatData m_invInertiaLocal;
|
||||
btVector3FloatData m_totalForce;
|
||||
btVector3FloatData m_totalTorque;
|
||||
float m_inverseMass;
|
||||
float m_linearDamping;
|
||||
float m_angularDamping;
|
||||
float m_additionalDampingFactor;
|
||||
float m_additionalLinearDampingThresholdSqr;
|
||||
float m_additionalAngularDampingThresholdSqr;
|
||||
float m_additionalAngularDampingFactor;
|
||||
float m_linearSleepingThreshold;
|
||||
float m_angularSleepingThreshold;
|
||||
int m_additionalDamping;
|
||||
};
|
||||
|
||||
btMatrix3x3Data m_invInertiaTensorWorld;
|
||||
btVector3Data m_linearVelocity;
|
||||
btVector3Data m_angularVelocity;
|
||||
btScalar m_inverseMass;
|
||||
btVector3Data m_angularFactor;
|
||||
btVector3Data m_linearFactor;
|
||||
|
||||
btVector3Data m_gravity;
|
||||
btVector3Data m_gravity_acceleration;
|
||||
btVector3Data m_invInertiaLocal;
|
||||
btVector3Data m_totalForce;
|
||||
btVector3Data m_totalTorque;
|
||||
|
||||
btScalar m_linearDamping;
|
||||
btScalar m_angularDamping;
|
||||
|
||||
int m_additionalDamping;
|
||||
btScalar m_additionalDampingFactor;
|
||||
btScalar m_additionalLinearDampingThresholdSqr;
|
||||
btScalar m_additionalAngularDampingThresholdSqr;
|
||||
btScalar m_additionalAngularDampingFactor;
|
||||
|
||||
|
||||
btScalar m_linearSleepingThreshold;
|
||||
btScalar m_angularSleepingThreshold;
|
||||
|
||||
struct btRigidBodyDoubleData
|
||||
{
|
||||
btCollisionObjectDoubleData m_collisionObjectData;
|
||||
btMatrix3x3DoubleData m_invInertiaTensorWorld;
|
||||
btVector3DoubleData m_linearVelocity;
|
||||
btVector3DoubleData m_angularVelocity;
|
||||
btVector3DoubleData m_angularFactor;
|
||||
btVector3DoubleData m_linearFactor;
|
||||
btVector3DoubleData m_gravity;
|
||||
btVector3DoubleData m_gravity_acceleration;
|
||||
btVector3DoubleData m_invInertiaLocal;
|
||||
btVector3DoubleData m_totalForce;
|
||||
btVector3DoubleData m_totalTorque;
|
||||
double m_inverseMass;
|
||||
double m_linearDamping;
|
||||
double m_angularDamping;
|
||||
double m_additionalDampingFactor;
|
||||
double m_additionalLinearDampingThresholdSqr;
|
||||
double m_additionalAngularDampingThresholdSqr;
|
||||
double m_additionalAngularDampingFactor;
|
||||
double m_linearSleepingThreshold;
|
||||
double m_angularSleepingThreshold;
|
||||
int m_additionalDamping;
|
||||
char m_padding[4];
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -1011,9 +1011,9 @@ bool HullLibrary::CleanupVertices(unsigned int svcount,
|
||||
btScalar y = v[1];
|
||||
btScalar z = v[2];
|
||||
|
||||
btScalar dx = fabsf(x - px );
|
||||
btScalar dy = fabsf(y - py );
|
||||
btScalar dz = fabsf(z - pz );
|
||||
btScalar dx = btFabs(x - px );
|
||||
btScalar dy = btFabs(y - py );
|
||||
btScalar dz = btFabs(z - pz );
|
||||
|
||||
if ( dx < normalepsilon && dy < normalepsilon && dz < normalepsilon )
|
||||
{
|
||||
|
||||
@@ -19,6 +19,11 @@ subject to the following restrictions:
|
||||
#include "btVector3.h"
|
||||
#include "btQuaternion.h"
|
||||
|
||||
#ifdef BT_USE_DOUBLE_PRECISION
|
||||
#define btMatrix3x3Data btMatrix3x3DoubleData
|
||||
#else
|
||||
#define btMatrix3x3Data btMatrix3x3FloatData
|
||||
#endif //BT_USE_DOUBLE_PRECISION
|
||||
|
||||
|
||||
/**@brief The btMatrix3x3 class implements a 3x3 rotation matrix, to perform linear algebra in combination with btQuaternion, btTransform and btVector3.
|
||||
@@ -500,6 +505,10 @@ public:
|
||||
|
||||
void deSerialize(const struct btMatrix3x3Data& dataIn);
|
||||
|
||||
void deSerializeFloat(const struct btMatrix3x3FloatData& dataIn);
|
||||
|
||||
void deSerializeDouble(const struct btMatrix3x3DoubleData& dataIn);
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -628,11 +637,18 @@ SIMD_FORCE_INLINE bool operator==(const btMatrix3x3& m1, const btMatrix3x3& m2)
|
||||
}
|
||||
|
||||
///for serialization
|
||||
struct btMatrix3x3Data
|
||||
struct btMatrix3x3FloatData
|
||||
{
|
||||
btVector3Data m_el[3];
|
||||
btVector3FloatData m_el[3];
|
||||
};
|
||||
|
||||
///for serialization
|
||||
struct btMatrix3x3DoubleData
|
||||
{
|
||||
btVector3DoubleData m_el[3];
|
||||
};
|
||||
|
||||
|
||||
|
||||
SIMD_FORCE_INLINE void btMatrix3x3::serialize(struct btMatrix3x3Data& dataOut) const
|
||||
{
|
||||
@@ -640,11 +656,24 @@ SIMD_FORCE_INLINE void btMatrix3x3::serialize(struct btMatrix3x3Data& dataOut) c
|
||||
m_el[i].serialize(dataOut.m_el[i]);
|
||||
}
|
||||
|
||||
|
||||
SIMD_FORCE_INLINE void btMatrix3x3::deSerialize(const struct btMatrix3x3Data& dataIn)
|
||||
{
|
||||
for (int i=0;i<3;i++)
|
||||
m_el[i].deSerialize(dataIn.m_el[i]);
|
||||
}
|
||||
|
||||
SIMD_FORCE_INLINE void btMatrix3x3::deSerializeFloat(const struct btMatrix3x3FloatData& dataIn)
|
||||
{
|
||||
for (int i=0;i<3;i++)
|
||||
m_el[i].deSerializeFloat(dataIn.m_el[i]);
|
||||
}
|
||||
|
||||
SIMD_FORCE_INLINE void btMatrix3x3::deSerializeDouble(const struct btMatrix3x3DoubleData& dataIn)
|
||||
{
|
||||
for (int i=0;i<3;i++)
|
||||
m_el[i].deSerializeDouble(dataIn.m_el[i]);
|
||||
}
|
||||
|
||||
#endif //BT_MATRIX3x3_H
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
unsigned char sBulletDNAstr[]= {
|
||||
83,68,78,65,78,65,77,69,83,0,0,0,109,95,115,105,122,101,0,109,
|
||||
|
||||
unsigned char sBulletDNAstr64[]= {
|
||||
83,68,78,65,78,65,77,69,85,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,
|
||||
@@ -12,115 +13,275 @@ unsigned char sBulletDNAstr[]= {
|
||||
109,95,108,111,99,97,108,83,99,97,108,105,110,103,0,109,95,105,109,112,
|
||||
108,105,99,105,116,83,104,97,112,101,68,105,109,101,110,115,105,111,110,115,
|
||||
0,109,95,99,111,108,108,105,115,105,111,110,77,97,114,103,105,110,0,109,
|
||||
95,112,111,115,0,109,95,114,97,100,105,117,115,0,109,95,99,111,110,118,
|
||||
101,120,73,110,116,101,114,110,97,108,83,104,97,112,101,68,97,116,97,0,
|
||||
42,109,95,108,111,99,97,108,80,111,115,105,116,105,111,110,65,114,114,97,
|
||||
121,80,116,114,0,109,95,108,111,99,97,108,80,111,115,105,116,105,111,110,
|
||||
65,114,114,97,121,83,105,122,101,0,109,95,118,97,108,117,101,0,105,110,
|
||||
116,0,42,109,95,118,101,114,116,105,99,101,115,51,102,0,42,109,95,118,
|
||||
101,114,116,105,99,101,115,51,100,0,42,109,95,105,110,100,105,99,101,115,
|
||||
51,50,0,42,109,95,105,110,100,105,99,101,115,49,54,0,109,95,110,117,
|
||||
109,84,114,105,97,110,103,108,101,115,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,110,117,109,77,101,115,104,80,97,114,116,115,0,109,95,115,99,
|
||||
97,108,105,110,103,0,98,116,67,111,108,108,105,115,105,111,110,83,104,97,
|
||||
112,101,68,97,116,97,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,108,101,100,80,111,105,110,116,115,
|
||||
80,116,114,0,109,95,110,117,109,85,110,115,99,97,108,101,100,80,111,105,
|
||||
110,116,115,0,109,95,119,111,114,108,100,84,114,97,110,115,102,111,114,109,
|
||||
0,109,95,105,110,116,101,114,112,111,108,97,116,105,111,110,87,111,114,108,
|
||||
100,84,114,97,110,115,102,111,114,109,0,109,95,105,110,116,101,114,112,111,
|
||||
108,97,116,105,111,110,76,105,110,101,97,114,86,101,108,111,99,105,116,121,
|
||||
0,109,95,105,110,116,101,114,112,111,108,97,116,105,111,110,65,110,103,117,
|
||||
108,97,114,86,101,108,111,99,105,116,121,0,109,95,97,110,105,115,111,116,
|
||||
114,111,112,105,99,70,114,105,99,116,105,111,110,0,109,95,104,97,115,65,
|
||||
110,105,115,111,116,114,111,112,105,99,70,114,105,99,116,105,111,110,0,109,
|
||||
95,99,111,110,116,97,99,116,80,114,111,99,101,115,115,105,110,103,84,104,
|
||||
114,101,115,104,111,108,100,0,42,109,95,98,114,111,97,100,112,104,97,115,
|
||||
101,72,97,110,100,108,101,0,42,109,95,99,111,108,108,105,115,105,111,110,
|
||||
83,104,97,112,101,0,42,109,95,114,111,111,116,67,111,108,108,105,115,105,
|
||||
111,110,83,104,97,112,101,0,109,95,99,111,108,108,105,115,105,111,110,70,
|
||||
108,97,103,115,0,109,95,105,115,108,97,110,100,84,97,103,49,0,109,95,
|
||||
99,111,109,112,97,110,105,111,110,73,100,0,109,95,97,99,116,105,118,97,
|
||||
116,105,111,110,83,116,97,116,101,49,0,109,95,100,101,97,99,116,105,118,
|
||||
97,116,105,111,110,84,105,109,101,0,109,95,102,114,105,99,116,105,111,110,
|
||||
0,109,95,114,101,115,116,105,116,117,116,105,111,110,0,109,95,105,110,116,
|
||||
101,114,110,97,108,84,121,112,101,0,42,109,95,117,115,101,114,79,98,106,
|
||||
101,99,116,80,111,105,110,116,101,114,0,109,95,104,105,116,70,114,97,99,
|
||||
116,105,111,110,0,109,95,99,99,100,83,119,101,112,116,83,112,104,101,114,
|
||||
101,82,97,100,105,117,115,0,109,95,99,99,100,77,111,116,105,111,110,84,
|
||||
104,114,101,115,104,111,108,100,0,109,95,99,104,101,99,107,67,111,108,108,
|
||||
105,100,101,87,105,116,104,0,109,95,99,111,108,108,105,115,105,111,110,79,
|
||||
98,106,101,99,116,68,97,116,97,0,109,95,105,110,118,73,110,101,114,116,
|
||||
105,97,84,101,110,115,111,114,87,111,114,108,100,0,109,95,108,105,110,101,
|
||||
97,114,86,101,108,111,99,105,116,121,0,109,95,97,110,103,117,108,97,114,
|
||||
86,101,108,111,99,105,116,121,0,109,95,105,110,118,101,114,115,101,77,97,
|
||||
115,115,0,109,95,97,110,103,117,108,97,114,70,97,99,116,111,114,0,109,
|
||||
95,108,105,110,101,97,114,70,97,99,116,111,114,0,109,95,103,114,97,118,
|
||||
105,116,121,0,109,95,103,114,97,118,105,116,121,95,97,99,99,101,108,101,
|
||||
114,97,116,105,111,110,0,109,95,105,110,118,73,110,101,114,116,105,97,76,
|
||||
111,99,97,108,0,109,95,116,111,116,97,108,70,111,114,99,101,0,109,95,
|
||||
116,111,116,97,108,84,111,114,113,117,101,0,109,95,108,105,110,101,97,114,
|
||||
68,97,109,112,105,110,103,0,109,95,97,110,103,117,108,97,114,68,97,109,
|
||||
112,105,110,103,0,109,95,97,100,100,105,116,105,111,110,97,108,68,97,109,
|
||||
112,105,110,103,0,109,95,97,100,100,105,116,105,111,110,97,108,68,97,109,
|
||||
112,105,110,103,70,97,99,116,111,114,0,109,95,97,100,100,105,116,105,111,
|
||||
110,97,108,76,105,110,101,97,114,68,97,109,112,105,110,103,84,104,114,101,
|
||||
115,104,111,108,100,83,113,114,0,109,95,97,100,100,105,116,105,111,110,97,
|
||||
108,65,110,103,117,108,97,114,68,97,109,112,105,110,103,84,104,114,101,115,
|
||||
104,111,108,100,83,113,114,0,109,95,97,100,100,105,116,105,111,110,97,108,
|
||||
65,110,103,117,108,97,114,68,97,109,112,105,110,103,70,97,99,116,111,114,
|
||||
0,109,95,108,105,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,0,0,84,89,80,69,
|
||||
32,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,98,116,83,99,97,108,97,114,0,80,111,105,110,116,101,114,65,114,114,
|
||||
97,121,0,98,116,80,104,121,115,105,99,115,83,121,115,116,101,109,0,76,
|
||||
105,115,116,66,97,115,101,0,98,116,86,101,99,116,111,114,51,68,97,116,
|
||||
97,0,98,116,86,101,99,116,111,114,51,70,108,111,97,116,68,97,116,97,
|
||||
0,98,116,86,101,99,116,111,114,51,68,111,117,98,108,101,68,97,116,97,
|
||||
0,98,116,77,97,116,114,105,120,51,120,51,68,97,116,97,0,98,116,84,
|
||||
114,97,110,115,102,111,114,109,68,97,116,97,0,98,116,67,111,108,108,105,
|
||||
115,105,111,110,83,104,97,112,101,68,97,116,97,0,98,116,67,111,110,118,
|
||||
101,120,73,110,116,101,114,110,97,108,83,104,97,112,101,68,97,116,97,0,
|
||||
98,116,80,111,115,105,116,105,111,110,65,110,100,82,97,100,105,117,115,0,
|
||||
98,116,77,117,108,116,105,83,112,104,101,114,101,83,104,97,112,101,68,97,
|
||||
116,97,0,98,116,73,110,116,73,110,100,101,120,68,97,116,97,0,98,116,
|
||||
83,104,111,114,116,73,110,116,73,110,100,101,120,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,109,95,99,111,110,99,97,118,101,83,104,97,112,101,68,
|
||||
97,116,97,59,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,97,116,97,0,98,116,82,105,103,105,100,66,111,100,121,
|
||||
68,97,116,97,0,0,0,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,4,0,12,0,36,0,8,0,
|
||||
16,0,16,0,32,0,48,0,64,0,12,0,52,0,20,0,64,0,4,0,
|
||||
4,0,24,0,28,0,0,0,0,0,64,0,-8,0,-32,1,83,84,82,67,
|
||||
20,0,0,0,11,0,3,0,4,0,0,0,4,0,1,0,9,0,2,0,
|
||||
12,0,3,0,11,0,3,0,11,0,4,0,11,0,5,0,13,0,2,0,
|
||||
9,0,6,0,9,0,7,0,14,0,1,0,10,0,8,0,15,0,1,0,
|
||||
7,0,8,0,16,0,1,0,8,0,8,0,17,0,1,0,14,0,9,0,
|
||||
18,0,2,0,17,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,14,0,16,0,
|
||||
14,0,17,0,10,0,18,0,0,0,14,0,21,0,2,0,14,0,19,0,
|
||||
10,0,20,0,22,0,4,0,20,0,21,0,21,0,22,0,4,0,23,0,
|
||||
0,0,14,0,23,0,1,0,4,0,24,0,24,0,2,0,2,0,25,0,
|
||||
2,0,24,0,25,0,6,0,15,0,26,0,16,0,27,0,23,0,28,0,
|
||||
24,0,29,0,4,0,30,0,4,0,31,0,26,0,4,0,25,0,32,0,
|
||||
4,0,33,0,14,0,34,0,0,0,14,0,27,0,4,0,28,0,35,0,
|
||||
28,0,15,0,26,0,36,0,10,0,18,0,29,0,4,0,20,0,21,0,
|
||||
14,0,37,0,4,0,38,0,0,0,14,0,30,0,23,0,18,0,39,0,
|
||||
18,0,40,0,14,0,41,0,14,0,42,0,14,0,43,0,4,0,44,0,
|
||||
10,0,45,0,9,0,46,0,9,0,47,0,19,0,48,0,4,0,49,0,
|
||||
4,0,50,0,4,0,51,0,4,0,52,0,10,0,53,0,10,0,54,0,
|
||||
10,0,55,0,4,0,56,0,9,0,57,0,10,0,58,0,10,0,59,0,
|
||||
10,0,60,0,4,0,61,0,31,0,21,0,30,0,62,0,17,0,63,0,
|
||||
14,0,64,0,14,0,65,0,10,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,
|
||||
10,0,74,0,10,0,75,0,4,0,76,0,10,0,77,0,10,0,78,0,
|
||||
10,0,79,0,10,0,80,0,10,0,81,0,10,0,82,0,};
|
||||
95,112,97,100,100,105,110,103,0,109,95,112,111,115,0,109,95,114,97,100,
|
||||
105,117,115,0,109,95,99,111,110,118,101,120,73,110,116,101,114,110,97,108,
|
||||
83,104,97,112,101,68,97,116,97,0,42,109,95,108,111,99,97,108,80,111,
|
||||
115,105,116,105,111,110,65,114,114,97,121,80,116,114,0,109,95,108,111,99,
|
||||
97,108,80,111,115,105,116,105,111,110,65,114,114,97,121,83,105,122,101,0,
|
||||
109,95,118,97,108,117,101,0,105,110,116,0,42,109,95,118,101,114,116,105,
|
||||
99,101,115,51,102,0,42,109,95,118,101,114,116,105,99,101,115,51,100,0,
|
||||
42,109,95,105,110,100,105,99,101,115,51,50,0,42,109,95,105,110,100,105,
|
||||
99,101,115,49,54,0,109,95,110,117,109,84,114,105,97,110,103,108,101,115,
|
||||
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,
|
||||
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,
|
||||
105,110,116,115,0,109,95,112,97,100,100,105,110,103,51,91,52,93,0,42,
|
||||
109,95,98,114,111,97,100,112,104,97,115,101,72,97,110,100,108,101,0,42,
|
||||
109,95,99,111,108,108,105,115,105,111,110,83,104,97,112,101,0,42,109,95,
|
||||
114,111,111,116,67,111,108,108,105,115,105,111,110,83,104,97,112,101,0,42,
|
||||
109,95,117,115,101,114,79,98,106,101,99,116,80,111,105,110,116,101,114,0,
|
||||
109,95,119,111,114,108,100,84,114,97,110,115,102,111,114,109,0,109,95,105,
|
||||
110,116,101,114,112,111,108,97,116,105,111,110,87,111,114,108,100,84,114,97,
|
||||
110,115,102,111,114,109,0,109,95,105,110,116,101,114,112,111,108,97,116,105,
|
||||
111,110,76,105,110,101,97,114,86,101,108,111,99,105,116,121,0,109,95,105,
|
||||
110,116,101,114,112,111,108,97,116,105,111,110,65,110,103,117,108,97,114,86,
|
||||
101,108,111,99,105,116,121,0,109,95,97,110,105,115,111,116,114,111,112,105,
|
||||
99,70,114,105,99,116,105,111,110,0,109,95,99,111,110,116,97,99,116,80,
|
||||
114,111,99,101,115,115,105,110,103,84,104,114,101,115,104,111,108,100,0,109,
|
||||
95,100,101,97,99,116,105,118,97,116,105,111,110,84,105,109,101,0,109,95,
|
||||
102,114,105,99,116,105,111,110,0,109,95,114,101,115,116,105,116,117,116,105,
|
||||
111,110,0,109,95,104,105,116,70,114,97,99,116,105,111,110,0,109,95,99,
|
||||
99,100,83,119,101,112,116,83,112,104,101,114,101,82,97,100,105,117,115,0,
|
||||
109,95,99,99,100,77,111,116,105,111,110,84,104,114,101,115,104,111,108,100,
|
||||
0,109,95,104,97,115,65,110,105,115,111,116,114,111,112,105,99,70,114,105,
|
||||
99,116,105,111,110,0,109,95,99,111,108,108,105,115,105,111,110,70,108,97,
|
||||
103,115,0,109,95,105,115,108,97,110,100,84,97,103,49,0,109,95,99,111,
|
||||
109,112,97,110,105,111,110,73,100,0,109,95,97,99,116,105,118,97,116,105,
|
||||
111,110,83,116,97,116,101,49,0,109,95,105,110,116,101,114,110,97,108,84,
|
||||
121,112,101,0,109,95,99,104,101,99,107,67,111,108,108,105,100,101,87,105,
|
||||
116,104,0,109,95,99,111,108,108,105,115,105,111,110,79,98,106,101,99,116,
|
||||
68,97,116,97,0,109,95,105,110,118,73,110,101,114,116,105,97,84,101,110,
|
||||
115,111,114,87,111,114,108,100,0,109,95,108,105,110,101,97,114,86,101,108,
|
||||
111,99,105,116,121,0,109,95,97,110,103,117,108,97,114,86,101,108,111,99,
|
||||
105,116,121,0,109,95,97,110,103,117,108,97,114,70,97,99,116,111,114,0,
|
||||
109,95,108,105,110,101,97,114,70,97,99,116,111,114,0,109,95,103,114,97,
|
||||
118,105,116,121,0,109,95,103,114,97,118,105,116,121,95,97,99,99,101,108,
|
||||
101,114,97,116,105,111,110,0,109,95,105,110,118,73,110,101,114,116,105,97,
|
||||
76,111,99,97,108,0,109,95,116,111,116,97,108,70,111,114,99,101,0,109,
|
||||
95,116,111,116,97,108,84,111,114,113,117,101,0,109,95,105,110,118,101,114,
|
||||
115,101,77,97,115,115,0,109,95,108,105,110,101,97,114,68,97,109,112,105,
|
||||
110,103,0,109,95,97,110,103,117,108,97,114,68,97,109,112,105,110,103,0,
|
||||
109,95,97,100,100,105,116,105,111,110,97,108,68,97,109,112,105,110,103,70,
|
||||
97,99,116,111,114,0,109,95,97,100,100,105,116,105,111,110,97,108,76,105,
|
||||
110,101,97,114,68,97,109,112,105,110,103,84,104,114,101,115,104,111,108,100,
|
||||
83,113,114,0,109,95,97,100,100,105,116,105,111,110,97,108,65,110,103,117,
|
||||
108,97,114,68,97,109,112,105,110,103,84,104,114,101,115,104,111,108,100,83,
|
||||
113,114,0,109,95,97,100,100,105,116,105,111,110,97,108,65,110,103,117,108,
|
||||
97,114,68,97,109,112,105,110,103,70,97,99,116,111,114,0,109,95,108,105,
|
||||
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,
|
||||
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,
|
||||
110,116,101,114,65,114,114,97,121,0,98,116,80,104,121,115,105,99,115,83,
|
||||
121,115,116,101,109,0,76,105,115,116,66,97,115,101,0,98,116,86,101,99,
|
||||
116,111,114,51,70,108,111,97,116,68,97,116,97,0,98,116,86,101,99,116,
|
||||
111,114,51,68,111,117,98,108,101,68,97,116,97,0,98,116,77,97,116,114,
|
||||
105,120,51,120,51,70,108,111,97,116,68,97,116,97,0,98,116,77,97,116,
|
||||
114,105,120,51,120,51,68,111,117,98,108,101,68,97,116,97,0,98,116,84,
|
||||
114,97,110,115,102,111,114,109,70,108,111,97,116,68,97,116,97,0,98,116,
|
||||
84,114,97,110,115,102,111,114,109,68,111,117,98,108,101,68,97,116,97,0,
|
||||
98,116,67,111,108,108,105,115,105,111,110,83,104,97,112,101,68,97,116,97,
|
||||
0,98,116,67,111,110,118,101,120,73,110,116,101,114,110,97,108,83,104,97,
|
||||
112,101,68,97,116,97,0,98,116,80,111,115,105,116,105,111,110,65,110,100,
|
||||
82,97,100,105,117,115,0,98,116,77,117,108,116,105,83,112,104,101,114,101,
|
||||
83,104,97,112,101,68,97,116,97,0,98,116,73,110,116,73,110,100,101,120,
|
||||
68,97,116,97,0,98,116,83,104,111,114,116,73,110,116,73,110,100,101,120,
|
||||
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,};
|
||||
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,
|
||||
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,
|
||||
115,116,114,97,105,110,116,115,0,42,102,105,114,115,116,0,42,108,97,115,
|
||||
116,0,109,95,102,108,111,97,116,115,91,52,93,0,109,95,101,108,91,51,
|
||||
93,0,109,95,98,97,115,105,115,0,109,95,111,114,105,103,105,110,0,42,
|
||||
109,95,117,115,101,114,80,111,105,110,116,101,114,0,109,95,115,104,97,112,
|
||||
101,84,121,112,101,0,109,95,112,97,100,100,105,110,103,91,52,93,0,109,
|
||||
95,99,111,108,108,105,115,105,111,110,83,104,97,112,101,68,97,116,97,0,
|
||||
109,95,108,111,99,97,108,83,99,97,108,105,110,103,0,109,95,105,109,112,
|
||||
108,105,99,105,116,83,104,97,112,101,68,105,109,101,110,115,105,111,110,115,
|
||||
0,109,95,99,111,108,108,105,115,105,111,110,77,97,114,103,105,110,0,109,
|
||||
95,112,97,100,100,105,110,103,0,109,95,112,111,115,0,109,95,114,97,100,
|
||||
105,117,115,0,109,95,99,111,110,118,101,120,73,110,116,101,114,110,97,108,
|
||||
83,104,97,112,101,68,97,116,97,0,42,109,95,108,111,99,97,108,80,111,
|
||||
115,105,116,105,111,110,65,114,114,97,121,80,116,114,0,109,95,108,111,99,
|
||||
97,108,80,111,115,105,116,105,111,110,65,114,114,97,121,83,105,122,101,0,
|
||||
109,95,118,97,108,117,101,0,105,110,116,0,42,109,95,118,101,114,116,105,
|
||||
99,101,115,51,102,0,42,109,95,118,101,114,116,105,99,101,115,51,100,0,
|
||||
42,109,95,105,110,100,105,99,101,115,51,50,0,42,109,95,105,110,100,105,
|
||||
99,101,115,49,54,0,109,95,110,117,109,84,114,105,97,110,103,108,101,115,
|
||||
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,
|
||||
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,
|
||||
105,110,116,115,0,109,95,112,97,100,100,105,110,103,51,91,52,93,0,42,
|
||||
109,95,98,114,111,97,100,112,104,97,115,101,72,97,110,100,108,101,0,42,
|
||||
109,95,99,111,108,108,105,115,105,111,110,83,104,97,112,101,0,42,109,95,
|
||||
114,111,111,116,67,111,108,108,105,115,105,111,110,83,104,97,112,101,0,42,
|
||||
109,95,117,115,101,114,79,98,106,101,99,116,80,111,105,110,116,101,114,0,
|
||||
109,95,119,111,114,108,100,84,114,97,110,115,102,111,114,109,0,109,95,105,
|
||||
110,116,101,114,112,111,108,97,116,105,111,110,87,111,114,108,100,84,114,97,
|
||||
110,115,102,111,114,109,0,109,95,105,110,116,101,114,112,111,108,97,116,105,
|
||||
111,110,76,105,110,101,97,114,86,101,108,111,99,105,116,121,0,109,95,105,
|
||||
110,116,101,114,112,111,108,97,116,105,111,110,65,110,103,117,108,97,114,86,
|
||||
101,108,111,99,105,116,121,0,109,95,97,110,105,115,111,116,114,111,112,105,
|
||||
99,70,114,105,99,116,105,111,110,0,109,95,99,111,110,116,97,99,116,80,
|
||||
114,111,99,101,115,115,105,110,103,84,104,114,101,115,104,111,108,100,0,109,
|
||||
95,100,101,97,99,116,105,118,97,116,105,111,110,84,105,109,101,0,109,95,
|
||||
102,114,105,99,116,105,111,110,0,109,95,114,101,115,116,105,116,117,116,105,
|
||||
111,110,0,109,95,104,105,116,70,114,97,99,116,105,111,110,0,109,95,99,
|
||||
99,100,83,119,101,112,116,83,112,104,101,114,101,82,97,100,105,117,115,0,
|
||||
109,95,99,99,100,77,111,116,105,111,110,84,104,114,101,115,104,111,108,100,
|
||||
0,109,95,104,97,115,65,110,105,115,111,116,114,111,112,105,99,70,114,105,
|
||||
99,116,105,111,110,0,109,95,99,111,108,108,105,115,105,111,110,70,108,97,
|
||||
103,115,0,109,95,105,115,108,97,110,100,84,97,103,49,0,109,95,99,111,
|
||||
109,112,97,110,105,111,110,73,100,0,109,95,97,99,116,105,118,97,116,105,
|
||||
111,110,83,116,97,116,101,49,0,109,95,105,110,116,101,114,110,97,108,84,
|
||||
121,112,101,0,109,95,99,104,101,99,107,67,111,108,108,105,100,101,87,105,
|
||||
116,104,0,109,95,99,111,108,108,105,115,105,111,110,79,98,106,101,99,116,
|
||||
68,97,116,97,0,109,95,105,110,118,73,110,101,114,116,105,97,84,101,110,
|
||||
115,111,114,87,111,114,108,100,0,109,95,108,105,110,101,97,114,86,101,108,
|
||||
111,99,105,116,121,0,109,95,97,110,103,117,108,97,114,86,101,108,111,99,
|
||||
105,116,121,0,109,95,97,110,103,117,108,97,114,70,97,99,116,111,114,0,
|
||||
109,95,108,105,110,101,97,114,70,97,99,116,111,114,0,109,95,103,114,97,
|
||||
118,105,116,121,0,109,95,103,114,97,118,105,116,121,95,97,99,99,101,108,
|
||||
101,114,97,116,105,111,110,0,109,95,105,110,118,73,110,101,114,116,105,97,
|
||||
76,111,99,97,108,0,109,95,116,111,116,97,108,70,111,114,99,101,0,109,
|
||||
95,116,111,116,97,108,84,111,114,113,117,101,0,109,95,105,110,118,101,114,
|
||||
115,101,77,97,115,115,0,109,95,108,105,110,101,97,114,68,97,109,112,105,
|
||||
110,103,0,109,95,97,110,103,117,108,97,114,68,97,109,112,105,110,103,0,
|
||||
109,95,97,100,100,105,116,105,111,110,97,108,68,97,109,112,105,110,103,70,
|
||||
97,99,116,111,114,0,109,95,97,100,100,105,116,105,111,110,97,108,76,105,
|
||||
110,101,97,114,68,97,109,112,105,110,103,84,104,114,101,115,104,111,108,100,
|
||||
83,113,114,0,109,95,97,100,100,105,116,105,111,110,97,108,65,110,103,117,
|
||||
108,97,114,68,97,109,112,105,110,103,84,104,114,101,115,104,111,108,100,83,
|
||||
113,114,0,109,95,97,100,100,105,116,105,111,110,97,108,65,110,103,117,108,
|
||||
97,114,68,97,109,112,105,110,103,70,97,99,116,111,114,0,109,95,108,105,
|
||||
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,
|
||||
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,
|
||||
110,116,101,114,65,114,114,97,121,0,98,116,80,104,121,115,105,99,115,83,
|
||||
121,115,116,101,109,0,76,105,115,116,66,97,115,101,0,98,116,86,101,99,
|
||||
116,111,114,51,70,108,111,97,116,68,97,116,97,0,98,116,86,101,99,116,
|
||||
111,114,51,68,111,117,98,108,101,68,97,116,97,0,98,116,77,97,116,114,
|
||||
105,120,51,120,51,70,108,111,97,116,68,97,116,97,0,98,116,77,97,116,
|
||||
114,105,120,51,120,51,68,111,117,98,108,101,68,97,116,97,0,98,116,84,
|
||||
114,97,110,115,102,111,114,109,70,108,111,97,116,68,97,116,97,0,98,116,
|
||||
84,114,97,110,115,102,111,114,109,68,111,117,98,108,101,68,97,116,97,0,
|
||||
98,116,67,111,108,108,105,115,105,111,110,83,104,97,112,101,68,97,116,97,
|
||||
0,98,116,67,111,110,118,101,120,73,110,116,101,114,110,97,108,83,104,97,
|
||||
112,101,68,97,116,97,0,98,116,80,111,115,105,116,105,111,110,65,110,100,
|
||||
82,97,100,105,117,115,0,98,116,77,117,108,116,105,83,112,104,101,114,101,
|
||||
83,104,97,112,101,68,97,116,97,0,98,116,73,110,116,73,110,100,101,120,
|
||||
68,97,116,97,0,98,116,83,104,111,114,116,73,110,116,73,110,100,101,120,
|
||||
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,};
|
||||
int sBulletDNAlen= sizeof(sBulletDNAstr);
|
||||
|
||||
@@ -23,9 +23,14 @@ subject to the following restrictions:
|
||||
#include <string.h>
|
||||
|
||||
|
||||
|
||||
///only the 32bit versions for now
|
||||
extern unsigned char sBulletDNAstr[];
|
||||
extern int sBulletDNAlen;
|
||||
extern unsigned char sBulletDNAstr64[];
|
||||
extern int sBulletDNAlen64;
|
||||
|
||||
|
||||
|
||||
class btChunk
|
||||
{
|
||||
@@ -263,12 +268,18 @@ public:
|
||||
|
||||
if (VOID_IS_8)
|
||||
{
|
||||
//64bit not yet supported (soon)
|
||||
btAssert(0);
|
||||
return;
|
||||
//#if _WIN64
|
||||
initDNA((const char*)sBulletDNAstr64,sBulletDNAlen64);
|
||||
//#else
|
||||
// btAssert(0);
|
||||
//#endif
|
||||
} else
|
||||
{
|
||||
//#ifndef _WIN64
|
||||
initDNA((const char*)sBulletDNAstr,sBulletDNAlen);
|
||||
//#else
|
||||
// btAssert(0);
|
||||
//#endif
|
||||
}
|
||||
|
||||
}
|
||||
@@ -282,28 +293,35 @@ public:
|
||||
{
|
||||
m_currentSize = BT_HEADER_LENGTH;
|
||||
|
||||
memcpy(m_buffer, "BULLET ", 7);
|
||||
int endian= 1;
|
||||
endian= ((char*)&endian)[0];
|
||||
#ifdef BT_USE_DOUBLE_PRECISION
|
||||
memcpy(m_buffer, "BULLETd", 7);
|
||||
#else
|
||||
memcpy(m_buffer, "BULLETf", 7);
|
||||
#endif //BT_USE_DOUBLE_PRECISION
|
||||
|
||||
int littleEndian= 1;
|
||||
littleEndian= ((char*)&littleEndian)[0];
|
||||
|
||||
if (endian)
|
||||
{
|
||||
m_buffer[7] = '_';
|
||||
} else
|
||||
{
|
||||
m_buffer[7] = '-';
|
||||
}
|
||||
if (sizeof(void*)==8)
|
||||
{
|
||||
m_buffer[8]='V';
|
||||
m_buffer[7] = '-';
|
||||
} else
|
||||
{
|
||||
m_buffer[8]='v';
|
||||
m_buffer[7] = '_';
|
||||
}
|
||||
|
||||
if (littleEndian)
|
||||
{
|
||||
m_buffer[8]='v';
|
||||
} else
|
||||
{
|
||||
m_buffer[8]='V';
|
||||
}
|
||||
|
||||
|
||||
m_buffer[9] = '2';
|
||||
m_buffer[10] = '7';
|
||||
m_buffer[11] = '5';
|
||||
m_buffer[11] = '6';
|
||||
|
||||
|
||||
}
|
||||
@@ -327,6 +345,7 @@ public:
|
||||
virtual void finalizeChunk(btChunk* chunk, const char* structType, int chunkCode,void* oldPtr) const
|
||||
{
|
||||
chunk->m_dna_nr = getReverseType(structType);
|
||||
|
||||
chunk->m_chunkCode = chunkCode;
|
||||
chunk->m_oldPtr = oldPtr;
|
||||
}
|
||||
@@ -339,14 +358,14 @@ public:
|
||||
{
|
||||
|
||||
unsigned char* ptr = m_buffer+m_currentSize;
|
||||
m_currentSize += size*numElements+sizeof(btChunk);
|
||||
m_currentSize += int(size)*numElements+sizeof(btChunk);
|
||||
|
||||
unsigned char* data = ptr + sizeof(btChunk);
|
||||
|
||||
btChunk* chunk = (btChunk*)ptr;
|
||||
chunk->m_chunkCode = 0;
|
||||
chunk->m_oldPtr = data;
|
||||
chunk->m_length = size*numElements;
|
||||
chunk->m_length = int(size)*numElements;
|
||||
chunk->m_number = numElements;
|
||||
|
||||
m_chunkPtrs.push_back(chunk);
|
||||
|
||||
@@ -20,6 +20,13 @@ subject to the following restrictions:
|
||||
|
||||
#include "btMatrix3x3.h"
|
||||
|
||||
#ifdef BT_USE_DOUBLE_PRECISION
|
||||
#define btTransformData btTransformDoubleData
|
||||
#else
|
||||
#define btTransformData btTransformFloatData
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
/**@brief The btTransform class supports rigid transforms with only translation and rotation and no scaling/shear.
|
||||
@@ -205,6 +212,10 @@ public:
|
||||
|
||||
void deSerialize(const struct btTransformData& dataIn);
|
||||
|
||||
void deSerializeDouble(const struct btTransformDoubleData& dataIn);
|
||||
|
||||
void deSerializeFloat(const struct btTransformFloatData& dataIn);
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -237,13 +248,22 @@ SIMD_FORCE_INLINE bool operator==(const btTransform& t1, const btTransform& t2)
|
||||
t1.getOrigin() == t2.getOrigin() );
|
||||
}
|
||||
|
||||
|
||||
///for serialization
|
||||
struct btTransformData
|
||||
struct btTransformFloatData
|
||||
{
|
||||
btMatrix3x3Data m_basis;
|
||||
btVector3Data m_origin;
|
||||
btMatrix3x3FloatData m_basis;
|
||||
btVector3FloatData m_origin;
|
||||
};
|
||||
|
||||
struct btTransformDoubleData
|
||||
{
|
||||
btMatrix3x3DoubleData m_basis;
|
||||
btVector3DoubleData m_origin;
|
||||
};
|
||||
|
||||
|
||||
|
||||
SIMD_FORCE_INLINE void btTransform::serialize(btTransformData& dataOut) const
|
||||
{
|
||||
m_basis.serialize(dataOut.m_basis);
|
||||
@@ -256,6 +276,19 @@ SIMD_FORCE_INLINE void btTransform::deSerialize(const btTransformData& dataIn)
|
||||
m_origin.deSerialize(dataIn.m_origin);
|
||||
}
|
||||
|
||||
SIMD_FORCE_INLINE void btTransform::deSerializeFloat(const btTransformFloatData& dataIn)
|
||||
{
|
||||
m_basis.deSerializeFloat(dataIn.m_basis);
|
||||
m_origin.deSerializeFloat(dataIn.m_origin);
|
||||
}
|
||||
|
||||
SIMD_FORCE_INLINE void btTransform::deSerializeDouble(const btTransformDoubleData& dataIn)
|
||||
{
|
||||
m_basis.deSerializeDouble(dataIn.m_basis);
|
||||
m_origin.deSerializeDouble(dataIn.m_origin);
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -21,6 +21,14 @@ subject to the following restrictions:
|
||||
#include "btScalar.h"
|
||||
#include "btMinMax.h"
|
||||
|
||||
#ifdef BT_USE_DOUBLE_PRECISION
|
||||
#define btVector3Data btVector3DoubleData
|
||||
#define btVector3DataName "btVector3DoubleData"
|
||||
#else
|
||||
#define btVector3Data btVector3FloatData
|
||||
#define btVector3DataName "btVector3FloatData"
|
||||
#endif //BT_USE_DOUBLE_PRECISION
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -330,10 +338,18 @@ public:
|
||||
return length2() < SIMD_EPSILON;
|
||||
}
|
||||
|
||||
|
||||
SIMD_FORCE_INLINE void serialize(struct btVector3Data& dataOut) const;
|
||||
|
||||
SIMD_FORCE_INLINE void deSerialize(const struct btVector3Data& dataIn);
|
||||
|
||||
SIMD_FORCE_INLINE void serializeFloat(struct btVector3FloatData& dataOut) const;
|
||||
|
||||
SIMD_FORCE_INLINE void deSerializeFloat(const struct btVector3FloatData& dataIn);
|
||||
|
||||
SIMD_FORCE_INLINE void serializeDouble(struct btVector3DoubleData& dataOut) const;
|
||||
|
||||
SIMD_FORCE_INLINE void deSerializeDouble(const struct btVector3DoubleData& dataIn);
|
||||
|
||||
};
|
||||
|
||||
/**@brief Return the sum of two vectors (Point symantics)*/
|
||||
@@ -671,10 +687,6 @@ SIMD_FORCE_INLINE void btPlaneSpace1 (const btVector3& n, btVector3& p, btVector
|
||||
}
|
||||
}
|
||||
|
||||
struct btVector3Data
|
||||
{
|
||||
btScalar m_floats[4];
|
||||
};
|
||||
|
||||
struct btVector3FloatData
|
||||
{
|
||||
@@ -684,8 +696,37 @@ struct btVector3FloatData
|
||||
struct btVector3DoubleData
|
||||
{
|
||||
double m_floats[4];
|
||||
|
||||
};
|
||||
|
||||
SIMD_FORCE_INLINE void btVector3::serializeFloat(struct btVector3FloatData& dataOut) const
|
||||
{
|
||||
///could also do a memcpy, check if it is worth it
|
||||
for (int i=0;i<4;i++)
|
||||
dataOut.m_floats[i] = float(m_floats[i]);
|
||||
}
|
||||
|
||||
SIMD_FORCE_INLINE void btVector3::deSerializeFloat(const struct btVector3FloatData& dataIn)
|
||||
{
|
||||
for (int i=0;i<4;i++)
|
||||
m_floats[i] = btScalar(dataIn.m_floats[i]);
|
||||
}
|
||||
|
||||
|
||||
SIMD_FORCE_INLINE void btVector3::serializeDouble(struct btVector3DoubleData& dataOut) const
|
||||
{
|
||||
///could also do a memcpy, check if it is worth it
|
||||
for (int i=0;i<4;i++)
|
||||
dataOut.m_floats[i] = double(m_floats[i]);
|
||||
}
|
||||
|
||||
SIMD_FORCE_INLINE void btVector3::deSerializeDouble(const struct btVector3DoubleData& dataIn)
|
||||
{
|
||||
for (int i=0;i<4;i++)
|
||||
m_floats[i] = btScalar(dataIn.m_floats[i]);
|
||||
}
|
||||
|
||||
|
||||
SIMD_FORCE_INLINE void btVector3::serialize(struct btVector3Data& dataOut) const
|
||||
{
|
||||
///could also do a memcpy, check if it is worth it
|
||||
|
||||
Reference in New Issue
Block a user