1 // Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
8 // This library is distributed in the hope that it will be useful
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/
19 #ifndef OCCVIEWER_VIEWPORT3D_H
20 #define OCCVIEWER_VIEWPORT3D_H
22 #include "OCCViewer_ViewPort.h"
26 #include <V3d_View.hxx>
27 #include <V3d_Viewer.hxx>
31 class OCCVIEWER_EXPORT OCCViewer_ViewPort3d: public OCCViewer_ViewPort
35 friend class OCCViewer_ViewTransformer;
38 OCCViewer_ViewPort3d( QWidget*, const Handle(V3d_Viewer)&, V3d_TypeOfView = V3d_ORTHOGRAPHIC );
39 virtual ~OCCViewer_ViewPort3d();
42 Handle(V3d_View) getView() const;
43 Handle(V3d_View) setView( const Handle(V3d_View)& );
44 Handle(V3d_Viewer) getViewer() const;
46 void setAnimationMode(bool theDegenerated);
48 virtual void setBackgroundColor( const QColor& color);
49 virtual QColor backgroundColor() const;
51 // void setActive( V3d_TypeOfView );
52 virtual bool syncronize( const OCCViewer_ViewPort3d* );
54 double getZSize() const;
55 void setZSize( double );
57 virtual void onUpdate();
61 virtual void pan( int , int );
62 virtual void setCenter( int , int );
63 virtual void fitRect( const QRect& );
64 virtual void zoom( int, int, int, int );
65 virtual void fitAll( bool keepScale = false, bool withZ = true, bool upd = true );
67 void startRotation( int, int );
68 void rotate( int, int );
73 virtual void paintEvent( QPaintEvent* );
74 virtual void resizeEvent( QResizeEvent* );
77 Handle(V3d_View) activeView() const;
78 Handle(V3d_View) inactiveView() const;
79 bool mapView( const Handle(V3d_View)& );
80 bool setWindow( const Handle(V3d_View)& );
81 bool mapped( const Handle(V3d_View)& ) const;
84 Handle(V3d_View) myOrthoView;
85 Handle(V3d_View) myPerspView;
86 Handle(V3d_View) myActiveView;