added some template to restore (syncMultiBody, syncContactManifolds) for single float and double precision, in 'pybullet.restoreState'
This commit is contained in:
@@ -602,7 +602,9 @@ public:
|
||||
|
||||
SIMD_FORCE_INLINE void serialize(struct btQuaternionData& dataOut) const;
|
||||
|
||||
SIMD_FORCE_INLINE void deSerialize(const struct btQuaternionData& dataIn);
|
||||
SIMD_FORCE_INLINE void deSerialize(const struct btQuaternionFloatData& dataIn);
|
||||
|
||||
SIMD_FORCE_INLINE void deSerialize(const struct btQuaternionDoubleData& dataIn);
|
||||
|
||||
SIMD_FORCE_INLINE void serializeFloat(struct btQuaternionFloatData& dataOut) const;
|
||||
|
||||
@@ -1003,10 +1005,16 @@ SIMD_FORCE_INLINE void btQuaternion::serialize(struct btQuaternionData& dataOut)
|
||||
dataOut.m_floats[i] = m_floats[i];
|
||||
}
|
||||
|
||||
SIMD_FORCE_INLINE void btQuaternion::deSerialize(const struct btQuaternionData& dataIn)
|
||||
SIMD_FORCE_INLINE void btQuaternion::deSerialize(const struct btQuaternionFloatData& dataIn)
|
||||
{
|
||||
for (int i = 0; i<4; i++)
|
||||
m_floats[i] = (btScalar)dataIn.m_floats[i];
|
||||
}
|
||||
|
||||
SIMD_FORCE_INLINE void btQuaternion::deSerialize(const struct btQuaternionDoubleData& dataIn)
|
||||
{
|
||||
for (int i=0;i<4;i++)
|
||||
m_floats[i] = dataIn.m_floats[i];
|
||||
m_floats[i] = (btScalar)dataIn.m_floats[i];
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user