コード例 #1
0
void CameraManipulator::setNode(osg::Node* node)
{
    _node = node;
    if (_node.get())
    {
        const osg::BoundingSphere& boundingSphere=_node->getBound();
        _modelScale = boundingSphere._radius;
    }
    if (getAutoComputeHomePosition()) computeHomePosition();
}
コード例 #2
0
ファイル: QOSGWidget.cpp プロジェクト: caomw/benthicQT
 void QOSGWidget::setSceneData(osg::Node* node) {
     osgViewer::Viewer::setSceneData(node);
     getCameraManipulator()->setNode(node);
     computeHomePosition();
 }
コード例 #3
0
void CameraManipulator::home(double /*currentTime*/)
{
    if (getAutoComputeHomePosition()) computeHomePosition();
    computePosition(_homeEye, _homeCenter, _homeUp);
    _thrown = false;
}