improved performance by adding constructors to btTransform/btMatrix3x3 to avoid conversions, compoundshape returns const references (instead of duplicate objects)

Thanks Marten Svanfeldt, Starbreeze Studios
This commit is contained in:
ejcoumans
2007-07-05 23:48:05 +00:00
parent b91886e1c2
commit 5c80ff1f7d
5 changed files with 36 additions and 43 deletions

View File

@@ -45,6 +45,21 @@ class btMatrix3x3 {
zx, zy, zz);
}
SIMD_FORCE_INLINE btMatrix3x3 (const btMatrix3x3& other)
{
m_el[0] = other.m_el[0];
m_el[1] = other.m_el[1];
m_el[2] = other.m_el[2];
}
SIMD_FORCE_INLINE btMatrix3x3& operator=(const btMatrix3x3& other)
{
m_el[0] = other.m_el[0];
m_el[1] = other.m_el[1];
m_el[2] = other.m_el[2];
return *this;
}
SIMD_FORCE_INLINE btVector3 getColumn(int i) const
{
return btVector3(m_el[0][i],m_el[1][i],m_el[2][i]);