36 typedef std::tuple<G4double, G4double, G4double, G4double> BDSColourKey;
50 G4bool normaliseTo255 =
true);
58 G4bool normaliseTo255 =
true);
Colour class that holds all colours used in BDSIM.
G4Colour * GetColour(G4double red, G4double green, G4double blue, G4double alpha=1)
Get a cached anonymous colour by values.
std::map< BDSColourKey, G4Colour * > anonymousColours
static BDSColours * Instance()
singleton pattern
void DefineColour(const G4String &name, G4double red, G4double green, G4double blue, G4double alpha=1, G4bool normaliseTo255=true)
Define a new colour.
BDSColours()
Private constructor as singleton.
std::map< G4int, G4String > magnetName
std::map< G4String, G4Colour * > colours
A map of the colour for each type or component by name.