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::Bond Class Reference

The Bond class represents a bond to be used with the Molecule class. More...

#include <Bond.hpp>

+ Inheritance diagram for vl::Bond:

Public Member Functions

 Bond ()
 
 Bond (const Bond &other)
 
unsigned int id () const
 
void setId (unsigned int id)
 
void setBondType (EBondType type)
 
EBondType bondType () const
 
void setAtom1 (Atom *atom)
 
Atomatom1 () const
 
void setAtom2 (Atom *atom)
 
Atomatom2 () const
 
void setVisible (bool visible)
 
bool visible () const
 
void setColor (const fvec4 &color)
 
const fvec4color () const
 
void setUseAtomColors (bool use_atom_color)
 
bool useAtomColors () const
 
float radius () const
 
void setRadius (float radius)
 
- 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
 
float mRadius
 
AtommAtom1
 
AtommAtom2
 
EBondType mType
 
unsigned int mId
 
bool mVisible
 
bool mUseAtomColors
 
- 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 Bond class represents a bond to be used with the Molecule class.

See also

Definition at line 62 of file Bond.hpp.

Constructor & Destructor Documentation

◆ Bond() [1/2]

vl::Bond::Bond ( )
inline

Definition at line 67 of file Bond.hpp.

◆ Bond() [2/2]

vl::Bond::Bond ( const Bond other)
inline

Definition at line 71 of file Bond.hpp.

Member Function Documentation

◆ atom1()

Atom* vl::Bond::atom1 ( ) const
inline

◆ atom2()

Atom* vl::Bond::atom2 ( ) const
inline

◆ bondType()

EBondType vl::Bond::bondType ( ) const
inline

Definition at line 77 of file Bond.hpp.

References mType.

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

◆ color()

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

◆ id()

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

Definition at line 73 of file Bond.hpp.

References mId.

Referenced by setId().

◆ radius()

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

Definition at line 94 of file Bond.hpp.

References mRadius.

Referenced by vl::Molecule::ballAndStickStyle(), setRadius(), and vl::Molecule::sticksStyle().

◆ setAtom1()

void vl::Bond::setAtom1 ( Atom atom)
inline

Definition at line 79 of file Bond.hpp.

References mAtom1.

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

◆ setAtom2()

void vl::Bond::setAtom2 ( Atom atom)
inline

Definition at line 82 of file Bond.hpp.

References mAtom2.

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

◆ setBondType()

void vl::Bond::setBondType ( EBondType  type)
inline

Definition at line 76 of file Bond.hpp.

References mType.

◆ setColor()

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

Definition at line 88 of file Bond.hpp.

References color(), and mColor.

◆ setId()

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

Definition at line 74 of file Bond.hpp.

References id(), and mId.

◆ setRadius()

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

Definition at line 95 of file Bond.hpp.

References mRadius, and radius().

◆ setUseAtomColors()

void vl::Bond::setUseAtomColors ( bool  use_atom_color)
inline

Definition at line 91 of file Bond.hpp.

References mUseAtomColors.

◆ setVisible()

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

Definition at line 85 of file Bond.hpp.

References mVisible, and visible().

◆ useAtomColors()

bool vl::Bond::useAtomColors ( ) const
inline

◆ visible()

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

Definition at line 86 of file Bond.hpp.

References mVisible.

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

Member Data Documentation

◆ mAtom1

Atom* vl::Bond::mAtom1
protected

Definition at line 100 of file Bond.hpp.

Referenced by atom1(), and setAtom1().

◆ mAtom2

Atom* vl::Bond::mAtom2
protected

Definition at line 101 of file Bond.hpp.

Referenced by atom2(), and setAtom2().

◆ mColor

fvec4 vl::Bond::mColor
protected

Definition at line 98 of file Bond.hpp.

Referenced by color(), and setColor().

◆ mId

unsigned int vl::Bond::mId
protected

Definition at line 103 of file Bond.hpp.

Referenced by id(), and setId().

◆ mRadius

float vl::Bond::mRadius
protected

Definition at line 99 of file Bond.hpp.

Referenced by radius(), and setRadius().

◆ mType

EBondType vl::Bond::mType
protected

Definition at line 102 of file Bond.hpp.

Referenced by bondType(), and setBondType().

◆ mUseAtomColors

bool vl::Bond::mUseAtomColors
protected

Definition at line 105 of file Bond.hpp.

Referenced by setUseAtomColors(), and useAtomColors().

◆ mVisible

bool vl::Bond::mVisible
protected

Definition at line 104 of file Bond.hpp.

Referenced by setVisible(), and visible().


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