#include <GLItems.h>
Inheritance diagram for GLUItem:
Its drawGLDef() does nothing, but it does allow you to draw various items. A concrete subclass should implement "drawGLDef()" and call one or more of the draw-shape functions. You can also create a GLUItem and just call the draw-shape functions.
Definition at line 97 of file GLItems.h.
Slices & Stacks. | |
These define the subdivisions used to tesselate the quadric to a polygon. | |
int | getSlice () const |
void | setSlice (int slice) |
int | getStack () const |
void | setStack (int stack) |
Draw-shape, creates the geometry for a shape | |
void | drawSphere (const gutz::vec3f &pos, float rad) |
GLUItem :: draw sphere. | |
void | drawBar (const gutz::vec3f &start, const gutz::vec3f &end, float rad) |
GLUItem :: draw bar. | |
compile to a display list? | |
bool | compiles () const |
void | setCompile (bool yes) |
Public Member Functions | |
GLUItem (int slice=20, int stack=20) | |
GLUItem :: construct. | |
GLUItem (const GLUItem &gi) | |
GLUItem & | operator= (const GLUItem &gi) |
assign | |
virtual | ~GLUItem () |
GLUItem :: destruct. | |
GLUquadricObj * | getObj () const |
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 () |
does nothing!!! | |
Protected Attributes | |
GLUquadricObj * | _qobj |
int | _slice |
int | _stack |
GLuint | _listName |
bool | _compile |
bool | _update |
int | _numNames |
|
GLUItem :: construct.
Definition at line 90 of file GLItems.cpp. |
|
Definition at line 96 of file GLItems.cpp. |
|
GLUItem :: destruct.
Definition at line 117 of file GLItems.cpp. References _qobj. |
|
Definition at line 47 of file GLItems.h. References GLItem::_compile. |
|
GLUItem :: draw bar.
Definition at line 138 of file GLItems.cpp. References _qobj, _slice, _stack, end, glMultMatrixf(), glPopMatrix(), glPushMatrix(), len, gutz::mat4f, start, gutz::vec3f, and gutz::vec3f_z. Referenced by GLUEdgeWidget::drawGLDef(). |
|
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.
Definition at line 31 of file GLItems.cpp. References GLItem::_compile, GLItem::_listName, GLItem::_update, GLItem::drawGLDef(), GL_COMPILE, glCallList(), glEndList(), glErr(), glGenLists(), glIsList(), and glNewList(). Referenced by GLUEdgeWidget::drawDef(), and GLUNodeWidget::drawDef(). |
|
does nothing!!!
Implements GLItem. Reimplemented in GLUNodeWidget, and GLUEdgeWidget. |
|
GLUItem :: draw sphere.
Definition at line 125 of file GLItems.cpp. References _qobj, _slice, _stack, glPopMatrix(), glPushMatrix(), and glTranslatef(). Referenced by GLUNodeWidget::drawGLDef(), and GLSurfaceWidget::drawQuad(). |
|
Definition at line 104 of file GLItems.h. References _qobj. |
|
Definition at line 111 of file GLItems.h. References _slice. |
|
Definition at line 113 of file GLItems.h. References _stack. |
|
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 GLItem::pushName(). Referenced by GLUEdgeWidget::drawDef(), and GLUNodeWidget::drawDef(). |
|
assign
Definition at line 105 of file GLItems.cpp. References _slice, _stack, and GLItem::setUp(). Referenced by GLUEdgeWidget::operator=(), and GLUNodeWidget::operator=(). |
|
pop all names pushed on stack
Definition at line 72 of file GLItems.cpp. References GLItem::_numNames, and glPopName(). Referenced by GLUEdgeWidget::drawDef(), and GLUNodeWidget::drawDef(). |
|
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 GLItem::_numNames, glPushName(), and name. Referenced by GLItem::initNames(). |
|
Definition at line 48 of file GLItems.h. References GLItem::_compile. |
|
Definition at line 112 of file GLItems.h. References _slice, and GLItem::setUp(). |
|
Definition at line 114 of file GLItems.h. References _stack, and GLItem::setUp(). |
|
object needs update? something changed, for display lists mostly
Definition at line 55 of file GLItems.h. References GLItem::_update. Referenced by GLUEdgeWidget::appearanceChanged(), GLUNodeWidget::appearanceChanged(), operator=(), setSlice(), and setStack(). |
|
Definition at line 75 of file GLItems.h. Referenced by GLItem::compiles(), GLItem::drawGL(), GLItem::GLItem(), and GLItem::setCompile(). |
|
Definition at line 74 of file GLItems.h. Referenced by GLItem::drawGL(), and GLItem::GLItem(). |
|
Definition at line 77 of file GLItems.h. Referenced by GLItem::GLItem(), GLItem::popNames(), and GLItem::pushName(). |
|
Definition at line 129 of file GLItems.h. Referenced by drawBar(), drawSphere(), getObj(), and ~GLUItem(). |
|
Definition at line 130 of file GLItems.h. Referenced by drawBar(), drawSphere(), getSlice(), operator=(), and setSlice(). |
|
Definition at line 131 of file GLItems.h. Referenced by drawBar(), drawSphere(), getStack(), operator=(), and setStack(). |
|
Definition at line 76 of file GLItems.h. Referenced by GLItem::drawGL(), GLItem::GLItem(), and GLItem::setUp(). |