• Skip to content
  • Skip to link menu
KDE 4.0 API Reference
  • KDE API Reference
  • kdeedu
  • Sitemap
  • Contact Us
 

kalzium

Avogadro::LabelEngine

Avogadro::LabelEngine Class Reference

#include <labelengine.h>

Inheritance diagram for Avogadro::LabelEngine:

Inheritance graph
[legend]

List of all members.


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]

Constructor.

Definition at line 47 of file labelengine.h.

Avogadro::LabelEngine::~LabelEngine (  )  [inline]

Deconstructor.

Definition at line 49 of file labelengine.h.


Member Function Documentation

QString Avogadro::LabelEngine::name (  )  [inline, virtual]

Returns:
engine name

Implements Avogadro::Engine.

Definition at line 54 of file labelengine.h.

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:
true if the rendering was completed successfully, false otherwise
Example
 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.
For more information on the various primitive lists available see PrimitiveQueue.

Implements Avogadro::Engine.

Definition at line 45 of file labelengine.cpp.


The documentation for this class was generated from the following files:
  • labelengine.h
  • labelengine.cpp

kalzium

Skip menu "kalzium"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdeedu

Skip menu "kdeedu"
  • kalzium
  • kanagram
  • kig
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  •   docs
  •   src
  • parley
Generated for kdeedu by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal