Added bool paramter to MatrixManipulator::setHomePosition(,,,bool) to allow
the autocomputehomeposition to be controlled.
This commit is contained in:
@@ -10,8 +10,7 @@ void KeySwitchMatrixManipulator::addMatrixManipulator(int key, std::string name,
|
||||
_manips[key]=std::make_pair(name,osg::ref_ptr<MatrixManipulator>(cm));
|
||||
if(!_current.valid()){
|
||||
_current=cm;
|
||||
_current->setAutoComputeHomePosition(_autoComputeHomePosition);
|
||||
_current->setHomePosition(_homeEye,_homeCenter,_homeUp);
|
||||
_current->setHomePosition(_homeEye,_homeCenter,_homeUp,_autoComputeHomePosition);
|
||||
_current->setNode(0);
|
||||
_current->setCoordinateFrameCallback(getCoordinateFrameCallback());
|
||||
_current->setByMatrix(getMatrix());
|
||||
@@ -36,8 +35,7 @@ void KeySwitchMatrixManipulator::selectMatrixManipulator(unsigned int num)
|
||||
|
||||
if (itr!=_manips.end())
|
||||
{
|
||||
itr->second.second->setAutoComputeHomePosition(_autoComputeHomePosition);
|
||||
itr->second.second->setHomePosition(_homeEye,_homeCenter,_homeUp);
|
||||
itr->second.second->setHomePosition(_homeEye,_homeCenter,_homeUp,_autoComputeHomePosition);
|
||||
|
||||
if (_current.valid())
|
||||
{
|
||||
@@ -66,14 +64,14 @@ void KeySwitchMatrixManipulator::setNode(osg::Node* node)
|
||||
}
|
||||
}
|
||||
|
||||
void KeySwitchMatrixManipulator::setHomePosition(const osg::Vec3d& eye, const osg::Vec3d& center, const osg::Vec3d& up)
|
||||
void KeySwitchMatrixManipulator::setHomePosition(const osg::Vec3d& eye, const osg::Vec3d& center, const osg::Vec3d& up, bool autoComputeHomePosition)
|
||||
{
|
||||
MatrixManipulator::setHomePosition(eye, center, up);
|
||||
MatrixManipulator::setHomePosition(eye, center, up, autoComputeHomePosition);
|
||||
for(KeyManipMap::iterator itr=_manips.begin();
|
||||
itr!=_manips.end();
|
||||
++itr)
|
||||
{
|
||||
itr->second.second->setHomePosition(eye, center, up);
|
||||
itr->second.second->setHomePosition(eye, center, up, autoComputeHomePosition);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user