0025552: Visualization - provide the way to hide the object in specified view of...
[occt.git] / src / Graphic3d / Graphic3d.cdl
CommitLineData
b311480e 1-- Created on: 1993-03-31
2-- Created by: NW,JPB,CAL
3-- Copyright (c) 1993-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 : Graphic3d
7fd59977 18-- Updated : Vendredi 2 Octobre 1992
19-- Mercredi 31 Mars 1993
20-- Mercredi 19 Janvier 1994
21-- 1/08/97 ; PCT : Ajout texture mapping
22-- 11/97 ; CAL : retrait de la dependance avec math
23-- 11/97 ; CAL : retrait des DataStructure
7fd59977 24-- 04/98 ; FGU : ajout champs 'TOR_EMISSION'
25-- 16-09-98; BGN: (S3819) Ajout TypeOfTriedronEcho,
26-- TypeOfTriedronPosition.
27-- 22-09-98; BGN: S3989 (anciennement S3819): report
28-- dans Aspect des TypeOfTriedron*
29-- 26-03-99 : FMN ; Compatibilite ascendante:
30-- Ajout des anciens noms de materiaux.
31-- 09-04-99 : GG ; Compatibilite ascendante:
32-- NameOfPhysicalMaterial disparait
33-- 23-11-99 : GG ; Add material name DEFAULT
34-- 16-06-2000 : ATS : Study G005: class ArrayOfPrimitives
35-- and derivated used for model presentation.
36-- Required: enumeration TypeOfPrimitive;
37-- imported PrimitiveArray; class PrimitiveList.
7fd59977 38-- Thanks to Stephane ROUTELOUS
39-- 20-01-2009 : ABD Integration support of system fonts (using FTGL and FreeType)
7fd59977 40-- Objective : Specifications definitives
7fd59977 41
42package Graphic3d
43
44 ---Version:
45
46 ---Purpose: This package permits the creation of 3d graphic objects
47 -- in a visualiser.
48 -- These objects, called structures, are composed of groups of
49 -- primitives and attributes.
50 -- The group is the smallest editable element of a structure.
51 -- A structure can be displayed, erased, high-lighted.
52 -- A transformation can be applied to it.
53 -- Structures can be connected to form a tree of structures,
54 -- composed by transformations.
55 -- The visualiser permits global manipulation of structures.
56
57 ---Keywords: Structure, Group, Primitives, Line, Marker, Text,
58 -- FillAreas, Vertex, Vector, Material, Font, Shading
59 ---Warning:
60 ---References:
61
62uses
63
64 TCollection,
65 TColStd,
b8ddfc2f 66 TColgp,
7fd59977 67 OSD,
68 Quantity,
69 Aspect,
70 MMgt,
7fd59977 71 WNT,
72 Image,
eeaaaefb 73 gp,
ed063270 74 Font,
75 Bnd
7fd59977 76is
77
78 -----------------------
79 -- Category: Exceptions
80 -----------------------
81
82 exception AspectTextDefinitionError inherits OutOfRange;
83 ---Category: Exceptions
84
85 exception CycleError inherits DomainError;
86 ---Category: Exceptions
87
88 exception GroupDefinitionError inherits OutOfRange;
89 ---Category: Exceptions
90
91 exception InitialisationError inherits OutOfRange;
92 ---Category: Exceptions
93
94 exception MaterialDefinitionError inherits OutOfRange;
95 ---Category: Exceptions
96
7fd59977 97 exception PriorityDefinitionError inherits OutOfRange;
98 ---Category: Exceptions
99
100 exception StructureDefinitionError inherits OutOfRange;
101 ---Category: Exceptions
102
103 exception TransformError inherits OutOfRange;
104 ---Category: Exceptions
105
106 exception VectorError inherits OutOfRange;
107 ---Category: Exceptions
108
109 -------------------------
110 -- Category: Enumerations
111 -------------------------
112
113 enumeration NameOfMaterial is
114 NOM_BRASS, -- laiton (PHYSIC)
44c7c33e 115 NOM_BRONZE, -- bronze (PHYSIC)
116 NOM_COPPER, -- cuivre (PHYSIC)
117 NOM_GOLD, -- or (PHYSIC)
7fd59977 118
44c7c33e 119 NOM_PEWTER, -- etain (PHYSIC)
7fd59977 120
44c7c33e 121 NOM_PLASTER, -- platre (GENERIC)
122 NOM_PLASTIC, -- plastic (GENERIC)
7fd59977 123
44c7c33e 124 NOM_SILVER, -- argent (PHYSIC)
7fd59977 125
44c7c33e 126 NOM_STEEL, -- acier (PHYSIC)
7fd59977 127
44c7c33e 128 NOM_STONE, -- pierre (PHYSIC)
7fd59977 129
44c7c33e 130 NOM_SHINY_PLASTIC, -- plastique brillant (GENERIC)
131 NOM_SATIN, -- satin (GENERIC)
132 NOM_METALIZED, -- metallise New (GENERIC)
133 NOM_NEON_GNC, -- neon New (GENERIC)
134 NOM_CHROME, -- chrome New (PHYSIC)
135 NOM_ALUMINIUM, -- aluminium New (PHYSIC)
136 NOM_OBSIDIAN, -- obsidian New (PHYSIC)
137 NOM_NEON_PHC, -- neon New (PHYSIC)
138 NOM_JADE, -- jade New (PHYSIC)
139
140 NOM_CHARCOAL,
141
142 NOM_WATER,
143 NOM_GLASS,
144 NOM_DIAMOND,
145
146 NOM_DEFAULT,
147 NOM_UserDefined -- owner material
7fd59977 148 end NameOfMaterial;
149 ---Purpose: Types of aspect materials.
150 ---Category: Enumerations
151
152 enumeration TypeOfMaterial is MATERIAL_ASPECT, -- Materiel generique
153 MATERIAL_PHYSIC -- Materiel physique
154 end TypeOfMaterial;
155 ---Purpose: Types of materials specifies if a material can change color.
156 ---Category: Enumerations
157
158 enumeration NameOfTexture1D is NOT_1D_ELEVATION,
159 NOT_1D_UNKNOWN
160 end NameOfTexture1D;
161 ---Purpose: Types of standard textures.
162 ---Category: Enumerations
163
164
165 enumeration NameOfTexture2D is NOT_2D_MATRA,
166 NOT_2D_ALIENSKIN,
167 NOT_2D_BLUE_ROCK,
168 NOT_2D_BLUEWHITE_PAPER,
169 NOT_2D_BRUSHED,
170 NOT_2D_BUBBLES,
171 NOT_2D_BUMP,
172 NOT_2D_CAST,
173 NOT_2D_CHIPBD,
174 NOT_2D_CLOUDS,
175 NOT_2D_FLESH,
176 NOT_2D_FLOOR,
177 NOT_2D_GALVNISD,
178 NOT_2D_GRASS,
179 NOT_2D_ALUMINUM,
180 NOT_2D_ROCK,
181 NOT_2D_KNURL,
182 NOT_2D_MAPLE,
183 NOT_2D_MARBLE,
184 NOT_2D_MOTTLED,
185 NOT_2D_RAIN,
186 NOT_2D_UNKNOWN
187 end NameOfTexture2D;
188 ---Purpose: Types of standard textures.
189 ---Category: Enumerations
190
191
192 enumeration NameOfTextureEnv is NOT_ENV_CLOUDS,
193 NOT_ENV_CV,
194 NOT_ENV_MEDIT,
195 NOT_ENV_PEARL,
196 NOT_ENV_SKY1,
197 NOT_ENV_SKY2,
198 NOT_ENV_LINES,
199 NOT_ENV_ROAD,
200 NOT_ENV_UNKNOWN
201 end NameOfTextureEnv;
202 ---Purpose: Types of standard textures.
203 ---Category: Enumerations
204
205 enumeration TypeOfTexture is TOT_1D,
206 TOT_2D,
207 TOT_2D_MIPMAP;
208 ---Purpose: Type of the texture file format.
209 ---Category: Enumerations
210
211 enumeration TypeOfTextureMode is TOTM_OBJECT,
212 TOTM_SPHERE,
213 TOTM_EYE,
a577aaab 214 TOTM_MANUAL,
215 TOTM_SPRITE;
7fd59977 216 ---Purpose: Type of the texture projection.
217 ---Category: Enumerations
218
bf75be98 219 enumeration TypeOfTextureFilter is TOTF_NEAREST,
220 TOTF_BILINEAR,
221 TOTF_TRILINEAR;
222 ---Purpose: Type of the texture filter.
223 -- Notice that for textures without mipmaps linear interpolation will be used instead of TOTF_BILINEAR and TOTF_TRILINEAR.
224 ---Category: Enumerations
225
226 enumeration LevelOfTextureAnisotropy is LOTA_OFF,
227 LOTA_FAST,
228 LOTA_MIDDLE,
229 LOTA_QUALITY;
230 ---Purpose: Level of anisotropy filter.
231 -- Notice that actual quality depends on hardware capabilities!
232 ---Category: Enumerations
233
7fd59977 234 enumeration NameOfTexturePlane is NOTP_XY,
235 NOTP_YZ,
236 NOTP_ZX,
237 NOTP_UNKNOWN;
238 ---Purpose: Type of the texture projection plane for both S and T texture coordinate.
239 ---Category: Enumerations
240
241 enumeration TypeOfComposition is TOC_REPLACE,
242 TOC_POSTCONCATENATE
243 end TypeOfComposition;
244 ---Purpose: To manage the transformation matrices of structures.
245 ---Category: Enumerations
246
247 enumeration TypeOfConnection is TOC_ANCESTOR,
248 TOC_DESCENDANT
249 end TypeOfConnection;
250 ---Purpose: To manage the connections between the structures.
251 ---Category: Enumerations
252
253 enumeration TypeOfPolygon is TOP_UNKNOWN,
254 TOP_COMPLEX,
255 TOP_CONCAVE,
256 TOP_CONVEX
257 end TypeOfPolygon;
258 ---Purpose: The type of polygon in a group in a structure.
259 ---Category: Enumerations
260
261 enumeration TypeOfPrimitive is TOP_UNDEFINED,
262 TOP_POLYLINE,
263 TOP_POLYGON,
264 TOP_TRIANGLEMESH,
265 TOP_QUADRANGLEMESH,
266 TOP_TEXT,
267 TOP_MARKER,
268 TOP_PARRAY
269 end TypeOfPrimitive;
270 ---Purpose: The type of primitive in a group in a structure.
271 ---Category: Enumerations
272
273 enumeration TypeOfPrimitiveArray is TOPA_UNDEFINED,
274 TOPA_POINTS,
275 TOPA_POLYLINES,
276 TOPA_SEGMENTS,
277 TOPA_POLYGONS,
278 TOPA_TRIANGLES,
279 TOPA_QUADRANGLES,
280 TOPA_TRIANGLESTRIPS,
281 TOPA_QUADRANGLESTRIPS,
282 TOPA_TRIANGLEFANS
283 end TypeOfPrimitiveArray;
284 ---Purpose: The type of primitive array in a group in a structure.
285 ---Category: Enumerations
286
287 enumeration TypeOfReflection is TOR_AMBIENT,
288 TOR_DIFFUSE,
289 TOR_SPECULAR,
290 TOR_EMISSION
291 end TypeOfReflection;
292 ---Purpose: Nature of the reflection of a material.
293 ---Category: Enumerations
294
295 enumeration TypeOfStructure is TOS_WIREFRAME,
296 TOS_SHADING,
297 TOS_COMPUTED,
298 TOS_ALL
299 end TypeOfStructure;
300 ---Purpose: Structural attribute indicating if it can be displayed
301 -- in wireframe, shadow mode, or both.
302 ---Category: Enumerations
303
304 enumeration TextPath is TP_UP,
305 TP_DOWN,
306 TP_LEFT,
307 TP_RIGHT
308 end TextPath;
309 ---Purpose: Direction in which text is displayed.
310 ---Category: Enumerations
311
312 enumeration HorizontalTextAlignment is HTA_LEFT,
313 HTA_CENTER,
314 HTA_RIGHT
315 end HorizontalTextAlignment;
316 ---Purpose: Defines the horizontal position of the text
317 -- relative to its anchor.
318 ---Category: Enumerations
319
320 enumeration VerticalTextAlignment is VTA_BOTTOM,
321 VTA_CENTER,
322 VTA_TOP
323 end VerticalTextAlignment;
324 ---Purpose: Defines the vertical position of the text
325 -- relative to its anchor.
326 ---Category: Enumerations
327
328 enumeration GroupAspect is ASPECT_LINE,
329 ASPECT_TEXT,
330 ASPECT_MARKER,
331 ASPECT_FILL_AREA
332 end GroupAspect;
333 ---Purpose: Identifies primitives aspects defined per group.
334 -- - ASPECT_LINE: aspect for line primitives;
335 -- - ASPECT_TEXT: aspect for text primitives;
336 -- - ASPECT_MARKER: aspect for marker primitives;
337 -- - ASPECT_FILL_AREA: aspect for face primitives.
338
bc8c79bb 339 enumeration RenderingMode is
340 RM_RASTERIZATION, RM_RAYTRACING
341 end RenderingMode;
342 ---Purpose: Describes rendering modes.
343 -- - RM_RASTERIZATION: enables OpenGL rasterization mode;
344 -- - RM_RAYTRACING: enables GPU ray-tracing mode.
345
0b0320e7 346 enumeration TypeOfBackground is
347 TOB_NONE, TOB_GRADIENT, TOB_TEXTURE
348 end TypeOfBackground;
349 ---Purpose: Describes type of view background.
350
7fd59977 351 ---------------------------
352 -- Category: Imported types
353 ---------------------------
354
b7cd4ba7 355 imported BndBox4f;
356 ---Purpose: Redefines BVH_Box<Standard_ShortReal, 4> for AABB representation
357 ---Category: Imported types
871fa103 358 imported Buffer;
359 imported Buffer_Handle;
360 imported BoundBuffer;
361 imported BoundBuffer_Handle;
362 imported IndexBuffer;
363 imported IndexBuffer_Handle;
364
b7cd4ba7 365 imported BndBox4d;
692613e5 366 imported BufferType;
7fd59977 367
368 imported CBitFields20;
7fd59977 369 ---Category: Imported types
370
371 imported CBitFields16;
7fd59977 372 ---Category: Imported types
373
374 imported CBitFields8;
7fd59977 375 ---Category: Imported types
376
377 imported CBitFields4;
7fd59977 378 ---Category: Imported types
379
b64d84be 380 imported CAspectFillArea;
381 imported CAspectMarker;
382 imported CAspectLine;
383 imported CAspectText;
7fd59977 384
385 imported CStructure;
7fd59977 386 ---Category: Imported types
387
b64d84be 388 pointer CStructurePtr to CStructure from Graphic3d;
389
63bcc448 390 imported CStructure_Handle;
391
7fd59977 392 imported CLight;
7fd59977 393 ---Category: Imported types
394
7fd59977 395 imported CPlane;
7fd59977 396 ---Category: Imported types
397
7fd59977 398 imported CUserDraw;
7fd59977 399 ---Category: Imported types
400
401 imported CView;
7fd59977 402 ---Category: Imported types
bc8c79bb 403
404 imported RenderingParams;
405 ---Purpose: Describes rendering parameters and effects.
406 ---Category: Imported types
7fd59977 407
408 imported CGraduatedTrihedron;
7fd59977 409 ---Category: Imported types
410
4269bd1b 411 imported ClipPlane;
4269bd1b 412 ---Category: Imported types
413
414 imported ClipPlane_Handle;
4269bd1b 415
7fd59977 416 imported CTexture;
417
bf75be98 418 imported CTransPersStruct;
419 imported TransModeFlags;
a577aaab 420
421 imported MarkerImage;
422 imported MarkerImage_Handle;
b5ac8292 423 imported Camera_Handle;
7fd59977 424
425 primitive PtrFrameBuffer;
bf75be98 426 primitive Vec2;
427 primitive Vec3;
428 primitive Vec4;
197ac94e 429 imported Mat4;
430 imported Mat4d;
7fd59977 431
a1954302 432 imported ZLayerSettings;
433 primitive ZLayerId;
c5751993 434
7fd59977 435 --------------------
436 -- Category: Classes
437 --------------------
438
7fd59977 439 deferred class ArrayOfPrimitives;
7fd59977 440
441 class ArrayOfPoints;
7fd59977 442
443 class ArrayOfPolylines;
7fd59977 444
445 class ArrayOfSegments;
7fd59977 446
447 class ArrayOfPolygons;
7fd59977 448
449 class ArrayOfTriangles;
7fd59977 450
451 class ArrayOfTriangleStrips;
7fd59977 452
453 class ArrayOfTriangleFans;
7fd59977 454
455 class ArrayOfQuadrangles;
7fd59977 456
457 class ArrayOfQuadrangleStrips;
7fd59977 458
459 class AspectLine3d;
7fd59977 460 ---Category: Classes
461
462 class AspectFillArea3d;
7fd59977 463 ---Category: Classes
464
465 class AspectMarker3d;
7fd59977 466 ---Category: Classes
467
468 class AspectText3d;
7fd59977 469 ---Category: Classes
470
b64d84be 471 deferred class Group;
7fd59977 472 ---Category: Classes
473
7fd59977 474 class MaterialAspect;
7fd59977 475 ---Category: Classes
476
477 class Structure;
7fd59977 478 ---Category: Classes
479
b64d84be 480 pointer StructurePtr to Structure from Graphic3d;
481
7fd59977 482 deferred class GraphicDriver;
7fd59977 483
484 deferred class StructureManager;
7fd59977 485 ---Category: Classes
486
63bcc448 487 pointer StructureManagerPtr to StructureManager from Graphic3d;
488
7fd59977 489 deferred class DataStructureManager;
7fd59977 490 ---Category: Classes
491
7fd59977 492 class Vector;
7fd59977 493 ---Category: Classes
494
b8ddfc2f 495 imported Vertex;
7fd59977 496 ---Category: Classes
497
a272ed94 498 imported transient class ViewAffinity;
499 imported MapOfObject;
500 imported transient class NMapOfTransient;
501
a1954302 502 imported MapOfStructure;
503 imported SequenceOfDisplayedStructures;
504
7fd59977 505 ---------------------------------
506 -- Category: Instantiated classes
507 ---------------------------------
508
b64d84be 509 imported SequenceOfGroup;
7fd59977 510
7fd59977 511 class SequenceOfStructure instantiates
512 Sequence from TCollection
513 (Structure from Graphic3d);
514 ---Category: Instantiated classes
515
516 class HSequenceOfStructure instantiates
517 HSequence from TCollection
518 (Structure from Graphic3d, SequenceOfStructure from Graphic3d);
519 ---Category: Instantiated classes
520
521 class Array1OfVector instantiates
522 Array1 from TCollection (Vector from Graphic3d);
523 ---Category: Instantiated classes
524
525 class Array1OfVertex instantiates
526 Array1 from TCollection (Vertex from Graphic3d);
527 ---Category: Instantiated classes
528
529 class Array2OfVertex instantiates
530 Array2 from TCollection (Vertex from Graphic3d);
531 ---Category: Instantiated classes
532
7fd59977 533 class ListOfShortReal instantiates
534 List from TCollection (ShortReal from Standard);
535 ---Category: Instantiated classes
536
537 --ABD Integration support of system fonts (using FTGL and FreeType)
538 imported NListOfHAsciiString;
539 ---Category: Instantiated classes
540
30f0ad28 541 imported ShaderProgram_Handle;
542 ---Category: Instantiated classes
543
51b10cd4 544 imported SequenceOfHClipPlane;
4269bd1b 545 ---Category: Instantiated classes
51b10cd4 546 -- Sequence of handles on clip planes
4269bd1b 547
bf75be98 548 deferred class TextureRoot from Graphic3d;
7fd59977 549 deferred class TextureMap from Graphic3d;
550 deferred class Texture1D from Graphic3d;
551 deferred class Texture2D from Graphic3d;
552
bf75be98 553 class TextureParams from Graphic3d;
7fd59977 554 class TextureEnv from Graphic3d;
555 class Texture1Dmanual from Graphic3d;
556 class Texture1Dsegment from Graphic3d;
557 class Texture2Dmanual from Graphic3d;
558 class Texture2Dplane from Graphic3d;
559
560
561 enumeration ExportFormat is
562
563 EF_PostScript,
564 EF_EnhPostScript,
565 EF_TEX,
566 EF_PDF,
567 EF_SVG,
5cedc27f
K
568 EF_PGF,
569 EF_EMF
7fd59977 570
571 end ExportFormat;
572
573
574 enumeration SortType is
575
576 ST_Simple, -- sorting by depth of center point of primitive(fast)
577 ST_BSP_Tree -- sorting by BSPTree (slow, but fine result )
578
579 end SortType;
580
581end Graphic3d;