0022819: Redesign of OpenGl driver
[occt.git] / src / Select3D / Select3D_Projector.cdl
... / ...
CommitLineData
1-- File: Select3D_Projector.cdl
2-- Created: Thu Mar 12 13:32:28 1992
3-- Author: Christophe MARION
4-- <cma@sdsun2> copie quasi exacte de HLRAlgo_Projector
5---Copyright: Matra Datavision 1992
6
7class Projector from Select3D inherits Transient from Standard
8 ---Purpose: A framework to define 3D projectors.
9uses
10 Real from Standard,
11 Boolean from Standard,
12 Trsf from gp,
13 GTrsf from gp,
14 Lin from gp,
15 Pnt from gp,
16 Vec from gp,
17 Ax2 from gp,
18 Vec2d from gp,
19 Pnt2d from gp,
20 Box from Bnd,
21 View from V3d
22
23raises
24 NoSuchObject from Standard
25
26is
27
28 Create(aView:View from V3d) returns Projector from Select3D;
29 --- Purpose: Constructs the 3D projector object defined by the 3D view aView.
30 Create returns Projector from Select3D;
31
32 Create(CS : Ax2 from gp)
33 ---Purpose: Creates an axonometric projector. <CS> is the
34 -- viewing coordinate system.
35 returns Projector from Select3D;
36
37 Create(CS : Ax2 from gp;
38 Focus : Real from Standard)
39 ---Purpose: Creates a perspective projector. <CS> is the
40 -- viewing coordinate system.
41 returns Projector from Select3D;
42
43 Create(T : Trsf from gp;
44 Persp : Boolean from Standard;
45 Focus : Real from Standard)
46 ---Purpose: build a Projector with automatic minmax directions.
47 returns Projector from Select3D;
48
49 Create(T : Trsf from gp;
50 Persp : Boolean from Standard;
51 Focus : Real from Standard;
52 v1,v2,v3 : Vec2d from gp)
53 ---Purpose: build a Projector with given minmax directions.
54 returns Projector from Select3D;
55
56 Create(GT : GTrsf from gp;
57 Persp : Boolean from Standard;
58 Focus : Real from Standard)
59 ---Purpose: build a Projector with automatic minmax directions.
60 returns Projector from Select3D;
61
62 Set (me : mutable;
63 T : Trsf from gp;
64 Persp : Boolean from Standard;
65 Focus : Real from Standard)
66 is static;
67
68
69 SetView(me : mutable; V : View from V3d);
70 ---Purpose: Sets the 3D view V used at the time of construction.
71
72 View(me) returns any View from V3d;
73 ---Purpose: Returns the 3D view used at the time of construction.
74 ---C++: return const&
75 ---C++: inline
76
77
78 Directions(me; D1 , D2 , D3 : out Vec2d from gp)
79 ---C++: inline
80 is virtual;
81
82 Scaled(me : mutable; On : Boolean from Standard = Standard_False)
83 ---Purpose: to compute with the given scale and translation.
84 is virtual;
85
86 Perspective(me) returns Boolean
87 ---Purpose: Returns True if there is a perspective transformation.
88 ---C++: inline
89 is virtual;
90
91 Transformation(me) returns GTrsf from gp
92 ---Purpose: Returns the active transformation.
93 ---C++: inline
94 ---C++: return const &
95 is virtual;
96
97 InvertedTransformation(me) returns GTrsf from gp
98 ---Purpose: Returns the active inverted transformation.
99 ---C++: inline
100 ---C++: return const &
101 is virtual;
102
103 FullTransformation(me) returns Trsf from gp
104 ---Purpose: Returns the original transformation.
105 ---C++: inline
106 ---C++: return const &
107 is virtual;
108
109 Focus(me) returns Real from Standard
110 ---Purpose: Returns the focal length.
111 ---C++: inline
112 raises
113 NoSuchObject from Standard -- if there is no perspective
114 is virtual;
115
116 Transform(me; D : in out Vec from gp)
117 ---C++: inline
118 is virtual;
119
120 Transform(me; Pnt : in out Pnt from gp)
121 ---C++: inline
122 is virtual;
123
124 Project(me; P : Pnt from gp;
125 Pout : out Pnt2d from gp)
126 ---Purpose: Transform and apply perspective if needed.
127 is virtual;
128
129 Project(me; P : Pnt from gp;
130 X,Y,Z : out Real from Standard)
131 ---Purpose: Transform and apply perspective if needed.
132 is static;
133
134 Project(me; P : Pnt from gp;
135 D1 : Vec from gp;
136 Pout : out Pnt2d from gp;
137 D1out : out Vec2d from gp)
138 ---Purpose: Transform and apply perspective if needed.
139 is virtual;
140
141 BoxAdd(me; P : Pnt2d from gp;
142 B : out Box from Bnd)
143 ---Purpose: Adds to the box <B> the min-max of the point <P>.
144 is virtual;
145
146 Shoot(me; X , Y : Real from Standard)
147 returns Lin from gp
148 ---Purpose: return a line going through the eye towards the
149 -- 2d point <X,Y>.
150 is virtual;
151
152 DepthMin(me) returns Real from Standard;
153 ---Purpose: Returns the minimum depth value (if clipping plane defined).
154 --- Should be used when call ::Shoot() to compute eyeline.
155 ---C++: inline
156
157 DepthMax(me) returns Real from Standard;
158 ---Purpose: Returns the maximum depth value (if clipping plane defined).
159 --- Should be used when call ::Shoot() to compute eyeline.
160 ---C++: inline
161
162 DepthMinMax(me : mutable;
163 theDepthMin : in Real from Standard;
164 theDepthMax : in Real from Standard);
165 ---Purpose: Setup the min/max depth values (doesn't affect
166 --- projection functionality itself).
167 --- Should be used when call ::Shoot() to compute eyeline.
168
169 SetDirection(me : mutable)
170 is static private;
171
172 Transform(me; P : in out Pnt from gp;
173 T : GTrsf from gp)
174 ---C++: inline
175 is virtual;
176
177 Transform(me; D : in out Lin from gp;
178 T : GTrsf from gp)
179 ---C++: inline
180 is virtual;
181
182fields
183 myType : Integer from Standard;
184
185 myPersp : Boolean from Standard is protected;
186 myFocus : Real from Standard is protected;
187 myScaledTrsf : Trsf from gp is protected;
188 myGTrsf : GTrsf from gp is protected;
189 myInvTrsf : GTrsf from gp is protected;
190 myD1 : Vec2d from gp is protected;
191 myD2 : Vec2d from gp is protected;
192 myD3 : Vec2d from gp is protected;
193
194 myView : View from V3d;
195 myDepthMin : Real from Standard;
196 myDepthMax : Real from Standard;
197
198end Projector;