Langmuir
Simulation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
LangmuirView::Grid Class Reference

A class to represent simulation grid. More...

#include <grid.h>

Public Slots

virtual void makeConnections ()
 make signal/slot connections More...
 
void setDimensions (int xsize, int ysize, int zsize)
 create the grid using dimensions More...
 
void setColor (QColor color)
 set the color 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 colorChanged (QColor color)
 signal that the color of has changed More...
 
void gridChanged ()
 signal that the grid has changed More...
 
- Signals inherited from LangmuirView::SceneObject
void visibleChanged (bool drawn)
 signal that the visibility has changed More...
 

Public Member Functions

 Grid (LangmuirViewer &viewer, QObject *parent=0)
 create the Grid More...
 
 ~Grid ()
 destroy the Grid More...
 
const QColor & getColor () const
 get color 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 drawFallback ()
 render function More...
 
void drawGrid ()
 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
 OpenGL shading pipeline. More...
 
QOpenGLBuffer * m_verticesVBO
 vertices buffer More...
 
unsigned int m_numPoints
 total number of points (# vertices / 3) More...
 
QColor m_color
 color of grid More...
 
bool m_shader1OK
 shader1 ok to use More...
 
- Protected Attributes inherited from LangmuirView::SceneObject
LangmuirViewerm_viewer
 reference to OpenGL widget More...
 
bool visible_
 visibility More...
 

Detailed Description

A class to represent simulation grid.

Constructor & Destructor Documentation

LangmuirView::Grid::Grid ( LangmuirViewer viewer,
QObject *  parent = 0 
)
explicit

create the Grid

Parameters
viewerthe viewer
parentQObject this belongs to
LangmuirView::Grid::~Grid ( )

destroy the Grid

Member Function Documentation

void LangmuirView::Grid::colorChanged ( QColor  color)
signal

signal that the color of has changed

Parameters
colorvalue of color
virtual void LangmuirView::Grid::draw ( )
protectedvirtual

perform OpenGL drawing operations

Reimplemented from LangmuirView::SceneObject.

void LangmuirView::Grid::drawFallback ( )
protected

render function

void LangmuirView::Grid::drawGrid ( )
protected

render function

const QColor& LangmuirView::Grid::getColor ( ) const

get color

void LangmuirView::Grid::gridChanged ( )
signal

signal that the grid has changed

virtual void LangmuirView::Grid::init ( )
protectedvirtual

initialize object

Reimplemented from LangmuirView::SceneObject.

void LangmuirView::Grid::initShaders ( )
protected

load the shaders

virtual void LangmuirView::Grid::makeConnections ( )
virtualslot

make signal/slot connections

void LangmuirView::Grid::setColor ( QColor  color)
slot

set the color

Parameters
colorcolor to set
void LangmuirView::Grid::setDimensions ( int  xsize,
int  ysize,
int  zsize 
)
slot

create the grid using dimensions

Parameters
xsizesize of grid in x-direction
ysizesize of grid in y-direction
zsizesize of grid in z-direction

Member Data Documentation

QColor LangmuirView::Grid::m_color
protected

color of grid

unsigned int LangmuirView::Grid::m_numPoints
protected

total number of points (# vertices / 3)

QOpenGLShaderProgram LangmuirView::Grid::m_shader1
protected

OpenGL shading pipeline.

bool LangmuirView::Grid::m_shader1OK
protected

shader1 ok to use

QOpenGLBuffer* LangmuirView::Grid::m_verticesVBO
protected

vertices buffer


The documentation for this class was generated from the following file: