7fd59977 |
1 | -- File : MeshVS_ElementalColorPrsBuilder.cdl |
2 | -- Created : 12 November 2003 |
3 | -- Author : Alexander SOLOVYOV |
4 | ---Copyright: Open CASCADE 2003 |
5 | |
6 | class ElementalColorPrsBuilder from MeshVS inherits PrsBuilder from MeshVS |
7 | |
8 | ---Purpose: This class provides methods to create presentation of elements with |
9 | -- assigned colors. The class contains two color maps: map of same colors for front |
10 | -- and back side of face and map of different ones, |
11 | |
12 | uses |
13 | Presentation from Prs3d, |
14 | |
15 | Boolean from Standard, |
16 | Integer from Standard, |
17 | |
18 | Mesh from MeshVS, |
19 | MeshPtr from MeshVS, |
20 | DisplayModeFlags from MeshVS, |
21 | DataSource from MeshVS, |
22 | DataMapOfIntegerColor from MeshVS, |
23 | DataMapOfIntegerTwoColors from MeshVS, |
24 | TwoColors from MeshVS, |
25 | BuilderPriority from MeshVS, |
26 | Color from Quantity, |
27 | PackedMapOfInteger from TColStd |
28 | |
29 | is |
30 | |
31 | Create ( Parent : Mesh from MeshVS; |
32 | Flags : DisplayModeFlags from MeshVS = MeshVS_DMF_ElementalColorDataPrs; |
33 | DS : DataSource from MeshVS = 0; |
34 | Id : Integer = -1; |
35 | Priority : BuilderPriority from MeshVS = MeshVS_BP_ElemColor ) |
36 | returns mutable ElementalColorPrsBuilder from MeshVS; |
37 | ---Purpose: Constructor |
38 | |
39 | Build ( me; Prs : Presentation from Prs3d; |
40 | IDs : PackedMapOfInteger; |
41 | IDsToExclude : in out PackedMapOfInteger; |
42 | IsElement : Boolean; |
43 | DisplayMode : Integer ) is virtual; |
44 | ---Purpose: Builds presentation of elements with assigned colors. |
45 | |
46 | GetColors1 ( me ) returns DataMapOfIntegerColor from MeshVS; |
47 | ---C++: return const & |
48 | ---Purpose: Returns map of colors same for front and back side of face. |
49 | |
50 | SetColors1 ( me : mutable; |
51 | Map : DataMapOfIntegerColor from MeshVS ); |
52 | ---Purpose: Sets map of colors same for front and back side of face. |
53 | |
54 | HasColors1 ( me ) returns Boolean; |
55 | ---Purpose: Returns true, if map of colors isn't empty |
56 | |
57 | GetColor1 ( me; ID : Integer; |
58 | theColor : out Color from Quantity ) returns Boolean; |
59 | ---Purpose: Returns color assigned with element number ID |
60 | |
61 | SetColor1 ( me : mutable; |
62 | ID : Integer; |
63 | theColor : Color from Quantity ); |
64 | ---Purpose: Sets color assigned with element number ID |
65 | |
66 | GetColors2 ( me ) returns DataMapOfIntegerTwoColors from MeshVS; |
67 | ---C++: return const & |
68 | ---Purpose: Returns map of different colors for front and back side of face |
69 | |
70 | SetColors2 ( me : mutable; Map : DataMapOfIntegerTwoColors from MeshVS ); |
71 | ---Purpose: Sets map of different colors for front and back side of face |
72 | |
73 | HasColors2 ( me ) returns Boolean; |
74 | ---Purpose: Returns true, if map isn't empty |
75 | |
76 | GetColor2 ( me; ID : Integer; |
77 | theColor : out TwoColors from MeshVS ) returns Boolean; |
78 | ---Purpose: Returns colors assigned with element number ID |
79 | |
80 | GetColor2 ( me; ID : Integer; |
81 | theColor1 : out Color from Quantity; |
82 | theColor2 : out Color from Quantity ) returns Boolean; |
83 | ---Purpose: Returns colors assigned with element number ID |
84 | -- theColor1 is the front element color |
85 | -- theColor2 is the back element color |
86 | |
87 | SetColor2 ( me : mutable; |
88 | ID : Integer; |
89 | theTwoColors : TwoColors from MeshVS ); |
90 | ---Purpose: Sets colors assigned with element number ID |
91 | |
92 | SetColor2 ( me : mutable; |
93 | ID : Integer; |
94 | theColor1 : Color from Quantity; |
95 | theColor2 : Color from Quantity ); |
96 | ---Purpose: Sets color assigned with element number ID |
97 | -- theColor1 is the front element color |
98 | -- theColor2 is the back element color |
99 | |
100 | fields |
101 | myElemColorMap1 : DataMapOfIntegerColor from MeshVS; |
102 | myElemColorMap2 : DataMapOfIntegerTwoColors from MeshVS; |
103 | |
104 | end ElementalColorPrsBuilder; |