Langmuir
Simulation
|
A class to represent a light source. More...
#include <light.h>
Public Slots | |
virtual void | makeConnections () |
make signal/slot connections More... | |
void | setPosition (float x, float y, float z, float w=0.0) |
set position of light More... | |
void | setPosition (QVector4D value) |
set position of light More... | |
void | setAColor (QColor color) |
set the ambient color More... | |
void | setDColor (QColor color) |
set the diffuse color More... | |
void | setSColor (QColor color) |
set the specular color More... | |
void | setLightID (GLuint lightID) |
set the OpenGL light ID More... | |
void | setEnabled (bool enabled) |
enabled or disable the light More... | |
void | toggle () |
toggle the light between enabled/disabled More... | |
void | updatePosition () |
use OpenGL commands More... | |
void | updateAColor () |
use OpenGL commands More... | |
void | updateSColor () |
use OpenGL commands More... | |
void | updateDColor () |
use OpenGL commands More... | |
Public Slots inherited from LangmuirView::SceneObject | |
void | toggleVisible () |
toggle visibility More... | |
void | setVisible (bool draw=true) |
set the visibility More... | |
virtual void | makeConnections () |
make signal/slot connections More... | |
Signals | |
void | positionChanged (QVector4D position) |
signal that the position changed More... | |
void | aColorChanged (QColor color) |
signal that the ambient color of has changed More... | |
void | dColorChanged (QColor color) |
signal that the diffuse color of has changed More... | |
void | sColorChanged (QColor color) |
signal that the specular color of has changed More... | |
void | enabledChanged (bool enabled) |
signal that the light has been enabled/disabled More... | |
void | lightIDChanged (GLuint lightID) |
signal that the OpenGL light ID has changed More... | |
Signals inherited from LangmuirView::SceneObject | |
void | visibleChanged (bool drawn) |
signal that the visibility has changed More... | |
Public Member Functions | |
Light (GLenum lightID, LangmuirViewer &viewer, QObject *parent=0) | |
~Light () | |
const QColor & | getAColor () const |
get ambient color More... | |
const QColor & | getDColor () const |
get diffuse color More... | |
const QColor & | getSColor () const |
get specular color More... | |
GLenum | getLightID () const |
get the OpenGL light id More... | |
bool | isEnabled () const |
find out if the light is enabled More... | |
const QVector4D & | getPosition () const |
get position of light More... | |
Public Member Functions inherited from LangmuirView::SceneObject | |
SceneObject (LangmuirViewer &viewer, QObject *parent=0) | |
create the SceneObject More... | |
bool | isVisible () |
true if object is drawn More... | |
void | render () |
calls OpenGL drawing commands. More... | |
Protected Member Functions | |
virtual void | init () |
initialize object More... | |
virtual void | draw () |
perform OpenGL drawing operations More... | |
Protected Member Functions inherited from LangmuirView::SceneObject | |
virtual void | preDraw () |
perform OpenGL drawing operations before draw() More... | |
virtual void | postDraw () |
perform OpenGL drawing operations after draw() More... | |
Protected Attributes | |
QVector4D | m_position |
location of light More... | |
QColor | m_acolor |
ambient color More... | |
QColor | m_dcolor |
diffuse color More... | |
QColor | m_scolor |
specular color More... | |
GLenum | m_lightID |
OpenGL light ID. More... | |
bool | m_enabled |
true if light is on More... | |
Protected Attributes inherited from LangmuirView::SceneObject | |
LangmuirViewer & | m_viewer |
reference to OpenGL widget More... | |
bool | visible_ |
visibility More... | |
A class to represent a light source.
|
explicit |
LangmuirView::Light::~Light | ( | ) |
|
signal |
signal that the ambient color of has changed
color | value of color |
|
signal |
signal that the diffuse color of has changed
color | value of color |
|
protectedvirtual |
perform OpenGL drawing operations
Reimplemented from LangmuirView::SceneObject.
|
signal |
signal that the light has been enabled/disabled
enabled | true if light has been enabled |
const QColor& LangmuirView::Light::getAColor | ( | ) | const |
get ambient color
const QColor& LangmuirView::Light::getDColor | ( | ) | const |
get diffuse color
GLenum LangmuirView::Light::getLightID | ( | ) | const |
get the OpenGL light id
const QVector4D& LangmuirView::Light::getPosition | ( | ) | const |
get position of light
const QColor& LangmuirView::Light::getSColor | ( | ) | const |
get specular color
|
protectedvirtual |
initialize object
Reimplemented from LangmuirView::SceneObject.
bool LangmuirView::Light::isEnabled | ( | ) | const |
find out if the light is enabled
|
signal |
signal that the OpenGL light ID has changed
lightID | value of OpenGL light ID |
|
virtualslot |
make signal/slot connections
|
signal |
signal that the position changed
position | value of position |
|
signal |
signal that the specular color of has changed
color | value of color |
|
slot |
set the ambient color
color | color to set |
|
slot |
set the diffuse color
color | color to set |
|
slot |
enabled or disable the light
enabled | true if the light is to be enabled |
|
slot |
set the OpenGL light ID
lightID | OpenGL light ID to use |
|
slot |
set position of light
x | x-position |
y | y-position |
z | z-position |
w | w-position |
|
slot |
set position of light
value | position to set |
|
slot |
set the specular color
color | color to set |
|
slot |
toggle the light between enabled/disabled
|
slot |
use OpenGL commands
|
slot |
use OpenGL commands
|
slot |
use OpenGL commands
|
slot |
use OpenGL commands
|
protected |
ambient color
|
protected |
diffuse color
|
protected |
true if light is on
|
protected |
OpenGL light ID.
|
protected |
location of light
|
protected |
specular color