arbeit
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

GLItem Class Reference

#include <GLItems.h>

Inheritance diagram for GLItem:

GLUItem GLUEdgeWidget GLUNodeWidget List of all members.

Detailed Description

a generic gl object, just a base class

Definition at line 30 of file GLItems.h.

compile to a display list?

bool compiles () const
void setCompile (bool yes)

Public Member Functions

virtual ~GLItem ()
void drawGL ()
 drawGL handles some display list stuff for you, you have to call "setUP()" if the object changes and needs to have the disp list re-compiled.

void setUp (bool yes=true)
 object needs update? something changed, for display lists mostly

void initNames (unsigned int name1, unsigned int name2)
 gl name for picking + push "this pointer" as second name be sure to call "popNames when you are through" ...

void pushName (unsigned int name)
 push a name on the pick stack, keeps track of how many you pushed so that when you call popNames() they all come off

void popNames ()
 pop all names pushed on stack


Protected Member Functions

virtual void drawGLDef ()=0
 GLItem (bool compile=true)
 GLItem (const GLItem &gli)

Protected Attributes

GLuint _listName
bool _compile
bool _update
int _numNames


Constructor & Destructor Documentation

virtual GLItem::~GLItem  )  [inline, virtual]
 

Definition at line 32 of file GLItems.h.

GLItem::GLItem bool  compile = true  )  [inline, protected]
 

Definition at line 79 of file GLItems.h.

References _compile, _listName, _numNames, _update, and glGenLists().

GLItem::GLItem const GLItem gli  )  [inline, protected]
 

Definition at line 84 of file GLItems.h.

References _compile, _listName, _numNames, _update, and glGenLists().


Member Function Documentation

bool GLItem::compiles  )  const [inline]
 

Definition at line 47 of file GLItems.h.

References _compile.

void GLItem::drawGL  ) 
 

drawGL handles some display list stuff for you, you have to call "setUP()" if the object changes and needs to have the disp list re-compiled.

drawGL() only calls "drawGLDef()" if the display list is being recompiled or you turn compilation off.

See also:
setCompile

Definition at line 31 of file GLItems.cpp.

References _compile, _listName, _update, drawGLDef(), GL_COMPILE, glCallList(), glEndList(), glErr(), glGenLists(), glIsList(), and glNewList().

Referenced by GLUEdgeWidget::drawDef(), and GLUNodeWidget::drawDef().

virtual void GLItem::drawGLDef  )  [protected, pure virtual]
 

Implemented in GLUItem, GLUNodeWidget, and GLUEdgeWidget.

Referenced by drawGL().

void GLItem::initNames unsigned int  name1,
unsigned int  name2
 

gl name for picking + push "this pointer" as second name be sure to call "popNames when you are through" ...

the drawGL() calls initNames() draw() popNames()

Definition at line 60 of file GLItems.cpp.

References pushName().

Referenced by GLUEdgeWidget::drawDef(), and GLUNodeWidget::drawDef().

void GLItem::popNames  ) 
 

pop all names pushed on stack

Definition at line 72 of file GLItems.cpp.

References _numNames, and glPopName().

Referenced by GLUEdgeWidget::drawDef(), and GLUNodeWidget::drawDef().

void GLItem::pushName unsigned int  name  ) 
 

push a name on the pick stack, keeps track of how many you pushed so that when you call popNames() they all come off

Definition at line 66 of file GLItems.cpp.

References _numNames, glPushName(), and name.

Referenced by initNames().

void GLItem::setCompile bool  yes  )  [inline]
 

Definition at line 48 of file GLItems.h.

References _compile.

void GLItem::setUp bool  yes = true  )  [inline]
 

object needs update? something changed, for display lists mostly

Definition at line 55 of file GLItems.h.

References _update.

Referenced by GLUEdgeWidget::appearanceChanged(), GLUNodeWidget::appearanceChanged(), GLUItem::operator=(), GLUItem::setSlice(), and GLUItem::setStack().


Member Data Documentation

bool GLItem::_compile [protected]
 

Definition at line 75 of file GLItems.h.

Referenced by compiles(), drawGL(), GLItem(), and setCompile().

GLuint GLItem::_listName [protected]
 

Definition at line 74 of file GLItems.h.

Referenced by drawGL(), and GLItem().

int GLItem::_numNames [protected]
 

Definition at line 77 of file GLItems.h.

Referenced by GLItem(), popNames(), and pushName().

bool GLItem::_update [protected]
 

Definition at line 76 of file GLItems.h.

Referenced by drawGL(), GLItem(), and setUp().


The documentation for this class was generated from the following files:
Send questions, comments, and bug reports to:
jmk