Add implicit convertion operators on mathematical types
Ybalrid opened this issue · 3 comments
Ybalrid commented
Vectors and Quaternions could benifit from being easilly convertible to their equivalent in other libraries explicitly (e.g. bullet)
This would permit this kind of syntax:
AnnQuaternion q = /*some value*/;
btQuaternion btq = /*some other value*/;
btQuaternion copoundedRotation = btq * q; //Currently impossible, would requirer to call q.getBtQuaternion();
What needs to be added is this kind of methods to the vector classes :
class V
{
/*all the content*/
operator OtherType() const
{
return getConvertionToOtherType();
}
};
Ybalrid commented
AnnVect3 -> BtVector3 done
Ybalrid commented
AnnQuaternion -> btQuaternion done
Ybalrid commented
This is basically done.