NEWMAT::Matrix rspfMatrix3x3::createRotationMatrix(double angleX, double angleY, double angleZ, rspfCoordSysOrientMode orientationMode) { return (createRotationZMatrix(angleZ, orientationMode)* createRotationYMatrix(angleY, orientationMode)* createRotationXMatrix(angleX, orientationMode)); }
pqe::Matrix pqe::Matrix3x3::createRotationMatrix(pqe_float64 angleX, pqe_float64 angleY, pqe_float64 angleZ, pqeCoordSysOrientMode orientationMode) { return (createRotationZMatrix(angleZ, orientationMode)* createRotationYMatrix(angleY, orientationMode)* createRotationXMatrix(angleX, orientationMode)); }
NEWMAT::Matrix ossimMatrix4x4::createRotationMatrix(double angleX, double angleY, double angleZ, ossimCoordSysOrientMode orientationMode) { return (createRotationZMatrix(angleZ, orientationMode)* createRotationYMatrix(angleY, orientationMode)* createRotationXMatrix(angleX, orientationMode)); }
void Camera::rotate(f32 dPhi, f32 dTheta){ phi += dPhi; theta += dTheta; if(theta > PI/2){ theta = PI/2; } if(theta < -PI/2){ theta = -PI/2; } Matrix4f rot = createRotationYMatrix(phi) * createRotationXMatrix(theta); sideDir = -Vector3f(rot[0][0], rot[1][0], rot[2][0]); upDir = Vector3f(rot[0][1], rot[1][1], rot[2][1]); viewDir = -Vector3f(rot[0][2], rot[1][2], rot[2][2]); }