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
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.
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.
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.
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.
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.
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.
77 ---Category: Classes of VRML field types.
78 -- Qualifies all types of VRML fields.
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
105 -- Enumeration for field representating a number of components
106 -- in the image per pixel for a SFImage type
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
113 -- A two-component image puts the intensity in the first (hight) byte
114 -- and the transparency in the second (low) byte
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.
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.
123 enumeration SFImageNumber
133 ---Category: Classes of VRML nodes specifying geometry shapes.
134 ---Purpose: qualifies VRML geometry shapes.
137 -- a SFBitMask type for Parts field of a Cone node
138 enumeration ConeParts
140 ConeSIDES, -- The conical part
141 ConeBOTTOM, -- The bottom circular face
147 -- a SFEnum VRML type for Justification field of a AsciiText node
148 enumeration AsciiTextJustification
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
154 end AsciiTextJustification;
157 -- a SFBitMask type for Parts field of a Cylinder node
158 enumeration CylinderParts
160 CylinderSIDES, -- The tubular part
161 CylinderTOP, -- The top circular face
162 CylinderBOTTOM, -- The bottom circular face
163 CylinderALL -- All parts
171 class IndexedFaceSet;
172 class IndexedLineSet;
177 ---Category: Classes of VRML nodes specifying properties of geometry
178 --- and its appearance.
179 --- Qualifies properties of geometry and its appearance.
183 -- a SFBitMask type for Family field of a FontStyle node
184 enumeration FontStyleFamily
186 SERIF, -- Serif style (such as TimesRoman)
187 SANS, -- Sans-serif style (such as Helvetica)
188 TYPEWRITER -- Fixed pitch style (such as Courier)
193 -- a SFEnum VRML type for Style field of a FontStyle node
194 enumeration FontStyleStyle
197 NONE, -- No modifications to family
198 BOLD, -- Embolden family
199 ITALIC -- Italicize or slant family
204 -- a SFEnum VRML type for Value field of a MaterialBinding
205 -- and NormalBinding nodes
206 enumeration MaterialBindingAndNormalBinding
217 end MaterialBindingAndNormalBinding;
220 -- a SFEnum VRML type for wrapS and wrapT fields of a Texture2 node
221 enumeration Texture2Wrap --Texture wrap type
223 REPEAT, -- Repeats texture outside 0-1 texture coordinate range
224 CLAMP -- Clamps texture coordinates to lie within 0-1 range
228 -- a SFEnum VRML type for VertexOrdering field of a ShapeHints node
229 enumeration VertexOrdering
238 -- a SFEnum VRML type for ShapeType field of a ShapeHints node
239 enumeration ShapeType
246 -- a SFEnum VRML type for FaceType field of a ShapeHints node
259 class MaterialBinding;
263 class Texture2Transform;
264 class TextureCoordinate2;
269 ---Category: Classes of VRML nodes specifying matrix and transform
271 --- Qualifies matrix and transform properties.
273 class MatrixTransform;
280 ---Category: Classes of VRML nodes specifying properties of cameras
282 --- Qualifies properties of cameras and lights.
284 class OrthographicCamera;
285 class PerspectiveCamera;
286 class DirectionalLight;
291 ---Category: Classes of VRML nodes specifying group properties.
292 --- Qualifies group properties.
296 -- a SFEnum VRML type for RenderCulling field of a Separator node-
297 enumeration SeparatorRenderCulling -- Possible values for culling
301 AUTO -- Decide based on some heuristic
302 end SeparatorRenderCulling;
305 -- a SFEnum VRML type for Map field of a WWWAnchor node
306 enumeration WWWAnchorMap
308 MAP_NONE, -- Leave URL name alone
309 POINT -- Add object coords to URL name
317 class TransformSeparator;
323 ---Category: Methods to write commentaries in anOStream (VRML file).
325 ---Purpose: Writes a header in anOStream (VRML file).
327 VrmlHeaderWriter ( anOStream: in out OStream from Standard )
328 returns OStream from Standard;
331 ---Purpose: Writes one line of commentary in anOStream (VRML file).
333 CommentWriter ( aComment : CString from Standard;
334 anOStream : in out OStream from Standard )
335 returns OStream from Standard;