1 -- Created on: 1993-03-31
2 -- Created by: NW,JPB,CAL
3 -- Copyright (c) 1993-1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
6 -- The content of this file is subject to the Open CASCADE Technology Public
7 -- License Version 6.5 (the "License"). You may not use the content of this file
8 -- except in compliance with the License. Please obtain a copy of the License
9 -- at http://www.opencascade.org and read it completely before using this file.
11 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
14 -- The Original Code and all software distributed under the License is
15 -- distributed on an "AS IS" basis, without warranty of any kind, and the
16 -- Initial Developer hereby disclaims all such warranties, including without
17 -- limitation, any warranties of merchantability, fitness for a particular
18 -- purpose or non-infringement. Please see the License for the specific terms
19 -- and conditions governing the rights and limitations under the License.
21 -- Package : Graphic3d
22 -- Updated : Vendredi 2 Octobre 1992
23 -- Mercredi 31 Mars 1993
24 -- Mercredi 19 Janvier 1994
25 -- 1/08/97 ; PCT : Ajout texture mapping
26 -- 11/97 ; CAL : retrait de la dependance avec math
27 -- 11/97 ; CAL : retrait des DataStructure
28 -- 11/97 ; CAL : ajout pointer StructPtr
29 -- 04/98 ; FGU : ajout champs 'TOR_EMISSION'
30 -- 16-09-98; BGN: (S3819) Ajout TypeOfTriedronEcho,
31 -- TypeOfTriedronPosition.
32 -- 22-09-98; BGN: S3989 (anciennement S3819): report
33 -- dans Aspect des TypeOfTriedron*
34 -- 26-03-99 : FMN ; Compatibilite ascendante:
35 -- Ajout des anciens noms de materiaux.
36 -- 09-04-99 : GG ; Compatibilite ascendante:
37 -- NameOfPhysicalMaterial disparait
38 -- 23-11-99 : GG ; Add material name DEFAULT
39 -- 16-06-2000 : ATS : Study G005: class ArrayOfPrimitives
40 -- and derivated used for model presentation.
41 -- Required: enumeration TypeOfPrimitive;
42 -- imported PrimitiveArray; class PrimitiveList.
43 -- 17-12-01 : GG ; IMP171201 : Add material name UserDefined
44 -- Thanks to Stephane ROUTELOUS
45 -- 20-01-2009 : ABD Integration support of system fonts (using FTGL and FreeType)
46 -- Objective : Specifications definitives
52 ---Purpose: This package permits the creation of 3d graphic objects
54 -- These objects, called structures, are composed of groups of
55 -- primitives and attributes.
56 -- The group is the smallest editable element of a structure.
57 -- A structure can be displayed, erased, high-lighted.
58 -- A transformation can be applied to it.
59 -- Structures can be connected to form a tree of structures,
60 -- composed by transformations.
61 -- The visualiser permits global manipulation of structures.
63 ---Keywords: Structure, Group, Primitives, Line, Marker, Text,
64 -- FillAreas, Vertex, Vector, Material, Font, Shading
84 -----------------------
85 -- Category: Exceptions
86 -----------------------
88 exception AspectTextDefinitionError inherits OutOfRange;
89 ---Category: Exceptions
91 exception CycleError inherits DomainError;
92 ---Category: Exceptions
94 exception GroupDefinitionError inherits OutOfRange;
95 ---Category: Exceptions
97 exception InitialisationError inherits OutOfRange;
98 ---Category: Exceptions
100 exception MaterialDefinitionError inherits OutOfRange;
101 ---Category: Exceptions
103 exception PickIdDefinitionError inherits OutOfRange;
104 ---Category: Exceptions
106 exception PlotterDefinitionError inherits OutOfRange;
107 ---Category: The exceptions
109 exception PriorityDefinitionError inherits OutOfRange;
110 ---Category: Exceptions
112 exception StructureDefinitionError inherits OutOfRange;
113 ---Category: Exceptions
115 exception TransformError inherits OutOfRange;
116 ---Category: Exceptions
118 exception VectorError inherits OutOfRange;
119 ---Category: Exceptions
121 -------------------------
122 -- Category: Enumerations
123 -------------------------
125 enumeration NameOfMaterial is
126 NOM_BRASS, -- laiton (PHYSIC)
127 NOM_BRONZE, -- bronze (PHYSIC)
128 NOM_COPPER, -- cuivre (PHYSIC)
129 NOM_GOLD, -- or (PHYSIC)
131 NOM_PEWTER, -- etain (PHYSIC)
133 NOM_PLASTER, -- platre (GENERIC)
134 NOM_PLASTIC, -- plastic (GENERIC)
136 NOM_SILVER, -- argent (PHYSIC)
138 NOM_STEEL, -- acier (PHYSIC)
140 NOM_STONE, -- pierre (PHYSIC)
142 NOM_SHINY_PLASTIC, -- plastique brillant (GENERIC)
143 NOM_SATIN, -- satin (GENERIC)
144 NOM_METALIZED, -- metallise New (GENERIC)
145 NOM_NEON_GNC, -- neon New (GENERIC)
146 NOM_CHROME, -- chrome New (PHYSIC)
147 NOM_ALUMINIUM, -- aluminium New (PHYSIC)
148 NOM_OBSIDIAN, -- obsidian New (PHYSIC)
149 NOM_NEON_PHC, -- neon New (PHYSIC)
150 NOM_JADE, -- jade New (PHYSIC)
152 NOM_UserDefined -- owner material
154 ---Purpose: Types of aspect materials.
155 ---Category: Enumerations
157 enumeration TypeOfMaterial is MATERIAL_ASPECT, -- Materiel generique
158 MATERIAL_PHYSIC -- Materiel physique
160 ---Purpose: Types of materials specifies if a material can change color.
161 ---Category: Enumerations
163 enumeration NameOfTexture1D is NOT_1D_ELEVATION,
166 ---Purpose: Types of standard textures.
167 ---Category: Enumerations
170 enumeration NameOfTexture2D is NOT_2D_MATRA,
173 NOT_2D_BLUEWHITE_PAPER,
193 ---Purpose: Types of standard textures.
194 ---Category: Enumerations
197 enumeration NameOfTextureEnv is NOT_ENV_CLOUDS,
206 end NameOfTextureEnv;
207 ---Purpose: Types of standard textures.
208 ---Category: Enumerations
210 enumeration TypeOfTexture is TOT_1D,
213 ---Purpose: Type of the texture file format.
214 ---Category: Enumerations
216 enumeration TypeOfTextureMode is TOTM_OBJECT,
220 ---Purpose: Type of the texture projection.
221 ---Category: Enumerations
223 enumeration NameOfTexturePlane is NOTP_XY,
227 ---Purpose: Type of the texture projection plane for both S and T texture coordinate.
228 ---Category: Enumerations
230 enumeration TypeOfComposition is TOC_REPLACE,
232 end TypeOfComposition;
233 ---Purpose: To manage the transformation matrices of structures.
234 ---Category: Enumerations
236 enumeration TypeOfConnection is TOC_ANCESTOR,
238 end TypeOfConnection;
239 ---Purpose: To manage the connections between the structures.
240 ---Category: Enumerations
242 enumeration TypeOfPolygon is TOP_UNKNOWN,
247 ---Purpose: The type of polygon in a group in a structure.
248 ---Category: Enumerations
250 enumeration TypeOfPrimitive is TOP_UNDEFINED,
259 ---Purpose: The type of primitive in a group in a structure.
260 ---Category: Enumerations
262 enumeration TypeOfPrimitiveArray is TOPA_UNDEFINED,
270 TOPA_QUADRANGLESTRIPS,
272 end TypeOfPrimitiveArray;
273 ---Purpose: The type of primitive array in a group in a structure.
274 ---Category: Enumerations
276 enumeration TypeOfReflection is TOR_AMBIENT,
280 end TypeOfReflection;
281 ---Purpose: Nature of the reflection of a material.
282 ---Category: Enumerations
284 enumeration TypeOfStructure is TOS_WIREFRAME,
289 ---Purpose: Structural attribute indicating if it can be displayed
290 -- in wireframe, shadow mode, or both.
291 ---Category: Enumerations
293 enumeration TextPath is TP_UP,
298 ---Purpose: Direction in which text is displayed.
299 ---Category: Enumerations
301 enumeration HorizontalTextAlignment is HTA_LEFT,
304 end HorizontalTextAlignment;
305 ---Purpose: Defines the horizontal position of the text
306 -- relative to its anchor.
307 ---Category: Enumerations
309 enumeration VerticalTextAlignment is VTA_BOTTOM,
312 end VerticalTextAlignment;
313 ---Purpose: Defines the vertical position of the text
314 -- relative to its anchor.
315 ---Category: Enumerations
317 enumeration GroupAspect is ASPECT_LINE,
322 ---Purpose: Identifies primitives aspects defined per group.
323 -- - ASPECT_LINE: aspect for line primitives;
324 -- - ASPECT_TEXT: aspect for text primitives;
325 -- - ASPECT_MARKER: aspect for marker primitives;
326 -- - ASPECT_FILL_AREA: aspect for face primitives.
328 ---------------------------
329 -- Category: Imported types
330 ---------------------------
332 imported PrimitiveArray;
335 imported CBitFields20;
336 ---Purpose: Defines the C structure
337 ---Category: Imported types
339 imported CBitFields16;
340 ---Purpose: Defines the C structure
341 ---Category: Imported types
343 imported CBitFields8;
344 ---Purpose: Defines the C structure
345 ---Category: Imported types
347 imported CBitFields4;
348 ---Purpose: Defines the C structure
349 ---Category: Imported types
352 ---Purpose: Defines the C structure <agroup>
353 ---Category: Imported types
356 ---Purpose: Defines the C structure <astructure>
357 ---Category: Imported types
360 ---Purpose: Defines the C structure <alight>
361 ---Category: Imported types
364 ---Purpose: Defines the C structure <apick>
365 ---Category: Imported types
368 ---Purpose: Defines the C structure <aplane>
369 ---Category: Imported types
372 ---Purpose: Defines the C structure <abounds>
373 ---Category: Imported types
376 ---Purpose: Defines the C structure <auserdraw>
377 ---Category: Imported types
380 ---Purpose: Defines the C structure <aview>
381 ---Category: Imported types
383 imported CGraduatedTrihedron;
384 ---Purpose: Defines the C structure of a graduated trihedron.
385 ---Category: Imported types
387 imported CInitTexture;
390 -- ABD 29/10/04 Transform Persistence of Presentation( pan, zoom, rotate )
391 imported CTransPersStruct;
392 imported TransModeFlags;
393 -- ABD 29/10/04 Transform Persistence of Presentation( pan, zoom, rotate )
395 primitive PtrFrameBuffer;
402 ---Purpose: Contains some static functions to strips treatment
404 deferred class ArrayOfPrimitives;
405 ---Purpose: Contains basic methods for array allocation and filling
408 ---Purpose: Contains points array definition
410 class ArrayOfPolylines;
411 ---Purpose: Contains polylines array definition
413 class ArrayOfSegments;
414 ---Purpose: Contains segments array definition
416 class ArrayOfPolygons;
417 ---Purpose: Contains polygons array definition
419 class ArrayOfTriangles;
420 ---Purpose: Contains triangles array definition
422 class ArrayOfTriangleStrips;
423 ---Purpose: Contains triangles strip array definition
425 class ArrayOfTriangleFans;
426 ---Purpose: Contains triangles fan array definition
428 class ArrayOfQuadrangles;
429 ---Purpose: Contains quatrangles array definition
431 class ArrayOfQuadrangleStrips;
432 ---Purpose: Contains quadrangles strip array definition
435 ---Purpose: Grouping line attributes
438 class AspectFillArea3d;
439 ---Purpose: Grouping face attributes
442 class AspectMarker3d;
443 ---Purpose: Grouping marker attributes
447 ---Purpose: Grouping text attributes.
451 ---Purpose: For grouping together primitives in a structure
455 ---Purpose: Defines a physical graphic device allowing to
456 -- shares graphical ressources.
459 class WNTGraphicDevice;
460 ---Purpose: Defines a physical graphic device for Windows NT
463 class MaterialAspect;
464 ---Purpose: Aspect attributes of a 3d face.
468 ---Purpose: Graphic object.
471 deferred class GraphicDriver;
472 ---Purpose: Defines a graphic driver for 3d interface
474 deferred class StructureManager;
475 ---Purpose: Visualiser with which the graphic objects are associated.
478 deferred class DataStructureManager;
479 ---Purpose: Visualiser with which the graphic objects are associated.
482 deferred class Plotter;
483 ---Purpose: Defines the minimal plotter.
484 ---Category: The classes
487 ---Purpose: 3d vector
491 ---Purpose: 3d vertex
495 ---Purpose: 3d vertex with a normal vector
499 ---Purpose: 3d vertex with a normal vector and texture coordinate
503 ---Purpose: 3d vertex with a colour
507 ---Purpose: 3d vertex with a normal and a colour
510 ---------------------
511 -- Category: Pointers
512 ---------------------
514 pointer StructPtr to Structure from Graphic3d;
515 ---Category: Pointers
517 ---------------------------------
518 -- Category: Instantiated classes
519 ---------------------------------
521 class ListOfPArray instantiates
522 List from TCollection (ArrayOfPrimitives from Graphic3d);
523 ---Category: Instantiated classes
525 class SequenceOfAddress instantiates
526 Sequence from TCollection
527 (Address from Standard);
528 ---Category: Instantiated classes
530 class SetOfGroup instantiates
531 Set from TCollection (Group from Graphic3d);
532 ---Category: Instantiated classes
534 class HSetOfGroup instantiates
535 HSet from TCollection
536 (Group from Graphic3d, SetOfGroup);
537 ---Category: Instantiated classes
539 class SequenceOfGroup instantiates
540 Sequence from TCollection (Group from Graphic3d);
542 ---Category: Instantiated classes
544 class HSequenceOfGroup instantiates
545 HSequence from TCollection
546 (Group from Graphic3d, SequenceOfGroup from Graphic3d);
547 ---Category: Instantiated classes
549 class MapOfStructure instantiates
550 Map from TCollection (Structure from Graphic3d,MapTransientHasher from TColStd);
553 ---Category: Instantiated classes
555 class SequenceOfStructure instantiates
556 Sequence from TCollection
557 (Structure from Graphic3d);
558 ---Category: Instantiated classes
560 class HSequenceOfStructure instantiates
561 HSequence from TCollection
562 (Structure from Graphic3d, SequenceOfStructure from Graphic3d);
563 ---Category: Instantiated classes
565 class Array1OfVector instantiates
566 Array1 from TCollection (Vector from Graphic3d);
567 ---Category: Instantiated classes
569 class Array1OfVertex instantiates
570 Array1 from TCollection (Vertex from Graphic3d);
571 ---Category: Instantiated classes
573 class Array2OfVertex instantiates
574 Array2 from TCollection (Vertex from Graphic3d);
575 ---Category: Instantiated classes
577 class Array1OfVertexC instantiates
578 Array1 from TCollection (VertexC from Graphic3d);
579 ---Category: Instantiated classes
581 class Array2OfVertexC instantiates
582 Array2 from TCollection (VertexC from Graphic3d);
583 ---Category: Instantiated classes
585 class Array1OfVertexN instantiates
586 Array1 from TCollection (VertexN from Graphic3d);
587 ---Category: Instantiated classes
589 class Array2OfVertexN instantiates
590 Array2 from TCollection (VertexN from Graphic3d);
591 ---Category: Instantiated classes
593 class Array1OfVertexNT instantiates
594 Array1 from TCollection (VertexNT from Graphic3d);
595 ---Category: Instantiated classes
597 class Array2OfVertexNT instantiates
598 Array2 from TCollection (VertexNT from Graphic3d);
599 ---Category: Instantiated classes
601 class Array1OfVertexNC instantiates
602 Array1 from TCollection (VertexNC from Graphic3d);
603 ---Category: Instantiated classes
605 class Array2OfVertexNC instantiates
606 Array2 from TCollection (VertexNC from Graphic3d);
607 ---Category: Instantiated classes
609 class ListOfShortReal instantiates
610 List from TCollection (ShortReal from Standard);
611 ---Category: Instantiated classes
613 --ABD Integration support of system fonts (using FTGL and FreeType)
614 imported NListOfHAsciiString;
615 ---Category: Instantiated classes
618 deferred class TextureRoot from Graphic3d;
619 deferred class TextureMap from Graphic3d;
620 deferred class Texture1D from Graphic3d;
621 deferred class Texture2D from Graphic3d;
623 class TextureEnv from Graphic3d;
624 class Texture1Dmanual from Graphic3d;
625 class Texture1Dsegment from Graphic3d;
626 class Texture2Dmanual from Graphic3d;
627 class Texture2Dplane from Graphic3d;
630 enumeration ExportFormat is
643 enumeration SortType is
645 ST_Simple, -- sorting by depth of center point of primitive(fast)
646 ST_BSP_Tree -- sorting by BSPTree (slow, but fine result )