- Added serialization to btBvhTriangleMeshShape/btOptimizedBvh. See ConcaveDemo for example usage.
- added bt32BitAxisSweep3, which co-exists without recompilation, using template class. This broadphase is recommended for large worlds with many objects (> 16384), until btMultiSwap is finished. - Fixed some recent issues in Bullet 2.57 related to compound (thanks Proctoid) and memory allocations
This commit is contained in:
@@ -22,10 +22,17 @@ subject to the following restrictions:
|
||||
class btQuadWordStorage
|
||||
{
|
||||
protected:
|
||||
btScalar m_x;
|
||||
btScalar m_y;
|
||||
btScalar m_z;
|
||||
btScalar m_unusedW;
|
||||
#ifdef BT_USE_DOUBLE_PRECISION
|
||||
union { btScalar m_x; unsigned long long int m_intx; unsigned char m_charx[8] ;};
|
||||
union { btScalar m_y; unsigned long long int m_inty; unsigned char m_chary[8] ; };
|
||||
union { btScalar m_z; unsigned long long int m_intz; unsigned char m_charz[8] ; };
|
||||
union { btScalar m_unusedW; unsigned long long int m_intw; unsigned char m_charw[8] ; };
|
||||
#else
|
||||
union { btScalar m_x; unsigned int m_intx; unsigned char m_charx[4] ;};
|
||||
union { btScalar m_y; unsigned int m_inty; unsigned char m_chary[4] ; };
|
||||
union { btScalar m_z; unsigned int m_intz; unsigned char m_charz[4] ; };
|
||||
union { btScalar m_unusedW; unsigned int m_intw; unsigned char m_charw[4] ; };
|
||||
#endif //BT_USE_DOUBLE_PRECISION
|
||||
};
|
||||
|
||||
|
||||
@@ -63,6 +70,79 @@ class btQuadWord : public btQuadWordStorage
|
||||
SIMD_FORCE_INLINE operator btScalar *() { return &m_x; }
|
||||
SIMD_FORCE_INLINE operator const btScalar *() const { return &m_x; }
|
||||
|
||||
#ifdef BT_USE_DOUBLE_PRECISION
|
||||
SIMD_FORCE_INLINE unsigned long long int getLongIntXValue() const
|
||||
{
|
||||
return m_intx;
|
||||
}
|
||||
SIMD_FORCE_INLINE unsigned long long int getLongIntYValue() const
|
||||
{
|
||||
return m_inty;
|
||||
}
|
||||
SIMD_FORCE_INLINE unsigned long long int getLongIntZValue() const
|
||||
{
|
||||
return m_intz;
|
||||
}
|
||||
SIMD_FORCE_INLINE unsigned long long int getLongIntWValue() const
|
||||
{
|
||||
return m_intw;
|
||||
}
|
||||
SIMD_FORCE_INLINE void setXValueByLongInt(unsigned long long int intval)
|
||||
{
|
||||
m_intx = intval;
|
||||
}
|
||||
|
||||
SIMD_FORCE_INLINE void setYValueByLongInt(unsigned long long int intval)
|
||||
{
|
||||
m_inty = intval;
|
||||
}
|
||||
|
||||
SIMD_FORCE_INLINE void setZValueByLongInt(unsigned long long int intval)
|
||||
{
|
||||
m_intz = intval;
|
||||
}
|
||||
SIMD_FORCE_INLINE void setWValueByLongInt(unsigned long long int intval)
|
||||
{
|
||||
m_intz = intval;
|
||||
}
|
||||
#else
|
||||
SIMD_FORCE_INLINE unsigned int getIntXValue() const
|
||||
{
|
||||
return m_intx;
|
||||
}
|
||||
SIMD_FORCE_INLINE unsigned int getIntYValue() const
|
||||
{
|
||||
return m_inty;
|
||||
}
|
||||
SIMD_FORCE_INLINE unsigned int getIntZValue() const
|
||||
{
|
||||
return m_intz;
|
||||
}
|
||||
SIMD_FORCE_INLINE unsigned int getIntWValue() const
|
||||
{
|
||||
return m_intw;
|
||||
}
|
||||
SIMD_FORCE_INLINE void setXValueByInt(unsigned int intval)
|
||||
{
|
||||
m_intx = intval;
|
||||
}
|
||||
|
||||
SIMD_FORCE_INLINE void setYValueByInt(unsigned int intval)
|
||||
{
|
||||
m_inty = intval;
|
||||
}
|
||||
|
||||
SIMD_FORCE_INLINE void setZValueByInt(unsigned int intval)
|
||||
{
|
||||
m_intz = intval;
|
||||
}
|
||||
SIMD_FORCE_INLINE void setWValueByInt(unsigned int intval)
|
||||
{
|
||||
m_intw = intval;
|
||||
}
|
||||
|
||||
#endif//BT_USE_DOUBLE_PRECISION
|
||||
|
||||
SIMD_FORCE_INLINE void setValue(const btScalar& x, const btScalar& y, const btScalar& z)
|
||||
{
|
||||
m_x=x;
|
||||
|
||||
Reference in New Issue
Block a user