kalzium
Avogadro::Cylinder Class Reference
#include <cylinder.h>
Detailed Description
Definition at line 43 of file cylinder.h.
Public Member Functions | |
| Cylinder (int faces=0) | |
| ~Cylinder () | |
| void | setup (int faces) |
| void | draw (const Eigen::Vector3d &end1, const Eigen::Vector3d &end2, double radius) const |
| void | drawMulti (const Eigen::Vector3d &end1, const Eigen::Vector3d &end2, double radius, int order, double shift, const Eigen::Vector3d &planeNormalVector) const |
Protected Member Functions | |
| void | initialize () |
| void | freeBuffers () |
Constructor & Destructor Documentation
| Avogadro::Cylinder::Cylinder | ( | int | faces = 0 |
) |
Definition at line 50 of file cylinder.cpp.
| Avogadro::Cylinder::~Cylinder | ( | ) |
Definition at line 55 of file cylinder.cpp.
Member Function Documentation
| void Avogadro::Cylinder::initialize | ( | ) | [protected] |
Definition at line 85 of file cylinder.cpp.
| void Avogadro::Cylinder::freeBuffers | ( | ) | [protected] |
Definition at line 64 of file cylinder.cpp.
| void Avogadro::Cylinder::setup | ( | int | faces | ) |
initializes the cylinder with given number of faces.
If the cylinder was already initialized, any pre-allocated buffers are freed and then re-allocated
Definition at line 78 of file cylinder.cpp.
| void Avogadro::Cylinder::draw | ( | const Eigen::Vector3d & | end1, | |
| const Eigen::Vector3d & | end2, | |||
| double | radius | |||
| ) | const |
draws the cylinder at specified position, with specified radius.
- Parameters:
-
end1 the position of the first end of the cylinder. that is, the center of the first disc-shaped face. end2 the position of the second end of the cylinder. that is, the center of the second disc-shaped face. radius the radius of the cylinder
| void Avogadro::Cylinder::drawMulti | ( | const Eigen::Vector3d & | end1, | |
| const Eigen::Vector3d & | end2, | |||
| double | radius, | |||
| int | order, | |||
| double | shift, | |||
| const Eigen::Vector3d & | planeNormalVector | |||
| ) | const |
draws the cylinder at specified position, with specified radius.
the order and shift arguments allow to render multiple cylinders at once, which is useful in libavogadro. for multiple bonds between atoms. If you only want to render one cylinder, leave order and shift at their default values.
- Parameters:
-
end1 the position of the first end of the cylinder. that is, the center of the first disc-shaped face. end2 the position of the second end of the cylinder. that is, the center of the second disc-shaped face. radius the radius of the cylinder order to render only one cylinder, leave this set to the default value, which is 1. If order>1, then order parallel cylinders are drawn around the axis (end1 - end2). shift this is only meaningful of order>1, otherwise just let this set to the default value. When order>1, this is interpreted as the displacement of the axis of the drawn cylinders from the axis (end1 - end2). planeNormalVector the unit normal vector of the plane in which we will try to fit the cylinders. This is useful to draw double bonds in a molecule in such a way that they avoid looking like single bonds. To achieve that, just pass the molecule's fitting plane's unit normal vector here.
The documentation for this class was generated from the following files:
KDE 4.0 API Reference