0024166: Unable to create file with "Save" menu of voxeldemo Qt sample
[occt.git] / src / VrmlAPI / VrmlAPI_Writer.cdl
1 -- Created on: 2000-06-20
2 -- Created by: Sergey MOZOKHIN
3 -- Copyright (c) 2000-2012 OPEN CASCADE SAS
4 --
5 -- The content of this file is subject to the Open CASCADE Technology Public
6 -- License Version 6.5 (the "License"). You may not use the content of this file
7 -- except in compliance with the License. Please obtain a copy of the License
8 -- at http://www.opencascade.org and read it completely before using this file.
9 --
10 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
11 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
12 --
13 -- The Original Code and all software distributed under the License is
14 -- distributed on an "AS IS" basis, without warranty of any kind, and the
15 -- Initial Developer hereby disclaims all such warranties, including without
16 -- limitation, any warranties of merchantability, fitness for a particular
17 -- purpose or non-infringement. Please see the License for the specific terms
18 -- and conditions governing the rights and limitations under the License.
19
20
21
22 class Writer from VrmlAPI 
23
24         ---Purpose: Creates and writes VRML files from Open
25         -- CASCADE shapes. A VRML file can be written to
26         -- an existing VRML file or to a new one.
27
28 uses
29     Shape from TopoDS,
30     Drawer from VrmlConverter,
31     Projector from VrmlConverter,
32     Material from Vrml,
33     Length from Quantity,
34     HArray1OfColor from Quantity,
35     RepresentationOfShape from VrmlAPI
36 is
37     Create returns Writer from VrmlAPI;
38         ---Purpose: Creates a writer object with default parameters.
39     ResetToDefaults(me : in out);
40         ---Purpose: Resets all parameters (representation, deflection)
41         -- to their default values..
42         
43     Drawer(me) returns  Drawer from VrmlConverter;  
44         ---Purpose: Returns drawer object
45     
46     SetDeflection(me : in out; aDef : Real from Standard);
47         ---Purpose: Sets the deflection aDef of
48         -- the mesh algorithm which is used to compute the shaded
49         -- representation of the translated shape. The default
50         -- value is -1. When the deflection value is less than
51         -- 0, the deflection is calculated from the relative
52         -- size of the shaped.
53     
54     SetRepresentation(me : in out; aRep : RepresentationOfShape from VrmlAPI);
55         ---Purpose: Sets the representation of the
56         -- shape aRep which is written to the VRML file. The three options are :
57         -- -      shaded
58         -- -      wireframe
59         -- -      both shaded and wireframe (default)
60         -- defined through the VrmlAPI_RepresentationOfShape enumeration.
61         
62     SetTransparencyToMaterial(me : in out; aMaterial : in out Material from Vrml;
63                              aTransparency : Real  from  Standard);
64         ---Purpose: Set transparency to given material          
65     
66     SetShininessToMaterial(me : in out; aMaterial : in out Material from Vrml;
67                               aShininess : Real  from  Standard);
68     SetAmbientColorToMaterial(me : in out ; aMaterial : in out Material from Vrml;
69                              Color : HArray1OfColor  from  Quantity);
70     SetDiffuseColorToMaterial(me : in out ; aMaterial : in out Material from Vrml;
71                              Color : HArray1OfColor  from  Quantity);
72     SetSpecularColorToMaterial(me : in out; aMaterial : in out Material from Vrml;
73                              Color : HArray1OfColor  from  Quantity);
74     SetEmissiveColorToMaterial(me : in out ; aMaterial : in out Material from Vrml;
75                              Color : HArray1OfColor  from  Quantity);
76     ----------------- Returns fields of class --------------------------------------                         
77     GetRepresentation(me) returns RepresentationOfShape from VrmlAPI;
78         ---Purpose: Returns the representation of the shape which is
79         -- written to the VRML file. Types of representation are set through the
80         -- VrmlAPI_RepresentationOfShape enumeration.
81     GetFrontMaterial(me) returns Material from Vrml;
82     GetPointsMaterial(me) returns Material from Vrml;
83     GetUisoMaterial(me) returns Material from Vrml;
84     GetVisoMaterial(me) returns Material from Vrml;
85     GetLineMaterial(me) returns Material from Vrml;
86     GetWireMaterial(me) returns Material from Vrml;
87     GetFreeBoundsMaterial(me) returns Material from Vrml;
88     GetUnfreeBoundsMaterial(me) returns Material from Vrml;
89     
90     Write(me; aShape : Shape from TopoDS; aFile : CString from Standard);
91         ---Purpose: Converts the shape aShape to
92         -- VRML format and writes it to the file identified by aFile.
93         
94 fields
95     myRepresentation : RepresentationOfShape from VrmlAPI;
96     myDrawer : Drawer from VrmlConverter;
97     myDeflection : Real from Standard;
98     myPerespectiveCamera : Projector from VrmlConverter;
99     myOrthographicCamera : Projector from VrmlConverter;
100     myTransparency : Real;
101     myShininess : Real;
102     myFrontMaterial : Material from Vrml;
103     myPointsMaterial : Material from Vrml;
104     myUisoMaterial : Material from Vrml;
105     myVisoMaterial : Material from Vrml;
106     myLineMaterial : Material from Vrml;
107     myWireMaterial : Material from Vrml;
108     myFreeBoundsMaterial : Material from Vrml;
109     myUnfreeBoundsMaterial : Material from Vrml;
110     --Projection Vector
111     DX : Length from Quantity;
112     DY : Length from Quantity;
113     DZ : Length from Quantity;
114     --High Point Direction
115     XUp : Length from Quantity;
116     YUp : Length from Quantity;
117     ZUp : Length from Quantity;
118     --Focus
119     Focus : Length from Quantity;
120 end Writer;