0025459: Visualization - AIS_ColoredShape::SetMaterial() should not reset custom...
[occt.git] / src / Prs3d / Prs3d_ShadingAspect.cdl
CommitLineData
b311480e 1-- Created on: 1993-04-26
2-- Created by: Jean-Louis Frenkel
3-- Copyright (c) 1993-1999 Matra Datavision
973c2be1 4-- Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 5--
973c2be1 6-- This file is part of Open CASCADE Technology software library.
b311480e 7--
d5f74e42 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
973c2be1 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.
b311480e 13--
973c2be1 14-- Alternatively, this file may be used under the terms of Open CASCADE
15-- commercial license or contractual agreement.
b311480e 16
7fd59977 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
7fd59977 22
23
24class 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:
27 -- - fill aspect
28 -- - color, and
29 -- - material
30uses
31
32 TypeOfFacingModel from Aspect,
33 AspectFillArea3d from Graphic3d,
34 NameOfColor from Quantity,
35 Color from Quantity,
36 NameOfMaterial from Graphic3d,
37 --NameOfMaterialPhysic from Graphic3d,
38 MaterialAspect from Graphic3d,
39 TypeOfLine from Aspect
40
41is
42 Create
43 ---Purpose: Constructs an empty framework to display shading.
6e33d3ce 44 returns ShadingAspect from Prs3d;
7fd59977 45
46 SetColor (me: mutable; aColor: Color from Quantity;
47 aModel: TypeOfFacingModel from Aspect = Aspect_TOFM_BOTH_SIDE)
48 is static;
49 --- Purpose: Change the polygons interior color and material ambient color.
50
51 SetColor (me: mutable; aColor: NameOfColor from Quantity;
52 aModel: TypeOfFacingModel from Aspect = Aspect_TOFM_BOTH_SIDE)
53 is static;
54 --- Purpose: Change the polygons interior color and material ambient color.
55
56 SetMaterial(me: mutable; aMaterial: MaterialAspect from Graphic3d;
57 aModel: TypeOfFacingModel from Aspect = Aspect_TOFM_BOTH_SIDE)
58 is static;
59 --- Purpose: Change the polygons material aspect.
60
61 SetMaterial(me: mutable; aMaterial: NameOfMaterial from Graphic3d;
62 aModel: TypeOfFacingModel from Aspect = Aspect_TOFM_BOTH_SIDE)
63 is static;
64
65 SetTransparency(me: mutable; aValue: Real from Standard;
66 aModel: TypeOfFacingModel from Aspect = Aspect_TOFM_BOTH_SIDE)
67 is static;
68 --- Purpose: Change the polygons transparency value.
69 -- Warning : aValue must be in the range 0,1. 0 is the default (NO transparent)
70
71 SetAspect(me:mutable; Asp : AspectFillArea3d from Graphic3d);
72 --- Purpose: Change the polygons aspect properties.
73
74 Color (me; aModel: TypeOfFacingModel from Aspect = Aspect_TOFM_FRONT_SIDE)
75 returns Color from Quantity is static;
76 --- Purpose: Returns the polygons color.
e0608a8d 77 ---C++: return const &
7fd59977 78
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.
e0608a8d 82 ---C++: return const &
7fd59977 83
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.
87
88 Aspect (me) returns AspectFillArea3d from Graphic3d;
89 --- Purpose: Returns the polygons aspect properties.
90
91fields
92
93 myAspect: AspectFillArea3d from Graphic3d;
94
95end ShadingAspect from Prs3d;