kalzium
Avogadro::Atom Class Reference
#include <primitive.h>

Detailed Description
Atom Class.The Atom class is a Primitive subclass that provides a wrapper around OpenBabel::OBAtom. This class is provided to give more control of the OpenBabel::OBAtom class through slots/signals provided by the Primitive superclass.
Definition at line 172 of file src/primitive.h.
Public Member Functions | |
| Atom (QObject *parent=0) | |
| const Eigen::Vector3d & | pos () const |
| void | setPos (const Eigen::Vector3d &vec) |
Constructor & Destructor Documentation
| Avogadro::Atom::Atom | ( | QObject * | parent = 0 |
) | [inline] |
Member Function Documentation
| const Eigen::Vector3d& Avogadro::Atom::pos | ( | ) | const [inline] |
Returns the position of the atom, as a Eigen::Vector3d.
This is similar to the OBAtom::GetVector() method, which returns the position as a OpenBabel::vector3.
Rationale for inlining: this method only does a cast on the return value of OBAtom::GetVector(). The memory layouts of the types between which it casts are not likely to change: both types represent 3D vectors of doubles, and there's only one sane way to represent them: struct{ double x,y,z; }.
- Returns:
- OBAtom::GetVector() but reinterpret_casted as a const Eigen::Vector3d &
Definition at line 194 of file src/primitive.h.
| void Avogadro::Atom::setPos | ( | const Eigen::Vector3d & | vec | ) | [inline] |
Sets the position of the atom, from a Eigen::Vector3d.
This is similar to the OBAtom::SetVector() method, which sets the position from a OpenBabel::vector3.
Rationale for inlining: this method only does a cast on the argument of OBAtom::SetVector(). The memory layouts of the types between which it casts are not likely to change: both types represent 3D vectors of doubles, and there's only one sane way to represent them: struct{ double x,y,z; }.
Definition at line 207 of file src/primitive.h.
The documentation for this class was generated from the following file:
KDE 4.0 API Reference