Aether3D
Game Engine
Public Types | Public Member Functions | List of all members
Light Class Referenceabstract

Light. More...

#include <Light.hpp>

Inheritance diagram for Light:
SceneGraphNode

Public Types

enum  Type { Directional, Type::Point, Type::Spot }
 
- Public Types inherited from SceneGraphNode
enum  Type { None, Model, Camera, Light }
 

Public Member Functions

virtual ~Light ()
 
virtual Type GetLightType () const =0
 
virtual void SetCastShadow (bool enable, int shadowMapSize)=0
 
virtual void SetColor (const Vec3 &newColor)=0
 
virtual Vec3 GetColor () const =0
 
virtual void SetConeAngle (float degrees)=0
 
virtual void SetDirection (const Vec3 &newDirection)=0
 
virtual void SetPosition (const Vec3 &position)=0
 
virtual void SetRadius (float radius)=0
 
- Public Member Functions inherited from SceneGraphNode
 SceneGraphNode ()
 
virtual ~SceneGraphNode ()
 
virtual bool AddChild (SceneGraphNode *child)
 
virtual bool ContainsChild (const SceneGraphNode *node) const
 
virtual void FindFirstChildWithName (const char *name, SceneGraphNode **outNode)
 
virtual void SetLayerMask (unsigned mask)
 
virtual void SetName (const std::string &newName)
 
virtual void SetRotation (const Quaternion &aRotation)
 
virtual Quaternion GetRotation () const
 
virtual void SetScale (float aScale)
 
virtual float GetScale () const
 
virtual void SolveMatrices ()
 
virtual SceneGraphNodeParent ()
 
virtual std::string GetName () const
 
virtual Type GetType () const
 
virtual unsigned GetLayerMask () const
 
virtual std::list< SceneGraphNode * > & Children ()
 
virtual Vec3 GetPosition () const
 
virtual SceneGraphNodeRoot ()
 
void CleanDirties ()
 
bool IsDirty () const
 

Additional Inherited Members

- Static Public Member Functions inherited from SceneGraphNode
static void RegisterScene (Scene *scene)
 
static void UnregisterScene ()
 
- Public Attributes inherited from SceneGraphNode
std::list< SceneGraphNode * > children
 
Matrix44 modelMatrix
 
- Protected Attributes inherited from SceneGraphNode
Type type
 
float scale
 
Vec3 position
 
SceneGraphNodeparent
 
Quaternion rotation
 
std::string name
 
bool dirtyTransform = true
 
unsigned layerMask = 0xFFFFFFFF
 

Detailed Description

Light.

Member Enumeration Documentation

◆ Type

enum Light::Type
strong

Light's type.

Enumerator
Point 

A light placed infinitely far away. It affects everything in the scene.

Spot 

A light with a punctual source. Affects every model in its radius. A light with conical area. Affects every model in its cone.

Constructor & Destructor Documentation

◆ ~Light()

virtual Light::~Light ( )
inlinevirtual

Destructor.

Member Function Documentation

◆ GetColor()

virtual Vec3 Light::GetColor ( ) const
pure virtual
Returns
Color in range 0-1.

◆ GetLightType()

virtual Type Light::GetLightType ( ) const
pure virtual
Returns
type.

◆ SetCastShadow()

virtual void Light::SetCastShadow ( bool  enable,
int  shadowMapSize 
)
pure virtual
Parameters
enableTrue, if the light casts shadow. Disabled by default. Shadows are currently only supported for directional lights.
shadowMapSizeShadow map's size in pixels. Width and height will be set to shadowMapSize.

◆ SetColor()

virtual void Light::SetColor ( const Vec3 newColor)
pure virtual
Parameters
newColorColor. Values are in range 0-1.

◆ SetConeAngle()

virtual void Light::SetConeAngle ( float  degrees)
pure virtual
Parameters
degreesSpot light's cone angle in degrees.

◆ SetDirection()

virtual void Light::SetDirection ( const Vec3 newDirection)
pure virtual
Parameters
newDirectionNormalized direction vector. Doesn't affect point lights.

◆ SetPosition()

virtual void Light::SetPosition ( const Vec3 position)
pure virtual
Parameters
positionPosition.

Reimplemented from SceneGraphNode.

◆ SetRadius()

virtual void Light::SetRadius ( float  radius)
pure virtual
Parameters
radiusRadius. Not affected by scene graph.

The documentation for this class was generated from the following file: