0023948: Wrong intersection between a surface of revolution and a plane.
[occt.git] / src / Vrml / Vrml.cdl
1 -- Created on: 1996-12-23
2 -- Created by: Alexander BRIVIN and Dmitry TARASOV
3 -- Copyright (c) 1996-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
5 --
6 -- This file is part of Open CASCADE Technology software library.
7 --
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.
13 --
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
16
17 package Vrml 
18
19         ---Purpose: Vrml package  implements the specification  of the
20         --          VRML ( Virtual  Reality Modeling Language ).  VRML
21         --          is a standard  language for describing interactive
22         --          3-D objects and  worlds delivered across Internet.
23         --          Actual version of Vrml package have made for objects 
24         --          of VRML version 1.0.  
25         --          This package is used by VrmlConverter package.   
26         --          The developer should  already be familiar with VRML 
27         --          specification before using this package.
28
29         --                     Coordinate System
30
31         --  VRML uses a Cartesian, right-handed, 3-dimensional coordinate system.  
32         --  By default, objects are projected onto a 2-dimensional device by projecting  
33         --  them in the direction of the positive Z axis, with the positive X axis to  
34         --  the right and the positive Y axis up. A camera or modeling transformation  
35         --  may be used to alter this default  projection. 
36         --  The standard unit for lengths and distances specified is meters.  
37         --  The standard unit for angles is radians.
38
39         --                           Fields
40
41         --  There are two general classes of fields; fields that contain a single value  
42         --  (where a value may be a single number, a vector, or even an image), and fields that  
43         --  contain multiple values. Single-valued fields all have names that begin with "SF",  
44         --  multiple-valued fields have names that begin with "MF". Each field type defines  
45         --  the format for the values it writes.  
46
47         --                            Nodes
48
49         --  VRML defines several different classes of nodes. Most of the nodes can be classified  
50         --  into one of three categories;  shape, property or group. Shape nodes define the geometry  
51         --  in the world. Conceptually, they are the only nodes  that draw anything. Property nodes  
52         --  affect the way shapes are drawn. And grouping nodes gather other nodes together, allowing  
53         --  collections of nodes to be treated as a single object. Some group nodes also control  
54         --  whether or not their children are drawn. 
55         --  Nodes may contain zero or more fields. Each node type defines the type, name, and default  
56         --  value for each of its fields. The default value for the field is used if a value for  
57         --  the field is not specified in the VRML file. 
58
59         --                             Instancing
60
61         --  A node may be the child of more than one group. This is called "instancing" (using the same  
62         --  instance of a node multiple times, called "aliasing" or "multiple references" by other  
63         --  systems), and is accomplished by using the "USE" and  "DEF  keywords. 
64
65 uses
66
67     TColStd,
68     TColgp, 
69     MMgt,
70     Quantity, 
71     gp, 
72     TCollection
73
74 is
75     
76
77         ---Category: Classes of VRML field types.
78    -- Qualifies all types of VRML fields.
79
80
81    --  Notes: 
82    --         SFBitMask  VRML type == enumeration
83    --         SFBool     VRML type == Boolean                from  Standard 
84    --         SFColor    VRML type == Color                  from  Quantity
85    --         SFEnum     VRML type == enumeration 
86    --         SFFloat    VRML type == Real                   from  Standard 
87    --         SFLong     VRML type == Integer                from  Standard
88    --         SFMatrix   VRML type == Trsf                   from  gp
89    --         SFString   VRML type == AsciiSting             from  TCollection 
90    --         SFVec2f    VRML type == Vec2d                  from  gp
91    --         SFVec3f    VRML type == Vec                    from  gp
92    --         MFColor    VRML type == HArray1OfColor         from  Quantity
93    --         MFLong     VRML type == HArray1OfInteger       from  TColStd
94    --         MFFloat    VRML type == HArray1OfReal          from  TColStd  
95    --         MFString   VRML type == HArray1OfAsciiString   from  TColStd  
96    --         MFVec2f    VRML type == HArray1OfVec2d         from  TColgp
97    --         MFVec3f    VRML type == HArray1OfVec           from  TColgp
98
99
100     class SFImage;
101
102     class SFRotation;
103  
104
105     -- Enumeration for field representating a number of components 
106     -- in the image per pixel for a SFImage type
107     --  
108   
109     -- One-component  image  will  have  one-bite  hexadecimal  values 
110     -- presenting  the  intensity  of  the  image 
111     -- Ex:  0xFF  is full  intensity,  0x00 is  no  intensity   
112
113     -- A  two-component  image  puts  the  intensity  in  the  first (hight)  byte 
114     -- and  the  transparency  in  the  second  (low)  byte 
115
116     -- Pixels  in  a  three-component  image  have  the  red  component  in  the  first (hight)  byte, 
117     -- followed by  green  and  blue  components.  Ex:  0xFF0000  is  red.
118
119     -- Four-component  images  put  transparency  byte  after  red/green/blue 
120     -- Ex:  0x0000FF80  is  semi-transparent  blue.  A  value  of  1.0  is  completely transparent,  
121     -- 0.0  is  completely  opaque.
122     
123     enumeration SFImageNumber  
124       is          
125          NULL,
126          ONE,    
127          TWO,
128          THREE,
129          FOUR  
130     end SFImageNumber;
131
132
133         ---Category: Classes of VRML nodes specifying geometry shapes.
134         ---Purpose: qualifies VRML geometry shapes.
135
136
137     --  a SFBitMask type for Parts field of a Cone node
138     enumeration ConeParts 
139       is 
140             ConeSIDES,       -- The conical part
141             ConeBOTTOM,      -- The bottom circular face
142             ConeALL          -- All parts
143
144     end ConeParts;
145
146
147     --  a SFEnum VRML type for Justification field of a AsciiText node
148     enumeration AsciiTextJustification 
149       is  
150             LEFT,      -- Align left edge of text to origin
151             CENTER,    -- Align center of text to origin
152             RIGHT      -- Align right edge of text to origin  
153
154     end AsciiTextJustification;
155
156
157     --  a SFBitMask type for Parts field of a Cylinder node
158     enumeration CylinderParts 
159       is 
160             CylinderSIDES,   -- The tubular part
161             CylinderTOP,     -- The top circular face 
162             CylinderBOTTOM,  -- The bottom circular face
163             CylinderALL      -- All parts
164    
165     end CylinderParts;
166
167     class AsciiText;
168     class Cone;
169     class Cube;
170     class Cylinder;
171     class IndexedFaceSet;
172     class IndexedLineSet;
173     class PointSet;
174     class Sphere;
175
176
177         ---Category: Classes of VRML nodes specifying properties of geometry
178         ---          and its appearance. 
179         --- Qualifies properties of geometry and its appearance.
180
181
182
183     --  a SFBitMask type for Family field of a FontStyle node
184     enumeration FontStyleFamily 
185       is 
186             SERIF,           -- Serif style (such as TimesRoman)
187             SANS,            -- Sans-serif style (such as Helvetica)
188             TYPEWRITER       -- Fixed pitch style (such as Courier) 
189
190     end FontStyleFamily;
191
192
193     --  a SFEnum VRML type for Style field of a FontStyle node
194     enumeration FontStyleStyle 
195       is  
196
197             NONE,                       -- No modifications to family
198             BOLD,                       -- Embolden family
199             ITALIC                      -- Italicize or slant family
200  
201     end FontStyleStyle; 
202      
203     
204     --  a SFEnum VRML type for Value field of a MaterialBinding  
205     --        and NormalBinding  nodes
206     enumeration MaterialBindingAndNormalBinding 
207       is  
208             DEFAULT,
209             OVERALL,
210             PER_PART,
211             PER_PART_INDEXED,
212             PER_FACE,
213             PER_FACE_INDEXED,
214             PER_VERTEX,
215             PER_VERTEX_INDEXED
216
217     end MaterialBindingAndNormalBinding;
218
219
220     --  a SFEnum VRML type for wrapS and wrapT fields  of a Texture2 node
221     enumeration Texture2Wrap   --Texture wrap type
222      is 
223           REPEAT,     -- Repeats texture outside 0-1 texture coordinate range
224           CLAMP       -- Clamps texture coordinates  to lie within 0-1 range
225      
226     end Texture2Wrap;
227
228      --  a SFEnum VRML type for VertexOrdering field of a ShapeHints node
229     enumeration VertexOrdering
230       is 
231         UNKNOWN_ORDERING,
232         CLOCKWISE,
233         COUNTERCLOCKWISE
234
235     end  VertexOrdering;
236
237
238      --  a SFEnum VRML type for ShapeType field of a ShapeHints node
239     enumeration ShapeType
240       is 
241         UNKNOWN_SHAPE_TYPE,
242         SOLID
243
244     end  ShapeType;
245
246      --  a SFEnum VRML type for FaceType field of a ShapeHints node
247     enumeration FaceType
248       is 
249         UNKNOWN_FACE_TYPE,
250         CONVEX
251
252     end  FaceType;
253
254     class Coordinate3;
255     class FontStyle;
256     class Info;
257     class LOD;
258     class Material;
259     class MaterialBinding;
260     class Normal;
261     class NormalBinding;
262     class Texture2;
263     class Texture2Transform;
264     class TextureCoordinate2;
265     class ShapeHints;
266
267
268
269         ---Category: Classes of VRML nodes specifying matrix and transform
270         ---          properties. 
271         --- Qualifies matrix and transform properties.
272
273     class MatrixTransform;
274     class Rotation;
275     class Scale;
276     class Transform;
277     class Translation;
278
279
280         ---Category: Classes of VRML nodes specifying properties of cameras
281         ---          and lights. 
282         --- Qualifies properties of cameras and lights.
283
284     class OrthographicCamera;
285     class PerspectiveCamera;
286     class DirectionalLight;
287     class PointLight;
288     class SpotLight;
289
290         
291         ---Category: Classes of VRML nodes specifying group properties. 
292         --- Qualifies group properties.
293
294
295
296      --  a SFEnum VRML type for RenderCulling field of a Separator node-
297      enumeration SeparatorRenderCulling  -- Possible values for culling
298       is 
299         OFF,                    -- Never cull
300         ON,                     -- Always cull
301         AUTO                    -- Decide based on some heuristic
302      end  SeparatorRenderCulling;
303
304     
305       --  a SFEnum VRML type for Map field of a WWWAnchor node
306     enumeration  WWWAnchorMap
307       is 
308         MAP_NONE,         -- Leave URL name alone
309         POINT             -- Add object coords to URL name
310
311     end WWWAnchorMap;
312
313
314     class Group;
315     class Separator;
316     class Switch;
317     class TransformSeparator;
318     class WWWAnchor;
319     class WWWInline; 
320
321     class Instancing; 
322     
323         ---Category: Methods to write commentaries in anOStream (VRML file).
324
325         ---Purpose: Writes a header in anOStream (VRML file).
326         
327     VrmlHeaderWriter  ( anOStream: in out OStream from Standard )
328             returns OStream from Standard;
329     ---C++:  return  & 
330         
331         ---Purpose: Writes one line of commentary in  anOStream (VRML file).
332
333     CommentWriter  ( aComment   :        CString from Standard;   
334                      anOStream  : in out OStream from Standard )
335             returns OStream from Standard;
336     ---C++:  return  & 
337                         
338 end Vrml;