Exemplo n.º 1
0
NEWMAT::Matrix rspfMatrix3x3::createRotationMatrix(double angleX,
                                                    double angleY,
                                                    double angleZ,
                                                    rspfCoordSysOrientMode orientationMode)
{
   return (createRotationZMatrix(angleZ, orientationMode)*
           createRotationYMatrix(angleY, orientationMode)*
           createRotationXMatrix(angleX, orientationMode));
}
Exemplo n.º 2
0
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));
}
Exemplo n.º 3
0
NEWMAT::Matrix ossimMatrix4x4::createRotationMatrix(double angleX,
                                                    double angleY,
                                                    double angleZ,
                                                    ossimCoordSysOrientMode orientationMode)
{
  return (createRotationZMatrix(angleZ,
                                orientationMode)*
	  createRotationYMatrix(angleY,
                                orientationMode)*
	  createRotationXMatrix(angleX,
                                orientationMode));
}
Exemplo n.º 4
0
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]);
}