# Visualization Library

A lightweight C++ OpenGL middleware for 2D/3D graphics

[Home] [Tutorials] [All Classes] [Grouped Classes]

Public Member Functions | Protected Member Functions | Protected Attributes

# vl::Molecule Class Reference

The Molecule class is used to manage and render 3D molecular structures. More...

`#include <Molecule.hpp>`

Inheritance diagram for vl::Molecule:

List of all members.

## Public Member Functions

| Molecule ()
| ~Molecule ()
| Molecule (const Molecule &other)
Molecule & | operator= (const Molecule &other)
void | reset ()
void | setMoleculeName (const String &name)
const String | moleculeName () const
unsigned int | id () const
void | setId (unsigned int id)
KeyValues * | tags ()
const KeyValues * | tags () const
const std::vector< ref< Atom > > & | atoms () const
std::vector< ref< Atom > > & | atoms ()
int | atomCount () const
const Atom * | atom (int index) const
Atom * | atom (int index)
void | addAtom (Atom *atom)
void | eraseAtom (Atom *atom)
void | eraseAtom (int index)
void | eraseAllAtoms ()
const std::vector< ref< Bond > > & | bonds () const
std::vector< ref< Bond > > & | bonds ()
int | bondCount () const
const Bond * | bond (int index) const
Bond * | bond (int index)
const Bond * | bond (Atom *a1, Atom *a2) const
Bond * | bond (Atom *a1, Atom *a2)
void | addBond (Bond *bond)
Bond * | addBond (Atom *a1, Atom *a2)
void | eraseBond (Bond *bond)
void | eraseBond (int bond)
void | eraseBond (Atom *a1, Atom *a2)
void | eraseBond (int a1, int a2)
void | eraseAllBonds ()
void | computeAtomAdjacency ()
void | incidentBonds (std::vector< Bond * > &inc_bonds, Atom *atom)
const std::vector< ref< Atom > > & | cycle (int i) const
| Returns the i-th cycle.
std::vector< ref< Atom > > & | cycle (int i)
| Returns the i-th cycle.
const std::vector< std::vector < ref< Atom > > > & | cycles () const
| Returns the list of cycles.
std::vector< std::vector< ref < Atom > > > & | cycles ()
| Returns the list of cycles.
void | prepareForRendering ()
| Generates the geometry representing the current molecule, atom and bond settings.
const ActorTree * | actorTree () const
| The ActorTree node containing the Actor[s] representing the molecule.
ActorTree * | actorTree ()
| The ActorTree node containing the Actor[s] representing the molecule.
void | setCPKAtomColors ()
| Sets all the atoms' color to their CPK color.
void | setAtomColors (const fvec4 &color)
| Sets all the atoms' color to the specified color.
void | setCalculatedAtomRadii (float percentage=1.0f)
| Sets all the atoms' radii to their calculated atom radii.
void | setEmpiricalAtomRadii (float percentage=1.0f)
| Sets all the atoms' radii to their empirical atom radii.
void | setCovalentAtomRadii (float percentage=1.0f)
| Sets all the atoms' radii to their covalent atom radii.
void | setVanDerWaalsAtomRadii (float percentage=1.0f)
| Sets all the atoms' radii to their van der Waals atom radii.
void | setAtomRadii (float radius)
| Sets all the atoms' radii to the specified one.
void | setBondRadii (float radius)
| Sets all the bonds' radii to the specified one.
void | setAtomTypeVisible (EAtomType type, bool visible)
void | setMoleculeStyle (EMoleculeStyle style)
| The rendering style of the molecule.
EMoleculeStyle | moleculeStyle () const
| The rendering style of the molecule.
void | setAtomDetail (int detail)
| Geometrical detail used to render the atoms, usually between 0 and 3 (default is 2)
int | atomDetail () const
| Geometrical detail used to render the atoms, usually between 0 and 3 (default is 2)
void | setBondDetail (int detail)
| Geometrical detail used to render the bonds, usually between 5 and 50 (default is 20)
int | bondDetail () const
| Geometrical detail used to render the bonds, usually between 5 and 50 (default is 20)
float | ringOffset () const
void | setRingOffset (float offset)
void | setAromaticBondsColor (const fvec4 &color)
void | setAromaticRingColor (const fvec4 &color)
const fvec4 & | aromaticRingColor () const
float | lineWidth () const
bool | smoothLines () const
void | setLineWidth (float w)
void | setSmoothLines (bool smooth)
Transform * | transformTree ()
| The transform tree used by the generated bonds, atoms and labels.
const Transform * | transformTree () const
| The transform tree used by the generated bonds, atoms and labels.
const Text * | atomLabelTemplate () const
| The text settings to be used to render the atom labels.
Text * | atomLabelTemplate ()
| The text settings to be used to render the atom labels.
void | setShowAtomNames (bool show)
| Globally defines whether the atom names should be rendered or not. See also Atom::setShowAtomName().
bool | showAtomNames () const
| Globally defines whether the atom names should be rendered or not. See also Atom::setShowAtomName().
const Effect * | atomLabelEffect () const
| The Effect used to render the atom labels.
Effect * | atomLabelEffect ()
| The Effect used to render the atom labels.
void | setMoleculeToActorMapEnabled (bool enabled)
| If enabled the atomToActorMap() and bondToActorMap() maps will be compiled next time the molecule's geometry is regenerated (except for wireframe style).
bool | isMoleculeToActorMapEnabled () const
| If enabled the atomToActorMap() and bondToActorMap() maps will be compiled next time the molecule's geometry is regenerated (except for wireframe style).
void | setActorToMoleculeMapEnabled (bool enabled)
| If enabled the actorToAtomMap() and actorToBondMap() maps will be compiled next time the molecule's geometry is regenerated (except for wireframe style).
bool | isActorToMoleculeMapEnabled () const
| If enabled the actorToAtomMap() and actorToBondMap() maps will be compiled next time the molecule's geometry is regenerated (except for wireframe style).
const std::map< ref< Atom > , ref< Actor > > & | atomToActorMap () const
| Maps an Atom to it's corresponding Actor.
const std::map< ref< Actor > , ref< Atom > > & | actorToAtomMap () const
| Maps an Actor to it's corresponding Atom.
const std::map< ref< Bond > , ref< Actor > > & | bondToActorMap () const
| Maps a Bond to it's corresponding Actor.
const std::map< ref< Actor > , ref< Bond > > & | actorToBondMap () const
| Maps an Actor to it's corresponding Bond.
std::map< ref< Atom >, ref < Actor > > & | atomToActorMap ()
| Maps an Atom to it's corresponding Actor.
std::map< ref< Actor >, ref < Atom > > & | actorToAtomMap ()
| Maps an Actor to it's corresponding Atom.
std::map< ref< Bond >, ref < Actor > > & | bondToActorMap ()
| Maps a Bond to it's corresponding Actor.
std::map< ref< Actor >, ref < Bond > > & | actorToBondMap ()
| Maps an Actor to it's corresponding Bond.

