RenderLight Class Reference

#include <RenderLight.h>

Description

A 3D aspect that signifies a light.

Data Structures

struct  LightAttributes
 

Public Types

enum  Light {
  Point,
  Directional
}
 
- Public Types inherited from Component
using EventHandler = bool(*)(void *, Component *component, Entity::ID self, Entity::ID source, const std::vector< std::string > &args)
 

Functions

void FormLight (Light type)
 
void Clear ()
 
void Enable (bool)
 
void OnDraw ()
 
std::string GetInfo ()
 
- Functions inherited from Component
std::string GetTag ()
 
EntityGetHost () const
 
template<typename T >
T * GetHostAs () const
 
Entity::ID GetHostID () const
 
bool EmitEvent (const std::string &eventName, Entity::ID source=Entity::ID(), const std::vector< std::string > &args={})
 
bool CanHandleEvent (const std::string &eventName)
 
void InstallHook (const std::string &eventName, EventHandler, void *data=nullptr)
 
void UninstallHook (const std::string &eventName, EventHandler)
 
void InstallHandler (const std::string &eventName, EventHandler, void *data=nullptr)
 
void UninstallHandler (const std::string &eventName, EventHandler)
 
std::vector< std::string > GetKnownEvents () const
 

Properties

LightAttributes state
 

Additional Inherited Members

- Protected Member Functions inherited from Component
virtual void OnStep ()
 
virtual void OnAttach ()
 
void InstallEvent (const std::string &eventName, EventHandler mainHandler=nullptr, void *data=nullptr)
 
void UninstallEvent (const std::string &)
 

Member Enumeration Documentation

enum Light
strong

Types of lights that the RenderLight can assume.

Enumerator
Point 

Vector lights have a single location in space. The intensity of the light is dependent on how close other objects are.

Directional 

Directional lights have a constant effect on object regardless of the object's proximity.

Member Function Documentation

void FormLight ( Light  type)

Defines the light.

Parameters
typeThe Light type that the light should be.
void Clear ( )

Resets the RenderLight.

void Enable ( bool  )

Enables or disables the light.

void OnDraw ( )
virtual

Function that is called upon each Draw iteration. Component Draw()s are run before the entity's draw function.

Reimplemented from Component.

std::string GetInfo ( )
virtual

Returns a string containing human-readable information on the state of the component.

Reimplemented from Component.

Field Documentation

Attributes of the light. Edit these to modify the light.


The documentation for this class was generated from the following file:
  • /home/jc/git/Dynacoe/DynacoeSrc/includes/Dynacoe/Components/RenderLight.h