- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject_molecule.cpp
r52cd7b rb9b49e 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 if (minradius < 1.) 74 minradius = 1.; 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.); 75 85 76 86 QGeometryData geo; … … 457 467 painter->modelViewMatrix().push(); 458 468 painter->modelViewMatrix().translate(m_position); 469 if (m_rotationAngle != 0.0f) 470 painter->modelViewMatrix().rotate(m_rotationAngle, m_rotationVector); 459 471 if ((m_scaleX != 1.0f) || (m_scaleY != 1.0f) || (m_scaleZ != 1.0f)) 460 472 painter->modelViewMatrix().scale(m_scaleX, m_scaleY, m_scaleZ); 461 if (m_rotationAngle != 0.0f)462 painter->modelViewMatrix().rotate(m_rotationAngle, m_rotationVector);463 473 464 474 // Draw a box around the mesh, if selected.
Note:
See TracChangeset
for help on using the changeset viewer.