7fd59977 |
1 | -- File: Vrml_Cylinder.cdl |
2 | -- Created: Wed Dec 25 15:07:51 1996 |
3 | -- Author: Alexander BRIVIN |
4 | -- <brivin@minox.nizhny.matra-dtv.fr> |
5 | ---Copyright: Matra Datavision 1996 |
6 | |
7 | |
8 | class Cylinder from Vrml |
9 | |
10 | ---Purpose: defines a Cylinder node of VRML specifying geometry shapes. |
11 | -- This node represents a simple capped cylinder centred around the y-axis. |
12 | -- By default , the cylinder is centred at (0,0,0) |
13 | -- and has size of -1 to +1 in the all three dimensions. |
14 | -- The cylinder has three parts: |
15 | -- the sides, the top (y=+1) and the bottom (y=-1) |
16 | |
17 | uses |
18 | |
19 | CylinderParts from Vrml |
20 | |
21 | is |
22 | |
23 | Create ( aParts : CylinderParts from Vrml = Vrml_CylinderALL; |
24 | aRadius : Real from Standard = 1; |
25 | aHeight : Real from Standard = 2 ) |
26 | returns Cylinder from Vrml; |
27 | |
28 | SetParts ( me : in out; aParts : CylinderParts from Vrml ); |
29 | Parts ( me ) returns CylinderParts from Vrml; |
30 | |
31 | SetRadius ( me : in out; aRadius : Real from Standard ); |
32 | Radius ( me ) returns Real from Standard; |
33 | |
34 | SetHeight ( me : in out; aHeight : Real from Standard ); |
35 | Height ( me ) returns Real from Standard; |
36 | |
37 | Print ( me; anOStream: in out OStream from Standard) returns OStream from Standard; |
38 | ---C++: return & |
39 | |
40 | fields |
41 | |
42 | myParts : CylinderParts from Vrml; -- Visible parts of cylinder |
43 | myRadius : Real from Standard; -- Radius in x and z dimensions |
44 | myHeight : Real from Standard; -- Size in y dimension |
45 | |
46 | end Cylinder; |