struct MolStyle
{
- /** This style in which the bonds are rendered (or not) */
+ /** The style in which the bonds are rendered (or not) */
enum BondStyle
{
BONDS_DISABLED, /**< don't render the bonds */
with the color of the atom it touches */
} m_bondStyle;
- /** This style in which the atoms are rendered (or not) */
+ /** The style in which the atoms are rendered (or not) */
enum AtomStyle
{
ATOMS_DISABLED,/**< don't render the atoms */
/** the detail-level of the sphere. Must be at least 1.
* This is interpreted as the number of sub-edges into which
* each edge of the icosahedron must be split. So the
- * number of edges of the sphere is simply:
+ * number of faces of the sphere is simply:
* 20 * detail^2. When detail==1, the sphere is just the
* icosahedron */
int m_detail;
#ifdef USE_DISPLAY_LISTS
if( m_haveToRecompileDisplayList )
{
- if( ! m_displayList ) m_displayList = glGenLists( 1 );
- if( ! m_displayList ) return;
- glNewList( m_displayList, GL_COMPILE );
+ if( ! m_displayList ) m_displayList = glGenLists( 1 );
+ if( ! m_displayList ) return;
+ glNewList( m_displayList, GL_COMPILE );
#endif
- renderAtoms();
- renderBonds();
+ renderAtoms();
+ renderBonds();
#ifdef USE_DISPLAY_LISTS
- glEndList();
- m_haveToRecompileDisplayList = false;
+ glEndList();
+ m_haveToRecompileDisplayList = false;
}
glCallList( m_displayList );
#endif
if( m_clickedAtom )
{
- Color( 0.6, 0.0, 1.0, 0.7 ).applyAsMaterials();
+ Color( 0.8, 0.4, 1.0, 0.7 ).applyAsMaterials();
glLoadName( m_clickedAtom->GetIdx() );
m_sphere.draw( m_clickedAtom->GetVector(),
0.18 + m_molStyle.getAtomRadius( m_clickedAtom ) );
if( m_selectedAtoms.count() )
{
- Color( 0.0, 0.7, 1.0, 0.7 ).applyAsMaterials();
+ Color( 0.3, 0.6, 1.0, 0.7 ).applyAsMaterials();
glEnable( GL_BLEND );
foreach(OpenBabel::OBAtom* atom, m_selectedAtoms)
{
}
new_time = t.elapsed();
-
+
frames++;
if( new_time - old_time > 200 )