Commit b9c7612a authored by Jan Möbius's avatar Jan Möbius

Removed gridnode from core, added function to set glstate bounding box

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@10132 383ad7c9-94d9-4d36-a494-682f7c89f535
parent c74b3962
......@@ -150,10 +150,6 @@ Core() :
// seperator handling the nodes for data
dataRootNode_ = new ACG::SceneGraph::SeparatorNode(dataSeparatorNode_, "Data Root Node");
// gridNode_ = new ACG::SceneGraph::GridNode(core_nodes_,"Grid Node");
// gridNode_->hide();
// Add ViewMode All
ViewMode* vm = new ViewMode();
......
......@@ -107,7 +107,6 @@
#include <OpenFlipper/Core/PluginInfo.hh>
#include <ACG/Scenegraph/CoordsysNode.hh>
#include <ACG/Scenegraph/GridNode.hh>
#include <OpenFlipper/threads/JobInfo.hh>
......@@ -766,9 +765,6 @@ private slots:
/// Node for the coordinate system
ACG::SceneGraph::CoordsysNode* coordsysNode_;
/// Node for the grid
// ACG::SceneGraph::GridNode* gridNode_;
/** @} */
//===========================================================================
......
......@@ -280,13 +280,24 @@ void glViewer::sceneGraph(ACG::SceneGraph::BaseNode* _root, const bool _resetTra
if ( ( bbmin[0] > bbmax[0] ) ||
( bbmin[1] > bbmax[1] ) ||
( bbmin[2] > bbmax[2] ) )
( bbmin[2] > bbmax[2] ) ) {
// Invalid bounding box, try to recover
setScenePos( ACG::Vec3d( 0.0,0.0,0.0 ) , 1.0, _resetTrackBall );
else
// Update bounding box to match the scene geometry after recovery
bbmin = ACG::Vec3d(-1.0,-1.0,-1.0);
bbmax = ACG::Vec3d( 1.0, 1.0, 1.0);
} else
setScenePos( ( bbmin + bbmax ) * 0.5,
( bbmax - bbmin ).norm() * 0.5,
_resetTrackBall);
// remember the new bounding box for the state
glstate_->set_bounding_box(bbmin,bbmax);
}
updateGL();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment