Visualization Library 2.0.0

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

VL     Star     Watch     Fork     Issue

[Download] [Tutorials] [All Classes] [Grouped Classes]
Public Member Functions | Protected Attributes | List of all members
vl::Atom Class Reference

The Atom class represents an atom to be used with the Molecule class. More...

#include <Atom.hpp>

+ Inheritance diagram for vl::Atom:

Public Member Functions

 Atom ()
 
 Atom (const Atom &other)
 
Atomoperator= (const Atom &other)
 Assignment operator: does not assign the adjacent atoms. More...
 
bool isAtomAdjacent (Atom *atom) const
 
const std::vector< Atom *> & adjacentAtoms () const
 
std::vector< Atom *> & adjacentAtoms ()
 
EAtomType atomType () const
 
void setAtomType (EAtomType type)
 
unsigned int id () const
 
void setId (unsigned int id)
 
const fvec3coordinates () const
 
void setCoordinates (const fvec3 &coordinates)
 
float radius () const
 
void setRadius (float radius)
 
void setVisited (bool visited)
 
bool visited () const
 
void setAtomName (const std::string &name)
 
const std::string & atomName () const
 
const fvec4color () const
 
void setColor (const fvec4 &color)
 
bool visible () const
 
void setVisible (bool visible)
 
void setShowAtomName (bool show)
 Defines whether the atom name should be rendered or not. See also Molecule::setShowAtomNames(). More...
 
bool showAtomName () const
 Defines whether the atom name should be rendered or not. See also Molecule::setShowAtomNames(). More...
 
- Public Member Functions inherited from vl::Object
 Object ()
 Constructor. More...
 
 Object (const Object &other)
 Copy constructor: copies the name, ref count mutex and user data. More...
 
Objectoperator= (const Object &other)
 Copy operator: copies the object's name, ref count mutex and user data. More...
 
const std::string & objectName () const
 The name of the object, by default set to the object's class name. More...
 
void setObjectName (const char *name)
 The name of the object, by default set to the object's class name in debug builds. More...
 
void setObjectName (const std::string &name)
 The name of the object, by default set to the object's class name in debug builds. More...
 
void setRefCountMutex (IMutex *mutex)
 The mutex used to protect the reference counting of an Object across multiple threads. More...
 
IMutexrefCountMutex ()
 The mutex used to protect the reference counting of an Object across multiple threads. More...
 
const IMutexrefCountMutex () const
 The mutex used to protect the reference counting of an Object across multiple threads. More...
 
int referenceCount () const
 Returns the number of references of an object. More...
 
void incReference () const
 Increments the reference count of an object. More...
 
void decReference ()
 Decrements the reference count of an object and deletes it if both automaticDelete() is true the count reaches 0. More...
 
void setAutomaticDelete (bool autodel_on)
 If set to true the Object is deleted when its reference count reaches 0. More...
 
bool automaticDelete () const
 If set to true the Object is deleted when its reference count reaches 0. More...
 
template<class T >
T * as ()
 Casts an Object to the specified class. More...
 
template<class T >
const T * as () const
 Casts an Object to the specified class. More...
 

Protected Attributes

fvec4 mColor
 
fvec3 mCoordinates
 
EAtomType mAtomType
 
float mRadius
 
std::vector< Atom *> mAdjacentAtoms
 
std::string mAtomName
 
unsigned int mId
 
bool mVisited
 
bool mVisible
 
bool mShowAtomName
 
- Protected Attributes inherited from vl::Object
std::string mObjectName
 
IMutexmRefCountMutex
 
int mReferenceCount
 
bool mAutomaticDelete
 

Additional Inherited Members

- Protected Member Functions inherited from vl::Object
virtual ~Object ()
 

Detailed Description

The Atom class represents an atom to be used with the Molecule class.

See also

Definition at line 51 of file Atom.hpp.

Constructor & Destructor Documentation

◆ Atom() [1/2]

vl::Atom::Atom ( )
inline

Definition at line 56 of file Atom.hpp.

References vl::AT_Unknown, mAtomType, mColor, mCoordinates, mId, mRadius, mShowAtomName, mVisible, and mVisited.

◆ Atom() [2/2]

vl::Atom::Atom ( const Atom other)
inline

Definition at line 70 of file Atom.hpp.

Member Function Documentation

◆ adjacentAtoms() [1/2]

const std::vector< Atom* >& vl::Atom::adjacentAtoms ( ) const
inline

◆ adjacentAtoms() [2/2]

std::vector< Atom* >& vl::Atom::adjacentAtoms ( )
inline

Definition at line 98 of file Atom.hpp.

References mAdjacentAtoms.

◆ atomName()

const std::string& vl::Atom::atomName ( ) const
inline

Definition at line 116 of file Atom.hpp.

References mAtomName.

Referenced by vl::Molecule::generateAtomLabel().

◆ atomType()

EAtomType vl::Atom::atomType ( ) const
inline

Definition at line 100 of file Atom.hpp.

References mAtomType.

Referenced by vl::Molecule::setAtomTypeVisible().

◆ color()

const fvec4& vl::Atom::color ( ) const
inline

