Ignore:
Timestamp:
Feb 10, 2015, 2:09:39 PM (10 years ago)
Author:
Frederik Heber <heber@…>
Branches:
Action_Thermostats, Add_AtomRandomPerturbation, Add_FitFragmentPartialChargesAction, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Added_ParseSaveFragmentResults, AddingActions_SaveParseParticleParameters, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_ParticleName_to_Atom, Adding_StructOpt_integration_tests, AtomFragments, Automaking_mpqc_open, AutomationFragmentation_failures, Candidate_v1.5.4, Candidate_v1.6.0, Candidate_v1.6.1, ChangeBugEmailaddress, ChangingTestPorts, ChemicalSpaceEvaluator, CombiningParticlePotentialParsing, Combining_Subpackages, Debian_Package_split, Debian_package_split_molecuildergui_only, Disabling_MemDebug, Docu_Python_wait, EmpiricalPotential_contain_HomologyGraph, EmpiricalPotential_contain_HomologyGraph_documentation, Enable_parallel_make_install, Enhance_userguide, Enhanced_StructuralOptimization, Enhanced_StructuralOptimization_continued, Example_ManyWaysToTranslateAtom, Exclude_Hydrogens_annealWithBondGraph, FitPartialCharges_GlobalError, Fix_BoundInBox_CenterInBox_MoleculeActions, Fix_ChargeSampling_PBC, Fix_ChronosMutex, Fix_FitPartialCharges, Fix_FitPotential_needs_atomicnumbers, Fix_ForceAnnealing, Fix_IndependentFragmentGrids, Fix_ParseParticles, Fix_ParseParticles_split_forward_backward_Actions, Fix_PopActions, Fix_QtFragmentList_sorted_selection, Fix_Restrictedkeyset_FragmentMolecule, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, Fix_fitting_potentials, Fixes, ForceAnnealing_goodresults, ForceAnnealing_oldresults, ForceAnnealing_tocheck, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, FragmentAction_writes_AtomFragments, FragmentMolecule_checks_bonddegrees, GeometryObjects, Gui_Fixes, Gui_displays_atomic_force_velocity, ImplicitCharges, IndependentFragmentGrids, IndependentFragmentGrids_IndividualZeroInstances, IndependentFragmentGrids_IntegrationTest, IndependentFragmentGrids_Sole_NN_Calculation, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, JobMarket_unresolvable_hostname_fix, MoreRobust_FragmentAutomation, ODR_violation_mpqc_open, PartialCharges_OrthogonalSummation, PdbParser_setsAtomName, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, Rewrite_FitPartialCharges, RotateToPrincipalAxisSystem_UndoRedo, SaturateAtoms_findBestMatching, SaturateAtoms_singleDegree, StoppableMakroAction, Subpackage_CodePatterns, Subpackage_JobMarket, Subpackage_LinearAlgebra, Subpackage_levmar, Subpackage_mpqc_open, Subpackage_vmg, Switchable_LogView, ThirdParty_MPQC_rebuilt_buildsystem, TrajectoryDependenant_MaxOrder, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, TremoloParser_setsAtomName, Ubuntu_1604_changes, stable
Children:
e895f7
Parents:
605b92
git-author:
Frederik Heber <heber@…> (01/25/15 11:07:22)
git-committer:
Frederik Heber <heber@…> (02/10/15 14:09:39)
Message:

FIX: Bond cylinders were wrongly scaled and too long with degree larger than one.

  • we have to first translate, then rotate, then scale. The last two were interchanged before. This is fixed.
Location:
src/UIElements/Views/Qt4/Qt3D
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject.cpp

    r605b92 rf47efd4  
    169169   painter->modelViewMatrix().push();
    170170   painter->modelViewMatrix().translate(m_position);
     171   if (m_rotationAngle != 0.0f)
     172     painter->modelViewMatrix().rotate(m_rotationAngle, m_rotationVector);
    171173   if ((m_scaleX != 1.0f) || (m_scaleY != 1.0f) || (m_scaleZ != 1.0f))
    172174     painter->modelViewMatrix().scale(m_scaleX, m_scaleY, m_scaleZ);
    173    if (m_rotationAngle != 0.0f)
    174      painter->modelViewMatrix().rotate(m_rotationAngle, m_rotationVector);
    175175
    176176   // Apply the material and effect to the painter.
  • src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject_bond.cpp

    r605b92 rf47efd4  
    329329    }
    330330  }
    331   if (DoResetPosition) {
     331  if (DoResetPosition)
    332332    resetPosition();
     333  if (DoResetWidth)
     334    resetWidth();
     335  if ((DoResetPosition) || (DoResetWidth))
    333336    emit changed();
    334   }
    335   if (DoResetWidth) {
    336     resetWidth();
    337     emit changed();
    338   }
    339337}
    340338
  • src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject_molecule.cpp

    r605b92 rf47efd4  
    457457    painter->modelViewMatrix().push();
    458458    painter->modelViewMatrix().translate(m_position);
     459    if (m_rotationAngle != 0.0f)
     460      painter->modelViewMatrix().rotate(m_rotationAngle, m_rotationVector);
    459461    if ((m_scaleX != 1.0f) || (m_scaleY != 1.0f) || (m_scaleZ != 1.0f))
    460462      painter->modelViewMatrix().scale(m_scaleX, m_scaleY, m_scaleZ);
    461     if (m_rotationAngle != 0.0f)
    462       painter->modelViewMatrix().rotate(m_rotationAngle, m_rotationVector);
    463463
    464464    // Draw a box around the mesh, if selected.
Note: See TracChangeset for help on using the changeset viewer.