Commit 34ed8b86 authored by Jan Möbius's avatar Jan Möbius
Browse files

Added second function for scene radius

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@7090 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 6621cdd3
...@@ -606,6 +606,19 @@ double sceneRadius() { ...@@ -606,6 +606,19 @@ double sceneRadius() {
return examiner_widgets_[activeExaminer_]->scene_radius(); return examiner_widgets_[activeExaminer_]->scene_radius();
} }
double sceneRadius( int _viewer ) {
if ( _viewer == ACTIVE_VIEWER ) {
return examiner_widgets_[activeExaminer_]->scene_radius();
} else if ( _viewer == ALL_VIEWERS )
std::cerr << "Illegal request for scene radius. Please select one viewer!" << std::endl;
else if ( ( _viewer >= 0 ) && _viewer < (int)examiner_widgets_.size() )
return examiner_widgets_[_viewer]->scene_radius();
else
std::cerr << "Requested illegal viewer for translate!!" << std::endl;
return -1;
}
void translate( const ACG::Vec3d &_vector , int _viewer ) { void translate( const ACG::Vec3d &_vector , int _viewer ) {
if ( _viewer == ACTIVE_VIEWER ) { if ( _viewer == ACTIVE_VIEWER ) {
examiner_widgets_[activeExaminer_]->translate(_vector); examiner_widgets_[activeExaminer_]->translate(_vector);
......
...@@ -169,13 +169,21 @@ void setScenePos(const ACG::Vec3d& _center , int _viewer = ALL_VIEWERS); ...@@ -169,13 +169,21 @@ void setScenePos(const ACG::Vec3d& _center , int _viewer = ALL_VIEWERS);
DLLEXPORT DLLEXPORT
const ACG::Vec3d& sceneCenter( int _viewer = ALL_VIEWERS ); const ACG::Vec3d& sceneCenter( int _viewer = ALL_VIEWERS );
/** \brief Returns the current scene radius from the examiner widget /** \brief Returns the current scene radius from the active examiner widget
* *
* Returns the Radius of the scene * Returns the Radius of the scene
*/ */
DLLEXPORT DLLEXPORT
double sceneRadius(); double sceneRadius();
DLLEXPORT
/** \brief Returns the current scene radius from a given examiner viewer
*
* Returns the Radius of the scene
* @param _viewer Give the viewer which should be asked for its current scene radius
*/
double sceneRadius( int _viewer );
/** \brief Translate viewer pos by given vector /** \brief Translate viewer pos by given vector
* *
* Translates the scene by a given vector. ( This is only a view transformation and does not * Translates the scene by a given vector. ( This is only a view transformation and does not
......
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