LightMaker Class Reference

Used to insert a new light into the scene. More...

#include <LightMaker.hh>

Inherits EntityMaker.

Inherited by DirectionalLightMaker, PointLightMaker, and SpotLightMaker.

Public Member Functions

 LightMaker ()
 Constructor. More...
 
virtual ~LightMaker ()
 Destructor. More...
 
virtual ignition::math::Vector3d EntityPosition () const
 Returns the entity world position. More...
 
bool InitFromLight (const std::string &_lightName)
 Initialize the light maker from an existing light in the scene. More...
 
virtual void OnMouseMove (const common::MouseEvent &_event)
 Callback when moving mouse. More...
 
virtual void OnMouseRelease (const common::MouseEvent &_event)
 Callback when mouse button is released. More...
 
void Start ()
 Start the maker. More...
 
void Stop ()
 Stop the maker. More...
 

Protected Member Functions

virtual void CreateTheEntity ()
 Creates the entity. More...
 
virtual bool Init ()
 Initialize the light maker. More...
 
virtual void SetEntityPosition (const ignition::math::Vector3d &_pos)
 Sets the entity world position. More...
 

Protected Attributes

std::string lightTypename
 Type of the light being spawned. More...
 
msgs::Light msg
 Message that holds all the light information. More...
 

Detailed Description

Used to insert a new light into the scene.

Constructor & Destructor Documentation

◆ LightMaker()

Constructor.

◆ ~LightMaker()

virtual ~LightMaker ( )
virtual

Destructor.

Member Function Documentation

◆ CreateTheEntity()

virtual void CreateTheEntity ( )
protectedvirtual

Creates the entity.

Implements EntityMaker.

◆ EntityPosition()

virtual ignition::math::Vector3d EntityPosition ( ) const
virtual

Returns the entity world position.

Returns
Entity's position in the world frame.

Reimplemented from EntityMaker.

◆ Init()

virtual bool Init ( )
protectedvirtual

Initialize the light maker.

Returns
True if the light maker is initialized successfully.

◆ InitFromLight()

bool InitFromLight ( const std::string &  _lightName)

Initialize the light maker from an existing light in the scene.

Parameters
[in]_lightNameName of existing light in the scene.
Returns
True if initialization is successful.

◆ SetEntityPosition()

virtual void SetEntityPosition ( const ignition::math::Vector3d &  _pos)
protectedvirtual

Sets the entity world position.

Parameters
[in]_posNew position in the world frame.

Reimplemented from EntityMaker.

◆ Start()

void Start ( )
virtual

Start the maker.

Reimplemented from EntityMaker.

◆ Stop()

void Stop ( )
virtual

Stop the maker.

Reimplemented from EntityMaker.

Member Data Documentation

◆ lightTypename

std::string lightTypename
protected

Type of the light being spawned.

◆ msg

msgs::Light msg
protected

Message that holds all the light information.


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