KiCad PCB EDA Suite
CLIGHTCONTAINER Class Reference

A light contariner. It will add lights and remove it in the end. More...

#include <clight.h>

Public Member Functions

 CLIGHTCONTAINER ()
 
 ~CLIGHTCONTAINER ()
 
void Clear ()
 Clear - Remove all lights from the container. More...
 
void Add (CLIGHT *aLight)
 Add - Add a light to the container. More...
 
const LIST_LIGHTGetList () const
 GetList - get light list of this container. More...
 

Private Attributes

LIST_LIGHT m_lights
 list of lights More...
 

Detailed Description

A light contariner. It will add lights and remove it in the end.

Definition at line 155 of file clight.h.

Constructor & Destructor Documentation

CLIGHTCONTAINER::CLIGHTCONTAINER ( )
inline

Definition at line 158 of file clight.h.

158 {}
CLIGHTCONTAINER::~CLIGHTCONTAINER ( )
inline

Definition at line 160 of file clight.h.

References Clear().

160 { Clear(); }
void Clear()
Clear - Remove all lights from the container.
Definition: clight.h:165

Member Function Documentation

void CLIGHTCONTAINER::Add ( CLIGHT aLight)
inline

Add - Add a light to the container.

Parameters
aLight

Definition at line 186 of file clight.h.

References m_lights.

Referenced by C3D_RENDER_RAYTRACING::reload().

187  {
188  if( aLight )
189  m_lights.push_back( aLight );
190  }
LIST_LIGHT m_lights
list of lights
Definition: clight.h:199
void CLIGHTCONTAINER::Clear ( )
inline

Clear - Remove all lights from the container.

Definition at line 165 of file clight.h.

References m_lights.

Referenced by C3D_RENDER_RAYTRACING::reload(), and ~CLIGHTCONTAINER().

166  {
167  if( !m_lights.empty() )
168  {
169  for( LIST_LIGHT::iterator ii = m_lights.begin();
170  ii != m_lights.end();
171  --ii )
172  {
173  delete *ii;
174  *ii = NULL;
175  }
176 
177  m_lights.clear();
178  }
179  }
LIST_LIGHT m_lights
list of lights
Definition: clight.h:199
const LIST_LIGHT& CLIGHTCONTAINER::GetList ( ) const
inline

GetList - get light list of this container.

Returns
a list of lights

Definition at line 196 of file clight.h.

References m_lights.

Referenced by C3D_RENDER_RAYTRACING::shadeHit().

196 { return m_lights; }
LIST_LIGHT m_lights
list of lights
Definition: clight.h:199

Member Data Documentation

LIST_LIGHT CLIGHTCONTAINER::m_lights
private

list of lights

Definition at line 199 of file clight.h.

Referenced by Add(), Clear(), and GetList().


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