## Protected Member Functions

void | prepareAtomInsert (int bonus=100)
void | prepareBondInsert (int bonus=100)
void | wireframeStyle ()
void | atomsStyle ()
void | ballAndStickStyle ()
void | sticksStyle ()
void | generateRings ()
void | generateAtomLabels ()
void | generateAtomLabel (const Atom *atom, Transform *tr)

## Protected Attributes

fvec4 | mAromaticRingColor
ref< ActorTree > | mActorTree
ref< Transform > | mTransformTree
std::vector< ref< Atom > > | mAtoms
std::vector< ref< Bond > > | mBonds
std::vector< std::vector< ref < Atom > > > | mCycles
std::map< ref< Atom >, ref < Actor > > | mAtomToActorMap
std::map< ref< Actor >, ref < Atom > > | mActorToAtomMap
std::map< ref< Bond >, ref < Actor > > | mBondToActorMap
std::map< ref< Actor >, ref < Bond > > | mActorToBondMap
String | mMoleculeName
ref< KeyValues > | mTags
ref< Text > | mAtomLabelTemplate
ref< Effect > | mAtomLabelEffect
unsigned int | mId
EMoleculeStyle | mMoleculeStyle
int | mAtomDetail
int | mBondDetail
float | mRingOffset
float | mLineWidth
bool | mSmoothLines
bool | mShowAtomNames
bool | mMoleculeToActorMapEnabled
bool | mActorToMoleculeMapEnabled

## Detailed Description

The Molecule class is used to manage and render 3D molecular structures.

See also:
  - Molecule Visualization Tutorial
  - Atom
  - Bond

Definition at line 64 of file Molecule.hpp.

## Constructor & Destructor Documentation

Molecule::Molecule | ( | ) |

Definition at line 38 of file Molecule.cpp.

