54 } colormap[NCOLOR] = { { 0.0, { 1., 1., 1., 1. } },
55 { 0.2, { 0., 0., 1., 1. } },
56 { 0.4, { 0., 1., 1., 1. } },
57 { 0.6, { 0., 1., 0., 1. } },
58 { 0.8, { 1., 1., 0., 1. } },
59 { 1.0, { 1., 0., 0., 1. } } };
62 G4int during[2] = { 0, 0 };
63 for(
int i = 1; i < NCOLOR; i++)
65 if(colormap[i].val >= value)
74 G4double a = std::fabs(value - colormap[during[0]].val);
75 G4double b = std::fabs(value - colormap[during[1]].val);
76 for(
int i = 0; i < 4; i++)
79 (b * colormap[during[0]].rgb[i] + a * colormap[during[1]].rgb[i]) /
80 (colormap[during[1]].val - colormap[during[0]].val);
void GetMapColor(G4double val, G4double color[4]) override