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