0024912: Remove unused Graphic3d_Strips
[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-- 17-12-01 : GG ; IMP171201 : Add material name UserDefined
39-- Thanks to Stephane ROUTELOUS
40-- 20-01-2009 : ABD Integration support of system fonts (using FTGL and FreeType)
7fd59977 41-- Objective : Specifications definitives
7fd59977 42
43package Graphic3d
44
45 ---Version:
46
47 ---Purpose: This package permits the creation of 3d graphic objects
48 -- in a visualiser.
49 -- These objects, called structures, are composed of groups of
50 -- primitives and attributes.
51 -- The group is the smallest editable element of a structure.
52 -- A structure can be displayed, erased, high-lighted.
53 -- A transformation can be applied to it.
54 -- Structures can be connected to form a tree of structures,
55 -- composed by transformations.
56 -- The visualiser permits global manipulation of structures.
57
58 ---Keywords: Structure, Group, Primitives, Line, Marker, Text,
59 -- FillAreas, Vertex, Vector, Material, Font, Shading
60 ---Warning:
61 ---References:
62
63uses
64
65 TCollection,
66 TColStd,
b8ddfc2f 67 TColgp,
7fd59977 68 OSD,
69 Quantity,
70 Aspect,
71 MMgt,
7fd59977 72 WNT,
73 Image,
eeaaaefb 74 gp,
75 Font
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 PlotterDefinitionError inherits OutOfRange;
98 ---Category: The exceptions
99
100 exception PriorityDefinitionError inherits OutOfRange;
101 ---Category: Exceptions
102
103 exception StructureDefinitionError inherits OutOfRange;
104 ---Category: Exceptions
105
106 exception TransformError inherits OutOfRange;
107 ---Category: Exceptions
108
109 exception VectorError inherits OutOfRange;
110 ---Category: Exceptions
111
112 -------------------------
113 -- Category: Enumerations
114 -------------------------
115
116 enumeration NameOfMaterial is
117 NOM_BRASS, -- laiton (PHYSIC)
118 NOM_BRONZE, -- bronze (PHYSIC)
119 NOM_COPPER, -- cuivre (PHYSIC)
120 NOM_GOLD, -- or (PHYSIC)
121
122 NOM_PEWTER, -- etain (PHYSIC)
123
124 NOM_PLASTER, -- platre (GENERIC)
125 NOM_PLASTIC, -- plastic (GENERIC)
126
127 NOM_SILVER, -- argent (PHYSIC)
128
129 NOM_STEEL, -- acier (PHYSIC)
130
131 NOM_STONE, -- pierre (PHYSIC)
132
133 NOM_SHINY_PLASTIC, -- plastique brillant (GENERIC)
134 NOM_SATIN, -- satin (GENERIC)
135 NOM_METALIZED, -- metallise New (GENERIC)
136 NOM_NEON_GNC, -- neon New (GENERIC)
137 NOM_CHROME, -- chrome New (PHYSIC)
138 NOM_ALUMINIUM, -- aluminium New (PHYSIC)
139 NOM_OBSIDIAN, -- obsidian New (PHYSIC)
140 NOM_NEON_PHC, -- neon New (PHYSIC)
141 NOM_JADE, -- jade New (PHYSIC)
142 NOM_DEFAULT,
143 NOM_UserDefined -- owner material
144 end NameOfMaterial;
145 ---Purpose: Types of aspect materials.
146 ---Category: Enumerations
147
148 enumeration TypeOfMaterial is MATERIAL_ASPECT, -- Materiel generique
149 MATERIAL_PHYSIC -- Materiel physique
150 end TypeOfMaterial;
151 ---Purpose: Types of materials specifies if a material can change color.
152 ---Category: Enumerations
153
154 enumeration NameOfTexture1D is NOT_1D_ELEVATION,
155 NOT_1D_UNKNOWN
156 end NameOfTexture1D;
157 ---Purpose: Types of standard textures.
158 ---Category: Enumerations
159
160
161 enumeration NameOfTexture2D is NOT_2D_MATRA,
162 NOT_2D_ALIENSKIN,
163 NOT_2D_BLUE_ROCK,
164 NOT_2D_BLUEWHITE_PAPER,
165 NOT_2D_BRUSHED,
166 NOT_2D_BUBBLES,
167 NOT_2D_BUMP,
168 NOT_2D_CAST,
169 NOT_2D_CHIPBD,
170 NOT_2D_CLOUDS,
171 NOT_2D_FLESH,
172 NOT_2D_FLOOR,
173 NOT_2D_GALVNISD,
174 NOT_2D_GRASS,
175 NOT_2D_ALUMINUM,
176 NOT_2D_ROCK,
177 NOT_2D_KNURL,
178 NOT_2D_MAPLE,
179 NOT_2D_MARBLE,
180 NOT_2D_MOTTLED,
181 NOT_2D_RAIN,
182 NOT_2D_UNKNOWN
183 end NameOfTexture2D;
184 ---Purpose: Types of standard textures.
185 ---Category: Enumerations
186
187
188 enumeration NameOfTextureEnv is NOT_ENV_CLOUDS,
189 NOT_ENV_CV,
190 NOT_ENV_MEDIT,
191 NOT_ENV_PEARL,
192 NOT_ENV_SKY1,
193 NOT_ENV_SKY2,
194 NOT_ENV_LINES,
195 NOT_ENV_ROAD,
196 NOT_ENV_UNKNOWN
197 end NameOfTextureEnv;
198 ---Purpose: Types of standard textures.
199 ---Category: Enumerations
200
201 enumeration TypeOfTexture is TOT_1D,
202 TOT_2D,
203 TOT_2D_MIPMAP;
204 ---Purpose: Type of the texture file format.
205 ---Category: Enumerations
206
207 enumeration TypeOfTextureMode is TOTM_OBJECT,
208 TOTM_SPHERE,
209 TOTM_EYE,
a577aaab 210 TOTM_MANUAL,
211 TOTM_SPRITE;
7fd59977 212 ---Purpose: Type of the texture projection.
213 ---Category: Enumerations
214
bf75be98 215 enumeration TypeOfTextureFilter is TOTF_NEAREST,
216 TOTF_BILINEAR,
217 TOTF_TRILINEAR;
218 ---Purpose: Type of the texture filter.
219 -- Notice that for textures without mipmaps linear interpolation will be used instead of TOTF_BILINEAR and TOTF_TRILINEAR.
220 ---Category: Enumerations
221
222 enumeration LevelOfTextureAnisotropy is LOTA_OFF,
223 LOTA_FAST,
224 LOTA_MIDDLE,
225 LOTA_QUALITY;
226 ---Purpose: Level of anisotropy filter.
227 -- Notice that actual quality depends on hardware capabilities!
228 ---Category: Enumerations
229
7fd59977 230 enumeration NameOfTexturePlane is NOTP_XY,
231 NOTP_YZ,
232 NOTP_ZX,
233 NOTP_UNKNOWN;
234 ---Purpose: Type of the texture projection plane for both S and T texture coordinate.
235 ---Category: Enumerations
236
237 enumeration TypeOfComposition is TOC_REPLACE,
238 TOC_POSTCONCATENATE
239 end TypeOfComposition;
240 ---Purpose: To manage the transformation matrices of structures.
241 ---Category: Enumerations
242
243 enumeration TypeOfConnection is TOC_ANCESTOR,
244 TOC_DESCENDANT
245 end TypeOfConnection;
246 ---Purpose: To manage the connections between the structures.
247 ---Category: Enumerations
248
249 enumeration TypeOfPolygon is TOP_UNKNOWN,
250 TOP_COMPLEX,
251 TOP_CONCAVE,
252 TOP_CONVEX
253 end TypeOfPolygon;
254 ---Purpose: The type of polygon in a group in a structure.
255 ---Category: Enumerations
256
257 enumeration TypeOfPrimitive is TOP_UNDEFINED,
258 TOP_POLYLINE,
259 TOP_POLYGON,
260 TOP_TRIANGLEMESH,
261 TOP_QUADRANGLEMESH,
262 TOP_TEXT,
263 TOP_MARKER,
264 TOP_PARRAY
265 end TypeOfPrimitive;
266 ---Purpose: The type of primitive in a group in a structure.
267 ---Category: Enumerations
268
269 enumeration TypeOfPrimitiveArray is TOPA_UNDEFINED,
270 TOPA_POINTS,
271 TOPA_POLYLINES,
272 TOPA_SEGMENTS,
273 TOPA_POLYGONS,
274 TOPA_TRIANGLES,
275 TOPA_QUADRANGLES,
276 TOPA_TRIANGLESTRIPS,
277 TOPA_QUADRANGLESTRIPS,
278 TOPA_TRIANGLEFANS
279 end TypeOfPrimitiveArray;
280 ---Purpose: The type of primitive array in a group in a structure.
281 ---Category: Enumerations
282
283 enumeration TypeOfReflection is TOR_AMBIENT,
284 TOR_DIFFUSE,
285 TOR_SPECULAR,
286 TOR_EMISSION
287 end TypeOfReflection;
288 ---Purpose: Nature of the reflection of a material.
289 ---Category: Enumerations
290
291 enumeration TypeOfStructure is TOS_WIREFRAME,
292 TOS_SHADING,
293 TOS_COMPUTED,
294 TOS_ALL
295 end TypeOfStructure;
296 ---Purpose: Structural attribute indicating if it can be displayed
297 -- in wireframe, shadow mode, or both.
298 ---Category: Enumerations
299
300 enumeration TextPath is TP_UP,
301 TP_DOWN,
302 TP_LEFT,
303 TP_RIGHT
304 end TextPath;
305 ---Purpose: Direction in which text is displayed.
306 ---Category: Enumerations
307
308 enumeration HorizontalTextAlignment is HTA_LEFT,
309 HTA_CENTER,
310 HTA_RIGHT
311 end HorizontalTextAlignment;
312 ---Purpose: Defines the horizontal position of the text
313 -- relative to its anchor.
314 ---Category: Enumerations
315
316 enumeration VerticalTextAlignment is VTA_BOTTOM,
317 VTA_CENTER,
318 VTA_TOP
319 end VerticalTextAlignment;
320 ---Purpose: Defines the vertical position of the text
321 -- relative to its anchor.
322 ---Category: Enumerations
323
324 enumeration GroupAspect is ASPECT_LINE,
325 ASPECT_TEXT,
326 ASPECT_MARKER,
327 ASPECT_FILL_AREA
328 end GroupAspect;
329 ---Purpose: Identifies primitives aspects defined per group.
330 -- - ASPECT_LINE: aspect for line primitives;
331 -- - ASPECT_TEXT: aspect for text primitives;
332 -- - ASPECT_MARKER: aspect for marker primitives;
333 -- - ASPECT_FILL_AREA: aspect for face primitives.
334
335 ---------------------------
336 -- Category: Imported types
337 ---------------------------
338
871fa103 339 imported Buffer;
340 imported Buffer_Handle;
341 imported BoundBuffer;
342 imported BoundBuffer_Handle;
343 imported IndexBuffer;
344 imported IndexBuffer_Handle;
345
692613e5 346 imported BufferType;
7fd59977 347
348 imported CBitFields20;
349 ---Purpose: Defines the C structure
350 ---Category: Imported types
351
352 imported CBitFields16;
353 ---Purpose: Defines the C structure
354 ---Category: Imported types
355
356 imported CBitFields8;
357 ---Purpose: Defines the C structure
358 ---Category: Imported types
359
360 imported CBitFields4;
361 ---Purpose: Defines the C structure
362 ---Category: Imported types
363
b64d84be 364 imported CAspectFillArea;
365 imported CAspectMarker;
366 imported CAspectLine;
367 imported CAspectText;
7fd59977 368
369 imported CStructure;
370 ---Purpose: Defines the C structure <astructure>
371 ---Category: Imported types
372
b64d84be 373 pointer CStructurePtr to CStructure from Graphic3d;
374
63bcc448 375 imported CStructure_Handle;
376
7fd59977 377 imported CLight;
378 ---Purpose: Defines the C structure <alight>
379 ---Category: Imported types
380
381 imported CPick;
382 ---Purpose: Defines the C structure <apick>
383 ---Category: Imported types
384
385 imported CPlane;
386 ---Purpose: Defines the C structure <aplane>
387 ---Category: Imported types
388
389 imported CBounds;
390 ---Purpose: Defines the C structure <abounds>
391 ---Category: Imported types
392
393 imported CUserDraw;
394 ---Purpose: Defines the C structure <auserdraw>
395 ---Category: Imported types
396
397 imported CView;
398 ---Purpose: Defines the C structure <aview>
399 ---Category: Imported types
400
401 imported CGraduatedTrihedron;
402 ---Purpose: Defines the C structure of a graduated trihedron.
403 ---Category: Imported types
404
4269bd1b 405 imported ClipPlane;
406 ---Purpose: Describes geometrical and auxiliary properties of clipping
407 -- planes applied on rendering by graphical driver.
408 ---Category: Imported types
409
410 imported ClipPlane_Handle;
411 ---Purpose: CDL-compatibility handle type definition for
412 -- clip plane objects.
413
7fd59977 414 imported CTexture;
415
bf75be98 416 imported CTransPersStruct;
417 imported TransModeFlags;
a577aaab 418
419 imported MarkerImage;
420 imported MarkerImage_Handle;
b5ac8292 421 imported Camera_Handle;
7fd59977 422
423 primitive PtrFrameBuffer;
bf75be98 424 primitive Vec2;
425 primitive Vec3;
426 primitive Vec4;
197ac94e 427 imported Mat4;
428 imported Mat4d;
7fd59977 429
c5751993 430 imported ZLayerSettings;
431
7fd59977 432 --------------------
433 -- Category: Classes
434 --------------------
435
7fd59977 436 deferred class ArrayOfPrimitives;
437 ---Purpose: Contains basic methods for array allocation and filling
438
439 class ArrayOfPoints;
440 ---Purpose: Contains points array definition
441
442 class ArrayOfPolylines;
443 ---Purpose: Contains polylines array definition
444
445 class ArrayOfSegments;
446 ---Purpose: Contains segments array definition
447
448 class ArrayOfPolygons;
449 ---Purpose: Contains polygons array definition
450
451 class ArrayOfTriangles;
452 ---Purpose: Contains triangles array definition
453
454 class ArrayOfTriangleStrips;
455 ---Purpose: Contains triangles strip array definition
456
457 class ArrayOfTriangleFans;
458 ---Purpose: Contains triangles fan array definition
459
460 class ArrayOfQuadrangles;
461 ---Purpose: Contains quatrangles array definition
462
463 class ArrayOfQuadrangleStrips;
464 ---Purpose: Contains quadrangles strip array definition
465
466 class AspectLine3d;
467 ---Purpose: Grouping line attributes
468 ---Category: Classes
469
470 class AspectFillArea3d;
471 ---Purpose: Grouping face attributes
472 ---Category: Classes
473
474 class AspectMarker3d;
475 ---Purpose: Grouping marker attributes
476 ---Category: Classes
477
478 class AspectText3d;
479 ---Purpose: Grouping text attributes.
480 ---Category: Classes
481
b64d84be 482 deferred class Group;
7fd59977 483 ---Purpose: For grouping together primitives in a structure
484 ---Category: Classes
485
7fd59977 486 class MaterialAspect;
487 ---Purpose: Aspect attributes of a 3d face.
488 ---Category: Classes
489
490 class Structure;
491 ---Purpose: Graphic object.
492 ---Category: Classes
493
b64d84be 494 pointer StructurePtr to Structure from Graphic3d;
495
7fd59977 496 deferred class GraphicDriver;
497 ---Purpose: Defines a graphic driver for 3d interface
498
499 deferred class StructureManager;
500 ---Purpose: Visualiser with which the graphic objects are associated.
501 ---Category: Classes
502
63bcc448 503 pointer StructureManagerPtr to StructureManager from Graphic3d;
504
7fd59977 505 deferred class DataStructureManager;
506 ---Purpose: Visualiser with which the graphic objects are associated.
507 ---Category: Classes
508
509 deferred class Plotter;
510 ---Purpose: Defines the minimal plotter.
511 ---Category: The classes
512
513 class Vector;
514 ---Purpose: 3d vector
515 ---Category: Classes
516
b8ddfc2f 517 imported Vertex;
7fd59977 518 ---Purpose: 3d vertex
519 ---Category: Classes
520
7fd59977 521 ---------------------------------
522 -- Category: Instantiated classes
523 ---------------------------------
524
7fd59977 525 class SequenceOfAddress instantiates
526 Sequence from TCollection
527 (Address from Standard);
528 ---Category: Instantiated classes
529
b64d84be 530 imported SequenceOfGroup;
7fd59977 531
532 ---Category: Instantiated classes
533
7fd59977 534 class MapOfStructure instantiates
535 Map from TCollection (Structure from Graphic3d,MapTransientHasher from TColStd);
536
537
538 ---Category: Instantiated classes
539
540 class SequenceOfStructure instantiates
541 Sequence from TCollection
542 (Structure from Graphic3d);
543 ---Category: Instantiated classes
544
545 class HSequenceOfStructure instantiates
546 HSequence from TCollection
547 (Structure from Graphic3d, SequenceOfStructure from Graphic3d);
548 ---Category: Instantiated classes
549
550 class Array1OfVector instantiates
551 Array1 from TCollection (Vector from Graphic3d);
552 ---Category: Instantiated classes
553
554 class Array1OfVertex instantiates
555 Array1 from TCollection (Vertex from Graphic3d);
556 ---Category: Instantiated classes
557
558 class Array2OfVertex instantiates
559 Array2 from TCollection (Vertex from Graphic3d);
560 ---Category: Instantiated classes
561
7fd59977 562 class ListOfShortReal instantiates
563 List from TCollection (ShortReal from Standard);
564 ---Category: Instantiated classes
565
566 --ABD Integration support of system fonts (using FTGL and FreeType)
567 imported NListOfHAsciiString;
568 ---Category: Instantiated classes
569
30f0ad28 570 imported ShaderProgram_Handle;
571 ---Category: Instantiated classes
572
51b10cd4 573 imported SequenceOfHClipPlane;
4269bd1b 574 ---Category: Instantiated classes
51b10cd4 575 -- Sequence of handles on clip planes
4269bd1b 576
bf75be98 577 deferred class TextureRoot from Graphic3d;
7fd59977 578 deferred class TextureMap from Graphic3d;
579 deferred class Texture1D from Graphic3d;
580 deferred class Texture2D from Graphic3d;
581
bf75be98 582 class TextureParams from Graphic3d;
7fd59977 583 class TextureEnv from Graphic3d;
584 class Texture1Dmanual from Graphic3d;
585 class Texture1Dsegment from Graphic3d;
586 class Texture2Dmanual from Graphic3d;
587 class Texture2Dplane from Graphic3d;
588
589
590 enumeration ExportFormat is
591
592 EF_PostScript,
593 EF_EnhPostScript,
594 EF_TEX,
595 EF_PDF,
596 EF_SVG,
5cedc27f
K
597 EF_PGF,
598 EF_EMF
7fd59977 599
600 end ExportFormat;
601
602
603 enumeration SortType is
604
605 ST_Simple, -- sorting by depth of center point of primitive(fast)
606 ST_BSP_Tree -- sorting by BSPTree (slow, but fine result )
607
608 end SortType;
609
dc3fe572 610 ----------------------------
611 -- Category: Package methods
612 ----------------------------
613
614 InitGraphicDriver (theDisplayConnection: DisplayConnection_Handle from Aspect)
615 returns GraphicDriver from Graphic3d
616 raises DriverDefinitionError from Aspect;
617 ---Purpose: Initialize graphic driver and returns Handle to it.
618
619
620
7fd59977 621end Graphic3d;