void Quaternion::FromAxes(const Vector3& xAxis, const Vector3& yAxis, const Vector3& zAxis) { Matrix3 matrix( xAxis.x, yAxis.x, zAxis.x, xAxis.y, yAxis.y, zAxis.y, xAxis.z, yAxis.z, zAxis.z ); FromRotationMatrix(matrix); }
void Quaternion::FromAxes(const Vector3& xAxis, const Vector3& yAxis, const Vector3& zAxis) { Matrix3 matrix( xAxis.x_, yAxis.x_, zAxis.x_, xAxis.y_, yAxis.y_, zAxis.y_, xAxis.z_, yAxis.z_, zAxis.z_ ); FromRotationMatrix(matrix); }
moQuaternion<Real>& moQuaternion<Real>::FromRotationMatrix ( const moVector3<Real> akRotColumn[3]) { moMatrix3<Real> kRot; for (int iCol = 0; iCol < 3; iCol++) { kRot(0,iCol) = akRotColumn[iCol][0]; kRot(1,iCol) = akRotColumn[iCol][1]; kRot(2,iCol) = akRotColumn[iCol][2]; } return FromRotationMatrix(kRot); }
//----------------------------------------------------------------------- void Quaternion::FromAxes (const Vector3* akAxis) { Matrix3 kRot; for (size_t iCol = 0; iCol < 3; iCol++) { kRot[0][iCol] = akAxis[iCol].x; kRot[1][iCol] = akAxis[iCol].y; kRot[2][iCol] = akAxis[iCol].z; } FromRotationMatrix(kRot); }
void Quaternion::FromAxes(const Vector3& xAxis, const Vector3& yAxis, const Vector3& zAxis) { Matrix3 kRot; kRot[0][0] = xAxis.x; kRot[1][0] = xAxis.y; kRot[2][0] = xAxis.z; kRot[0][1] = yAxis.x; kRot[1][1] = yAxis.y; kRot[2][1] = yAxis.z; kRot[0][2] = zAxis.x; kRot[1][2] = zAxis.y; kRot[2][2] = zAxis.z; FromRotationMatrix(kRot); }
void Quat::FromAxes(const Vec3& xAxis, const Vec3& yAxis, const Vec3& zAxis) { Mat33 rot; rot[0][0] = xAxis.x; rot[1][0] = xAxis.y; rot[2][0] = xAxis.z; rot[0][1] = yAxis.x; rot[1][1] = yAxis.y; rot[2][1] = yAxis.z; rot[0][2] = zAxis.x; rot[1][2] = zAxis.y; rot[2][2] = zAxis.z; FromRotationMatrix(rot); }
void Quaternion::fromAxes(const Vector3& xA, const Vector3& yA, const Vector3& zA) { Matrix3 kRot; kRot[0][0] = xA.x; kRot[1][0] = xA.y; kRot[2][0] = xA.z; kRot[0][1] = yA.x; kRot[1][1] = yA.y; kRot[2][1] = yA.z; kRot[0][2] = zA.x; kRot[1][2] = zA.y; kRot[2][2] = zA.z; FromRotationMatrix(kRot); }
Quat::Quat(const Mat33& rot) { FromRotationMatrix(rot); }
moQuaternion<Real>::moQuaternion (const moVector3<Real> akRotColumn[3]) { FromRotationMatrix(akRotColumn); }
moQuaternion<Real>::moQuaternion (const moMatrix3<Real>& rkRot) { FromRotationMatrix(rkRot); }
//----------------------------------------------------------------------- void Quaternion::FromAxes (const Vector3& xaxis, const Vector3& yaxis, const Vector3& zaxis) { Matrix3 kRot; kRot.FromAxes(xaxis, yaxis, zaxis); FromRotationMatrix(kRot); }