blob: 5281a02d45357bbfa508dbedaa62d74ae80835da (
plain)
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
|
#include <Aspect_ColorMap.ixx>
Aspect_ColorMap::Aspect_ColorMap( const Aspect_TypeOfColorMap type ) {
mytype = type;
}
Aspect_TypeOfColorMap Aspect_ColorMap::Type() const {
return mytype ;
}
Standard_Integer Aspect_ColorMap::Size() const {
return mydata.Length() ;
}
Standard_Integer Aspect_ColorMap::Index(const Standard_Integer anIndex) const {
if( anIndex < 1 || anIndex > Size() ) {
Aspect_BadAccess::Raise ("Undefined colormap Index");
}
Aspect_ColorMapEntry theEntry = mydata.Value(anIndex) ;
return theEntry.Index() ;
}
const Aspect_ColorMapEntry& Aspect_ColorMap::Entry (const Standard_Integer AnIndex) const {
return mydata.Value(AnIndex);
}
void Aspect_ColorMap::Dump () const {
Standard_Integer i ;
cout << "Colormap Dump-->\n" ;
for ( i = 1 ; i <= Size() ; i++ ) (Entry(i)).Dump() ;
cout << "<--End Colormap Dump\n" ;
}
|