Blender V2.61 - r43446
|
#include <KX_Light.h>
Public Member Functions | |
KX_LightObject (void *sgReplicationInfo, SG_Callbacks callbacks, class RAS_IRenderTools *rendertools, const struct RAS_LightObject &lightobj, bool glsl) | |
virtual | ~KX_LightObject () |
virtual CValue * | GetReplica () |
RAS_LightObject * | GetLightData () |
bool | ApplyLight (KX_Scene *kxscene, int oblayer, int slot) |
struct GPULamp * | GetGPULamp () |
bool | HasShadowBuffer () |
int | GetShadowLayer () |
void | BindShadowBuffer (class RAS_IRasterizer *ras, class KX_Camera *cam, class MT_Transform &camtrans) |
void | UnbindShadowBuffer (class RAS_IRasterizer *ras) |
void | Update () |
void | UpdateScene (class KX_Scene *kxscene) |
virtual int | GetGameObjectType () |
Protected Attributes | |
RAS_LightObject | m_lightobj |
class RAS_IRenderTools * | m_rendertools |
bool | m_glsl |
Scene * | m_blenderscene |
Definition at line 45 of file KX_Light.h.
KX_LightObject::KX_LightObject | ( | void * | sgReplicationInfo, |
SG_Callbacks | callbacks, | ||
class RAS_IRenderTools * | rendertools, | ||
const struct RAS_LightObject & | lightobj, | ||
bool | glsl | ||
) |
Definition at line 50 of file KX_Light.cpp.
References RAS_IRenderTools::AddLight(), m_blenderscene, m_glsl, RAS_LightObject::m_light, m_lightobj, m_rendertools, and RAS_LightObject::m_scene.
Referenced by GetReplica().
KX_LightObject::~KX_LightObject | ( | ) | [virtual] |
Definition at line 66 of file KX_Light.cpp.
References GetGPULamp(), GPU_lamp_update(), m_lightobj, m_rendertools, and RAS_IRenderTools::RemoveLight().
bool KX_LightObject::ApplyLight | ( | KX_Scene * | kxscene, |
int | oblayer, | ||
int | slot | ||
) |
Definition at line 92 of file KX_Light.cpp.
References KX_Scene::GetBlenderScene(), KX_GameObject::GetOpenGLMatrix(), KX_GameObject::GetOpenGLMatrixPtr(), KX_GameObject::GetSGNode(), Scene::lay, RAS_LightObject::LIGHT_SPOT, RAS_LightObject::LIGHT_SUN, RAS_LightObject::m_att1, RAS_LightObject::m_att2, RAS_LightObject::m_blue, RAS_LightObject::m_distance, RAS_LightObject::m_energy, RAS_LightObject::m_green, RAS_LightObject::m_layer, m_lightobj, RAS_LightObject::m_nodiffuse, RAS_LightObject::m_nospecular, RAS_LightObject::m_red, RAS_LightObject::m_scene, RAS_LightObject::m_spotblend, RAS_LightObject::m_spotsize, and RAS_LightObject::m_type.
Referenced by KX_BlenderRenderTools::applyLights(), and GPC_RenderTools::applyLights().
void KX_LightObject::BindShadowBuffer | ( | class RAS_IRasterizer * | ras, |
class KX_Camera * | cam, | ||
class MT_Transform & | camtrans | ||
) |
Definition at line 231 of file KX_Light.cpp.
References MT_Transform::getBasis(), KX_Camera::GetCameraData(), GetGPULamp(), MT_Transform::getOrigin(), RAS_IRasterizer::GetStereoMode(), GPU_lamp_shadow_buffer_bind(), MT_Transform::invert(), RAS_CameraData::m_perspective, KX_GameObject::NodeGetWorldOrientation(), KX_GameObject::NodeGetWorldPosition(), KX_GameObject::NodeSetLocalOrientation(), KX_GameObject::NodeSetLocalPosition(), KX_GameObject::NodeUpdateGS(), RAS_IRasterizer::RAS_STEREO_NOSTEREO, KX_Camera::SetModelviewMatrix(), KX_Camera::SetProjectionMatrix(), RAS_IRasterizer::SetProjectionMatrix(), RAS_IRasterizer::SetStereoMode(), and RAS_IRasterizer::SetViewMatrix().
virtual int KX_LightObject::GetGameObjectType | ( | ) | [inline, virtual] |
Reimplemented from SCA_IObject.
Definition at line 73 of file KX_Light.h.
References SCA_IObject::OBJ_LIGHT.
GPULamp * KX_LightObject::GetGPULamp | ( | ) | [read] |
Definition at line 182 of file KX_Light.cpp.
References KX_GameObject::GetBlenderGroupObject(), KX_GameObject::GetBlenderObject(), GPU_lamp_from_blender(), m_blenderscene, m_glsl, and NULL.
Referenced by BindShadowBuffer(), GetShadowLayer(), HasShadowBuffer(), UnbindShadowBuffer(), Update(), and ~KX_LightObject().
RAS_LightObject* KX_LightObject::GetLightData | ( | ) | [inline] |
Definition at line 58 of file KX_Light.h.
References m_lightobj.
Referenced by KX_Scene::AddReplicaObject(), KX_Scene::DupliGroupRecurse(), and KX_LightIpoSGController::Update().
CValue * KX_LightObject::GetReplica | ( | void | ) | [virtual] |
Inherited from CValue -- return a new copy of this instance allocated on the heap. Ownership of the new object belongs with the caller.
Reimplemented from KX_GameObject.
Definition at line 79 of file KX_Light.cpp.
References RAS_IRenderTools::AddLight(), KX_LightObject(), RAS_LightObject::m_light, m_lightobj, m_rendertools, and KX_GameObject::ProcessReplica().
int KX_LightObject::GetShadowLayer | ( | ) |
Definition at line 221 of file KX_Light.cpp.
References GetGPULamp(), and GPU_lamp_shadow_layer().
bool KX_LightObject::HasShadowBuffer | ( | ) |
Definition at line 211 of file KX_Light.cpp.
References GetGPULamp(), and GPU_lamp_has_shadow_buffer().
void KX_LightObject::UnbindShadowBuffer | ( | class RAS_IRasterizer * | ras | ) |
Definition at line 264 of file KX_Light.cpp.
References GetGPULamp(), and GPU_lamp_shadow_buffer_unbind().
void KX_LightObject::Update | ( | void | ) |
Definition at line 190 of file KX_Light.cpp.
References GetGPULamp(), KX_GameObject::GetOpenGLMatrix(), KX_GameObject::GetOpenGLMatrixPtr(), MT_CmMatrix4x4::getPointer(), KX_GameObject::GetSGNode(), GPU_lamp_update(), GPU_lamp_update_colors(), i, RAS_LightObject::m_blue, RAS_LightObject::m_energy, RAS_LightObject::m_green, RAS_LightObject::m_layer, m_lightobj, RAS_LightObject::m_red, and NULL.
void KX_LightObject::UpdateScene | ( | class KX_Scene * | kxscene | ) | [inline] |
Definition at line 71 of file KX_Light.h.
References m_lightobj, and RAS_LightObject::m_scene.
Scene* KX_LightObject::m_blenderscene [protected] |
Definition at line 52 of file KX_Light.h.
Referenced by GetGPULamp(), and KX_LightObject().
bool KX_LightObject::m_glsl [protected] |
Definition at line 51 of file KX_Light.h.
Referenced by GetGPULamp(), and KX_LightObject().
RAS_LightObject KX_LightObject::m_lightobj [protected] |
Definition at line 49 of file KX_Light.h.
Referenced by ApplyLight(), GetLightData(), GetReplica(), KX_LightObject(), Update(), UpdateScene(), and ~KX_LightObject().
class RAS_IRenderTools* KX_LightObject::m_rendertools [protected] |
Definition at line 50 of file KX_Light.h.
Referenced by GetReplica(), KX_LightObject(), and ~KX_LightObject().