0024157: Parallelization of assembly part of BO
[occt.git] / src / Prs3d / Prs3d_ShadingAspect.cdl
1 -- Created on: 1993-04-26
2 -- Created by: Jean-Louis Frenkel
3 -- Copyright (c) 1993-1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
5 --
6 -- The content of this file is subject to the Open CASCADE Technology Public
7 -- License Version 6.5 (the "License"). You may not use the content of this file
8 -- except in compliance with the License. Please obtain a copy of the License
9 -- at http://www.opencascade.org and read it completely before using this file.
10 --
11 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
13 --
14 -- The Original Code and all software distributed under the License is
15 -- distributed on an "AS IS" basis, without warranty of any kind, and the
16 -- Initial Developer hereby disclaims all such warranties, including without
17 -- limitation, any warranties of merchantability, fitness for a particular
18 -- purpose or non-infringement. Please see the License for the specific terms
19 -- and conditions governing the rights and limitations under the License.
20
21 --   GG  : GER61351 17/11/1999 Change SetColor() with a compatible Quantity_Color instead
22 --                                     the restricted NameOfColor.
23 --                        Parameters the color model rule (not especially the front & back side)
24 --                        Add the SetTransparency() method.
25 --                        Add the Color(),Material() and Transparency() methods
26
27
28 class ShadingAspect from Prs3d inherits BasicAspect from Prs3d
29         ---Purpose: A framework to define the display of shading.
30         -- The attributes which make up this definition include:
31         -- -   fill aspect
32         -- -   color, and
33         -- -   material
34 uses 
35
36     TypeOfFacingModel      from Aspect,
37     AspectFillArea3d       from Graphic3d,
38     NameOfColor            from Quantity,
39     Color                          from Quantity,
40     NameOfMaterial   from Graphic3d,
41     --NameOfMaterialPhysic   from Graphic3d,
42     MaterialAspect         from Graphic3d,
43     TypeOfLine             from Aspect
44
45 is
46     Create
47         ---Purpose: Constructs an empty framework to display shading.
48     returns mutable ShadingAspect from Prs3d;
49     
50     SetColor (me: mutable; aColor: Color from Quantity;
51                                    aModel: TypeOfFacingModel from Aspect = Aspect_TOFM_BOTH_SIDE)
52     is static;
53         --- Purpose: Change the polygons interior color and material ambient color.
54
55     SetColor (me: mutable; aColor: NameOfColor from Quantity;
56                                    aModel: TypeOfFacingModel from Aspect = Aspect_TOFM_BOTH_SIDE)
57     is static;
58         --- Purpose: Change the polygons interior color and material ambient color.
59         
60     SetMaterial(me: mutable; aMaterial: MaterialAspect from Graphic3d;
61                                      aModel: TypeOfFacingModel from Aspect = Aspect_TOFM_BOTH_SIDE)
62     is static;
63         --- Purpose: Change the polygons material aspect.
64
65     SetMaterial(me: mutable; aMaterial: NameOfMaterial from Graphic3d;
66                                      aModel: TypeOfFacingModel from Aspect = Aspect_TOFM_BOTH_SIDE)
67     is static;
68
69     SetTransparency(me: mutable; aValue: Real from Standard;
70                                          aModel: TypeOfFacingModel from Aspect = Aspect_TOFM_BOTH_SIDE)
71     is static;
72         --- Purpose: Change the polygons transparency value.
73         --  Warning : aValue must be in the range 0,1. 0 is the default (NO transparent)
74
75     SetAspect(me:mutable; Asp : AspectFillArea3d from Graphic3d);
76         --- Purpose: Change the polygons aspect properties.
77
78     Color (me; aModel: TypeOfFacingModel from Aspect = Aspect_TOFM_FRONT_SIDE) 
79     returns Color from Quantity is static;
80         --- Purpose: Returns the polygons color.
81
82     Material (me; aModel: TypeOfFacingModel from Aspect = Aspect_TOFM_FRONT_SIDE) 
83     returns MaterialAspect from Graphic3d is static;
84         --- Purpose: Returns the polygons material aspect.
85
86     Transparency (me; aModel: TypeOfFacingModel from Aspect = Aspect_TOFM_FRONT_SIDE) 
87     returns Real from Standard is static;
88         --- Purpose: Returns the polygons transparency value.
89
90     Aspect (me) returns AspectFillArea3d from Graphic3d;
91         --- Purpose: Returns the polygons aspect properties.
92     
93 fields
94
95     myAspect: AspectFillArea3d from Graphic3d;
96
97 end ShadingAspect from Prs3d;