kalzium
Avogadro::SphereEngine Class Reference
#include <sphereengine.h>
Inheritance diagram for Avogadro::SphereEngine:

Detailed Description
Sphere Engine class.Definition at line 42 of file sphereengine.h.
Public Member Functions | |
| SphereEngine (QObject *parent=0) | |
| ~SphereEngine () | |
| double | radius (const Primitive *p=0) |
Description methods | |
| QString | name () |
| QString | description () |
Render Methods | |
| bool | render (const Atom *a) |
| bool | render (GLWidget *gl) |
Constructor & Destructor Documentation
| Avogadro::SphereEngine::SphereEngine | ( | QObject * | parent = 0 |
) | [inline] |
| Avogadro::SphereEngine::~SphereEngine | ( | ) | [inline] |
Member Function Documentation
| QString Avogadro::SphereEngine::name | ( | ) | [inline, virtual] |
| QString Avogadro::SphereEngine::description | ( | ) | [inline, virtual] |
- Returns:
- engine description
Implements Avogadro::Engine.
Definition at line 57 of file sphereengine.h.
| bool SphereEngine::render | ( | const Atom * | a | ) |
| bool SphereEngine::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 sphereengine.cpp.
| double SphereEngine::radius | ( | const Primitive * | primitive = 0 |
) | [virtual] |
Get the radius of the primitive referred to.
- Parameters:
-
primitive is the Primitive to get the radius of
- Returns:
- the radius of the Primitive
Reimplemented from Avogadro::Engine.
Definition at line 72 of file sphereengine.cpp.
The documentation for this class was generated from the following files:
KDE 4.0 API Reference