#include <Visual3d_View.hxx>
#include <V3d_Viewer.hxx>
+
+#if OCC_VERSION_LARGE > 0x06070000
+#include <V3d_View.hxx>
+#else
#include <V3d_PerspectiveView.hxx>
#include <V3d_OrthographicView.hxx>
+#endif
#include "utilities.h"
// VSR: 01/07/2010 commented to avoid SIGSEGV at SALOME exit
//selectVisualId();
+#if OCC_VERSION_LARGE > 0x06070000
+ myActiveView = new V3d_View( viewer, type );
+#else
if ( type == V3d_ORTHOGRAPHIC ) {
myOrthoView = new V3d_OrthographicView( viewer );
myActiveView = myOrthoView;
myPerspView = new V3d_PerspectiveView( viewer );
myActiveView = myPerspView;
}
+#endif
+
setBackground( Qtx::BackgroundData( Qt::black ) ); // set default background
}
myScale = activeView()->Scale();
Standard_Real margin = 0.01;
+
+#if OCC_VERSION_LARGE > 0x06070000
+ activeView()->FitAll( margin, upd );
+ if(withZ)
+ activeView()->ZFitAll();
+#else
activeView()->FitAll( margin, withZ, upd );
+#endif
activeView()->SetZSize(0.);
emit vpTransformed( this );
}
Handle(V3d_View) aView3d = getView();
Handle(V3d_View) aRefView3d = vp3d->getView();
aView3d->SetImmediateUpdate( Standard_False );
+#if OCC_VERSION_LARGE > 0x06070000
+ aView3d->Camera()->Copy( aRefView3d->Camera() );
+#else
aView3d->SetViewMapping( aRefView3d->ViewMapping() );
aView3d->SetViewOrientation( aRefView3d->ViewOrientation() );
+#endif
aView3d->ZFitAll();
aView3d->SetImmediateUpdate( Standard_True );
aView3d->Update();
Nstruct = MySetOfStructures.Extent() ;
Graphic3d_MapIteratorOfMapOfStructure MyIterator(MySetOfStructures) ;
- aView->ViewMapping().WindowLimit(Umin,Vmin,Umax,Vmax) ;
+#if OCC_VERSION_LARGE > 0x06070000
+ aView->Camera()->WindowLimit(Umin,Vmin,Umax,Vmax);
+#else
+ aView->ViewMapping().WindowLimit(Umin,Vmin,Umax,Vmax);
+#endif
Npoint = 0 ; theX = theY = theZ = 0. ;
for( ; MyIterator.More(); MyIterator.Next()) {
if (!(MyIterator.Key())->IsEmpty()) {
Precision::Confusion(),
Precision::Confusion() );
- // get projection reference point in view coordinates
+// get projection reference point in view coordinates
+#if OCC_VERSION_LARGE > 0x06070000
+ gp_Pnt aProjRef = aSourceView->Camera()->ProjectionShift();
+ aProjRef.SetX( -aProjRef.X() );
+ aProjRef.SetY( -aProjRef.Y() );
+#else
Graphic3d_Vertex aProjRef = aSourceView->ViewMapping().ProjectionReferencePoint();
-
+#endif
+
// transform to world-space coordinate system
gp_Pnt aPosition = gp_Pnt(aProjRef.X(), aProjRef.Y(), aCameraDepth).Transformed(aTrsf);
gp_Pnt aProjRef(aPosition[0], aPosition[1], aPosition[2]);
aProjRef.Transform(aTrsf);
+#if OCC_VERSION_LARGE > 0x06070000
+ aDestView->Camera()->SetDirection( -aProjDir );
+ aDestView->Camera()->SetUp( gp_Dir( anUpDir[0], anUpDir[1], anUpDir[2] ) );
+ aDestView->Camera()->SetProjectionShift( gp_Pnt( -aProjRef.X(), -aProjRef.Y(), 0.0 ) );
+#else
// set view camera properties using low-level approach. this is done
// in order to avoid interference with static variables in v3d view used
// when rotation is in process in another view.
// set panning
aDestView->SetCenter(aProjRef.X(), aProjRef.Y());
+#endif
// set mapping scale
Standard_Real aWidth, aHeight;