Commit 22e41bb4 authored by Hans-Christian Ebke's avatar Hans-Christian Ebke

PluginFunctions: Added fovy function.


git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@18263 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 820c4f6d
......@@ -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.
......
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