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

Base class for objects in OpenGL scene. More...

#include <sceneobject.h>

Public Slots

void toggleVisible ()
 toggle visibility More...
 
void setVisible (bool draw=true)
 set the visibility More...
 
virtual void makeConnections ()
 make signal/slot connections More...
 

Signals

void visibleChanged (bool drawn)
 signal that the visibility has changed More...
 

Public Member Functions

 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...
 
virtual void preDraw ()
 perform OpenGL drawing operations before draw() More...
 
virtual void postDraw ()
 perform OpenGL drawing operations after draw() More...
 

Protected Attributes

LangmuirViewerm_viewer
 reference to OpenGL widget More...
 
bool visible_
 visibility More...
 

Detailed Description

Base class for objects in OpenGL scene.

Constructor & Destructor Documentation

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

create the SceneObject

Parameters
viewerthe viewer
parentQObject this belongs to

Member Function Documentation

virtual void LangmuirView::SceneObject::draw ( )
protectedvirtual
virtual void LangmuirView::SceneObject::init ( )
protectedvirtual

initialize object

Explicitly call this in derived class constructor.

Reimplemented in LangmuirView::PointCloud, LangmuirView::Light, LangmuirView::Box, LangmuirView::Mesh, LangmuirView::Axis, LangmuirView::CornerAxis, and LangmuirView::Grid.

bool LangmuirView::SceneObject::isVisible ( )

true if object is drawn

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

make signal/slot connections

virtual void LangmuirView::SceneObject::postDraw ( )
protectedvirtual

perform OpenGL drawing operations after draw()

Reimplemented in LangmuirView::CornerAxis.

virtual void LangmuirView::SceneObject::preDraw ( )
protectedvirtual

perform OpenGL drawing operations before draw()

Reimplemented in LangmuirView::CornerAxis.

void LangmuirView::SceneObject::render ( )

calls OpenGL drawing commands.

Use this inside the paintGL() or draw() functions of the main OpenGL widget.

void LangmuirView::SceneObject::setVisible ( bool  draw = true)
slot

set the visibility

Parameters
drawtrue if object is to be drawn
void LangmuirView::SceneObject::toggleVisible ( )
slot

toggle visibility

void LangmuirView::SceneObject::visibleChanged ( bool  drawn)
signal

signal that the visibility has changed

Parameters
drawntrue if object is visible

Member Data Documentation

LangmuirViewer& LangmuirView::SceneObject::m_viewer
protected

reference to OpenGL widget

bool LangmuirView::SceneObject::visible_
protected

visibility


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