- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject_molecule.cpp
rb9b49e r52cd7b 71 71 double minradius = 2.; // TODO: set to maximum bond length value 72 72 LOG(3, "DEBUG: Molecule fits into sphere of radius " << minradius); 73 // check minimum bond radius in molecule 74 double minlength = std::numeric_limits<double>::max(); 75 for (molecule::const_iterator iter = molref->begin(); 76 iter != molref->end(); ++iter) { 77 const BondList &ListOfBonds = (*iter)->getListOfBonds(); 78 for (BondList::const_iterator bonditer = ListOfBonds.begin(); 79 bonditer != ListOfBonds.end(); ++bonditer) { 80 const double bond_distance = (*bonditer)->GetDistance(); 81 minlength = std::min(bond_distance, minlength); 82 } 83 } 84 minradius = std::max( std::max(minradius, minlength), 1.); 73 if (minradius < 1.) 74 minradius = 1.; 85 75 86 76 QGeometryData geo; … … 467 457 painter->modelViewMatrix().push(); 468 458 painter->modelViewMatrix().translate(m_position); 459 if ((m_scaleX != 1.0f) || (m_scaleY != 1.0f) || (m_scaleZ != 1.0f)) 460 painter->modelViewMatrix().scale(m_scaleX, m_scaleY, m_scaleZ); 469 461 if (m_rotationAngle != 0.0f) 470 462 painter->modelViewMatrix().rotate(m_rotationAngle, m_rotationVector); 471 if ((m_scaleX != 1.0f) || (m_scaleY != 1.0f) || (m_scaleZ != 1.0f))472 painter->modelViewMatrix().scale(m_scaleX, m_scaleY, m_scaleZ);473 463 474 464 // Draw a box around the mesh, if selected.
Note:
See TracChangeset
for help on using the changeset viewer.