References vl::EN_BLEND, mAtomLabelEffect, reset(), and VL_DEBUG_SET_OBJECT_NAME.

vl::Molecule::~Molecule | ( | ) | `[inline]`

Definition at line 70 of file Molecule.hpp.

vl::Molecule::Molecule | ( | const Molecule & | other ) | `[inline]`

Definition at line 71 of file Molecule.hpp.

## Member Function Documentation

Molecule & Molecule::operator= | ( | const Molecule & | other ) |

Definition at line 76 of file Molecule.cpp.

References atom(), vl::Bond::atom1(), vl::Bond::atom2(), atoms(), bond(), bonds(), cycle(), mAromaticRingColor, mAtomDetail, mBondDetail, mCycles, mLineWidth, mMoleculeName, mMoleculeStyle, mRingOffset, mSmoothLines, mTags, and reset().

void Molecule::reset | ( | ) |

Definition at line 50 of file Molecule.cpp.

References vl::KeyValues::clear(), vl::String::clear(), mActorToAtomMap, mActorToBondMap, mActorToMoleculeMapEnabled, mActorTree, mAromaticRingColor, mAtomDetail, mAtoms, mAtomToActorMap, mBondDetail, mBonds, mBondToActorMap, mCycles, mId, mLineWidth, mMoleculeName, mMoleculeStyle, mMoleculeToActorMapEnabled, mRingOffset, vl::MS_BallAndStick, mShowAtomNames, mSmoothLines, and tags().

Referenced by Molecule(), and operator=().

void vl::Molecule::setMoleculeName | ( | const String & | name ) | `[inline]`

Definition at line 76 of file Molecule.hpp.

const String vl::Molecule::moleculeName | ( | ) | const`[inline]`

Definition at line 77 of file Molecule.hpp.

unsigned int vl::Molecule::id | ( | ) | const`[inline]`

Definition at line 79 of file Molecule.hpp.

void vl::Molecule::setId | ( | unsigned int | id ) | `[inline]`

Definition at line 80 of file Molecule.hpp.

KeyValues* vl::Molecule::tags | ( | ) | `[inline]`

Definition at line 82 of file Molecule.hpp.

Referenced by reset().

const KeyValues* vl::Molecule::tags | ( | ) | const`[inline]`

Definition at line 83 of file Molecule.hpp.

const std::vector< ref<Atom> >& vl::Molecule::atoms | ( | ) | const`[inline]`

Definition at line 85 of file Molecule.hpp.

Referenced by addAtom(), eraseAtom(), vl::RingExtractor::keepMinimalCycles(), operator=(), setAtomColors(), setAtomRadii(), setAtomTypeVisible(), setCalculatedAtomRadii(), setCovalentAtomRadii(), setCPKAtomColors(), setEmpiricalAtomRadii(), and setVanDerWaalsAtomRadii().

std::vector< ref<Atom> >& vl::Molecule::atoms | ( | ) | `[inline]`

Definition at line 86 of file Molecule.hpp.

int vl::Molecule::atomCount | ( | ) | const`[inline]`

Definition at line 88 of file Molecule.hpp.

Referenced by vl::RingExtractor::bootstrap(), and computeAtomAdjacency().

const Atom * Molecule::atom | ( | int | index ) | const

Definition at line 115 of file Molecule.cpp.

References mAtoms.

Referenced by vl::RingExtractor::bootstrap(), computeAtomAdjacency(), eraseAtom(), eraseBond(), incidentBonds(), operator=(), and setAtomTypeVisible().

Atom * Molecule::atom | ( | int | index ) |

Definition at line 117 of file Molecule.cpp.

References mAtoms.

void Molecule::addAtom | ( | Atom * | atom ) |

Definition at line 119 of file Molecule.cpp.

References atoms(), and prepareAtomInsert().

void Molecule::eraseAtom | ( | Atom * | atom ) |

Definition at line 141 of file Molecule.cpp.

References atom(), atoms(), eraseBond(), and incidentBonds().

void Molecule::eraseAtom | ( | int | index ) |

Definition at line 132 of file Molecule.cpp.

References atom(), atoms(), eraseBond(), and incidentBonds().

void Molecule::eraseAllAtoms | ( | ) |

Definition at line 125 of file Molecule.cpp.

References mAtoms, mBonds, and mCycles.

const std::vector< ref<Bond> >& vl::Molecule::bonds | ( | ) | const`[inline]`

Definition at line 96 of file Molecule.hpp.

