+
+/*
+ * Set default parameters from preferences
+ */
+void OCCViewer_ViewPort3d::setDefaultParams()
+{
+ setBackground( Qtx::BackgroundData( Qt::black ) ); // set default background
+
+ // get ray tracing parameters from preferences
+ int aDepth = SUIT_Session::session()->resourceMgr()->integerValue( "OCCViewer", "rt_depth", 3 );
+ bool aReflection = SUIT_Session::session()->resourceMgr()->booleanValue( "OCCViewer", "rt_reflection", true );
+ bool anAntialiasing = SUIT_Session::session()->resourceMgr()->booleanValue( "OCCViewer", "rt_antialiasing", false );
+ bool aShadow = SUIT_Session::session()->resourceMgr()->booleanValue( "OCCViewer", "rt_shadow", true );
+ bool aTransparentShadow = SUIT_Session::session()->resourceMgr()->booleanValue( "OCCViewer", "rt_trans_shadow", true );
+
+ Graphic3d_RenderingParams& aParams = myActiveView->ChangeRenderingParams();
+ aParams.RaytracingDepth = aDepth;
+ aParams.IsReflectionEnabled = aReflection;
+ aParams.IsAntialiasingEnabled = anAntialiasing;
+ aParams.IsShadowEnabled = aShadow;
+ aParams.IsTransparentShadowEnabled = aTransparentShadow;
+ myActiveView->Redraw();
+}