2 // Copyright (c) 1991-1999 Matra Datavision
3 // Copyright (c) 1999-2014 OPEN CASCADE SAS
5 // This file is part of Open CASCADE Technology software library.
7 // This library is free software; you can redistribute it and / or modify it
8 // under the terms of the GNU Lesser General Public version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
16 // Modified 25-02-98 : FMN ; PERF.27: Optimization of view creation from an existing view
32 #include <V3d_View.hxx>
33 #include <V3d_OrthographicView.ixx>
34 #include <V3d_PerspectiveView.hxx>
40 //-Global data definitions
44 V3d_OrthographicView::V3d_OrthographicView (const Handle(V3d_Viewer)& VM):V3d_View (VM) {
46 MyType = V3d_ORTHOGRAPHIC ;
47 MyViewMapping.SetProjection(Visual3d_TOP_PARALLEL) ;
48 SetViewMappingDefault() ;
49 SetViewOrientationDefault() ;
52 V3d_OrthographicView::V3d_OrthographicView (const Handle(V3d_Viewer)& VM, const Handle(V3d_PerspectiveView)& V):V3d_View (VM,V) {
54 MyType = V3d_ORTHOGRAPHIC ;
55 MyViewMapping.SetProjection(Visual3d_TOP_PARALLEL) ;
56 SetZoom(0.1, Standard_True);
57 SetViewMappingDefault() ;
58 SetViewOrientationDefault() ;
61 V3d_OrthographicView::V3d_OrthographicView (const Handle(V3d_Viewer)& VM, const Handle(V3d_OrthographicView)& V):V3d_View (VM,V) {
63 MyType = V3d_ORTHOGRAPHIC ;
64 MyViewMapping.SetProjection(Visual3d_TOP_PARALLEL) ;
65 SetViewMappingDefault() ;
66 SetViewOrientationDefault() ;
69 Handle(V3d_OrthographicView) V3d_OrthographicView::Copy () const {
70 return new V3d_OrthographicView(this->Viewer(),this);}