blob: d6f6508d73d0080c1ab3807bca88f2a5ee6e3896 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
|
-- File: VrmlAPI_Writer.cdl
-- Created: Tue Jun 20 18:00:44 2000
-- Author: Sergey MOZOKHIN
-- <smh@russox.nnov.matra-dtv.fr>
---Copyright: Matra Datavision 2000
class Writer from VrmlAPI
---Purpose: Creates and writes VRML files from Open
-- CASCADE shapes. A VRML file can be written to
-- an existing VRML file or to a new one.
uses
Shape from TopoDS,
Drawer from VrmlConverter,
Projector from VrmlConverter,
Material from Vrml,
Length from Quantity,
HArray1OfColor from Quantity,
RepresentationOfShape from VrmlAPI
is
Create returns Writer from VrmlAPI;
---Purpose: Creates a writer object with default parameters.
ResetToDefaults(me : in out);
---Purpose: Resets all parameters (representation, deflection)
-- to their default values..
Drawer(me) returns Drawer from VrmlConverter;
---Purpose: Returns drawer object
SetDeflection(me : in out; aDef : Real from Standard);
---Purpose: Sets the deflection aDef of
-- the mesh algorithm which is used to compute the shaded
-- representation of the translated shape. The default
-- value is -1. When the deflection value is less than
-- 0, the deflection is calculated from the relative
-- size of the shaped.
SetRepresentation(me : in out; aRep : RepresentationOfShape from VrmlAPI);
---Purpose: Sets the representation of the
-- shape aRep which is written to the VRML file. The three options are :
-- - shaded
-- - wireframe
-- - both shaded and wireframe (default)
-- defined through the VrmlAPI_RepresentationOfShape enumeration.
SetTransparencyToMaterial(me : in out; aMaterial : in out Material from Vrml;
aTransparency : Real from Standard);
---Purpose: Set transparency to given material
SetShininessToMaterial(me : in out; aMaterial : in out Material from Vrml;
aShininess : Real from Standard);
SetAmbientColorToMaterial(me : in out ; aMaterial : in out Material from Vrml;
Color : HArray1OfColor from Quantity);
SetDiffuseColorToMaterial(me : in out ; aMaterial : in out Material from Vrml;
Color : HArray1OfColor from Quantity);
SetSpecularColorToMaterial(me : in out; aMaterial : in out Material from Vrml;
Color : HArray1OfColor from Quantity);
SetEmissiveColorToMaterial(me : in out ; aMaterial : in out Material from Vrml;
Color : HArray1OfColor from Quantity);
----------------- Returns fields of class --------------------------------------
GetRepresentation(me) returns RepresentationOfShape from VrmlAPI;
---Purpose: Returns the representation of the shape which is
-- written to the VRML file. Types of representation are set through the
-- VrmlAPI_RepresentationOfShape enumeration.
GetFrontMaterial(me) returns Material from Vrml;
GetPointsMaterial(me) returns Material from Vrml;
GetUisoMaterial(me) returns Material from Vrml;
GetVisoMaterial(me) returns Material from Vrml;
GetLineMaterial(me) returns Material from Vrml;
GetWireMaterial(me) returns Material from Vrml;
GetFreeBoundsMaterial(me) returns Material from Vrml;
GetUnfreeBoundsMaterial(me) returns Material from Vrml;
Write(me; aShape : Shape from TopoDS; aFile : CString from Standard);
---Purpose: Converts the shape aShape to
-- VRML format and writes it to the file identified by aFile.
fields
myRepresentation : RepresentationOfShape from VrmlAPI;
myDrawer : Drawer from VrmlConverter;
myDeflection : Real from Standard;
myPerespectiveCamera : Projector from VrmlConverter;
myOrthographicCamera : Projector from VrmlConverter;
myTransparency : Real;
myShininess : Real;
myFrontMaterial : Material from Vrml;
myPointsMaterial : Material from Vrml;
myUisoMaterial : Material from Vrml;
myVisoMaterial : Material from Vrml;
myLineMaterial : Material from Vrml;
myWireMaterial : Material from Vrml;
myFreeBoundsMaterial : Material from Vrml;
myUnfreeBoundsMaterial : Material from Vrml;
--Projection Vector
DX : Length from Quantity;
DY : Length from Quantity;
DZ : Length from Quantity;
--High Point Direction
XUp : Length from Quantity;
YUp : Length from Quantity;
ZUp : Length from Quantity;
--Focus
Focus : Length from Quantity;
end Writer;
|