Referenced by addBond(), bond(), eraseAllBonds(), eraseBond(), operator=(), setAromaticBondsColor(), and setBondRadii().

std::vector< ref<Bond> >& vl::Molecule::bonds | ( | ) | `[inline]`

Definition at line 97 of file Molecule.hpp.

int vl::Molecule::bondCount | ( | ) | const`[inline]`

Definition at line 99 of file Molecule.hpp.

Referenced by computeAtomAdjacency(), and incidentBonds().

const Bond * Molecule::bond | ( | int | index ) | const

Definition at line 167 of file Molecule.cpp.

References mBonds.

Referenced by addBond(), bond(), computeAtomAdjacency(), eraseBond(), incidentBonds(), vl::RingExtractor::keepAromaticCycles(), and operator=().

Bond * Molecule::bond | ( | int | index ) |

Definition at line 169 of file Molecule.cpp.

References mBonds.

const Bond * Molecule::bond | ( | Atom * | a1,
|  | Atom * | a2
| ) |  | const

Definition at line 171 of file Molecule.cpp.

References vl::Bond::atom1(), vl::Bond::atom2(), bond(), bonds(), and NULL.

Bond * Molecule::bond | ( | Atom * | a1,
|  | Atom * | a2
| ) |  |

Definition at line 179 of file Molecule.cpp.

References vl::Bond::atom1(), vl::Bond::atom2(), bond(), bonds(), and NULL.

void Molecule::addBond | ( | Bond * | bond ) |

Definition at line 187 of file Molecule.cpp.

References bonds(), and prepareBondInsert().

Bond * Molecule::addBond | ( | Atom * | a1,
|  | Atom * | a2
| ) |  |

Definition at line 157 of file Molecule.cpp.

References bond(), bonds(), vl::ref< T >::get(), and prepareBondInsert().

void Molecule::eraseBond | ( | Bond * | bond ) |

Definition at line 193 of file Molecule.cpp.

References bond(), and bonds().

Referenced by eraseAtom(), and eraseBond().

void Molecule::eraseBond | ( | int | bond ) |

Definition at line 205 of file Molecule.cpp.

References bonds().

void Molecule::eraseBond | ( | Atom * | a1,
|  | Atom * | a2
| ) |  |

Definition at line 209 of file Molecule.cpp.

References vl::Bond::atom1(), vl::Bond::atom2(), bond(), and bonds().

void Molecule::eraseBond | ( | int | a1,
|  | int | a2
| ) |  |

Definition at line 222 of file Molecule.cpp.

References atom(), and eraseBond().

void Molecule::eraseAllBonds | ( | ) |

Definition at line 207 of file Molecule.cpp.

References bonds().

void Molecule::computeAtomAdjacency | ( | ) |

Definition at line 224 of file Molecule.cpp.

References vl::Atom::adjacentAtoms(), atom(), vl::Bond::atom1(), vl::Bond::atom2(), atomCount(), bond(), and bondCount().

Referenced by vl::RingExtractor::bootstrap().

void Molecule::incidentBonds | ( | std::vector< Bond * > & | inc_bonds,
|  | Atom * | atom
| ) |  |

Definition at line 235 of file Molecule.cpp.

References atom(), vl::Bond::atom1(), vl::Bond::atom2(), bond(), and bondCount().

Referenced by eraseAtom().

const std::vector< ref<Atom> >& vl::Molecule::cycle | ( | int | i ) | const`[inline]`

Returns the i-th cycle.

Definition at line 116 of file Molecule.hpp.

Referenced by vl::RingExtractor::keepAromaticCycles(), vl::RingExtractor::keepPlanarCycles(), operator=(), vl::RingExtractor::removeDoubles(), and vl::RingExtractor::sortCycles().

std::vector< ref<Atom> >& vl::Molecule::cycle | ( | int | i ) | `[inline]`

Returns the i-th cycle.

Definition at line 118 of file Molecule.hpp.

const std::vector< std::vector< ref<Atom> > >& vl::Molecule::cycles | ( | ) | const`[inline]`

Returns the list of cycles.

Definition at line 121 of file Molecule.hpp.

Referenced by vl::RingExtractor::depthFirstVisit(), vl::RingExtractor::keepAromaticCycles(), vl::RingExtractor::keepMinimalCycles(), vl::RingExtractor::keepPlanarCycles(), vl::RingExtractor::removeDoubles(), and vl::RingExtractor::sortCycles().

