1 -- Created on: 1993-04-26
2 -- Created by: Jean-Louis Frenkel
3 -- Copyright (c) 1993-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
6 -- This file is part of Open CASCADE Technology software library.
8 -- This library is free software; you can redistribute it and/or modify it under
9 -- the terms of the GNU Lesser General Public License version 2.1 as published
10 -- by the Free Software Foundation, with special exception defined in the file
11 -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 -- distribution for complete text of the license and disclaimer of any warranty.
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
17 -- GG : GER61351 17/11/1999 Change SetColor() with a compatible Quantity_Color instead
18 -- the restricted NameOfColor.
19 -- Parameters the color model rule (not especially the front & back side)
20 -- Add the SetTransparency() method.
21 -- Add the Color(),Material() and Transparency() methods
24 class ShadingAspect from Prs3d inherits BasicAspect from Prs3d
25 ---Purpose: A framework to define the display of shading.
26 -- The attributes which make up this definition include:
32 TypeOfFacingModel from Aspect,
33 AspectFillArea3d from Graphic3d,
34 NameOfColor from Quantity,
36 NameOfMaterial from Graphic3d,
37 --NameOfMaterialPhysic from Graphic3d,
38 MaterialAspect from Graphic3d,
39 TypeOfLine from Aspect
43 ---Purpose: Constructs an empty framework to display shading.
44 returns ShadingAspect from Prs3d;
46 SetColor (me: mutable; aColor: Color from Quantity;
47 aModel: TypeOfFacingModel from Aspect = Aspect_TOFM_BOTH_SIDE)
49 --- Purpose: Change the polygons interior color and material ambient color.
51 SetColor (me: mutable; aColor: NameOfColor from Quantity;
52 aModel: TypeOfFacingModel from Aspect = Aspect_TOFM_BOTH_SIDE)
54 --- Purpose: Change the polygons interior color and material ambient color.
56 SetMaterial(me: mutable; aMaterial: MaterialAspect from Graphic3d;
57 aModel: TypeOfFacingModel from Aspect = Aspect_TOFM_BOTH_SIDE)
59 --- Purpose: Change the polygons material aspect.
61 SetMaterial(me: mutable; aMaterial: NameOfMaterial from Graphic3d;
62 aModel: TypeOfFacingModel from Aspect = Aspect_TOFM_BOTH_SIDE)
65 SetTransparency(me: mutable; aValue: Real from Standard;
66 aModel: TypeOfFacingModel from Aspect = Aspect_TOFM_BOTH_SIDE)
68 --- Purpose: Change the polygons transparency value.
69 -- Warning : aValue must be in the range 0,1. 0 is the default (NO transparent)
71 SetAspect(me:mutable; Asp : AspectFillArea3d from Graphic3d);
72 --- Purpose: Change the polygons aspect properties.
74 Color (me; aModel: TypeOfFacingModel from Aspect = Aspect_TOFM_FRONT_SIDE)
75 returns Color from Quantity is static;
76 --- Purpose: Returns the polygons color.
77 ---C++: return const &
79 Material (me; aModel: TypeOfFacingModel from Aspect = Aspect_TOFM_FRONT_SIDE)
80 returns MaterialAspect from Graphic3d is static;
81 --- Purpose: Returns the polygons material aspect.
82 ---C++: return const &
84 Transparency (me; aModel: TypeOfFacingModel from Aspect = Aspect_TOFM_FRONT_SIDE)
85 returns Real from Standard is static;
86 --- Purpose: Returns the polygons transparency value.
88 Aspect (me) returns AspectFillArea3d from Graphic3d;
89 --- Purpose: Returns the polygons aspect properties.
93 myAspect: AspectFillArea3d from Graphic3d;
95 end ShadingAspect from Prs3d;