Commit 9c86513d authored by Jan Möbius's avatar Jan Möbius

Modified Pluginfunctions

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@5365 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 2a9e1441
......@@ -288,12 +288,12 @@ QPoint mapToLocal( const QPoint _point ) {
void setDrawMode( const unsigned int _mode , int _viewer) {
if ( _viewer == ACTIVE_VIEWER )
if ( _viewer == ACTIVE_VIEWER )
viewerProperties(activeExaminer()).drawMode(_mode);
else if ( _viewer == ALL_VIEWERS )
for ( uint i = 0 ; i < examiner_widgets_.size(); ++i )
for ( uint i = 0 ; i < examiner_widgets_.size(); ++i )
viewerProperties(i).drawMode(_mode);
else if ( ( _viewer >= 0 ) && _viewer < (int)examiner_widgets_.size() )
else if ( ( _viewer >= 0 ) && _viewer < (int)examiner_widgets_.size() )
viewerProperties(_viewer).drawMode(_mode);
else
std::cerr << "Requested illegal viewer for setting DrawMode!!" << std::endl;
......@@ -417,12 +417,28 @@ Viewer::ViewerProperties& viewerProperties(int _id) {
}
void perspectiveProjection() {
examiner_widget_->perspectiveProjection();
void perspectiveProjection( int _viewer ) {
if ( _viewer == ACTIVE_VIEWER ) {
examiner_widgets_[activeExaminer_]->perspectiveProjection();
} else if ( _viewer == ALL_VIEWERS )
for ( uint i = 0 ; i < examiner_widgets_.size(); ++i )
examiner_widgets_[i]->perspectiveProjection();
else if ( ( _viewer >= 0 ) && _viewer < (int)examiner_widgets_.size() )
examiner_widgets_[_viewer]->perspectiveProjection();
else
std::cerr << "Requested illegal viewer for perspectiveProjection()!!" << std::endl;
}
void orthographicProjection() {
examiner_widget_->orthographicProjection();
void orthographicProjection( int _viewer ) {
if ( _viewer == ACTIVE_VIEWER ) {
examiner_widgets_[activeExaminer_]->orthographicProjection();
} else if ( _viewer == ALL_VIEWERS )
for ( uint i = 0 ; i < examiner_widgets_.size(); ++i )
examiner_widgets_[i]->orthographicProjection();
else if ( ( _viewer >= 0 ) && _viewer < (int)examiner_widgets_.size() )
examiner_widgets_[_viewer]->orthographicProjection();
else
std::cerr << "Requested illegal viewer for orthographicProjection()!!" << std::endl;
}
void allowRotation(bool _mode) {
......
......@@ -134,7 +134,7 @@ void setScenePos(const ACG::Vec3d& _center , int _viewer = ALL_VIEWERS);
*
*/
DLLEXPORT
const ACG::Vec3d& sceneCenter( int _viewer = ACTIVE_VIEWER );
const ACG::Vec3d& sceneCenter( int _viewer = ALL_VIEWERS );
/** \brief Returns the current scene radius from the examiner widget
*
......@@ -201,7 +201,7 @@ void viewAll(int _viewer = ALL_VIEWERS);
* 0..3 Choose viewer explicitly
*/
DLLEXPORT
ACG::Vec3d viewingDirection(int _viewer = ACTIVE_VIEWER);
ACG::Vec3d viewingDirection(int _viewer = ALL_VIEWERS);
/** \brief Get the current viewer position
*
......@@ -210,7 +210,7 @@ ACG::Vec3d viewingDirection(int _viewer = ACTIVE_VIEWER);
* 0..3 Choose viewer explicitly
*/
DLLEXPORT
ACG::Vec3d eyePos(int _viewer = ACTIVE_VIEWER);
ACG::Vec3d eyePos(int _viewer = ALL_VIEWERS);
/** \brief Get the current up vector
*
......@@ -219,19 +219,25 @@ ACG::Vec3d eyePos(int _viewer = ACTIVE_VIEWER);
* 0..3 Choose viewer explicitly
*/
DLLEXPORT
ACG::Vec3d upVector(int _viewer = ACTIVE_VIEWER);
ACG::Vec3d upVector(int _viewer = ALL_VIEWERS);
/** \brief Switch to orthographic Projection
*
* @param _viewer Id of the viewer to use.
* ACTIVE_VIEWER active viewer
* 0..3 Choose viewer explicitly
*/
DLLEXPORT
void orthographicProjection();
void orthographicProjection( int _viewer = ALL_VIEWERS );
/** \brief Switch to perspective Projection
*
* @param _viewer Id of the viewer to use.
* ACTIVE_VIEWER active viewer
* 0..3 Choose viewer explicitly
*/
DLLEXPORT
void perspectiveProjection();
void perspectiveProjection( int _viewer = ALL_VIEWERS );
/** \brief Set the draw Mode of a Viewer.\n
*
......@@ -253,7 +259,7 @@ void setDrawMode( const unsigned int _mode , int _viewer = ALL_VIEWERS);
* 0..3 Choose viewer explicitly
*/
DLLEXPORT
unsigned int drawMode( int _viewer = ACTIVE_VIEWER );
unsigned int drawMode( int _viewer = ALL_VIEWERS );
/** \brief Set the background color of the examiner widget.
......
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