Langmuir
Simulation
|
A class to represent a mesh. More...
#include <mesh.h>
Public Types | |
enum | Mode { Single = 1, SingleAlpha = 2, Double = 3, DoubleAlpha = 4, Shader1 = 5, Shader2 = 6 } |
The rendering mode for the cloud. More... | |
Public Slots | |
virtual void | makeConnections () |
make signal/slot connections More... | |
void | setColorA (QColor color) |
set color A More... | |
void | setColorB (QColor color) |
set color B More... | |
void | setMesh (const QVector< float > &vertices, const QVector< float > &normals, const QVector< unsigned int > &indices) |
set up the mesh on the GPU More... | |
void | setMode (Mesh::Mode mode) |
set the mode More... | |
void | clear () |
clear GPU buffers More... | |
static QString | modeToQString (Mode mode) |
convert Mode to string More... | |
static Mode | QStringToMode (QString string) |
convert string to Mode enum 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 | colorAChanged (QColor color) |
signal that color A of has changed More... | |
void | colorBChanged (QColor color) |
signal that color B of has changed More... | |
void | meshChanged () |
signal that the mesh has changed More... | |
void | modeChanged (Mesh::Mode mode) |
signal that the render mode has changed More... | |
void | modeChanged (QString mode) |
signal that the render mode has changed More... | |
Signals inherited from LangmuirView::SceneObject | |
void | visibleChanged (bool drawn) |
signal that the visibility has changed More... | |
Public Member Functions | |
Mesh (LangmuirViewer &viewer, QObject *parent=0) | |
create the Mesh More... | |
~Mesh () | |
destroy the Mesh More... | |
const QColor & | getColorA () const |
get color A More... | |
const QColor & | getColorB () const |
get color B More... | |
Mode | getMode () const |
get render mode 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... | |
void | initShaders () |
load the shaders More... | |
void | drawSingle () |
render function More... | |
void | drawSingleAlpha () |
render function More... | |
void | drawDouble () |
render function More... | |
void | drawDoubleAlpha () |
render function More... | |
void | drawShader1 () |
render function More... | |
void | drawShader2 () |
render function 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 | |
QOpenGLShaderProgram | m_shader1 |
tesselation shader More... | |
QOpenGLShaderProgram | m_shader2 |
tesselation shader More... | |
QOpenGLBuffer * | m_verticesVBO |
vertices buffer More... | |
QOpenGLBuffer * | m_normalsVBO |
normals buffer More... | |
QOpenGLBuffer * | m_indexVBO |
index buffer CW More... | |
QColor | m_colorA |
color of side A More... | |
QColor | m_colorB |
color of side B More... | |
unsigned int | m_numVertices |
number of vertices (3 * number of points) More... | |
unsigned int | m_numIndices |
index count More... | |
Mode | m_mode |
rendering mode More... | |
bool | m_shader1OK |
shader1 ok to use More... | |
bool | m_shader2OK |
shader2 ok to use More... | |
Protected Attributes inherited from LangmuirView::SceneObject | |
LangmuirViewer & | m_viewer |
reference to OpenGL widget More... | |
bool | visible_ |
visibility More... | |
A class to represent a mesh.
|
explicit |
create the Mesh
viewer | the viewer |
parent | QObject this belongs to |
LangmuirView::Mesh::~Mesh | ( | ) |
destroy the Mesh
|
slot |
clear GPU buffers
|
signal |
signal that color A of has changed
color | value of color |
|
signal |
signal that color B of has changed
color | value of color |
|
protectedvirtual |
perform OpenGL drawing operations
Reimplemented from LangmuirView::SceneObject.
|
protected |
render function
|
protected |
render function
|
protected |
render function
|
protected |
render function
|
protected |
render function
|
protected |
render function
const QColor& LangmuirView::Mesh::getColorA | ( | ) | const |
get color A
const QColor& LangmuirView::Mesh::getColorB | ( | ) | const |
get color B
Mode LangmuirView::Mesh::getMode | ( | ) | const |
get render mode
|
protectedvirtual |
initialize object
Reimplemented from LangmuirView::SceneObject.
|
protected |
load the shaders
|
virtualslot |
make signal/slot connections
|
signal |
signal that the mesh has changed
|
signal |
signal that the render mode has changed
mode | value of rendering mode |
|
signal |
signal that the render mode has changed
mode | value of rendering mode |
|
staticslot |
convert Mode to string
mode | mode enum |
|
staticslot |
convert string to Mode enum
string | mode string |
|
slot |
set color A
color | color to set |
|
slot |
set color B
color | color to set |
|
slot |
set up the mesh on the GPU
vertices | vertex buffer |
normals | normal buffer |
indices | index buffer |
|
slot |
set the mode
mode | mode to set |
|
protected |
color of side A
|
protected |
color of side B
|
protected |
index buffer CW
|
protected |
rendering mode
|
protected |
normals buffer
|
protected |
index count
|
protected |
number of vertices (3 * number of points)
|
protected |
tesselation shader
|
protected |
shader1 ok to use
|
protected |
tesselation shader
|
protected |
shader2 ok to use
|
protected |
vertices buffer