0025552: Visualization - provide the way to hide the object in specified view of...
[occt.git] / src / V3d / V3d.cdl
CommitLineData
b311480e 1-- Created on: 1992-11-13
2-- Created by: GG
3-- Copyright (c) 1992-1999 Matra Datavision
973c2be1 4-- Copyright (c) 1999-2014 OPEN CASCADE SAS
7fd59977 5--
973c2be1 6-- This file is part of Open CASCADE Technology software library.
b311480e 7--
d5f74e42 8-- This library is free software; you can redistribute it and/or modify it under
9-- the terms of the GNU Lesser General Public License version 2.1 as published
973c2be1 10-- by the Free Software Foundation, with special exception defined in the file
11-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12-- distribution for complete text of the license and disclaimer of any warranty.
b311480e 13--
973c2be1 14-- Alternatively, this file may be used under the terms of Open CASCADE
15-- commercial license or contractual agreement.
b311480e 16
7fd59977 17-- Package: V3d.cdl
7fd59977 18-- Modified: stt:25-02-98; S3558: ajout ViewStdAdapter
19-- ZOV - Mars 30 1998
20-- stt:08-04-98; suppr. ViewStdAdapter
21-- 16-09-98 ; BGN : Ajout TypeOfTriedronEcho,
22-- TypeOfTriedronPosition.
23-- 22-09-98; BGN: S3989 (anciennement S3819): report
24-- dans Aspect des TypeOfTriedron*
7fd59977 25-- Purpose: Specifications provisoires
7fd59977 26
27package V3d
28
29 ---Purpose: This package contains the set of commands and services
30 -- of the 3D Viewer. It provides a set of high level commands
31 -- to control the views and viewing modes. This package is
32 -- complementary to the Visual3D graphic package.
7fd59977 33
34uses
7fd59977 35 TColStd,
36 Graphic3d,
37 Visual3d,
a272ed94 38 SelectMgr,
7fd59977 39 MMgt,
40 TCollection,
41 Quantity,
42 Aspect,
7fd59977 43 Image,
44 gp,
eeaaaefb 45 OSD,
ed063270 46 Font,
47 Bnd
7fd59977 48
49is
50
51 ------------------------------
52 ---Category: The extern types
53 ------------------------------
54
55 alias Coordinate is Length from Quantity;
56 ---Purpose: User-defined coordinate in the reference plane of
57 -- view (Projection or Mapping).
58
59
60 alias Parameter is Parameter from Quantity;
61
62 --------------------------
63 --Category: The Exceptions
64 --------------------------
65
6942f04a 66 exception BadValue inherits OutOfRange;
7fd59977 67 exception UnMapped inherits DomainError;
68
69 -----------------------------
70 ---Category: The Enumerations
71 -----------------------------
72
73 enumeration TypeOfView is ORTHOGRAPHIC,PERSPECTIVE
74 end TypeOfView ;
75 ---Purpose: Defines the type of projection of the view.
76
8625ef7e 77 enumeration TypeOfShadingModel is COLOR,FLAT,GOURAUD,PHONG
7fd59977 78 end TypeOfShadingModel ;
79 ---Purpose:
80 -- Defines the type of shading for the graphic object:
8625ef7e 81 -- - V3d_COLOR: simple surface color (Visual3d_TOM_NONE),
82 -- - V3d_FLAT: flat shading (Visual3d_TOM_FACET),
83 -- - V3d_GOURAUD: Gouraud shading (Visual3d_TOM_VERTEX),
84 -- - V3d_PHONG: Phong shading (Visual3d_TOM_FRAGMENT).
7fd59977 85
86 enumeration TypeOfSurfaceDetail is TEX_NONE, TEX_ENVIRONMENT, TEX_ALL
87 end TypeOfSurfaceDetail;
88 ---Purpose: Modes of visualization for objects in a view
89 -- - V3d_TEX_NONE: no texture mapping,
90 -- - V3d_TEX_ENVIRONMENT: environment mapping only,
91 -- - V3d_TEX_ALL: environment and texture mapping.
92
93 enumeration TypeOfVisualization is WIREFRAME,ZBUFFER
94 end TypeOfVisualization ;
95 ---Purpose: Determines the type of visualization in the view, either
96 -- WIREFRAME or ZBUFFER (shading).
97
98 enumeration TypeOfZclipping is OFF,BACK,FRONT,SLICE
99 -- Type "BACK" Remove rear part
100 -- Type "FRONT" Remove front part
101 -- "SLICE" Keep the slice between the front plane
102 -- plane depth + half the thickness
103 -- and the rear plane
104 -- plane depth - half the thickness.
105 -- "OFF" ZClipping deactivated.
106 end TypeOfZclipping ;
107 ---Purpose: The available options are
108 -- - V3d_OFF: Zclipping (clipping executed in the
109 -- depth of the view) is deactivated,
110 -- - V3d_BACK: back Zclipping is activated,
111 -- - V3d_FRONT: front Zclipping is activated,
112 -- - V3d_SLICE: both front and back Zclippings are activated.
113
114 enumeration TypeOfLight is AMBIENT,DIRECTIONAL,POSITIONAL,SPOT
115 end TypeOfLight ;
116 ---Purpose: Determines the type of light.
117
118 enumeration TypeOfUpdate is ASAP,WAIT
119 end TypeOfUpdate ;
120 ---Purpose: Determines the type of update of the view
121 -- - V3d_ASAP: as soon as possible. The view is updated immediately after a modification.
122 -- - V3d_WAIT: deferred. The view is updated when the Update function is called.
123
124 enumeration TypeOfAxe is X,Y,Z
125 end TypeOfAxe ;
126 ---Purpose: Determines the axis type through the coordinates X, Y, Z.
127
128 enumeration TypeOfOrientation is Xpos,Ypos,Zpos,Xneg,Yneg,Zneg,
129 XposYpos,XposZpos,YposZpos,XnegYneg,XnegYpos,XnegZneg,
130 XnegZpos,YnegZneg,YnegZpos,XposYneg,XposZneg,YposZneg,
131 XposYposZpos,XposYnegZpos,XposYposZneg,XnegYposZpos,
132 XposYnegZneg,XnegYposZneg,XnegYnegZpos,XnegYnegZneg
133 end TypeOfOrientation ;
134 ---Purpose: Determines the type of orientation.
135
136 enumeration TypeOfRepresentation is SIMPLE,COMPLETE,PARTIAL,SAMELAST
137 end TypeOfRepresentation;
138
139
140 enumeration TypeOfPickLight is POSITIONLIGHT,SPACELIGHT,
141 RADIUSTEXTLIGHT,ExtRADIUSLIGHT,IntRADIUSLIGHT,
142 NOTHING
143 end TypeOfPickLight;
144
145 enumeration TypeOfPickCamera is POSITIONCAMERA,SPACECAMERA,
146 RADIUSTEXTCAMERA,ExtRADIUSCAMERA,IntRADIUSCAMERA,
147 NOTHINGCAMERA
148 end TypeOfPickCamera;
149
7fd59977 150 enumeration TypeOfBackfacingModel is
151 TOBM_AUTOMATIC, TOBM_ALWAYS_DISPLAYED, TOBM_NEVER_DISPLAYED
152 end TypeOfBackfacingModel;
153 ---Purpose : Modes of display of back faces in the view
154 --
155 -- TOBM_AUTOMATIC graphic's structure setting is in use
156 -- TOBM_ALWAYS_DISPLAYED force display of back faces
157 -- TOBM_NEVER_DISPLAYED disable display of back faces
158
b5ac8292 159 enumeration StereoDumpOptions is
160 SDO_MONO,
161 SDO_LEFT_EYE,
162 SDO_RIGHT_EYE
163 end StereoDumpOptions;
164 ---Purpose : Options to be used with image dumping.
165 --
166 -- SDO_MONO dump monographic projection for stereo camera
167 -- SDO_LEFT_EYE dump left eye projection for stereo camera
168 -- SDO_RIGHT_EYE dump right eye projection for stereo camera
169
7fd59977 170 ------------------------
171 ---Category: The classes
172 ------------------------
173
174 class Viewer;
7fd59977 175
6942f04a 176 class View;
7fd59977 177
7fd59977 178 class LayerMgr;
7fd59977 179
180 deferred class Light;
7fd59977 181
182 class AmbientLight;
7fd59977 183
184 deferred class PositionLight;
7fd59977 185
186 class PositionalLight;
7fd59977 187
188 class DirectionalLight;
7fd59977 189
190 class SpotLight;
7fd59977 191
7fd59977 192 ---------------------------------
193 ---Category: Instantiated classes
194 ---------------------------------
195
db3cb1ce 196 imported ListOfTransient;
7fd59977 197
198 pointer ViewerPointer to Viewer from V3d;
199 pointer ViewPointer to View from V3d;
200 pointer LayerMgrPointer to LayerMgr from V3d;
201
202 private class RectangularGrid;
203 private class CircularGrid;
204
205 private class ColorScale;
206 private class ColorScaleLayerItem;
207
208 ---------------------------------
209 ---Category: Methodes de package
210 ---------------------------------
211
212 GetProjAxis( Orientation : TypeOfOrientation )
213 returns Vector from Graphic3d ;
214 ---Purpose: Determines the orientation vector corresponding
215 -- to the predefined orientation type.
216
6e33d3ce 217 ArrowOfRadius ( garrow : Group from Graphic3d;
7fd59977 218 X0,Y0,Z0 : Coordinate;
219 DX,DY,DZ : Parameter;
220 Alpha : PlaneAngle from Quantity;
221 Lng : Parameter ) is protected;
222 ---Level: Advanced
223 ---Purpose: Compute the graphic structure of arrow.
224 -- X0,Y0,Z0 : coordinate of the arrow.
225 -- DX,DY,DZ : Direction of the arrow.
226 -- Alpha : Angle of arrow.
227 -- Lng : Length of arrow.
228
6e33d3ce 229 CircleInPlane ( gcircle : Group from Graphic3d;
7fd59977 230 X0,Y0,Z0 : Coordinate;
231 VX,VY,VZ : Parameter;
232 Radius : Parameter ) is protected;
233 ---Level: Advanced
234 ---Purpose: Compute the graphic structure of circle.
235 -- X0,Y0,Z0 : Center of circle.
236 -- VX,VY,VZ : Axis of circle.
237 -- Radius : Radius of circle.
238
239 SwitchViewsinWindow(aPreviousView: View from V3d;
240 aNextView: View from V3d);
241
242
243 DrawSphere(aViewer: Viewer from V3d; aRadius: Length from Quantity =1000);
244 ---Purpose: test.
245
246 PickGrid(aViewer: Viewer from V3d; aRadius: Length from Quantity =1000);
247 ---Purpose: test.
248
249 SetPlane(aViewer: Viewer from V3d; x1,y1,z1,x2,y2,z2: Length from Quantity);
250 ---Purpose: test.
251
252end V3d;
253