kalzium
Avogadro::LabelEngine Class Reference
#include <labelengine.h>
Inheritance diagram for Avogadro::LabelEngine:

Detailed Description
Label Engine class.Definition at line 41 of file labelengine.h.
Public Member Functions | |
| LabelEngine (QObject *parent=0) | |
| ~LabelEngine () | |
Description methods | |
| QString | name () |
| QString | description () |
Render Methods | |
| bool | render (GLWidget *gl) |
Constructor & Destructor Documentation
| Avogadro::LabelEngine::LabelEngine | ( | QObject * | parent = 0 |
) | [inline] |
| Avogadro::LabelEngine::~LabelEngine | ( | ) | [inline] |
Member Function Documentation
| QString Avogadro::LabelEngine::name | ( | ) | [inline, virtual] |
| QString Avogadro::LabelEngine::description | ( | ) | [inline, virtual] |
- Returns:
- engine description
Implements Avogadro::Engine.
Definition at line 56 of file labelengine.h.
| bool LabelEngine::render | ( | GLWidget * | gl | ) | [virtual] |
Render a PrimitiveQueue.
This function is allowed to rendering whatever primitives it wishes. There is no requirement that it render every primitive.
- Parameters:
-
queue This parameter is of type PrimitiveQueue which provides an organized list of Primitive* objects. During generation of the GL view engines will have their render function called at most once. It is the responsibility of the engine to render all of the objects in it's queue if it can.
- Returns:
trueif the rendering was completed successfully,falseotherwise
Engine::render(const PrimitiveQueue *queue) { const QList<Primitive *> *list; glPushName(Primitive::AtomType); list = q->primitiveList(Primitive::AtomType); for( int i=0; i<list->size(); i++ ) { Bond *atom = (*list)[i]; glPushName(atom->GetIdx()); *** render atom *** glPopName(); } glPushName(Primitive::BondType); list = q->primitiveList(Primitive::BondType); for( int i=0; i<list->size(); i++ ) { Bond *bond = (*list)[i]; glPushName(bond->GetIdx()); *** render bond *** glPopName(); } glPopName(); return true; }
- Note:
- To allow picking to happen you need to push the object type and name. If objects cannot be picked this may be omitted.
Implements Avogadro::Engine.
Definition at line 45 of file labelengine.cpp.
The documentation for this class was generated from the following files:
KDE 4.0 API Reference