std::vector< std::vector< ref<Atom> > >& vl::Molecule::cycles | ( | ) | `[inline]`

Returns the list of cycles.

Definition at line 123 of file Molecule.hpp.

void Molecule::prepareForRendering | ( | ) |

Generates the geometry representing the current molecule, atom and bond settings.

The actors, geometry, and transforms generated by this function can be found in actorTree() and transformTree().

Definition at line 185 of file Molecule_rendering.cpp.

References vl::MS_AtomsOnly, vl::MS_BallAndStick, vl::MS_Sticks, and vl::MS_Wireframe.

const ActorTree* vl::Molecule::actorTree | ( | ) | const`[inline]`

The ActorTree node containing the Actor[s] representing the molecule.

Definition at line 131 of file Molecule.hpp.

ActorTree* vl::Molecule::actorTree | ( | ) | `[inline]`

The ActorTree node containing the Actor[s] representing the molecule.

Definition at line 133 of file Molecule.hpp.

void Molecule::setCPKAtomColors | ( | ) |

Sets all the atoms' color to their CPK color.

Definition at line 243 of file Molecule.cpp.

References vl::atomInfo(), atoms(), and vl::atomType().

void Molecule::setAtomColors | ( | const fvec4 & | color ) |

Sets all the atoms' color to the specified color.

Definition at line 249 of file Molecule.cpp.

References atoms().

void Molecule::setCalculatedAtomRadii | ( | float | percentage = `1.0f` ) |

Sets all the atoms' radii to their calculated atom radii.

Definition at line 255 of file Molecule.cpp.

References vl::atomInfo(), atoms(), and vl::atomType().

void Molecule::setEmpiricalAtomRadii | ( | float | percentage = `1.0f` ) |

Sets all the atoms' radii to their empirical atom radii.

Definition at line 261 of file Molecule.cpp.

References vl::atomInfo(), atoms(), and vl::atomType().

void Molecule::setCovalentAtomRadii | ( | float | percentage = `1.0f` ) |

Sets all the atoms' radii to their covalent atom radii.

Definition at line 267 of file Molecule.cpp.

References vl::atomInfo(), atoms(), and vl::atomType().

void Molecule::setVanDerWaalsAtomRadii | ( | float | percentage = `1.0f` ) |

Sets all the atoms' radii to their van der Waals atom radii.

Definition at line 273 of file Molecule.cpp.

References vl::atomInfo(), atoms(), and vl::atomType().

void Molecule::setAtomRadii | ( | float | radius ) |

Sets all the atoms' radii to the specified one.

Definition at line 279 of file Molecule.cpp.

References atoms().

void Molecule::setBondRadii | ( | float | radius ) |

Sets all the bonds' radii to the specified one.

Definition at line 285 of file Molecule.cpp.

References bonds().

void Molecule::setAtomTypeVisible | ( | EAtomType | type,
|  | bool | visible
| ) |  |

Definition at line 291 of file Molecule.cpp.

References atom(), atoms(), vl::Atom::atomType(), and vl::Atom::setVisible().

void vl::Molecule::setMoleculeStyle | ( | EMoleculeStyle | style ) | `[inline]`

The rendering style of the molecule.

Definition at line 156 of file Molecule.hpp.

EMoleculeStyle vl::Molecule::moleculeStyle | ( | ) | const`[inline]`

The rendering style of the molecule.

Definition at line 158 of file Molecule.hpp.

void vl::Molecule::setAtomDetail | ( | int | detail ) | `[inline]`

Geometrical detail used to render the atoms, usually between 0 and 3 (default is 2)

Definition at line 161 of file Molecule.hpp.

int vl::Molecule::atomDetail | ( | ) | const`[inline]`

Geometrical detail used to render the atoms, usually between 0 and 3 (default is 2)

Definition at line 163 of file Molecule.hpp.

void vl::Molecule::setBondDetail | ( | int | detail ) | `[inline]`

Geometrical detail used to render the bonds, usually between 5 and 50 (default is 20)

Definition at line 166 of file Molecule.hpp.

int vl::Molecule::bondDetail | ( | ) | const`[inline]`

Geometrical detail used to render the bonds, usually between 5 and 50 (default is 20)

Definition at line 168 of file Molecule.hpp.

float vl::Molecule::ringOffset | ( | ) | const`[inline]`

Definition at line 170 of file Molecule.hpp.

void vl::Molecule::setRingOffset | ( | float | offset ) | `[inline]`

