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
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.
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.
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.
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
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:
36 TypeOfFacingModel from Aspect,
37 AspectFillArea3d from Graphic3d,
38 NameOfColor from Quantity,
40 NameOfMaterial from Graphic3d,
41 --NameOfMaterialPhysic from Graphic3d,
42 MaterialAspect from Graphic3d,
43 TypeOfLine from Aspect
47 ---Purpose: Constructs an empty framework to display shading.
48 returns mutable ShadingAspect from Prs3d;
50 SetColor (me: mutable; aColor: Color from Quantity;
51 aModel: TypeOfFacingModel from Aspect = Aspect_TOFM_BOTH_SIDE)
53 --- Purpose: Change the polygons interior color and material ambient color.
55 SetColor (me: mutable; aColor: NameOfColor from Quantity;
56 aModel: TypeOfFacingModel from Aspect = Aspect_TOFM_BOTH_SIDE)
58 --- Purpose: Change the polygons interior color and material ambient color.
60 SetMaterial(me: mutable; aMaterial: MaterialAspect from Graphic3d;
61 aModel: TypeOfFacingModel from Aspect = Aspect_TOFM_BOTH_SIDE)
63 --- Purpose: Change the polygons material aspect.
65 SetMaterial(me: mutable; aMaterial: NameOfMaterial from Graphic3d;
66 aModel: TypeOfFacingModel from Aspect = Aspect_TOFM_BOTH_SIDE)
69 SetTransparency(me: mutable; aValue: Real from Standard;
70 aModel: TypeOfFacingModel from Aspect = Aspect_TOFM_BOTH_SIDE)
72 --- Purpose: Change the polygons transparency value.
73 -- Warning : aValue must be in the range 0,1. 0 is the default (NO transparent)
75 SetAspect(me:mutable; Asp : AspectFillArea3d from Graphic3d);
76 --- Purpose: Change the polygons aspect properties.
78 Color (me; aModel: TypeOfFacingModel from Aspect = Aspect_TOFM_FRONT_SIDE)
79 returns Color from Quantity is static;
80 --- Purpose: Returns the polygons color.
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.
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.
90 Aspect (me) returns AspectFillArea3d from Graphic3d;
91 --- Purpose: Returns the polygons aspect properties.
95 myAspect: AspectFillArea3d from Graphic3d;
97 end ShadingAspect from Prs3d;