Hi,
In most situations, immediately after creating an instance of btTransform or btMatrix3x3 class respective .setIdentity() method is called on that instance.
For Ex. The constructor of the RagDoll class present in the RagDoll demo calls .setIdenty() method 32 times. Rather than setting btMatrix3x3 object to a Zero-Matrix by default if it is set to a diagonal matrix, where the diagonal values will be passed by the user during object instantiation, we can avoid significant number of function calls made to .setIdentity().
btMatrix3x3::btMatrix3x3(btScalar dia=0.0f){
dia 0 0
0 dia 0
0 0 dia
}
I hope my suggestion makes some sense and I wish this is implemented in the next release.
Vijay Kumar R
dehinrsu@gmail.com
www.iamacoder.in