Made the following name changes to Matrix and Quat to clean them up and make
the functionality clear given the name. This will break user code unfortunately so please be away of the following mapping. osg::Matrix::makeTrans(..)?\026 -> osg::Matrix::makeTranslate(..) osg::Matrix::makeRot(..)?\026 -> osg::Matrix::makeRotate(..) osg::Matrix::trans(..)?\026 -> osg::Matrix::translate(..) osg::Quat::makeRot(..)?\026 -> osg::Quat::makeRotate(..) Also updated the rest of the OSG distribution to use the new names, and have removed the old deprecated Matrix methods too.
This commit is contained in:
@@ -408,9 +408,9 @@ bool DriveManipulator::calcMovement()
|
||||
float yaw = -inDegrees(dx*0.1f*dt);
|
||||
|
||||
osg::Matrix mat;
|
||||
mat.makeTrans(-center.x(),-center.y(),-center.z());
|
||||
mat.makeTranslate(-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());
|
||||
mat *= Matrix::translate(center.x(),center.y(),center.z());
|
||||
|
||||
center = _camera->getEyePoint();
|
||||
uv = _camera->getUpVector();
|
||||
|
||||
@@ -205,7 +205,7 @@ bool FlightManipulator::calcMovement()
|
||||
float roll = inDegrees(dx*0.1f*dt);
|
||||
|
||||
osg::Matrix mat;
|
||||
mat.makeTrans(-center);
|
||||
mat.makeTranslate(-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)
|
||||
@@ -217,7 +217,7 @@ bool FlightManipulator::calcMovement()
|
||||
|
||||
lv *= (_velocity*dt);
|
||||
|
||||
mat *= Matrix::trans(center+lv);
|
||||
mat *= Matrix::translate(center+lv);
|
||||
|
||||
_camera->transformLookAt(mat);
|
||||
|
||||
|
||||
@@ -215,9 +215,9 @@ bool TrackballManipulator::calcMovement()
|
||||
trackball(axis,angle,px1,py1,px0,py0);
|
||||
|
||||
osg::Matrix mat;
|
||||
mat.makeTrans(-center.x(),-center.y(),-center.z());
|
||||
mat.makeTranslate(-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());
|
||||
mat *= Matrix::translate(center.x(),center.y(),center.z());
|
||||
|
||||
_camera->transformLookAt(mat);
|
||||
|
||||
@@ -237,7 +237,7 @@ bool TrackballManipulator::calcMovement()
|
||||
osg::Vec3 dv = uv*(dy*scale)-sv*(dx*scale);
|
||||
|
||||
osg::Matrix mat;
|
||||
mat.makeTrans(dv.x(),dv.y(),dv.z());
|
||||
mat.makeTranslate(dv.x(),dv.y(),dv.z());
|
||||
|
||||
_camera->transformLookAt(mat);
|
||||
|
||||
@@ -257,9 +257,9 @@ bool TrackballManipulator::calcMovement()
|
||||
osg::Vec3 center = _camera->getCenterPoint();
|
||||
|
||||
osg::Matrix mat;
|
||||
mat.makeTrans(-center.x(),-center.y(),-center.z());
|
||||
mat.makeTranslate(-center.x(),-center.y(),-center.z());
|
||||
mat *= Matrix::scale(scale,scale,scale);
|
||||
mat *= Matrix::trans(center.x(),center.y(),center.z());
|
||||
mat *= Matrix::translate(center.x(),center.y(),center.z());
|
||||
|
||||
_camera->transformLookAt(mat);
|
||||
|
||||
@@ -273,7 +273,7 @@ bool TrackballManipulator::calcMovement()
|
||||
osg::Vec3 dv = _camera->getLookVector()*(dy*scale);
|
||||
|
||||
osg::Matrix mat;
|
||||
mat.makeTrans(dv.x(),dv.y(),dv.z());
|
||||
mat.makeTranslate(dv.x(),dv.y(),dv.z());
|
||||
|
||||
_camera->transformLookAt(mat);
|
||||
|
||||
|
||||
@@ -32,9 +32,9 @@ void TransformCallback::operator() (osg::Node* node, osg::NodeVisitor* nv)
|
||||
double newTime = fs->getReferenceTime();
|
||||
float delta_angle = _angular_velocity*(newTime-_previousTime);
|
||||
|
||||
osg::Matrix mat = osg::Matrix::trans(-_pivot)*
|
||||
osg::Matrix mat = osg::Matrix::translate(-_pivot)*
|
||||
osg::Matrix::rotate(delta_angle,_axis)*
|
||||
osg::Matrix::trans(_pivot);
|
||||
osg::Matrix::translate(_pivot);
|
||||
|
||||
|
||||
// update the specified transform
|
||||
|
||||
Reference in New Issue
Block a user