6 #include <QOpenGLShaderProgram>
7 #include <QOpenGLShader>
8 #include <QOpenGLBuffer>
41 Q_DECLARE_FLAGS(Modes,
Mode)
246 #endif // POINTCLOUD_H
unsigned int m_maxPoints
maximum number of points allowed (# vertices / 3)
Definition: pointcloud.h:218
static Mode QStringToMode(QString string)
convert string to Mode enum
bool m_shader3OK
shader3 ok to use
Definition: pointcloud.h:239
void drawFallback()
render function
Base class for objects in OpenGL scene.
Definition: sceneobject.h:22
static QString modeToQString(Mode mode)
convert Mode to string
Mode m_mode
rendering mode
Definition: pointcloud.h:230
void setMaxPoints(unsigned int value)
change the maximum number of points allowed
void maxRenderChanged(unsigned int value)
signal that the maximum number of points rendered has changed
const QColor & getColor() const
get color
Mode getMode() const
get render mode
virtual void makeConnections()
make signal/slot connections
void drawPoints()
render function
virtual void draw()
perform OpenGL drawing operations
void modeChanged(PointCloud::Mode mode)
signal that the render mode has changed
void drawCubes()
render function
bool m_shader1OK
shader1 ok to use
Definition: pointcloud.h:233
void setPointSize(float value)
set the point size
QOpenGLShaderProgram m_shader2
OpenGL shading pipeline for squares.
Definition: pointcloud.h:206
Q_DECLARE_METATYPE(LangmuirView::PointCloud::Mode)
PointCloud(LangmuirViewer &viewer, QObject *parent=0)
create the PointCloud
Mode
The rendering mode for the cloud.
Definition: pointcloud.h:36
unsigned int getMaxPoints()
get the maximum number of points that can be rendered
A class to represent a point cloud.
Definition: pointcloud.h:17
void setMode(Mode mode)
set the mode
unsigned int getMaxRender()
get the number of points currently being rendered
QOpenGLShaderProgram m_shader1
OpenGL shading pipeline for points.
Definition: pointcloud.h:203
render points as squares
Definition: pointcloud.h:39
QOpenGLBuffer * m_verticesVBO
vertices buffer (GPU)
Definition: pointcloud.h:212
float getPointSize() const
get x length
void colorChanged(QColor color)
signal that the color of has changed
QOpenGLShaderProgram m_shader3
OpenGL shading pipeline for cubes.
Definition: pointcloud.h:209
render points as OpenGL points
Definition: pointcloud.h:38
Widget to view Langmuir Simulation in real time.
Definition: langmuirviewer.h:47
void maxPointsChanged(unsigned int value)
signal that the maximum number of points has changed
void initShaders()
load the shaders
unsigned int m_maxRender
maximum number of points rendered (less than or equal to max points)
Definition: pointcloud.h:221
void drawSquares()
render function
QVector< float > & vertices()
get the list of vertices (CPU memory)
Definition: pointcloud.h:37
virtual void init()
initialize object
~PointCloud()
destroy the PointCloud
QColor m_color
color of points
Definition: pointcloud.h:227
void setMaxRender(unsigned int value)
change the maximum number of points to render
bool m_shader2OK
shader2 ok to use
Definition: pointcloud.h:236
float m_pointSize
the size of points
Definition: pointcloud.h:224
QVector< float > m_vertices
vertices buffer (CPU)
Definition: pointcloud.h:215
void pointSizeChanged(float value)
signal that the point size has changed
void updateVBO()
update the GPU memory using CPU vertices
void setColor(QColor color)
set the color