Test for 0022778: Bug in BRepMesh
[occt.git] / src / V3d / V3d_PerspectiveView.cdl
1 -- Created on: 1992-01-21
2 -- Created by: GG
3 -- Copyright (c) 1992-1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
5 --
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.
10 --
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.
13 --
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.
20
21 -- Update:                              
22
23
24 class PerspectiveView from V3d
25
26         ---Purpose : Creates and modifies a perspective
27         --           See the methods of the class View  
28
29
30
31 inherits View from V3d
32
33
34 uses
35
36         Viewer from V3d,
37         OrthographicView from V3d,
38         PlaneAngle from Quantity
39
40 raises
41
42         BadValue from Viewer
43         
44 is
45
46         Create ( VM : mutable Viewer ) returns mutable PerspectiveView;
47         ---Level: Public
48         ---Purpose: Defines a perspective view in a viewer VM.
49         --          The default angle of opening is given
50         --          by the viewer.
51      
52
53         Create ( VM : mutable Viewer ; V : OrthographicView )
54                                         returns mutable PerspectiveView;  
55         ---Level: Public
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
62         --          by the viewer.
63
64
65
66         Create ( VM : mutable Viewer ; V : PerspectiveView ) 
67                                         returns mutable PerspectiveView ; 
68         ---Level: Public
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.
73
74         Copy ( me ) returns mutable PerspectiveView from V3d is static;
75         ---Level: Public
76         
77         --------------------------------------------------------
78         ---Category: Methods to modify the status of the view
79         --------------------------------------------------------
80
81         SetAngle ( me : mutable ; Angle : PlaneAngle ) 
82         ---Level: Public
83         ---Purpose: Modifies the angle of opening of the perspective in RADIANS.
84         --          The projection window is resized according to the
85         --          formula :
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 
92         is static;
93         
94         Angle ( me ) returns PlaneAngle  is static; 
95         ---Level: Public
96         ---Purpose: Returns the value of the angle of opening.
97
98         SetPerspective ( me : mutable ; Angle : PlaneAngle; 
99                                  UVRatio, ZNear, ZFar : Real ) 
100         ---Level: Public
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.
108         is static;
109         
110 end PerspectiveView;