Definition at line 171 of file Molecule.hpp.

void Molecule::setAromaticBondsColor | ( | const fvec4 & | color ) |

Definition at line 298 of file Molecule.cpp.

References bonds(), and vl::BT_Aromatic.

void vl::Molecule::setAromaticRingColor | ( | const fvec4 & | color ) | `[inline]`

Definition at line 174 of file Molecule.hpp.

const fvec4& vl::Molecule::aromaticRingColor | ( | ) | const`[inline]`

Definition at line 175 of file Molecule.hpp.

float vl::Molecule::lineWidth | ( | ) | const`[inline]`

Definition at line 177 of file Molecule.hpp.

bool vl::Molecule::smoothLines | ( | ) | const`[inline]`

Definition at line 178 of file Molecule.hpp.

void vl::Molecule::setLineWidth | ( | float | w ) | `[inline]`

Definition at line 180 of file Molecule.hpp.

void vl::Molecule::setSmoothLines | ( | bool | smooth ) | `[inline]`

Definition at line 181 of file Molecule.hpp.

Transform* vl::Molecule::transformTree | ( | ) | `[inline]`

The transform tree used by the generated bonds, atoms and labels.

Definition at line 184 of file Molecule.hpp.

const Transform* vl::Molecule::transformTree | ( | ) | const`[inline]`

The transform tree used by the generated bonds, atoms and labels.

Definition at line 186 of file Molecule.hpp.

const Text* vl::Molecule::atomLabelTemplate | ( | ) | const`[inline]`

The text settings to be used to render the atom labels.

Definition at line 189 of file Molecule.hpp.

Text* vl::Molecule::atomLabelTemplate | ( | ) | `[inline]`

The text settings to be used to render the atom labels.

Definition at line 191 of file Molecule.hpp.

void vl::Molecule::setShowAtomNames | ( | bool | show ) | `[inline]`

Globally defines whether the atom names should be rendered or not. See also Atom::setShowAtomName().

Definition at line 194 of file Molecule.hpp.

bool vl::Molecule::showAtomNames | ( | ) | const`[inline]`

Globally defines whether the atom names should be rendered or not. See also Atom::setShowAtomName().

Definition at line 196 of file Molecule.hpp.

const Effect* vl::Molecule::atomLabelEffect | ( | ) | const`[inline]`

The Effect used to render the atom labels.

Definition at line 199 of file Molecule.hpp.

Effect* vl::Molecule::atomLabelEffect | ( | ) | `[inline]`

The Effect used to render the atom labels.

Definition at line 201 of file Molecule.hpp.

void vl::Molecule::setMoleculeToActorMapEnabled | ( | bool | enabled ) | `[inline]`

If enabled the atomToActorMap() and bondToActorMap() maps will be compiled next time the molecule's geometry is regenerated (except for wireframe style).

Definition at line 204 of file Molecule.hpp.

bool vl::Molecule::isMoleculeToActorMapEnabled | ( | ) | const`[inline]`

If enabled the atomToActorMap() and bondToActorMap() maps will be compiled next time the molecule's geometry is regenerated (except for wireframe style).

Definition at line 206 of file Molecule.hpp.

void vl::Molecule::setActorToMoleculeMapEnabled | ( | bool | enabled ) | `[inline]`

If enabled the actorToAtomMap() and actorToBondMap() maps will be compiled next time the molecule's geometry is regenerated (except for wireframe style).

Definition at line 209 of file Molecule.hpp.

bool vl::Molecule::isActorToMoleculeMapEnabled | ( | ) | const`[inline]`

If enabled the actorToAtomMap() and actorToBondMap() maps will be compiled next time the molecule's geometry is regenerated (except for wireframe style).

Definition at line 211 of file Molecule.hpp.

const std::map< ref<Atom>, ref<Actor> >& vl::Molecule::atomToActorMap | ( | ) | const`[inline]`

Maps an Atom to it's corresponding Actor.

Definition at line 214 of file Molecule.hpp.

const std::map< ref<Actor>, ref<Atom> >& vl::Molecule::actorToAtomMap | ( | ) | const`[inline]`

Maps an Actor to it's corresponding Atom.

Definition at line 216 of file Molecule.hpp.

const std::map< ref<Bond>, ref<Actor> >& vl::Molecule::bondToActorMap | ( | ) | const`[inline]`

Maps a Bond to it's corresponding Actor.

Definition at line 218 of file Molecule.hpp.

