Avogadro
1.1.0
|
Public Member Functions | |
Sphere (int detail=0) | |
void | setup (int detail) |
void | draw (const Eigen::Vector3d ¢er, double radius) const |
Protected Member Functions | |
unsigned short | indexOfVertex (int strip, int column, int row) |
void | computeVertex (int strip, int column, int row) |
void | freeBuffers () |
void | initialize () |
void Avogadro::Sphere::computeVertex | ( | int | strip, |
int | column, | ||
int | row | ||
) | [protected] |
computes the coordinates of a vertex given by its position (strip, column, row) inside a certain flat model of the sub-tesselated icosahedron
References indexOfVertex().
void Avogadro::Sphere::draw | ( | const Eigen::Vector3d & | center, |
double | radius | ||
) | const |
draws the sphere at specified position and with specified radius
unsigned short Avogadro::Sphere::indexOfVertex | ( | int | strip, |
int | column, | ||
int | row | ||
) | [inline, protected] |
computes the index (position inside the index buffer) of a vertex given by its position (strip, column, row) inside a certain flat model of the sub-tesselated icosahedron
Referenced by computeVertex().
void Avogadro::Sphere::setup | ( | int | detail | ) |
initializes the sphere with given level of detail. If the sphere was already initialized, any pre-allocated buffers are freed and then re-allocated.
detail | the wanted level of detail. See m_detail member |