#include <light.h>
Inheritance diagram for Light:
Change direction to be world rotation z-axis to enable light to be positioned in hierarchies
Public Types | |
enum | LIGHTTYPE { DIRECTIONAL = 0, POINT = 1, SPOT = 2, AMBIENT = 3 } |
Light type identifiers. More... | |
enum | LIGHTFLAG { NOFLAGS = 0, CASTSHADOWS = 1 } |
Light flags. More... | |
Public Member Functions | |
Light (LIGHTTYPE eType, int iFlags=NOFLAGS, const Vector3d &rkDirection=Vector3d::ZERO) | |
LIGHTTYPE | GetType () const |
int | GetFlags () const |
Vector3d | GetDirection () |
virtual bool | Render (Frustum *pkFrustum=0, bool bForce=false) |
SceneNode * | GetSceneNode () |
BoundingVolume * | GetBoundingVolume () |
void | SetBoundingVolume (BoundingVolume *pkBoundingVolume) |
virtual SceneEntity * | Duplicate () |
virtual bool | Intersection (BoundingVolume *pkObj, ContactSet *pkContactSet=0, bool bInvertNormal=false) |
virtual bool | Intersection (const Ray &rkRay, ContactSet *pkContactSet=0) |
virtual void | Update (float fDeltaTime) |
bool | IsActive () const |
virtual void | Activate () |
virtual void | Deactivate () |
bool | Toggle () |
virtual void | Accept (BaseVisitor &rkVisitor)=0 |
Public Attributes | |
Vector3d | m_kDirection |
Color | m_kAmbient |
Color | m_kDiffuse |
Color | m_kSpecular |
float | m_fConstantAttenuation |
float | m_fLinearAttenuation |
float | m_fQuadraticAttenuation |
unsigned int | m_uiLastFrame |
Static Public Attributes | |
unsigned int | s_uiFrameCount |
Protected Member Functions | |
virtual void | SetNode () |
Static Protected Member Functions | |
template<class NodeType> void | AcceptImpl (NodeType &rkVisited, BaseVisitor &rkVisitor) |
Protected Attributes | |
LIGHTTYPE | m_eType |
int | m_iFlags |
SceneNode * | m_pkNode |
BoundingVolume * | m_pkBoundingVolume |
bool | m_bActive |
|
Light type identifiers.
|
|
Light flags.
|
|
|
|
|
|
|
|
|
|
Add light to this frame rendering queue
Reimplemented from RenderEntity. |
|
Called by scene node when entity has been set to a node Reimplemented in MeshEntity. |
|
|
|
|
|
Set new bounding volume object. Old bounding volume object will be deleted. The new bounding volume SRT data should be in LOCAL space, the world space SRT data will be calculated internally
|
|
Duplicate entity
Reimplemented in MeshEntity. |
|
Intersection test with unknown object type
Reimplemented in MeshEntity. |
|
Intersection test with ray
Reimplemented in MeshEntity. |
|
Update object
Reimplemented in AnimatedNode, AnimatedSubMesh, Animation, AnimatorController, MassParticle, MeshEntity, NodeAnimatorController, ParticleSystem, PhysicsManager, PhysicsNode, RigidBody, SceneNode, Skeleton, SkeletalSubMesh, SubMesh, SubMeshAnimatorController, Animation< SubMeshKeyframe >, Animation< NodeKeyframe >, AnimatorController< SubMeshAnimation >, AnimatorController< NodeAnimation >, and AnimatorController< SkeletonAnimation >. |
|
Query state of object
|
|
Activate object |
|
Deactivate object |
|
Toggle active state. This method does not need to be overloaded, it is only a wrapper to Activate and Deactivate
|
|
Accept visitors if implementation available
|
|
Accept a visitor
|
|
Type |
|
Flags |
|
Direction (for directional and spot lights) |
|
Ambient color |
|
Diffuse color |
|
Specular color |
|
Constant attenuation, default 1.0f |
|
Linear attenuation, default 0.0f |
|
Quadratic attenuation |
|
Parent scene node object |
|
Bounding volume for this entity |
|
Active flag |
|
Frame counter (at 500 frames per second, can be active ~100 days continously before loop, and then it will just skip one frame -> safe enough) |
|
Last frame count we were rendered |