LLQuaternion::LLQuaternion(const LLVector3 &x_axis, const LLVector3 &y_axis, const LLVector3 &z_axis) { LLMatrix3 mat; mat.setRows(x_axis, y_axis, z_axis); *this = mat.quaternion(); normalize(); }
void llquat_test_object_t::test<3>() { LLMatrix3 llmat; LLVector3 vect1(3.4028234660000000f , 234.56f, 4234.442234f); LLVector3 vect2(741.434f, 23.00034f, 6567.223423f); LLVector3 vect3(566.003034f, 12.98705f, 234.764423f); llmat.setRows(vect1, vect2, vect3); ensure("LLMatrix3::setRows fn failed.", 3.4028234660000000f == llmat.mMatrix[0][0] && 234.56f == llmat.mMatrix[0][1] && 4234.442234f == llmat.mMatrix[0][2] && 741.434f == llmat.mMatrix[1][0] && 23.00034f == llmat.mMatrix[1][1] && 6567.223423f == llmat.mMatrix[1][2] && 566.003034f == llmat.mMatrix[2][0] && 12.98705f == llmat.mMatrix[2][1] && 234.764423f == llmat.mMatrix[2][2]); }
LLQuaternion::LLQuaternion(const LLMatrix3 &mat) { *this = mat.quaternion(); normalize(); }