1 -- Created on: 1993-03-31
2 -- Created by: NW,JPB,CAL
3 -- Copyright (c) 1993-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
6 -- This file is part of Open CASCADE Technology software library.
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
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.
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
17 -- Package : Graphic3d
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
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.
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)
41 -- Objective : Specifications definitives
47 ---Purpose: This package permits the creation of 3d graphic objects
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.
58 ---Keywords: Structure, Group, Primitives, Line, Marker, Text,
59 -- FillAreas, Vertex, Vector, Material, Font, Shading
78 -----------------------
79 -- Category: Exceptions
80 -----------------------
82 exception AspectTextDefinitionError inherits OutOfRange;
83 ---Category: Exceptions
85 exception CycleError inherits DomainError;
86 ---Category: Exceptions
88 exception GroupDefinitionError inherits OutOfRange;
89 ---Category: Exceptions
91 exception InitialisationError inherits OutOfRange;
92 ---Category: Exceptions
94 exception MaterialDefinitionError inherits OutOfRange;
95 ---Category: Exceptions
97 exception PlotterDefinitionError inherits OutOfRange;
98 ---Category: The exceptions
100 exception PriorityDefinitionError inherits OutOfRange;
101 ---Category: Exceptions
103 exception StructureDefinitionError inherits OutOfRange;
104 ---Category: Exceptions
106 exception TransformError inherits OutOfRange;
107 ---Category: Exceptions
109 exception VectorError inherits OutOfRange;
110 ---Category: Exceptions
112 -------------------------
113 -- Category: Enumerations
114 -------------------------
116 enumeration NameOfMaterial is
117 NOM_BRASS, -- laiton (PHYSIC)
118 NOM_BRONZE, -- bronze (PHYSIC)
119 NOM_COPPER, -- cuivre (PHYSIC)
120 NOM_GOLD, -- or (PHYSIC)
122 NOM_PEWTER, -- etain (PHYSIC)
124 NOM_PLASTER, -- platre (GENERIC)
125 NOM_PLASTIC, -- plastic (GENERIC)
127 NOM_SILVER, -- argent (PHYSIC)
129 NOM_STEEL, -- acier (PHYSIC)
131 NOM_STONE, -- pierre (PHYSIC)
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)
143 NOM_UserDefined -- owner material
145 ---Purpose: Types of aspect materials.
146 ---Category: Enumerations
148 enumeration TypeOfMaterial is MATERIAL_ASPECT, -- Materiel generique
149 MATERIAL_PHYSIC -- Materiel physique
151 ---Purpose: Types of materials specifies if a material can change color.
152 ---Category: Enumerations
154 enumeration NameOfTexture1D is NOT_1D_ELEVATION,
157 ---Purpose: Types of standard textures.
158 ---Category: Enumerations
161 enumeration NameOfTexture2D is NOT_2D_MATRA,
164 NOT_2D_BLUEWHITE_PAPER,
184 ---Purpose: Types of standard textures.
185 ---Category: Enumerations
188 enumeration NameOfTextureEnv is NOT_ENV_CLOUDS,
197 end NameOfTextureEnv;
198 ---Purpose: Types of standard textures.
199 ---Category: Enumerations
201 enumeration TypeOfTexture is TOT_1D,
204 ---Purpose: Type of the texture file format.
205 ---Category: Enumerations
207 enumeration TypeOfTextureMode is TOTM_OBJECT,
212 ---Purpose: Type of the texture projection.
213 ---Category: Enumerations
215 enumeration TypeOfTextureFilter is TOTF_NEAREST,
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
222 enumeration LevelOfTextureAnisotropy is LOTA_OFF,
226 ---Purpose: Level of anisotropy filter.
227 -- Notice that actual quality depends on hardware capabilities!
228 ---Category: Enumerations
230 enumeration NameOfTexturePlane is NOTP_XY,
234 ---Purpose: Type of the texture projection plane for both S and T texture coordinate.
235 ---Category: Enumerations
237 enumeration TypeOfComposition is TOC_REPLACE,
239 end TypeOfComposition;
240 ---Purpose: To manage the transformation matrices of structures.
241 ---Category: Enumerations
243 enumeration TypeOfConnection is TOC_ANCESTOR,
245 end TypeOfConnection;
246 ---Purpose: To manage the connections between the structures.
247 ---Category: Enumerations
249 enumeration TypeOfPolygon is TOP_UNKNOWN,
254 ---Purpose: The type of polygon in a group in a structure.
255 ---Category: Enumerations
257 enumeration TypeOfPrimitive is TOP_UNDEFINED,
266 ---Purpose: The type of primitive in a group in a structure.
267 ---Category: Enumerations
269 enumeration TypeOfPrimitiveArray is TOPA_UNDEFINED,
277 TOPA_QUADRANGLESTRIPS,
279 end TypeOfPrimitiveArray;
280 ---Purpose: The type of primitive array in a group in a structure.
281 ---Category: Enumerations
283 enumeration TypeOfReflection is TOR_AMBIENT,
287 end TypeOfReflection;
288 ---Purpose: Nature of the reflection of a material.
289 ---Category: Enumerations
291 enumeration TypeOfStructure is TOS_WIREFRAME,
296 ---Purpose: Structural attribute indicating if it can be displayed
297 -- in wireframe, shadow mode, or both.
298 ---Category: Enumerations
300 enumeration TextPath is TP_UP,
305 ---Purpose: Direction in which text is displayed.
306 ---Category: Enumerations
308 enumeration HorizontalTextAlignment is HTA_LEFT,
311 end HorizontalTextAlignment;
312 ---Purpose: Defines the horizontal position of the text
313 -- relative to its anchor.
314 ---Category: Enumerations
316 enumeration VerticalTextAlignment is VTA_BOTTOM,
319 end VerticalTextAlignment;
320 ---Purpose: Defines the vertical position of the text
321 -- relative to its anchor.
322 ---Category: Enumerations
324 enumeration GroupAspect is ASPECT_LINE,
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.
335 ---------------------------
336 -- Category: Imported types
337 ---------------------------
340 imported Buffer_Handle;
341 imported BoundBuffer;
342 imported BoundBuffer_Handle;
343 imported IndexBuffer;
344 imported IndexBuffer_Handle;
348 imported CBitFields20;
349 ---Purpose: Defines the C structure
350 ---Category: Imported types
352 imported CBitFields16;
353 ---Purpose: Defines the C structure
354 ---Category: Imported types
356 imported CBitFields8;
357 ---Purpose: Defines the C structure
358 ---Category: Imported types
360 imported CBitFields4;
361 ---Purpose: Defines the C structure
362 ---Category: Imported types
364 imported CAspectFillArea;
365 imported CAspectMarker;
366 imported CAspectLine;
367 imported CAspectText;
370 ---Purpose: Defines the C structure <astructure>
371 ---Category: Imported types
373 pointer CStructurePtr to CStructure from Graphic3d;
375 imported CStructure_Handle;
378 ---Purpose: Defines the C structure <alight>
379 ---Category: Imported types
382 ---Purpose: Defines the C structure <apick>
383 ---Category: Imported types
386 ---Purpose: Defines the C structure <aplane>
387 ---Category: Imported types
390 ---Purpose: Defines the C structure <abounds>
391 ---Category: Imported types
394 ---Purpose: Defines the C structure <auserdraw>
395 ---Category: Imported types
398 ---Purpose: Defines the C structure <aview>
399 ---Category: Imported types
401 imported CGraduatedTrihedron;
402 ---Purpose: Defines the C structure of a graduated trihedron.
403 ---Category: Imported types
406 ---Purpose: Describes geometrical and auxiliary properties of clipping
407 -- planes applied on rendering by graphical driver.
408 ---Category: Imported types
410 imported ClipPlane_Handle;
411 ---Purpose: CDL-compatibility handle type definition for
412 -- clip plane objects.
416 imported CTransPersStruct;
417 imported TransModeFlags;
419 imported MarkerImage;
420 imported MarkerImage_Handle;
421 imported Camera_Handle;
423 primitive PtrFrameBuffer;
430 imported ZLayerSettings;
436 deferred class ArrayOfPrimitives;
437 ---Purpose: Contains basic methods for array allocation and filling
440 ---Purpose: Contains points array definition
442 class ArrayOfPolylines;
443 ---Purpose: Contains polylines array definition
445 class ArrayOfSegments;
446 ---Purpose: Contains segments array definition
448 class ArrayOfPolygons;
449 ---Purpose: Contains polygons array definition
451 class ArrayOfTriangles;
452 ---Purpose: Contains triangles array definition
454 class ArrayOfTriangleStrips;
455 ---Purpose: Contains triangles strip array definition
457 class ArrayOfTriangleFans;
458 ---Purpose: Contains triangles fan array definition
460 class ArrayOfQuadrangles;
461 ---Purpose: Contains quatrangles array definition
463 class ArrayOfQuadrangleStrips;
464 ---Purpose: Contains quadrangles strip array definition
467 ---Purpose: Grouping line attributes
470 class AspectFillArea3d;
471 ---Purpose: Grouping face attributes
474 class AspectMarker3d;
475 ---Purpose: Grouping marker attributes
479 ---Purpose: Grouping text attributes.
482 deferred class Group;
483 ---Purpose: For grouping together primitives in a structure
486 class MaterialAspect;
487 ---Purpose: Aspect attributes of a 3d face.
491 ---Purpose: Graphic object.
494 pointer StructurePtr to Structure from Graphic3d;
496 deferred class GraphicDriver;
497 ---Purpose: Defines a graphic driver for 3d interface
499 deferred class StructureManager;
500 ---Purpose: Visualiser with which the graphic objects are associated.
503 pointer StructureManagerPtr to StructureManager from Graphic3d;
505 deferred class DataStructureManager;
506 ---Purpose: Visualiser with which the graphic objects are associated.
509 deferred class Plotter;
510 ---Purpose: Defines the minimal plotter.
511 ---Category: The classes
514 ---Purpose: 3d vector
518 ---Purpose: 3d vertex
521 ---------------------------------
522 -- Category: Instantiated classes
523 ---------------------------------
525 imported SequenceOfGroup;
527 ---Category: Instantiated classes
529 class MapOfStructure instantiates
530 Map from TCollection (Structure from Graphic3d,MapTransientHasher from TColStd);
533 ---Category: Instantiated classes
535 class SequenceOfStructure instantiates
536 Sequence from TCollection
537 (Structure from Graphic3d);
538 ---Category: Instantiated classes
540 class HSequenceOfStructure instantiates
541 HSequence from TCollection
542 (Structure from Graphic3d, SequenceOfStructure from Graphic3d);
543 ---Category: Instantiated classes
545 class Array1OfVector instantiates
546 Array1 from TCollection (Vector from Graphic3d);
547 ---Category: Instantiated classes
549 class Array1OfVertex instantiates
550 Array1 from TCollection (Vertex from Graphic3d);
551 ---Category: Instantiated classes
553 class Array2OfVertex instantiates
554 Array2 from TCollection (Vertex from Graphic3d);
555 ---Category: Instantiated classes
557 class ListOfShortReal instantiates
558 List from TCollection (ShortReal from Standard);
559 ---Category: Instantiated classes
561 --ABD Integration support of system fonts (using FTGL and FreeType)
562 imported NListOfHAsciiString;
563 ---Category: Instantiated classes
565 imported ShaderProgram_Handle;
566 ---Category: Instantiated classes
568 imported SequenceOfHClipPlane;
569 ---Category: Instantiated classes
570 -- Sequence of handles on clip planes
572 deferred class TextureRoot from Graphic3d;
573 deferred class TextureMap from Graphic3d;
574 deferred class Texture1D from Graphic3d;
575 deferred class Texture2D from Graphic3d;
577 class TextureParams from Graphic3d;
578 class TextureEnv from Graphic3d;
579 class Texture1Dmanual from Graphic3d;
580 class Texture1Dsegment from Graphic3d;
581 class Texture2Dmanual from Graphic3d;
582 class Texture2Dplane from Graphic3d;
585 enumeration ExportFormat is
598 enumeration SortType is
600 ST_Simple, -- sorting by depth of center point of primitive(fast)
601 ST_BSP_Tree -- sorting by BSPTree (slow, but fine result )
605 ----------------------------
606 -- Category: Package methods
607 ----------------------------
609 InitGraphicDriver (theDisplayConnection: DisplayConnection_Handle from Aspect)
610 returns GraphicDriver from Graphic3d
611 raises DriverDefinitionError from Aspect;
612 ---Purpose: Initialize graphic driver and returns Handle to it.