100 void setPosition(
float x,
float y,
float z,
float w=0.0);
const QColor & getDColor() const
get diffuse color
void positionChanged(QVector4D position)
signal that the position changed
QColor m_dcolor
diffuse color
Definition: light.h:173
void setPosition(float x, float y, float z, float w=0.0)
set position of light
GLenum getLightID() const
get the OpenGL light id
Base class for objects in OpenGL scene.
Definition: sceneobject.h:22
void setAColor(QColor color)
set the ambient color
virtual void makeConnections()
make signal/slot connections
void sColorChanged(QColor color)
signal that the specular color of has changed
void enabledChanged(bool enabled)
signal that the light has been enabled/disabled
void setDColor(QColor color)
set the diffuse color
bool m_enabled
true if light is on
Definition: light.h:182
void updateDColor()
use OpenGL commands
void dColorChanged(QColor color)
signal that the diffuse color of has changed
void lightIDChanged(GLuint lightID)
signal that the OpenGL light ID has changed
const QColor & getAColor() const
get ambient color
bool isEnabled() const
find out if the light is enabled
void updatePosition()
use OpenGL commands
QColor m_acolor
ambient color
Definition: light.h:170
void updateSColor()
use OpenGL commands
Widget to view Langmuir Simulation in real time.
Definition: langmuirviewer.h:47
void setSColor(QColor color)
set the specular color
const QVector4D & getPosition() const
get position of light
A class to represent a light source.
Definition: light.h:13
virtual void init()
initialize object
QColor m_scolor
specular color
Definition: light.h:176
void aColorChanged(QColor color)
signal that the ambient color of has changed
QVector4D m_position
location of light
Definition: light.h:167
GLenum m_lightID
OpenGL light ID.
Definition: light.h:179
void updateAColor()
use OpenGL commands
void toggle()
toggle the light between enabled/disabled
virtual void draw()
perform OpenGL drawing operations
const QColor & getSColor() const
get specular color
Light(GLenum lightID, LangmuirViewer &viewer, QObject *parent=0)
void setEnabled(bool enabled)
enabled or disable the light
void setLightID(GLuint lightID)
set the OpenGL light ID