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

Function to set backfaceCulling from scripting

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@4987 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 49bc0035
...@@ -849,6 +849,19 @@ void ViewControlPlugin::translate( Vector _vec , int _viewer) { ...@@ -849,6 +849,19 @@ void ViewControlPlugin::translate( Vector _vec , int _viewer) {
} }
void ViewControlPlugin::enableBackfaceCulling( bool _state , int _viewer ) {
if ( _viewer == PluginFunctions::ALL_VIEWERS )
for ( uint i = 0 ; i < PluginFunctions::viewers( ); ++i )
PluginFunctions::viewerProperties(i).backFaceCulling(_state);
else if ( _viewer == PluginFunctions::ACTIVE_VIEWER )
PluginFunctions::viewerProperties(PluginFunctions::activeExaminer()).backFaceCulling(_state);
else if ( _viewer >= 0 && _viewer < PluginFunctions::viewers( ) )
PluginFunctions::viewerProperties(_viewer).backFaceCulling(_state);
else
std::cerr << "Illegal viewer requested! " << std::endl;
}
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
......
...@@ -181,6 +181,9 @@ class ViewControlPlugin : public QObject, BaseInterface , PickingInterface, Logg ...@@ -181,6 +181,9 @@ class ViewControlPlugin : public QObject, BaseInterface , PickingInterface, Logg
/// Set the scene center /// Set the scene center
void setSceneCenter( Vector _center, int _viewer = PluginFunctions::ALL_VIEWERS ); void setSceneCenter( Vector _center, int _viewer = PluginFunctions::ALL_VIEWERS );
/// Enable or disable Backface culling
void enableBackfaceCulling( bool _state , int _viewer = PluginFunctions::ALL_VIEWERS );
void setEyePosition(Vector _eye); void setEyePosition(Vector _eye);
}; };
......
Supports Markdown
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