Changeset 45ea59 for src/UIElements/Views/Qt4/Qt3D/GLWorldScene.cpp
- Timestamp:
- Jul 17, 2012, 12:17:22 PM (13 years ago)
- 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:
- d1196d
- Parents:
- 8880c9
- git-author:
- Michael Ankele <ankele@…> (05/03/12 10:59:20)
- git-committer:
- Michael Ankele <ankele@…> (07/17/12 12:17:22)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/UIElements/Views/Qt4/Qt3D/GLWorldScene.cpp
r8880c9 r45ea59 56 56 57 57 //changeMaterials(false); 58 domainBoxMaterial = new QGLMaterial; 59 domainBoxMaterial->setAmbientColor(QColor(0,0,0,255)); 60 domainBoxMaterial->setDiffuseColor(QColor(0,0,0,255)); 61 domainBoxMaterial->setEmittedLight(QColor(150,160,200,255)); 58 62 } 59 63 … … 62 66 // remove all elements 63 67 GLMoleculeObject::cleanMaterialMap(); 68 69 delete(domainBoxMaterial); 64 70 } 65 71 … … 265 271 } 266 272 273 void GLWorldScene::drawDomainBox(QGLPainter *painter) const 274 { 275 RealSpaceMatrix m = World::getInstance().getDomain().getM(); 276 painter->modelViewMatrix().push(); 277 painter->modelViewMatrix() *= QMatrix4x4(m.at(0,0), m.at(0,1), m.at(0,2), 0.0, 278 m.at(1,0), m.at(1,1), m.at(1,2), 0.0, 279 m.at(2,0), m.at(2,1), m.at(2,2), 0.0, 280 0.0, 0.0, 0.0, 1.0); 281 282 painter->setFaceMaterial(QGL::AllFaces, domainBoxMaterial); 283 //glEnable(GL_LINE_SMOOTH); 284 QVector3DArray array; 285 array.append(0, 0, 0); array.append(1, 0, 0); 286 array.append(1, 0, 0); array.append(1, 1, 0); 287 array.append(1, 1, 0); array.append(0, 1, 0); 288 array.append(0, 1, 0); array.append(0, 0, 0); 289 290 array.append(0, 0, 1); array.append(1, 0, 1); 291 array.append(1, 0, 1); array.append(1, 1, 1); 292 array.append(1, 1, 1); array.append(0, 1, 1); 293 array.append(0, 1, 1); array.append(0, 0, 1); 294 295 array.append(0, 0, 0); array.append(0, 0, 1); 296 array.append(1, 0, 0); array.append(1, 0, 1); 297 array.append(0, 1, 0); array.append(0, 1, 1); 298 array.append(1, 1, 0); array.append(1, 1, 1); 299 painter->clearAttributes(); 300 painter->setVertexAttribute(QGL::Position, array); 301 painter->draw(QGL::Lines, 24); 302 painter->modelViewMatrix().pop(); 303 } 304 267 305 void GLWorldScene::draw(QGLPainter *painter) const 268 306 { … … 273 311 meshobj->draw(painter); 274 312 } 313 314 drawDomainBox(painter); 275 315 } 276 316
Note:
See TracChangeset
for help on using the changeset viewer.