4 * ***** BEGIN GPL LICENSE BLOCK *****
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software Foundation,
18 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
21 * All rights reserved.
23 * The Original Code is: all of this file.
25 * Contributor(s): none yet.
27 * ***** END GPL LICENSE BLOCK *****
32 #include "RAS_LightObject.h"
33 #include "KX_GameObject.h"
37 class RAS_IRasterizer;
38 class RAS_IRenderTools;
41 class KX_LightObject : public KX_GameObject
45 RAS_LightObject m_lightobj;
46 class RAS_IRenderTools* m_rendertools; //needed for registering and replication of lightobj
47 struct GPULamp *m_gpulamp;
51 KX_LightObject(void* sgReplicationInfo,SG_Callbacks callbacks,class RAS_IRenderTools* rendertools,const struct RAS_LightObject& lightobj, struct GPULamp *gpulamp, PyTypeObject *T = &Type);
52 virtual ~KX_LightObject();
53 virtual CValue* GetReplica();
54 RAS_LightObject* GetLightData() { return &m_lightobj;}
57 bool HasShadowBuffer();
59 void BindShadowBuffer(class RAS_IRasterizer *ras, class KX_Camera *cam, class MT_Transform& camtrans);
60 void UnbindShadowBuffer(class RAS_IRasterizer *ras);
63 virtual PyObject* _getattr(const STR_String& attr); /* lens, near, far, projection_matrix */
64 virtual int _setattr(const STR_String& attr, PyObject *pyvalue);