1 #ifndef LANGMUIRVIEWER_H
2 #define LANGMUIRVIEWER_H
4 #include <QGLViewer/qglviewer.h>
5 #include <QGLViewer/manipulatedCameraFrame.h>
6 #include <QErrorMessage>
7 #include <QColorDialog>
20 #define BOOST_DISABLE_ASSERTS
24 #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
25 #pragma GCC diagnostic push
26 #pragma GCC system_header
29 #include "boost/multi_array.hpp"
31 #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
32 #pragma GCC diagnostic pop
173 void showMessage(
const QString& message,
int timeout=0);
310 void load(QString fileName);
316 void save(QString fileName);
506 void drawTraps(QImage &image, QColor bcolor, QColor fcolor);
514 void drawChecker(QImage &image, QColor color1, QColor color2);
622 #endif // LANGMUIRVIEWER_H
void setCanCalculateIsoSurface(bool enabled)
set can calculate isosurface
Box & trapBox()
get trap box object
Definition: langmuirviewer.h:145
PointCloud & defects()
get defects object
Definition: langmuirviewer.h:115
A class to generate random numbers.
Definition: rand.h:31
void toggleGridIsVisible()
show/hide the grid
void resetSettings()
set default colors
Grid * m_grid
grid that outlines sites
Definition: langmuirviewer.h:566
QMatrix4x4 & getOpenGLModelViewMatrix()
obtain the model-view matrix (OpenGL matrix stack)
void isUsingCoulomb(bool useCoulomb)
signal if Coulomb is being used
QMatrix4x4 & getOpenGLProjectionMatrix()
obtain the projection matrix (OpenGL matrix stack)
float m_stageExtend
stage size
Definition: langmuirviewer.h:614
void loadSettings(QString fileName)
load settings from a file
const QColor & trapColor() const
get the trap color
Definition: langmuirviewer.h:95
Mesh & trapMesh()
get trap mesh object
Definition: langmuirviewer.h:155
MarchingCubes::Isosurface * m_isoSurface
isosurface
Definition: langmuirviewer.h:572
void initGeometry()
update the geometry using simulation parameters
Box * m_trapBox
trap box
Definition: langmuirviewer.h:542
LangmuirCore::Simulation * m_simulation
the simulation manipulator
Definition: langmuirviewer.h:578
void clearMessage()
clear the status bar message
float m_gridX
grid.x
Definition: langmuirviewer.h:596
Light & light()
get light object
Definition: langmuirviewer.h:160
void setBackgroundColor(QColor color)
set background color
void drawLightSource(GLenum light, float scale=1.0f) const
draw an OpenGL light source
void isoSurfaceProgress(int)
show calculation progress
void initTraps()
init trap texture
A class to represent an xyz axis that doesnt change size/position.
Definition: corneraxis.h:11
void currentStepChanged(int value)
signal that current.step changed
void showParameters()
show parameters in a window
Box * m_rBox
box (right)
Definition: langmuirviewer.h:551
Box & stageBox()
get stage box object
Definition: langmuirviewer.h:150
double m_boxThickness
box parameter
Definition: langmuirviewer.h:557
void trapColorChanged(QColor color)
signal that the trap color changed
Box & rightBox()
get right box object
Definition: langmuirviewer.h:130
void toggleCoulomb(bool on=true)
turn Coulomb on and off
void setHolePointMode(PointCloud::Mode mode)
set the render mode for points
PointCloud * m_traps
point cloud representing traps
Definition: langmuirviewer.h:539
PointCloud * m_electrons
point cloud representing electrons
Definition: langmuirviewer.h:530
void setIterationsPrint(int value)
set the value of iterations.print
float m_sceneRadius
size of scene
Definition: langmuirviewer.h:611
Grid & grid()
get grid object
Definition: langmuirviewer.h:165
PointCloud & electrons()
get electrons object
Definition: langmuirviewer.h:110
PointCloud & traps()
get traps object
Definition: langmuirviewer.h:125
void toggleTrapsShown(bool on=true)
turn on the traps texture
Mode
The rendering mode for the cloud.
Definition: pointcloud.h:36
void generateIsoSurface(float value)
generate isosurface
void setSettings(QSettings &settings)
set the properties of settings object
A class to represent a point cloud.
Definition: pointcloud.h:17
void initStage()
init stage texture
A class to hold all objects in a simulation.
Definition: world.h:51
Light * m_light0
main light source
Definition: langmuirviewer.h:575
void errorMessage(QString message)
show error message window
void isAnimated(bool playing)
signal if simulation is playing
const QColor & stageColor2() const
get the stage color
Definition: langmuirviewer.h:100
void load(QString fileName)
load a simulation
CornerAxis * m_cornerAxis
axis that sits in the corner and doesnt change size
Definition: langmuirviewer.h:527
void setCheckerSize(float size)
set size of checkers on stage
A class to compute a contour iso-surface.
Definition: isosurface.h:385
void openGLInitFinished()
signal that OpenGL has been initialized
QMatrix4x4 & getModelViewProjectionMatrix()
obtain the model-view-projection matrix (QGLViewer camera)
PointCloud * m_defects
point cloud representing defects
Definition: langmuirviewer.h:533
void setPointMode(PointCloud::Mode mode)
set the render mode for points
LangmuirCore::World * m_world
the simulation data
Definition: langmuirviewer.h:584
PointCloud * m_holes
point cloud representing holes
Definition: langmuirviewer.h:536
void toggleOpenCL(bool on=true)
turn OpenCL on and off
void getSettings(QSettings &settings)
get the properties of settings object
void save(QString fileName)
save a checkpoint file
CornerAxis & cornerAxis()
get corner axis object
Definition: langmuirviewer.h:105
void updateHoleCloud()
update the hole point cloud
virtual void animate()
change the state of the system before drawing
float m_gridY
grid.y
Definition: langmuirviewer.h:599
void stageColor2Changed(QColor color)
signal that the stage color2 changed
void toggleCornerAxisIsVisible()
show/hide the corner axis
void setElectronPointMode(PointCloud::Mode mode)
set the render mode for points
Widget to view Langmuir Simulation in real time.
Definition: langmuirviewer.h:47
void iterationsPrintChanged(int value)
signal that iterations.print changed
A class to represent a textured box.
Definition: box.h:13
void updateTrapCloud()
update the defect point cloud
void reset()
reset the current simulation
void pause()
pause the simulation
float m_gridHalfZ
half of grid.z
Definition: langmuirviewer.h:593
A class to represent a light source.
Definition: light.h:13
void updateDefectCloud()
update the defect point cloud
void play()
play the simulation
PointCloud & holes()
get holes object
Definition: langmuirviewer.h:120
void setDefectPointMode(PointCloud::Mode mode)
set the render mode for points
Box * m_baseBox
base box
Definition: langmuirviewer.h:545
LangmuirCore::Random & random()
get the random number generator
virtual QString helpString() const
get the help string
virtual void postDraw()
draw on the OpenGL widget after the main draw event
void backgroundColorChanged(QColor color)
signal that the background color changed
void updateElectronCloud()
update the electron point cloud
void drawChecker(QImage &image, QColor color1, QColor color2)
draw checker pattern on stage
QColor m_stageColor2
stage color
Definition: langmuirviewer.h:563
void isUsingOpenCL(bool useOpenCL)
signal if OpenCL is being used
LangmuirCore::Random m_random
a random number generator instance
Definition: langmuirviewer.h:581
A class to represent simulation grid.
Definition: grid.h:17
QMatrix4x4 & getProjectionMatrix()
obtain the projection matrix (QGLViewer camera)
Mesh * m_trapMesh
trap mesh
Definition: langmuirviewer.h:569
virtual void draw()
draw on the OpenGL widget
void saveSettings(QString fileName)
save settings to a file
void resetCamera()
reset the camera to the default position
Box * m_stageBox
box (stage)
Definition: langmuirviewer.h:554
void setTrapColor(QColor color)
Change the trap color.
Box & leftBox()
get left box object
Definition: langmuirviewer.h:135
float m_gridHalfY
half of grid.y
Definition: langmuirviewer.h:590
void loadTexture(GLuint imageID, QImage &image)
load texture to gpu memory
void isShowingTraps(bool shown)
signal if traps are shown
void unload()
unload the current simulation
virtual void preDraw()
draw on the OpenGL widget before the main draw event
float m_gridHalfX
half of grid.x
Definition: langmuirviewer.h:587
void drawTraps(QImage &image, QColor bcolor, QColor fcolor)
draw traps on image
void showMessage(const QString &message, int timeout=0)
show a message in the status bar
~LangmuirViewer()
destroy the LangmuirViewer
void updateTrapMesh()
update trap mesh
void setStageColor2(QColor color)
Change the stage color2.
QColor m_trapColor
box parameter
Definition: langmuirviewer.h:560
A class to represent a mesh.
Definition: mesh.h:17
virtual void init()
setup OpenGL
void canCalculateIsoSurface(bool able)
signal that the isosurface can by calculated again
LangmuirViewer(QWidget *parent=0)
create the LangmuirViewer
bool okToCalculateIsoSurface()
its ok when not already calculating
Definition: langmuirviewer.h:90
void checkerSizeChanged(float)
signal that the checker size changed
QErrorMessage * m_error
error messages
Definition: langmuirviewer.h:605
Box & baseBox()
get base box object
Definition: langmuirviewer.h:140
bool m_canCalculateIsoSurface
can calculate isosurface
Definition: langmuirviewer.h:608
A class to orchestrate the calculation.
Definition: simulation.h:21
virtual void help()
open the help widget
GLuint m_textures[2]
texture ids
Definition: langmuirviewer.h:524
float m_checkerSize
size of checkers on stage
Definition: langmuirviewer.h:617
Box * m_lBox
box (left)
Definition: langmuirviewer.h:548
float m_gridZ
grid.z
Definition: langmuirviewer.h:602