7fd59977 |
1 | -- File: Prs3d_ShadingAspect.cdl |
2 | -- Created: Mon Apr 26 16:18:12 1993 |
3 | -- Author: Jean-Louis Frenkel |
4 | -- <jlf@phylox> |
5 | -- GG : GER61351 17/11/1999 Change SetColor() with a compatible Quantity_Color instead |
6 | -- the restricted NameOfColor. |
7 | -- Parameters the color model rule (not especially the front & back side) |
8 | -- Add the SetTransparency() method. |
9 | -- Add the Color(),Material() and Transparency() methods |
10 | ---Copyright: Matra Datavision 1993 |
11 | |
12 | |
13 | class ShadingAspect from Prs3d inherits BasicAspect from Prs3d |
14 | ---Purpose: A framework to define the display of shading. |
15 | -- The attributes which make up this definition include: |
16 | -- - fill aspect |
17 | -- - color, and |
18 | -- - material |
19 | uses |
20 | |
21 | TypeOfFacingModel from Aspect, |
22 | AspectFillArea3d from Graphic3d, |
23 | NameOfColor from Quantity, |
24 | Color from Quantity, |
25 | NameOfMaterial from Graphic3d, |
26 | --NameOfMaterialPhysic from Graphic3d, |
27 | MaterialAspect from Graphic3d, |
28 | TypeOfLine from Aspect |
29 | |
30 | is |
31 | Create |
32 | ---Purpose: Constructs an empty framework to display shading. |
33 | returns mutable ShadingAspect from Prs3d; |
34 | |
35 | SetColor (me: mutable; aColor: Color from Quantity; |
36 | aModel: TypeOfFacingModel from Aspect = Aspect_TOFM_BOTH_SIDE) |
37 | is static; |
38 | --- Purpose: Change the polygons interior color and material ambient color. |
39 | |
40 | SetColor (me: mutable; aColor: NameOfColor from Quantity; |
41 | aModel: TypeOfFacingModel from Aspect = Aspect_TOFM_BOTH_SIDE) |
42 | is static; |
43 | --- Purpose: Change the polygons interior color and material ambient color. |
44 | |
45 | SetMaterial(me: mutable; aMaterial: MaterialAspect from Graphic3d; |
46 | aModel: TypeOfFacingModel from Aspect = Aspect_TOFM_BOTH_SIDE) |
47 | is static; |
48 | --- Purpose: Change the polygons material aspect. |
49 | |
50 | SetMaterial(me: mutable; aMaterial: NameOfMaterial from Graphic3d; |
51 | aModel: TypeOfFacingModel from Aspect = Aspect_TOFM_BOTH_SIDE) |
52 | is static; |
53 | |
54 | SetTransparency(me: mutable; aValue: Real from Standard; |
55 | aModel: TypeOfFacingModel from Aspect = Aspect_TOFM_BOTH_SIDE) |
56 | is static; |
57 | --- Purpose: Change the polygons transparency value. |
58 | -- Warning : aValue must be in the range 0,1. 0 is the default (NO transparent) |
59 | |
60 | SetAspect(me:mutable; Asp : AspectFillArea3d from Graphic3d); |
61 | --- Purpose: Change the polygons aspect properties. |
62 | |
63 | Color (me; aModel: TypeOfFacingModel from Aspect = Aspect_TOFM_FRONT_SIDE) |
64 | returns Color from Quantity is static; |
65 | --- Purpose: Returns the polygons color. |
66 | |
67 | Material (me; aModel: TypeOfFacingModel from Aspect = Aspect_TOFM_FRONT_SIDE) |
68 | returns MaterialAspect from Graphic3d is static; |
69 | --- Purpose: Returns the polygons material aspect. |
70 | |
71 | Transparency (me; aModel: TypeOfFacingModel from Aspect = Aspect_TOFM_FRONT_SIDE) |
72 | returns Real from Standard is static; |
73 | --- Purpose: Returns the polygons transparency value. |
74 | |
75 | Aspect (me) returns AspectFillArea3d from Graphic3d; |
76 | --- Purpose: Returns the polygons aspect properties. |
77 | |
78 | fields |
79 | |
80 | myAspect: AspectFillArea3d from Graphic3d; |
81 | |
82 | end ShadingAspect from Prs3d; |