Skip to content
Snippets Groups Projects
Commit 22e41bb4 authored by Hans-Christian Ebke's avatar Hans-Christian Ebke
Browse files

PluginFunctions: Added fovy function.

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@18263 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 820c4f6d
Branches
No related tags found
No related merge requests found
......@@ -851,6 +851,22 @@ ACG::Vec3d upVector(int _viewer) {
return viewerProperties().glState().up();
}
/** \brief Get field of view angle
*/
DLLEXPORT
double fovy(int _viewer) {
if ( _viewer == ACTIVE_VIEWER ) {
return viewerProperties(activeExaminer_).glState().fovy();
} else if ( _viewer == ALL_VIEWERS )
std::cerr << "Please select viewer to get fovy!" << std::endl;
else if ( ( _viewer >= 0 ) && _viewer < (int)examiner_widgets_.size() )
return viewerProperties(_viewer).glState().fovy();
else
std::cerr << "Requested illegal viewer for fovy!!" << std::endl;
return viewerProperties().glState().fovy();
}
void setViewObjectMarker(ViewObjectMarker * _marker)
{
for ( uint i = 0 ; i < examiner_widgets_.size(); ++i )
......
......@@ -330,6 +330,11 @@ void orthographicProjection( int _viewer = ALL_VIEWERS );
DLLEXPORT
void setFOVY( double _fovy );
/** \brief Get field of view angle
*/
DLLEXPORT
double fovy(int _viewer = ACTIVE_VIEWER);
/** \brief Switch to perspective Projection
*
* @param _viewer Id of the viewer to use.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment