*** empty log message ***

This commit is contained in:
Robert Osfield
2001-09-27 09:44:55 +00:00
parent e50ce2784f
commit ba47264c5e
10 changed files with 119 additions and 83 deletions

View File

@@ -409,8 +409,8 @@ bool DriveManipulator::calcMovement()
osg::Matrix mat;
mat.makeTrans(-center.x(),-center.y(),-center.z());
mat.postRot(yaw,uv.x(),uv.y(),uv.z());
mat.postTrans(center.x(),center.y(),center.z());
mat *= Matrix::rotate(yaw,uv.x(),uv.y(),uv.z());
mat *= Matrix::trans(center.x(),center.y(),center.z());
center = _camera->getEyePoint();
uv = _camera->getUpVector();

View File

@@ -205,20 +205,19 @@ bool FlightManipulator::calcMovement()
float roll = -dx*0.1f*dt;
osg::Matrix mat;
mat.makeTrans(-center.x(),-center.y(),-center.z());
mat.postRot(pitch,sv.x(),sv.y(),sv.z());
mat.postRot(roll,lv.x(),lv.y(),lv.z());
mat.makeTrans(-center);
mat *= Matrix::rotate(pitch,sv.x(),sv.y(),sv.z());
mat *= Matrix::rotate(roll,lv.x(),lv.y(),lv.z());
if (_yawMode==YAW_AUTOMATICALLY_WHEN_BANKED)
{
float bank = asinf(sv.z());
float yaw = (-bank*180.0f/M_PI)*dt;
mat.postRot(yaw,0.0f,0.0f,1.0f);
mat *= Matrix::rotate(yaw,0.0f,0.0f,1.0f);
}
mat.postTrans(center.x(),center.y(),center.z());
lv *= (_velocity*dt);
mat.postTrans(lv.x(),lv.y(),lv.z());
mat *= Matrix::trans(center+lv);
_camera->transformLookAt(mat);

View File

@@ -216,8 +216,8 @@ bool TrackballManipulator::calcMovement()
osg::Matrix mat;
mat.makeTrans(-center.x(),-center.y(),-center.z());
mat.postRot(angle,axis.x(),axis.y(),axis.z());
mat.postTrans(center.x(),center.y(),center.z());
mat *= Matrix::rotate(angle,axis.x(),axis.y(),axis.z());
mat *= Matrix::trans(center.x(),center.y(),center.z());
_camera->transformLookAt(mat);
@@ -258,8 +258,8 @@ bool TrackballManipulator::calcMovement()
osg::Matrix mat;
mat.makeTrans(-center.x(),-center.y(),-center.z());
mat.postScale(scale,scale,scale);
mat.postTrans(center.x(),center.y(),center.z());
mat *= Matrix::scale(scale,scale,scale);
mat *= Matrix::trans(center.x(),center.y(),center.z());
_camera->transformLookAt(mat);