Sets the matrix from translation arg0
and rotation arg1
.
Source
void setFromTranslationRotation(Vector3 arg0, Quaternion arg1) { final arg1Storage = arg1._qStorage; double x = arg1Storage[0]; double y = arg1Storage[1]; double z = arg1Storage[2]; double w = arg1Storage[3]; double x2 = x + x; double y2 = y + y; double z2 = z + z; double xx = x * x2; double xy = x * y2; double xz = x * z2; double yy = y * y2; double yz = y * z2; double zz = z * z2; double wx = w * x2; double wy = w * y2; double wz = w * z2; final arg0Storage = arg0._v3storage; _m4storage[0] = 1.0 - (yy + zz); _m4storage[1] = xy + wz; _m4storage[2] = xz - wy; _m4storage[3] = 0.0; _m4storage[4] = xy - wz; _m4storage[5] = 1.0 - (xx + zz); _m4storage[6] = yz + wx; _m4storage[7] = 0.0; _m4storage[8] = xz + wy; _m4storage[9] = yz - wx; _m4storage[10] = 1.0 - (xx + yy); _m4storage[11] = 0.0; _m4storage[12] = arg0Storage[0]; _m4storage[13] = arg0Storage[1]; _m4storage[14] = arg0Storage[2]; _m4storage[15] = 1.0; }