scg3  0.6
scg::LightPosition Class Reference

A light position node to define the position of an associated light within the scene graph (leaf node). More...

#include "LightPosition.h"

Inheritance diagram for scg::LightPosition:
[legend]
Collaboration diagram for scg::LightPosition:
[legend]

Public Member Functions

 LightPosition (LightSP light)
 
virtual ~LightPosition ()
 
LightSP getLight ()
 
LightPositionsetLight (LightSP light)
 
void accept (Traverser *traverser)
 
- Public Member Functions inherited from scg::Leaf
 Leaf ()
 
virtual ~Leaf ()=0
 
virtual void traverse (Traverser *traverser)
 
- Public Member Functions inherited from scg::Node
 Node ()
 
virtual ~Node ()=0
 
virtual void clear ()
 
virtual void destroy ()
 
int getNCores () const
 
const std::string & getMetaInfo (const std::string &key) const
 
void setMetaInfo (const std::string &key, const std::string &value)
 
bool isVisible () const
 
void setVisible (bool isVisible=true)
 
virtual void render (RenderState *renderState)
 

Static Public Member Functions

static LightPositionSP create (LightSP light)
 

Protected Attributes

LightSP light_
 
- Protected Attributes inherited from scg::Node
NodeSP rightSibling_
 
Compositeparent_
 
std::vector< CoreSPcores_
 
bool isVisible_
 
std::unordered_map< std::string, std::string > metaInfo_
 

Additional Inherited Members

- Protected Member Functions inherited from scg::Node
void addSibling_ (NodeSP sibling)
 
void removeSibling_ (Node *node, bool &result)
 
void processCores_ (RenderState *renderState)
 
void postProcessCores_ (RenderState *renderState)
 

Detailed Description

A light position node to define the position of an associated light within the scene graph (leaf node).

Light defines the logical position of a light source (i.e., which sub-tree of the scene graph the light is applied to), while LightPosition defines its physical position within the transformation hierarchy.

Definition at line 44 of file LightPosition.h.

Constructor & Destructor Documentation

◆ LightPosition()

scg::LightPosition::LightPosition ( LightSP  light)

Constructor with associated Light.

◆ ~LightPosition()

virtual scg::LightPosition::~LightPosition ( )
virtual

Destructor.

Member Function Documentation

◆ accept()

void scg::LightPosition::accept ( Traverser traverser)
virtual

Accept traverser (visitor pattern).

Reimplemented from scg::Node.

◆ create()

static LightPositionSP scg::LightPosition::create ( LightSP  light)
static

Create shared pointer.

◆ getLight()

LightSP scg::LightPosition::getLight ( )

Get associated Light.

◆ setLight()

LightPosition* scg::LightPosition::setLight ( LightSP  light)

Set associated Light.

Returns
this pointer for method chaining

Member Data Documentation

◆ light_

LightSP scg::LightPosition::light_
protected

Definition at line 81 of file LightPosition.h.


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