Planeshift
pseffectobjlight.h
Go to the documentation of this file.
1 /*
2 * Author: Matthieu Kraus
3 *
4 * Copyright (C) 2010 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_OBJ_LIGHT_HEADER
21 #define PS_EFFECT_OBJ_LIGHT_HEADER
22 
23 #include <cssysdef.h>
24 #include <iengine/light.h>
25 #include <csutil/cscolor.h>
26 
27 #include "pseffectobj.h"
28 
34 {
35 public:
36 
37  psEffectObjLight(iView* parentView, psEffect2DRenderer* renderer2d);
39 
40  bool Load(iDocumentNode* node, iLoaderContext* ldr_context);
41  bool Render(const csVector3 &up);
42  bool Update(csTicks elapsed);
43  psEffectObj* Clone() const;
45 
46 protected:
47  csRef<iLight> light;
48  float radius;
49  csLightType type;
50  csLightAttenuationMode mode;
51  csColor color;
52  csVector3 offset;
53 };
54 
57 #endif
bool Render(const csVector3 &up)
Renders the effect.
bool AttachToAnchor(psEffectAnchor *anchor)
Attaches this mesh to the given effect anchor.
The manager of all 2D effect elements.
psEffectObj * Clone() const
Clones the effect object.
csRef< iLight > light
An effect is not much more than a collection of effect objects.
Definition: pseffectobj.h:207
csLightAttenuationMode mode
psEffectAnchor * anchor
Definition: pseffectobj.h:514
psEffectObjLight(iView *parentView, psEffect2DRenderer *renderer2d)
bool Load(iDocumentNode *node, iLoaderContext *ldr_context)
Loads the effect object from an xml node.
bool Update(csTicks elapsed)
Updates the spell effect – called every frame.
Effect anchors provide a base location / anchor point for all effect objs.
psEffect2DRenderer * renderer2d
Definition: pseffectobj.h:529