Planeshift
pseffectlight.h
Go to the documentation of this file.
1 /*
2 * Author: Andrew Robberts
3 *
4 * Copyright (C) 2008 Atomic Blue (info@planeshift.it, http://www.atomicblue.org)
5 *
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation (version 2 of the License)
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 *
18 */
19 
20 #ifndef PS_EFFECT_LIGHT_HEADER
21 #define PS_EFFECT_LIGHT_HEADER
22 
23 #include <csgeom/matrix3.h>
24 #include <csutil/cscolor.h>
25 #include <csutil/scf_implementation.h>
26 #include <iengine/movable.h>
27 #include <iengine/sector.h>
28 #include <iutil/virtclk.h>
29 
30 class csColor;
31 struct iEngine;
32 struct iLight;
33 struct iMeshWrapper;
34 
39 class psLight
40 {
41 public:
42  psLight(iObjectRegistry* object_reg);
43  ~psLight();
44 
45  unsigned int AttachLight(const char* name, const csVector3 &pos,
46  float radius, const csColor &colour, iMeshWrapper* mw);
47  bool Update();
48 
49 private:
50  csRef<iLight> light;
51  csRef<iVirtualClock> vclock;
52  csRef<iEngine> engine;
53 
54  csTicks lastTime;
55  csColor baseColour;
56  bool dim;
57  uint sequencenum;
58  uint stepsPerSecond;
59  uint stepsPerCycle;
60  uint dimStrength;
61 };
62 
65 #endif
unsigned int AttachLight(const char *name, const csVector3 &pos, float radius, const csColor &colour, iMeshWrapper *mw)
bool Update()
psLight(iObjectRegistry *object_reg)