void MQuaternion::setFromVectors(const MVector3 & source, const MVector3 & destination) { MVector3 axis=source.crossProduct(destination); float angle = acosf(source.getNormalized().dotProduct(destination.getNormalized())); setFromAngleAxis((float)(angle*RAD_TO_DEG), axis); }
void Quaternion::setToRotationZ (float angleDegrees) { setFromAngleAxis (angleDegrees, Constants::WORLD_Z); }
Quaternion::Quaternion (float angleDegrees, const Vector3<float>& unitAxis) { setFromAngleAxis (angleDegrees, unitAxis); }