1 -- Created on: 1992-01-21
3 -- Copyright (c) 1992-1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
6 -- The content of this file is subject to the Open CASCADE Technology Public
7 -- License Version 6.5 (the "License"). You may not use the content of this file
8 -- except in compliance with the License. Please obtain a copy of the License
9 -- at http://www.opencascade.org and read it completely before using this file.
11 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
14 -- The Original Code and all software distributed under the License is
15 -- distributed on an "AS IS" basis, without warranty of any kind, and the
16 -- Initial Developer hereby disclaims all such warranties, including without
17 -- limitation, any warranties of merchantability, fitness for a particular
18 -- purpose or non-infringement. Please see the License for the specific terms
19 -- and conditions governing the rights and limitations under the License.
24 class PerspectiveView from V3d
26 ---Purpose : Creates and modifies a perspective
27 -- See the methods of the class View
31 inherits View from V3d
37 OrthographicView from V3d,
38 PlaneAngle from Quantity
46 Create ( VM : mutable Viewer ) returns mutable PerspectiveView;
48 ---Purpose: Defines a perspective view in a viewer VM.
49 -- The default angle of opening is given
53 Create ( VM : mutable Viewer ; V : OrthographicView )
54 returns mutable PerspectiveView;
56 ---Purpose: Creates a perspective view from the parameters
57 -- of an orthographic view.
58 -- The parameters of the original view are duplicated
59 -- in the resulting view (Projection,Mapping,Context) .
60 -- The view thus created must be activated in a new window.
61 -- The default angle of opening is given
66 Create ( VM : mutable Viewer ; V : PerspectiveView )
67 returns mutable PerspectiveView ;
69 ---Purpose: Creates one perspective view from another.
70 -- The parameters of the original view are duplicated
71 -- in the resulting view (Projection,Mapping,Context) .
72 -- The view thus created must be activated in a new window.
74 Copy ( me ) returns mutable PerspectiveView from V3d is static;
77 --------------------------------------------------------
78 ---Category: Methods to modify the status of the view
79 --------------------------------------------------------
81 SetAngle ( me : mutable ; Angle : PlaneAngle )
83 ---Purpose: Modifies the angle of opening of the perspective in RADIANS.
84 -- The projection window is resized according to the
86 -- TAN(Angle/2) = Size/Length
87 -- Size expresses the smallest dimension of the window.
88 -- Length expresses the focal length.
89 raises BadValue from Viewer
90 ---Purpose: Warning! raises BadValue from Viewer
91 -- if the opening angle is <= 0 or >= PI
94 Angle ( me ) returns PlaneAngle is static;
96 ---Purpose: Returns the value of the angle of opening.
98 SetPerspective ( me : mutable ; Angle : PlaneAngle;
99 UVRatio, ZNear, ZFar : Real )
101 ---Purpose: Modifies the viewing perspective volume by given
102 -- angle of opening of the perspective in RADIANS,
103 -- aspect ratio of window width to its height and
104 -- near and far clipping planes
105 raises BadValue from Viewer
106 -- if the opening angle is <= 0 or >= PI or
107 -- the ZNear<0, ZFar<0 or ZNear>=Zfar.