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
9 -- under the terms of the GNU Lesser General Public 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 -- 11/97 ; CAL : ajout pointer StructPtr
25 -- 04/98 ; FGU : ajout champs 'TOR_EMISSION'
26 -- 16-09-98; BGN: (S3819) Ajout TypeOfTriedronEcho,
27 -- TypeOfTriedronPosition.
28 -- 22-09-98; BGN: S3989 (anciennement S3819): report
29 -- dans Aspect des TypeOfTriedron*
30 -- 26-03-99 : FMN ; Compatibilite ascendante:
31 -- Ajout des anciens noms de materiaux.
32 -- 09-04-99 : GG ; Compatibilite ascendante:
33 -- NameOfPhysicalMaterial disparait
34 -- 23-11-99 : GG ; Add material name DEFAULT
35 -- 16-06-2000 : ATS : Study G005: class ArrayOfPrimitives
36 -- and derivated used for model presentation.
37 -- Required: enumeration TypeOfPrimitive;
38 -- imported PrimitiveArray; class PrimitiveList.
39 -- 17-12-01 : GG ; IMP171201 : Add material name UserDefined
40 -- Thanks to Stephane ROUTELOUS
41 -- 20-01-2009 : ABD Integration support of system fonts (using FTGL and FreeType)
42 -- Objective : Specifications definitives
48 ---Purpose: This package permits the creation of 3d graphic objects
50 -- These objects, called structures, are composed of groups of
51 -- primitives and attributes.
52 -- The group is the smallest editable element of a structure.
53 -- A structure can be displayed, erased, high-lighted.
54 -- A transformation can be applied to it.
55 -- Structures can be connected to form a tree of structures,
56 -- composed by transformations.
57 -- The visualiser permits global manipulation of structures.
59 ---Keywords: Structure, Group, Primitives, Line, Marker, Text,
60 -- FillAreas, Vertex, Vector, Material, Font, Shading
79 -----------------------
80 -- Category: Exceptions
81 -----------------------
83 exception AspectTextDefinitionError inherits OutOfRange;
84 ---Category: Exceptions
86 exception CycleError inherits DomainError;
87 ---Category: Exceptions
89 exception GroupDefinitionError inherits OutOfRange;
90 ---Category: Exceptions
92 exception InitialisationError inherits OutOfRange;
93 ---Category: Exceptions
95 exception MaterialDefinitionError inherits OutOfRange;
96 ---Category: Exceptions
98 exception PickIdDefinitionError inherits OutOfRange;
99 ---Category: Exceptions
101 exception PlotterDefinitionError inherits OutOfRange;
102 ---Category: The exceptions
104 exception PriorityDefinitionError inherits OutOfRange;
105 ---Category: Exceptions
107 exception StructureDefinitionError inherits OutOfRange;
108 ---Category: Exceptions
110 exception TransformError inherits OutOfRange;
111 ---Category: Exceptions
113 exception VectorError inherits OutOfRange;
114 ---Category: Exceptions
116 -------------------------
117 -- Category: Enumerations
118 -------------------------
120 enumeration NameOfMaterial is
121 NOM_BRASS, -- laiton (PHYSIC)
122 NOM_BRONZE, -- bronze (PHYSIC)
123 NOM_COPPER, -- cuivre (PHYSIC)
124 NOM_GOLD, -- or (PHYSIC)
126 NOM_PEWTER, -- etain (PHYSIC)
128 NOM_PLASTER, -- platre (GENERIC)
129 NOM_PLASTIC, -- plastic (GENERIC)
131 NOM_SILVER, -- argent (PHYSIC)
133 NOM_STEEL, -- acier (PHYSIC)
135 NOM_STONE, -- pierre (PHYSIC)
137 NOM_SHINY_PLASTIC, -- plastique brillant (GENERIC)
138 NOM_SATIN, -- satin (GENERIC)
139 NOM_METALIZED, -- metallise New (GENERIC)
140 NOM_NEON_GNC, -- neon New (GENERIC)
141 NOM_CHROME, -- chrome New (PHYSIC)
142 NOM_ALUMINIUM, -- aluminium New (PHYSIC)
143 NOM_OBSIDIAN, -- obsidian New (PHYSIC)
144 NOM_NEON_PHC, -- neon New (PHYSIC)
145 NOM_JADE, -- jade New (PHYSIC)
147 NOM_UserDefined -- owner material
149 ---Purpose: Types of aspect materials.
150 ---Category: Enumerations
152 enumeration TypeOfMaterial is MATERIAL_ASPECT, -- Materiel generique
153 MATERIAL_PHYSIC -- Materiel physique
155 ---Purpose: Types of materials specifies if a material can change color.
156 ---Category: Enumerations
158 enumeration NameOfTexture1D is NOT_1D_ELEVATION,
161 ---Purpose: Types of standard textures.
162 ---Category: Enumerations
165 enumeration NameOfTexture2D is NOT_2D_MATRA,
168 NOT_2D_BLUEWHITE_PAPER,
188 ---Purpose: Types of standard textures.
189 ---Category: Enumerations
192 enumeration NameOfTextureEnv is NOT_ENV_CLOUDS,
201 end NameOfTextureEnv;
202 ---Purpose: Types of standard textures.
203 ---Category: Enumerations
205 enumeration TypeOfTexture is TOT_1D,
208 ---Purpose: Type of the texture file format.
209 ---Category: Enumerations
211 enumeration TypeOfTextureMode is TOTM_OBJECT,
216 ---Purpose: Type of the texture projection.
217 ---Category: Enumerations
219 enumeration TypeOfTextureFilter is TOTF_NEAREST,
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
226 enumeration LevelOfTextureAnisotropy is LOTA_OFF,
230 ---Purpose: Level of anisotropy filter.
231 -- Notice that actual quality depends on hardware capabilities!
232 ---Category: Enumerations
234 enumeration NameOfTexturePlane is NOTP_XY,
238 ---Purpose: Type of the texture projection plane for both S and T texture coordinate.
239 ---Category: Enumerations
241 enumeration TypeOfComposition is TOC_REPLACE,
243 end TypeOfComposition;
244 ---Purpose: To manage the transformation matrices of structures.
245 ---Category: Enumerations
247 enumeration TypeOfConnection is TOC_ANCESTOR,
249 end TypeOfConnection;
250 ---Purpose: To manage the connections between the structures.
251 ---Category: Enumerations
253 enumeration TypeOfPolygon is TOP_UNKNOWN,
258 ---Purpose: The type of polygon in a group in a structure.
259 ---Category: Enumerations
261 enumeration TypeOfPrimitive is TOP_UNDEFINED,
270 ---Purpose: The type of primitive in a group in a structure.
271 ---Category: Enumerations
273 enumeration TypeOfPrimitiveArray is TOPA_UNDEFINED,
281 TOPA_QUADRANGLESTRIPS,
283 end TypeOfPrimitiveArray;
284 ---Purpose: The type of primitive array in a group in a structure.
285 ---Category: Enumerations
287 enumeration TypeOfReflection is TOR_AMBIENT,
291 end TypeOfReflection;
292 ---Purpose: Nature of the reflection of a material.
293 ---Category: Enumerations
295 enumeration TypeOfStructure is TOS_WIREFRAME,
300 ---Purpose: Structural attribute indicating if it can be displayed
301 -- in wireframe, shadow mode, or both.
302 ---Category: Enumerations
304 enumeration TextPath is TP_UP,
309 ---Purpose: Direction in which text is displayed.
310 ---Category: Enumerations
312 enumeration HorizontalTextAlignment is HTA_LEFT,
315 end HorizontalTextAlignment;
316 ---Purpose: Defines the horizontal position of the text
317 -- relative to its anchor.
318 ---Category: Enumerations
320 enumeration VerticalTextAlignment is VTA_BOTTOM,
323 end VerticalTextAlignment;
324 ---Purpose: Defines the vertical position of the text
325 -- relative to its anchor.
326 ---Category: Enumerations
328 enumeration GroupAspect is ASPECT_LINE,
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.
339 ---------------------------
340 -- Category: Imported types
341 ---------------------------
343 imported PrimitiveArray;
346 imported CBitFields20;
347 ---Purpose: Defines the C structure
348 ---Category: Imported types
350 imported CBitFields16;
351 ---Purpose: Defines the C structure
352 ---Category: Imported types
354 imported CBitFields8;
355 ---Purpose: Defines the C structure
356 ---Category: Imported types
358 imported CBitFields4;
359 ---Purpose: Defines the C structure
360 ---Category: Imported types
363 ---Purpose: Defines the C structure <agroup>
364 ---Category: Imported types
367 ---Purpose: Defines the C structure <astructure>
368 ---Category: Imported types
371 ---Purpose: Defines the C structure <alight>
372 ---Category: Imported types
375 ---Purpose: Defines the C structure <apick>
376 ---Category: Imported types
379 ---Purpose: Defines the C structure <aplane>
380 ---Category: Imported types
383 ---Purpose: Defines the C structure <abounds>
384 ---Category: Imported types
387 ---Purpose: Defines the C structure <auserdraw>
388 ---Category: Imported types
391 ---Purpose: Defines the C structure <aview>
392 ---Category: Imported types
394 imported CGraduatedTrihedron;
395 ---Purpose: Defines the C structure of a graduated trihedron.
396 ---Category: Imported types
399 ---Purpose: Describes geometrical and auxiliary properties of clipping
400 -- planes applied on rendering by graphical driver.
401 ---Category: Imported types
403 imported ClipPlane_Handle;
404 ---Purpose: CDL-compatibility handle type definition for
405 -- clip plane objects.
409 imported CTransPersStruct;
410 imported TransModeFlags;
412 imported MarkerImage;
413 imported MarkerImage_Handle;
414 imported Camera_Handle;
416 primitive PtrFrameBuffer;
428 ---Purpose: Contains some static functions to strips treatment
430 deferred class ArrayOfPrimitives;
431 ---Purpose: Contains basic methods for array allocation and filling
434 ---Purpose: Contains points array definition
436 class ArrayOfPolylines;
437 ---Purpose: Contains polylines array definition
439 class ArrayOfSegments;
440 ---Purpose: Contains segments array definition
442 class ArrayOfPolygons;
443 ---Purpose: Contains polygons array definition
445 class ArrayOfTriangles;
446 ---Purpose: Contains triangles array definition
448 class ArrayOfTriangleStrips;
449 ---Purpose: Contains triangles strip array definition
451 class ArrayOfTriangleFans;
452 ---Purpose: Contains triangles fan array definition
454 class ArrayOfQuadrangles;
455 ---Purpose: Contains quatrangles array definition
457 class ArrayOfQuadrangleStrips;
458 ---Purpose: Contains quadrangles strip array definition
461 ---Purpose: Grouping line attributes
464 class AspectFillArea3d;
465 ---Purpose: Grouping face attributes
468 class AspectMarker3d;
469 ---Purpose: Grouping marker attributes
473 ---Purpose: Grouping text attributes.
477 ---Purpose: For grouping together primitives in a structure
480 class MaterialAspect;
481 ---Purpose: Aspect attributes of a 3d face.
485 ---Purpose: Graphic object.
488 deferred class GraphicDriver;
489 ---Purpose: Defines a graphic driver for 3d interface
491 deferred class StructureManager;
492 ---Purpose: Visualiser with which the graphic objects are associated.
495 deferred class DataStructureManager;
496 ---Purpose: Visualiser with which the graphic objects are associated.
499 deferred class Plotter;
500 ---Purpose: Defines the minimal plotter.
501 ---Category: The classes
504 ---Purpose: 3d vector
508 ---Purpose: 3d vertex
511 ---------------------
512 -- Category: Pointers
513 ---------------------
515 pointer StructPtr to Structure from Graphic3d;
516 ---Category: Pointers
518 ---------------------------------
519 -- Category: Instantiated classes
520 ---------------------------------
522 class ListOfPArray instantiates
523 List from TCollection (ArrayOfPrimitives from Graphic3d);
524 ---Category: Instantiated classes
526 class SequenceOfAddress instantiates
527 Sequence from TCollection
528 (Address from Standard);
529 ---Category: Instantiated classes
531 class SetOfGroup instantiates
532 Set from TCollection (Group from Graphic3d);
533 ---Category: Instantiated classes
535 class HSetOfGroup instantiates
536 HSet from TCollection
537 (Group from Graphic3d, SetOfGroup);
538 ---Category: Instantiated classes
540 class SequenceOfGroup instantiates
541 Sequence from TCollection (Group from Graphic3d);
543 ---Category: Instantiated classes
545 class HSequenceOfGroup instantiates
546 HSequence from TCollection
547 (Group from Graphic3d, SequenceOfGroup from Graphic3d);
548 ---Category: Instantiated classes
550 class MapOfStructure instantiates
551 Map from TCollection (Structure from Graphic3d,MapTransientHasher from TColStd);
554 ---Category: Instantiated classes
556 class SequenceOfStructure instantiates
557 Sequence from TCollection
558 (Structure from Graphic3d);
559 ---Category: Instantiated classes
561 class HSequenceOfStructure instantiates
562 HSequence from TCollection
563 (Structure from Graphic3d, SequenceOfStructure from Graphic3d);
564 ---Category: Instantiated classes
566 class Array1OfVector instantiates
567 Array1 from TCollection (Vector from Graphic3d);
568 ---Category: Instantiated classes
570 class Array1OfVertex instantiates
571 Array1 from TCollection (Vertex from Graphic3d);
572 ---Category: Instantiated classes
574 class Array2OfVertex instantiates
575 Array2 from TCollection (Vertex from Graphic3d);
576 ---Category: Instantiated classes
578 class ListOfShortReal instantiates
579 List from TCollection (ShortReal from Standard);
580 ---Category: Instantiated classes
582 --ABD Integration support of system fonts (using FTGL and FreeType)
583 imported NListOfHAsciiString;
584 ---Category: Instantiated classes
586 imported ShaderProgram_Handle;
587 ---Category: Instantiated classes
589 imported SequenceOfHClipPlane;
590 ---Category: Instantiated classes
591 -- Sequence of handles on clip planes
593 deferred class TextureRoot from Graphic3d;
594 deferred class TextureMap from Graphic3d;
595 deferred class Texture1D from Graphic3d;
596 deferred class Texture2D from Graphic3d;
598 class TextureParams from Graphic3d;
599 class TextureEnv from Graphic3d;
600 class Texture1Dmanual from Graphic3d;
601 class Texture1Dsegment from Graphic3d;
602 class Texture2Dmanual from Graphic3d;
603 class Texture2Dplane from Graphic3d;
606 enumeration ExportFormat is
619 enumeration SortType is
621 ST_Simple, -- sorting by depth of center point of primitive(fast)
622 ST_BSP_Tree -- sorting by BSPTree (slow, but fine result )
626 ----------------------------
627 -- Category: Package methods
628 ----------------------------
630 InitGraphicDriver (theDisplayConnection: DisplayConnection_Handle from Aspect)
631 returns GraphicDriver from Graphic3d
632 raises DriverDefinitionError from Aspect;
633 ---Purpose: Initialize graphic driver and returns Handle to it.