GUInity
Public Member Functions | List of all members
Light Class Reference

#include <Light.hpp>

Inheritance diagram for Light:
Component Subject< Light >

Public Member Functions

 Light ()
 
 Light (glm::vec3 color)
 
 ~Light ()
 
glm::vec3 getColor ()
 
void setColor (glm::vec3)
 
virtual void init () override
 
virtual void destroy () override
 
virtual shared_ptr< Componentclone () override
 
virtual shared_ptr< ComponentDescriptiongetComponentDescription () override
 
virtual void deserialize (shared_ptr< ComponentDescription > desc) override
 
- Public Member Functions inherited from Component
 Component ()
 
virtual ~Component ()
 
virtual void setActive (bool isActive)
 
virtual void awake ()
 
virtual void tick (float deltaSecods)
 
shared_ptr< ActorgetActor ()
 
void setActor (weak_ptr< Actor > actor)
 

Additional Inherited Members

- Static Public Member Functions inherited from Subject< Light >
static void addObserver (shared_ptr< Observer > observer)
 
static void removeObserver (shared_ptr< Observer > observer)
 
- Protected Member Functions inherited from Component
void setCopyMode (bool initWithData)
 
- Static Protected Member Functions inherited from Subject< Light >
static void notify (ComponentEventType type, shared_ptr< Component > component, bool isEditor)
 
static void notify (ActorEventType type, shared_ptr< Actor > actor, bool isEditor)
 
- Protected Attributes inherited from Component
bool initWithData
 
bool isActive
 

Detailed Description

Light Component. This component adds Light behaviour to a game actor. For now the Light component behaves like point light and is very very basic There are no shadows currently.

Constructor & Destructor Documentation

Light::Light ( )

Default Constructor. White Light

Light::Light ( glm::vec3  c)

Default Constructor. Colored Light

Light::~Light ( )

Default Destructor

Member Function Documentation

shared_ptr< Component > Light::clone ( )
overridevirtual

Clones current component (Prototype Design Pattern)

Returns
shared_ptr to cloned Light Component

Implements Component.

void Light::destroy ( )
overridevirtual

Component destroy override. Notifies that this light has been destroyed

Reimplemented from Component.

glm::vec3 Light::getColor ( )

color setter

void Light::init ( )
overridevirtual

Component init override. Notifies that a new light has been created

Reimplemented from Component.

void Light::setColor ( glm::vec3  color)

color setter


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