blob: 072dacdd3422a53aaa28dc87b8e3a79646802d24 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
|
-- File: PerspectiveView.cdl
-- Created: Tue Jan 21 15:28:48 1992
-- Author: GG
-- Update:
---Copyright: Matra Datavision 1992
class PerspectiveView from V3d
---Purpose : Creates and modifies a perspective
-- See the methods of the class View
inherits View from V3d
uses
Viewer from V3d,
OrthographicView from V3d,
PlaneAngle from Quantity
raises
BadValue from Viewer
is
Create ( VM : mutable Viewer ) returns mutable PerspectiveView;
---Level: Public
---Purpose: Defines a perspective view in a viewer VM.
-- The default angle of opening is given
-- by the viewer.
Create ( VM : mutable Viewer ; V : OrthographicView )
returns mutable PerspectiveView;
---Level: Public
---Purpose: Creates a perspective view from the parameters
-- of an orthographic view.
-- The parameters of the original view are duplicated
-- in the resulting view (Projection,Mapping,Context) .
-- The view thus created must be activated in a new window.
-- The default angle of opening is given
-- by the viewer.
Create ( VM : mutable Viewer ; V : PerspectiveView )
returns mutable PerspectiveView ;
---Level: Public
---Purpose: Creates one perspective view from another.
-- The parameters of the original view are duplicated
-- in the resulting view (Projection,Mapping,Context) .
-- The view thus created must be activated in a new window.
Copy ( me ) returns mutable PerspectiveView from V3d is static;
---Level: Public
--------------------------------------------------------
---Category: Methods to modify the status of the view
--------------------------------------------------------
SetAngle ( me : mutable ; Angle : PlaneAngle )
---Level: Public
---Purpose: Modifies the angle of opening of the perspective in RADIANS.
-- The projection window is resized according to the
-- formula :
-- TAN(Angle/2) = Size/Length
-- Size expresses the smallest dimension of the window.
-- Length expresses the focal length.
raises BadValue from Viewer
---Purpose: Warning! raises BadValue from Viewer
-- if the opening angle is <= 0 or >= PI
is static;
Angle ( me ) returns PlaneAngle is static;
---Level: Public
---Purpose: Returns the value of the angle of opening.
SetPerspective ( me : mutable ; Angle : PlaneAngle;
UVRatio, ZNear, ZFar : Real )
---Level: Public
---Purpose: Modifies the viewing perspective volume by given
-- angle of opening of the perspective in RADIANS,
-- aspect ratio of window width to its height and
-- near and far clipping planes
raises BadValue from Viewer
-- if the opening angle is <= 0 or >= PI or
-- the ZNear<0, ZFar<0 or ZNear>=Zfar.
is static;
end PerspectiveView;
|