◆ coordinates()

const fvec3& vl::Atom::coordinates ( ) const
inline

◆ id()

unsigned int vl::Atom::id ( ) const
inline

Definition at line 103 of file Atom.hpp.

References mId.

Referenced by setId().

◆ isAtomAdjacent()

bool vl::Atom::isAtomAdjacent ( Atom atom) const
inline

Definition at line 89 of file Atom.hpp.

References adjacentAtoms().

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

◆ operator=()

Atom& vl::Atom::operator= ( const Atom other)
inline

Assignment operator: does not assign the adjacent atoms.

Definition at line 73 of file Atom.hpp.

References mAtomName, mAtomType, mColor, mCoordinates, mId, mRadius, mShowAtomName, and mVisible.

◆ radius()

float vl::Atom::radius ( ) const
inline

Definition at line 109 of file Atom.hpp.

References mRadius.

Referenced by setRadius().

◆ setAtomName()

void vl::Atom::setAtomName ( const std::string &  name)
inline

Definition at line 115 of file Atom.hpp.

References mAtomName.

◆ setAtomType()

void vl::Atom::setAtomType ( EAtomType  type)
inline

Definition at line 101 of file Atom.hpp.

References mAtomType.

◆ setColor()

void vl::Atom::setColor ( const fvec4 color)
inline

Definition at line 119 of file Atom.hpp.

References color(), and mColor.

◆ setCoordinates()

void vl::Atom::setCoordinates ( const fvec3 coordinates)
inline

Definition at line 107 of file Atom.hpp.

References coordinates(), and mCoordinates.

◆ setId()

void vl::Atom::setId ( unsigned int  id)
inline

Definition at line 104 of file Atom.hpp.

References id(), and mId.

◆ setRadius()

void vl::Atom::setRadius ( float  radius)
inline

Definition at line 110 of file Atom.hpp.

References mRadius, and radius().

◆ setShowAtomName()

void vl::Atom::setShowAtomName ( bool  show)
inline

Defines whether the atom name should be rendered or not. See also Molecule::setShowAtomNames().

Definition at line 125 of file Atom.hpp.

References mShowAtomName.

◆ setVisible()

void vl::Atom::setVisible ( bool  visible)
inline

Definition at line 122 of file Atom.hpp.

References mVisible, and visible().

Referenced by vl::Molecule::setAtomTypeVisible().

◆ setVisited()

void vl::Atom::setVisited ( bool  visited)
inline

Definition at line 112 of file Atom.hpp.

References mVisited, and visited().

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

◆ showAtomName()

bool vl::Atom::showAtomName ( ) const
inline

Defines whether the atom name should be rendered or not. See also Molecule::setShowAtomNames().

Definition at line 127 of file Atom.hpp.

References mShowAtomName.

Referenced by vl::Molecule::generateAtomLabel().

◆ visible()

bool vl::Atom::visible ( ) const
inline

Definition at line 121 of file Atom.hpp.

References mVisible.

Referenced by vl::Molecule::generateAtomLabel(), setVisible(), and vl::Molecule::wireframeStyle().

◆ visited()

bool vl::Atom::visited ( ) const
inline

Definition at line 113 of file Atom.hpp.

References mVisited.

Referenced by vl::RingExtractor::depthFirstVisit(), and setVisited().

Member Data Documentation

◆ mAdjacentAtoms

std::vector< Atom* > vl::Atom::mAdjacentAtoms
protected

Definition at line 134 of file Atom.hpp.

Referenced by adjacentAtoms().

◆ mAtomName

std::string vl::Atom::mAtomName
protected

Definition at line 135 of file Atom.hpp.

Referenced by atomName(), operator=(), and setAtomName().

◆ mAtomType

EAtomType vl::Atom::mAtomType
protected

Definition at line 132 of file Atom.hpp.

Referenced by Atom(), atomType(), operator=(), and setAtomType().

◆ mColor

fvec4 vl::Atom::mColor
protected

Definition at line 130 of file Atom.hpp.

Referenced by Atom(), color(), operator=(), and setColor().

◆ mCoordinates

fvec3 vl::Atom::mCoordinates
protected

Definition at line 131 of file Atom.hpp.

Referenced by Atom(), coordinates(), operator=(), and setCoordinates().

◆ mId

unsigned int vl::Atom::mId
protected

Definition at line 136 of file Atom.hpp.

Referenced by Atom(), id(), operator=(), and setId().

◆ mRadius

float vl::Atom::mRadius
protected

Definition at line 133 of file Atom.hpp.

Referenced by Atom(), operator=(), radius(), and setRadius().

◆ mShowAtomName

bool vl::Atom::mShowAtomName
protected

Definition at line 142 of file Atom.hpp.

Referenced by Atom(), operator=(), setShowAtomName(), and showAtomName().

◆ mVisible

bool vl::Atom::mVisible
protected

Definition at line 140 of file Atom.hpp.

Referenced by Atom(), operator=(), setVisible(), and visible().

◆ mVisited

bool vl::Atom::mVisited
protected

Definition at line 138 of file Atom.hpp.

Referenced by Atom(), setVisited(), and visited().


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