const std::map< ref<Actor>, ref<Bond> >& vl::Molecule::actorToBondMap | ( | ) | const`[inline]`

Maps an Actor to it's corresponding Bond.

Definition at line 220 of file Molecule.hpp.

std::map< ref<Atom>, ref<Actor> >& vl::Molecule::atomToActorMap | ( | ) | `[inline]`

Maps an Atom to it's corresponding Actor.

Definition at line 223 of file Molecule.hpp.

std::map< ref<Actor>, ref<Atom> >& vl::Molecule::actorToAtomMap | ( | ) | `[inline]`

Maps an Actor to it's corresponding Atom.

Definition at line 225 of file Molecule.hpp.

std::map< ref<Bond>, ref<Actor> >& vl::Molecule::bondToActorMap | ( | ) | `[inline]`

Maps a Bond to it's corresponding Actor.

Definition at line 227 of file Molecule.hpp.

std::map< ref<Actor>, ref<Bond> >& vl::Molecule::actorToBondMap | ( | ) | `[inline]`

Maps an Actor to it's corresponding Bond.

Definition at line 229 of file Molecule.hpp.

void vl::Molecule::prepareAtomInsert | ( | int | bonus = `100` ) | `[inline, protected]`

Definition at line 232 of file Molecule.hpp.

Referenced by addAtom().

void vl::Molecule::prepareBondInsert | ( | int | bonus = `100` ) | `[inline, protected]`

Definition at line 237 of file Molecule.hpp.

Referenced by addBond().

void Molecule::wireframeStyle | ( | ) | `[protected]`

Definition at line 245 of file Molecule_rendering.cpp.

References vl::Bond::atom1(), vl::Bond::atom2(), vl::Atom::color(), vl::Bond::color(), vl::Atom::coordinates(), vl::EN_BLEND, vl::EN_DEPTH_TEST, vl::EN_LINE_SMOOTH, vl::ref< T >::get(), NULL, vl::PT_LINES, vl::Bond::useAtomColors(), vl::Atom::visible(), and vl::Bond::visible().

void Molecule::atomsStyle | ( | ) | `[protected]`

Definition at line 310 of file Molecule_rendering.cpp.

References vl::ref< T >::get(), and vl::Matrix4< float >::getTranslation().

void Molecule::ballAndStickStyle | ( | ) | `[protected]`

Definition at line 342 of file Molecule_rendering.cpp.

References vl::Bond::atom1(), vl::Bond::atom2(), vl::CC_NoCap, vl::Atom::color(), vl::Bond::color(), vl::Atom::coordinates(), vl::EN_CULL_FACE, vl::EN_DEPTH_TEST, vl::EN_LIGHTING, vl::ref< T >::get(), vl::Matrix4< float >::getRotation(), vl::Matrix4< float >::getTranslation(), vl::length(), vl::normalize(), vl::Bond::radius(), and vl::Bond::useAtomColors().

void Molecule::sticksStyle | ( | ) | `[protected]`

Definition at line 422 of file Molecule_rendering.cpp.

References vl::Bond::atom1(), vl::Bond::atom2(), vl::CC_RoundedCap, vl::Atom::color(), vl::Bond::color(), vl::Atom::coordinates(), vl::EN_CULL_FACE, vl::EN_DEPTH_TEST, vl::EN_LIGHTING, vl::ref< T >::get(), vl::Matrix4< float >::getRotation(), vl::Matrix4< float >::getTranslation(), vl::length(), vl::normalize(), vl::Bond::radius(), and vl::Bond::useAtomColors().

void Molecule::generateRings | ( | ) | `[protected]`

Definition at line 474 of file Molecule_rendering.cpp.

References vl::AABB::center(), vl::EN_DEPTH_TEST, vl::ref< T >::get(), vl::normalize(), NULL, and vl::PT_LINES.

void Molecule::generateAtomLabels | ( | ) | `[protected]`

Definition at line 235 of file Molecule_rendering.cpp.

References vl::ref< T >::get(), and vl::Matrix4< float >::getTranslation().

void Molecule::generateAtomLabel | ( | const Atom * | atom,
|  | Transform * | tr
| ) |  | `[protected]`

Definition at line 201 of file Molecule_rendering.cpp.

References vl::Atom::atomName(), vl::ref< T >::get(), vl::Atom::showAtomName(), and vl::Atom::visible().

## Member Data Documentation

fvec4 vl::Molecule::mAromaticRingColor`[protected]`

