OCCViewer_ViewPort3d::OCCViewer_ViewPort3d( QWidget* parent, const Handle( V3d_Viewer)& viewer, V3d_TypeOfView type )
: OCCViewer_ViewPort( parent ),
myScale( 1.0 ),
- myDegenerated( true ),
- myAnimate( false ),
myBusy( true ),
myIsAdvancedZoomingEnabled( false )
{
myPerspView = new V3d_PerspectiveView( viewer );
myActiveView = myPerspView;
}
- if ( myDegenerated )
- activeView()->SetDegenerateModeOn();
setBackground( Qtx::BackgroundData( Qt::black ) ); // set default background
}
view->SetBackgroundColor( oldView->BackgroundColor() );
}
- if ( myDegenerated )
- view->SetDegenerateModeOn();
- else
- view->SetDegenerateModeOff();
-
view->View()->Activate();
activeView() = view;
return oldView;
#endif
}
-/*!
- Set animation mode
- \param theDegenerated - degenerated mode
-*/
-void OCCViewer_ViewPort3d::setAnimationMode(bool theDegenerated)
-{
- if ( !activeView().IsNull() ) {
- myAnimate = theDegenerated;
- activeView()->SetAnimationMode(true, theDegenerated);
- }
-}
-
/*!
Updates the active viewport. [ virtual public ]
*/
const gp_Pnt& theSelectedPoint )
{
if ( !activeView().IsNull() ) {
- myDegenerated = activeView()->DegenerateModeIsOn();
- activeView()->SetDegenerateModeOn();
- if (myAnimate) activeView()->SetAnimationModeOn();
-
//double gx, gy, gz;
//double gx = activeView()->gx;
//activeView()->Gravity(gx,gy,gz);
void OCCViewer_ViewPort3d::endRotation()
{
if ( !activeView().IsNull() ) {
- if (myAnimate) activeView()->SetAnimationModeOff();
- if ( !myDegenerated )
- activeView()->SetDegenerateModeOff();
activeView()->ZFitAll(1.);
activeView()->SetZSize(0.);
activeView()->Update();
Handle(V3d_View) setView( const Handle(V3d_View)& );
Handle(V3d_Viewer) getViewer() const;
- void setAnimationMode(bool theDegenerated);
-
virtual void setBackgroundColor( const QColor& color); // obsolete
virtual QColor backgroundColor() const; // obsolete
void setBackground( const Qtx::BackgroundData& color);
Handle(V3d_View) myOrthoView;
Handle(V3d_View) myPerspView;
Handle(V3d_View) myActiveView;
- bool myDegenerated;
- bool myAnimate;
bool myBusy;
double myScale;
bool myIsAdvancedZoomingEnabled;