BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
BDSColourWheel.cc
1/*
2Beam Delivery Simulation (BDSIM) Copyright (C) BDSIM Collaboration, 2001 - 2026.
3
4This file is part of BDSIM.
5
6BDSIM is free software: you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published
8by the Free Software Foundation version 3 of the License.
9
10BDSIM is distributed in the hope that it will be useful, but
11WITHOUT ANY WARRANTY; without even the implied warranty of
12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13GNU General Public License for more details.
14
15You should have received a copy of the GNU General Public License
16along with BDSIM. If not, see <http://www.gnu.org/licenses/>.
17*/
18#include "BDSColourWheel.hh"
19
20#include "G4Colour.hh"
21
22BDSColourWheel::BDSColourWheel()
23{
24 palette.push_back(G4Colour(1.0, 0.0, 0.0, 0.4));
25 palette.push_back(G4Colour(0.0, 1.0, 0.0, 0.4));
26 palette.push_back(G4Colour(0.0, 0.0, 1.0, 0.4));
27 Reset();
28}
29
30BDSColourWheel::~BDSColourWheel()
31{;}
32
34{
35 ++colour_it;
36 if(colour_it == palette.end())
37 {Reset();}
38}
39
41{
42 colour_it = palette.begin();
43}
44
46{
47 return (*colour_it);
48}
void Reset()
Start sequence again.
void Spin()
Iterate colour choice from RGB.
G4Colour Colour()
Return current colour.