Definition at line 251 of file Molecule.hpp.

Referenced by operator=(), and reset().

ref<ActorTree> vl::Molecule::mActorTree`[protected]`

Definition at line 252 of file Molecule.hpp.

Referenced by reset().

ref<Transform> vl::Molecule::mTransformTree`[protected]`

Definition at line 253 of file Molecule.hpp.

std::vector< ref<Atom> > vl::Molecule::mAtoms`[protected]`

Definition at line 254 of file Molecule.hpp.

Referenced by atom(), eraseAllAtoms(), and reset().

std::vector< ref<Bond> > vl::Molecule::mBonds`[protected]`

Definition at line 255 of file Molecule.hpp.

Referenced by bond(), eraseAllAtoms(), and reset().

std::vector< std::vector< ref<Atom> > > vl::Molecule::mCycles`[protected]`

Definition at line 256 of file Molecule.hpp.

Referenced by eraseAllAtoms(), operator=(), and reset().

std::map< ref<Atom>, ref<Actor> > vl::Molecule::mAtomToActorMap`[protected]`

Definition at line 257 of file Molecule.hpp.

Referenced by reset().

std::map< ref<Actor>, ref<Atom> > vl::Molecule::mActorToAtomMap`[protected]`

Definition at line 258 of file Molecule.hpp.

Referenced by reset().

std::map< ref<Bond>, ref<Actor> > vl::Molecule::mBondToActorMap`[protected]`

Definition at line 259 of file Molecule.hpp.

Referenced by reset().

std::map< ref<Actor>, ref<Bond> > vl::Molecule::mActorToBondMap`[protected]`

Definition at line 260 of file Molecule.hpp.

Referenced by reset().

String vl::Molecule::mMoleculeName`[protected]`

Definition at line 261 of file Molecule.hpp.

Referenced by operator=(), and reset().

ref<KeyValues> vl::Molecule::mTags`[protected]`

Definition at line 262 of file Molecule.hpp.

Referenced by operator=().

ref<Text> vl::Molecule::mAtomLabelTemplate`[protected]`

Definition at line 263 of file Molecule.hpp.

ref<Effect> vl::Molecule::mAtomLabelEffect`[protected]`

Definition at line 264 of file Molecule.hpp.

Referenced by Molecule().

unsigned int vl::Molecule::mId`[protected]`

Definition at line 265 of file Molecule.hpp.

Referenced by reset().

EMoleculeStyle vl::Molecule::mMoleculeStyle`[protected]`

Definition at line 266 of file Molecule.hpp.

Referenced by operator=(), and reset().

int vl::Molecule::mAtomDetail`[protected]`

Definition at line 267 of file Molecule.hpp.

Referenced by operator=(), and reset().

int vl::Molecule::mBondDetail`[protected]`

Definition at line 268 of file Molecule.hpp.

Referenced by operator=(), and reset().

float vl::Molecule::mRingOffset`[protected]`

Definition at line 269 of file Molecule.hpp.

Referenced by operator=(), and reset().

float vl::Molecule::mLineWidth`[protected]`

Definition at line 270 of file Molecule.hpp.

Referenced by operator=(), and reset().

bool vl::Molecule::mSmoothLines`[protected]`

Definition at line 271 of file Molecule.hpp.

Referenced by operator=(), and reset().

bool vl::Molecule::mShowAtomNames`[protected]`

Definition at line 272 of file Molecule.hpp.

Referenced by reset().

bool vl::Molecule::mMoleculeToActorMapEnabled`[protected]`

Definition at line 273 of file Molecule.hpp.

Referenced by reset().

bool vl::Molecule::mActorToMoleculeMapEnabled`[protected]`

Definition at line 274 of file Molecule.hpp.

Referenced by reset().

The documentation for this class was generated from the following files:

- D:/VL/BuildSystem/VL_DISTRO/Visualization_Library_SDK/src/vlMolecule/Molecule.hpp
- D:/VL/BuildSystem/VL_DISTRO/Visualization_Library_SDK/src/vlMolecule/Molecule.cpp
- D:/VL/BuildSystem/VL_DISTRO/Visualization_Library_SDK/src/vlMolecule/Molecule_rendering.cpp

Visualization Library v2011.09.1162 Reference Documentation
Copyright 2005-2011 Michele Bosi. All rights reserved.
Updated on Thu Jan 26 2012 00:44:59.
Permission is granted to use this page to write and publish articles regarding Visualization Library.