make btTransform::getIdentity a static const reference, returning a static, and add getIdentity to btMatrix3x3 and btQuaternion class
Thanks to ejtttje and martijn for the suggestions: http://code.google.com/p/bullet/issues/detail?id=139
This commit is contained in:
@@ -190,11 +190,10 @@ public:
|
||||
btTransform operator*(const btTransform& t) const;
|
||||
|
||||
/**@brief Return an identity transform */
|
||||
static btTransform getIdentity()
|
||||
static const btTransform& getIdentity()
|
||||
{
|
||||
btTransform tr;
|
||||
tr.setIdentity();
|
||||
return tr;
|
||||
static const btTransform identityTransform(btMatrix3x3::getIdentity());
|
||||
return identityTransform;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user