47 if(value > 1.) {value=1.;}
48 if(value < 0.) {value=0.;}
55 } colormap[NCOLOR] = {{0.0, {1., 1., 1., 1.}},
56 {0.2, {0., 0., 1., 1.}},
57 {0.4, {0., 1., 1., 1.}},
58 {0.6, {0., 1., 0., 1.}},
59 {0.8, {1., 1., 0., 1.}},
60 {1.0, {1., 0., 0., 1.}}};
63 G4int during[2] = {0, 0};
64 for(
int i = 1; i < NCOLOR; i++) {
65 if(colormap[i].val >= value) {
73 G4double a = std::fabs(value - colormap[during[0]].val);
74 G4double b = std::fabs(value - colormap[during[1]].val);
75 for(
int i = 0; i < 4; i++) {
76 color[i] = (b*colormap[during[0]].rgb[i] + a*colormap[during[1]].rgb[i])
77 /(colormap[during[1]].val - colormap[during[0]].val);
virtual void GetMapColor(G4double val, G4double color[4])
virtual ~G4DefaultLinearColorMap()
G4DefaultLinearColorMap(G4String mName)