model_lightindicator.cc
Go to the documentation of this file.
1 #include "stage.hh"
2 
3 using namespace Stg;
4 
6  Model* parent,
7  const std::string& type ) :
8  Model( world, parent, type ),
9  m_IsOn(false)
10 {
11 }
12 
13 
15 {
16 }
17 
18 
20 {
21  m_IsOn = isOn;
22 }
23 
24 
26 {
27  if(m_IsOn)
28  {
30  }
31  else
32  {
33  const double scaleFactor = 0.8;
34 
35  Color keep = this->GetColor();
36  Color c = this->GetColor();
37  c.r *= scaleFactor;
38  c.g *= scaleFactor;
39  c.b *= scaleFactor;
40 
41  this->SetColor( c );
43 
44  this->SetColor( keep );
45  }
46 }
Model class
Definition: stage.hh:1742
virtual void DrawBlocks()
Definition: model_draw.cc:251
World class
Definition: stage.hh:814
The Stage library uses its own namespace.
Definition: canvas.hh:8
ModelLightIndicator(World *world, Model *parent, const std::string &type)
Color GetColor() const
Definition: stage.hh:2362
double r
Definition: stage.hh:200
double b
Definition: stage.hh:200
double g
Definition: stage.hh:200
void SetColor(Color col)
Definition: model.cc:1260


stage
Author(s): Richard Vaughan , Brian Gerkey , Reed Hedges , Andrew Howard , Toby Collett , Pooya Karimian , Jeremy Asher , Alex Couture-Beil , Geoff Biggs , Rich Mattes , Abbas Sadat
autogenerated on Mon Jun 10 2019 15:06:09