0025770: Possible "invalid memory access"
[occt.git] / src / VrmlAPI / VrmlAPI_Writer.cdl
CommitLineData
b311480e 1-- Created on: 2000-06-20
2-- Created by: Sergey MOZOKHIN
973c2be1 3-- Copyright (c) 2000-2014 OPEN CASCADE SAS
b311480e 4--
973c2be1 5-- This file is part of Open CASCADE Technology software library.
b311480e 6--
d5f74e42 7-- This library is free software; you can redistribute it and/or modify it under
8-- the terms of the GNU Lesser General Public License version 2.1 as published
973c2be1 9-- by the Free Software Foundation, with special exception defined in the file
10-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11-- distribution for complete text of the license and disclaimer of any warranty.
b311480e 12--
973c2be1 13-- Alternatively, this file may be used under the terms of Open CASCADE
14-- commercial license or contractual agreement.
7fd59977 15
16class Writer from VrmlAPI
17
18 ---Purpose: Creates and writes VRML files from Open
19 -- CASCADE shapes. A VRML file can be written to
20 -- an existing VRML file or to a new one.
21
22uses
23 Shape from TopoDS,
24 Drawer from VrmlConverter,
25 Projector from VrmlConverter,
26 Material from Vrml,
27 Length from Quantity,
28 HArray1OfColor from Quantity,
29 RepresentationOfShape from VrmlAPI
30is
31 Create returns Writer from VrmlAPI;
32 ---Purpose: Creates a writer object with default parameters.
33 ResetToDefaults(me : in out);
34 ---Purpose: Resets all parameters (representation, deflection)
35 -- to their default values..
36
37 Drawer(me) returns Drawer from VrmlConverter;
38 ---Purpose: Returns drawer object
39
40 SetDeflection(me : in out; aDef : Real from Standard);
41 ---Purpose: Sets the deflection aDef of
42 -- the mesh algorithm which is used to compute the shaded
43 -- representation of the translated shape. The default
44 -- value is -1. When the deflection value is less than
45 -- 0, the deflection is calculated from the relative
46 -- size of the shaped.
47
48 SetRepresentation(me : in out; aRep : RepresentationOfShape from VrmlAPI);
49 ---Purpose: Sets the representation of the
50 -- shape aRep which is written to the VRML file. The three options are :
51 -- - shaded
52 -- - wireframe
53 -- - both shaded and wireframe (default)
54 -- defined through the VrmlAPI_RepresentationOfShape enumeration.
55
56 SetTransparencyToMaterial(me : in out; aMaterial : in out Material from Vrml;
57 aTransparency : Real from Standard);
58 ---Purpose: Set transparency to given material
59
60 SetShininessToMaterial(me : in out; aMaterial : in out Material from Vrml;
61 aShininess : Real from Standard);
62 SetAmbientColorToMaterial(me : in out ; aMaterial : in out Material from Vrml;
63 Color : HArray1OfColor from Quantity);
64 SetDiffuseColorToMaterial(me : in out ; aMaterial : in out Material from Vrml;
65 Color : HArray1OfColor from Quantity);
66 SetSpecularColorToMaterial(me : in out; aMaterial : in out Material from Vrml;
67 Color : HArray1OfColor from Quantity);
68 SetEmissiveColorToMaterial(me : in out ; aMaterial : in out Material from Vrml;
69 Color : HArray1OfColor from Quantity);
70 ----------------- Returns fields of class --------------------------------------
71 GetRepresentation(me) returns RepresentationOfShape from VrmlAPI;
72 ---Purpose: Returns the representation of the shape which is
73 -- written to the VRML file. Types of representation are set through the
74 -- VrmlAPI_RepresentationOfShape enumeration.
75 GetFrontMaterial(me) returns Material from Vrml;
76 GetPointsMaterial(me) returns Material from Vrml;
77 GetUisoMaterial(me) returns Material from Vrml;
78 GetVisoMaterial(me) returns Material from Vrml;
79 GetLineMaterial(me) returns Material from Vrml;
80 GetWireMaterial(me) returns Material from Vrml;
81 GetFreeBoundsMaterial(me) returns Material from Vrml;
82 GetUnfreeBoundsMaterial(me) returns Material from Vrml;
83
84 Write(me; aShape : Shape from TopoDS; aFile : CString from Standard);
85 ---Purpose: Converts the shape aShape to
86 -- VRML format and writes it to the file identified by aFile.
87
88fields
89 myRepresentation : RepresentationOfShape from VrmlAPI;
90 myDrawer : Drawer from VrmlConverter;
91 myDeflection : Real from Standard;
92 myPerespectiveCamera : Projector from VrmlConverter;
93 myOrthographicCamera : Projector from VrmlConverter;
94 myTransparency : Real;
95 myShininess : Real;
96 myFrontMaterial : Material from Vrml;
97 myPointsMaterial : Material from Vrml;
98 myUisoMaterial : Material from Vrml;
99 myVisoMaterial : Material from Vrml;
100 myLineMaterial : Material from Vrml;
101 myWireMaterial : Material from Vrml;
102 myFreeBoundsMaterial : Material from Vrml;
103 myUnfreeBoundsMaterial : Material from Vrml;
104 --Projection Vector
105 DX : Length from Quantity;
106 DY : Length from Quantity;
107 DZ : Length from Quantity;
108 --High Point Direction
109 XUp : Length from Quantity;
110 YUp : Length from Quantity;
111 ZUp : Length from Quantity;
112 --Focus
113 Focus : Length from Quantity;
114end Writer;