Changeset 1340 for trunk/source/visualization
- Timestamp:
- Nov 5, 2010, 3:45:55 PM (15 years ago)
- Location:
- trunk/source/visualization
- Files:
-
- 47 edited
-
CVS/Entries (modified) (1 diff)
-
HepRep/CVS/Entries (modified) (1 diff)
-
History (modified) (2 diffs)
-
OpenGL/CVS/Entries (modified) (1 diff)
-
OpenGL/GNUmakefile (modified) (1 diff)
-
OpenGL/History (modified) (2 diffs)
-
OpenGL/include/CVS/Entries (modified) (3 diffs)
-
OpenGL/include/G4OpenGLQtViewer.hh (modified) (3 diffs)
-
OpenGL/include/G4OpenGLStoredSceneHandler.hh (modified) (3 diffs)
-
OpenGL/include/G4OpenGLViewer.hh (modified) (1 diff)
-
OpenGL/include/G4OpenGLViewerMessenger.hh (modified) (3 diffs)
-
OpenGL/src/CVS/Entries (modified) (3 diffs)
-
OpenGL/src/G4OpenGLQtViewer.cc (modified) (13 diffs)
-
OpenGL/src/G4OpenGLStoredQtViewer.cc (modified) (4 diffs)
-
OpenGL/src/G4OpenGLStoredSceneHandler.cc (modified) (5 diffs)
-
OpenGL/src/G4OpenGLStoredViewer.cc (modified) (3 diffs)
-
OpenGL/src/G4OpenGLViewer.cc (modified) (15 diffs)
-
OpenGL/src/G4OpenGLViewerMessenger.cc (modified) (6 diffs)
-
OpenInventor/CVS/Entries (modified) (1 diff)
-
OpenInventor/History (modified) (2 diffs)
-
OpenInventor/src/CVS/Entries (modified) (2 diffs)
-
OpenInventor/src/G4OpenInventorViewer.cc (modified) (2 diffs)
-
XXX/CVS/Entries (modified) (1 diff)
-
XXX/History (modified) (2 diffs)
-
XXX/src/CVS/Entries (modified) (1 diff)
-
XXX/src/G4XXXSGViewer.cc (modified) (2 diffs)
-
XXX/src/G4XXXStoredViewer.cc (modified) (2 diffs)
-
externals/gl2ps/CVS/Entries (modified) (1 diff)
-
externals/gl2ps/History (modified) (2 diffs)
-
externals/gl2ps/include/CVS/Entries (modified) (1 diff)
-
externals/gl2ps/include/Geant4_gl2ps.h (modified) (1 diff)
-
externals/gl2ps/include/gl2ps.h (modified) (3 diffs)
-
externals/gl2ps/src/CVS/Entries (modified) (1 diff)
-
externals/gl2ps/src/G4OpenGL2PSAction.cc (modified) (2 diffs)
-
externals/gl2ps/src/gl2ps.cc (modified) (21 diffs)
-
externals/zlib/CVS/Entries (modified) (1 diff)
-
management/CVS/Entries (modified) (1 diff)
-
management/History (modified) (2 diffs)
-
management/include/CVS/Entries (modified) (2 diffs)
-
management/include/G4VisCommandsViewerSet.hh (modified) (2 diffs)
-
management/src/CVS/Entries (modified) (2 diffs)
-
management/src/G4ViewParameters.cc (modified) (1 diff)
-
management/src/G4VisCommandsViewerSet.cc (modified) (5 diffs)
-
test/G4History.macro (modified) (21 diffs)
-
test/History (modified) (2 diffs)
-
test/test19.cc (modified) (3 diffs)
-
test/test19.g4m (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/visualization/CVS/Entries
r1337 r1340 13 13 /CMakeLists.txt/1.1/Wed Sep 29 19:11:25 2010// 14 14 /GNUmakefile/1.27/Thu Sep 30 11:54:25 2010// 15 /History/1.48 1/Thu Sep 30 06:16:172010//15 /History/1.484/Fri Nov 5 10:16:45 2010// -
trunk/source/visualization/HepRep/CVS/Entries
r1337 r1340 5 5 /History/1.135/Thu Sep 30 06:16:21 2010// 6 6 /README/1.23/Mon Jul 12 14:53:10 2010// 7 /sources.cmake/1. 1/Wed Sep 29 19:11:582010//7 /sources.cmake/1.2/Fri Oct 8 10:03:41 2010// -
trunk/source/visualization/History
r1315 r1340 1 $Id: History,v 1.48 1 2010/06/15 16:41:14allison Exp $1 $Id: History,v 1.484 2010/10/27 11:20:27 allison Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 24 24 History file for visualization category 25 25 --------------------------------------- 26 27 27th October 2010 John Allison 28 - vistest-V09-03-01: Replaced MyPhysicsList by QGSP_BERT. 29 30 8th October 2010 John Allison (vis-V09-03-09 with co-working tags...) 31 - Co-working tags: interfaces-V09-03-12 + config-V09-03-08 32 - visman-V09-03-12: 33 o Added /vis/viewer/set/defaultColour and defaultTextColour. 34 - opengl-V09-03-07/08: 35 o Improved kernel visit trigger. 36 o Time-slices fade to background colour. 37 o Many improvements to Qt. 38 - openinventor-V09-03-01: 39 o Improved kernel visit trigger. 40 - visXXX-V08-03-00: 41 o Improved kernel visit trigger. 42 - visexternal-V09-03-00: 43 o G4OpenGL2PSAction : add new method to set viewport. 44 - gMocren-V09-03-04: 45 o Added missing inclusion of <sstream>. 26 46 27 47 15th June 2010 John Allison (vis-V09-03-08) -
trunk/source/visualization/OpenGL/CVS/Entries
r1337 r1340 4 4 /Doxyfile/1.4/Mon Jul 12 14:53:12 2010// 5 5 /GNUmakefile/1.13/Thu Sep 30 06:16:41 2010// 6 /History/1.180/Thu Sep 30 11:54:25 2010//7 6 /sources.cmake/1.1/Wed Sep 29 19:12:14 2010// 7 /History/1.187/Fri Nov 5 10:16:45 2010// -
trunk/source/visualization/OpenGL/GNUmakefile
r1337 r1340 11 11 12 12 # For debug mode 13 #CPPFLAGS += -DG4DEBUG_VIS_OGL13 CPPFLAGS += -DG4DEBUG_VIS_OGL 14 14 15 15 GLOBLIBS = libG4vis_management.lib libG4modeling.lib libG4gl2ps.lib -
trunk/source/visualization/OpenGL/History
r1337 r1340 1 $Id: History,v 1.18 0 2010/06/23 13:29:23 lgarnierExp $1 $Id: History,v 1.187 2010/11/05 06:25:23 allison Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 17 17 * Reverse chronological order (last date on top), please * 18 18 ---------------------------------------------------------- 19 20 5th November 2010 John Allison 21 - G4OpenGLStoredSceneHandler, G4OpenGLViewerMessenger: 22 o Introduced a display list limit to avoid memory exhaustion. 23 o Introduced /vis/ogl/set/displayListLimit. 24 25 8th October 2010 Laurent Garnier 26 - G4OpenGQtViewer.cc: 27 o Add menu for changing text color, default color, background color 28 o Toogle projection now call directly command instead of redefinding it 29 30 6th October 2010 John Allison (opengl-V09-03-08 with co-working tags...) 31 - Co-working tags: interfaces-V09-03-12 + config-V09-03-08 32 - G4OpenGLStoredViewer.cc: 33 o Added default colour and default text colour to list of parameters 34 that trigger a kernel visit. 35 36 5th October 2010 John Allison 37 - G4OpenGLStoredViewer.cc: Time-slices fade to background colour. 38 39 5th October 2010 Laurent Garnier 40 - Change lots of shortcuts in Qt 41 - Add 'google earth like' rotation 19 42 20 43 23th June 2010 Laurent Garnier -
trunk/source/visualization/OpenGL/include/CVS/Entries
r1337 r1340 14 14 /G4OpenGLQtExportDialog.hh/1.7/Thu Sep 30 06:16:49 2010// 15 15 /G4OpenGLQtMovieDialog.hh/1.4/Thu Sep 30 06:16:49 2010// 16 /G4OpenGLQtViewer.hh/1.23/Thu Sep 30 06:16:49 2010//17 16 /G4OpenGLSceneHandler.hh/1.30/Thu Sep 30 06:16:49 2010// 18 17 /G4OpenGLSceneHandler.icc/1.9/Thu Sep 30 06:16:49 2010// 19 18 /G4OpenGLStoredQt.hh/1.2/Thu Sep 30 06:16:49 2010// 20 19 /G4OpenGLStoredQtViewer.hh/1.10/Thu Sep 30 06:16:49 2010// 21 /G4OpenGLStoredSceneHandler.hh/1.28/Thu Sep 30 06:16:49 2010//22 20 /G4OpenGLStoredViewer.hh/1.10/Thu Sep 30 06:16:49 2010// 23 21 /G4OpenGLStoredWin32.hh/1.8/Thu Sep 30 06:16:49 2010// … … 28 26 /G4OpenGLStoredXmViewer.hh/1.8/Thu Sep 30 06:16:50 2010// 29 27 /G4OpenGLTransform3D.hh/1.8/Thu Sep 30 06:16:50 2010// 30 /G4OpenGLViewer.hh/1.32/Thu Sep 30 06:16:50 2010//31 /G4OpenGLViewerMessenger.hh/1.7/Thu Sep 30 06:16:50 2010//32 28 /G4OpenGLWin32Viewer.hh/1.15/Thu Sep 30 06:16:50 2010// 33 29 /G4OpenGLXViewer.hh/1.32/Thu Sep 30 06:16:50 2010// … … 48 44 /G4OpenGLXmViewer.hh/1.11/Thu Sep 30 06:16:50 2010// 49 45 /G4OpenGLXmViewerMessenger.hh/1.5/Thu Sep 30 06:16:50 2010// 46 /G4OpenGLViewer.hh/1.33/Tue Oct 5 15:45:19 2010// 47 /G4OpenGLQtViewer.hh/1.25/Fri Oct 8 10:07:31 2010// 48 /G4OpenGLStoredSceneHandler.hh/1.29/Fri Nov 5 10:16:52 2010// 49 /G4OpenGLViewerMessenger.hh/1.8/Fri Nov 5 10:16:52 2010// 50 50 D -
trunk/source/visualization/OpenGL/include/G4OpenGLQtViewer.hh
r1333 r1340 25 25 // 26 26 // 27 // $Id: G4OpenGLQtViewer.hh,v 1.2 3 2010/06/04 15:27:47lgarnier Exp $27 // $Id: G4OpenGLQtViewer.hh,v 1.25 2010/10/08 10:07:31 lgarnier Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 // … … 231 231 void actionDrawingLineSurfaceRemoval(); 232 232 void actionSaveImage(); 233 void actionChangeBackgroundColor(); 234 void actionChangeTextColor(); 235 void actionChangeDefaultColor(); 233 236 void actionMovieParameters(); 234 237 … … 238 241 void toggleRepresentation(bool); 239 242 void toggleProjection(bool); 240 void toggleBackground(bool);241 243 void toggleTransparency(bool); 242 244 void toggleAntialiasing(bool); -
trunk/source/visualization/OpenGL/include/G4OpenGLStoredSceneHandler.hh
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4OpenGLStoredSceneHandler.hh,v 1.2 8 2009/02/04 16:48:40 lgarnierExp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4OpenGLStoredSceneHandler.hh,v 1.29 2010/11/05 06:25:23 allison Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 // … … 69 69 void ClearTransientStore (); 70 70 71 static G4int GetDisplayListLimit() {return fDisplayListLimit;} 72 static void SetDisplayListLimit(G4int lim) {fDisplayListLimit = lim;} 73 71 74 protected: 72 75 … … 77 80 static G4int fSceneIdCount; // static counter for OpenGLStored scenes. 78 81 G4int fDisplayListId; // Workspace. 79 G4bool fMemoryForDisplayLists; // avoid memory overflow 82 G4bool fMemoryForDisplayLists; // avoid memory overflow 83 static G4int fDisplayListLimit; // avoid memory overflow 84 static G4int fDisplayListBase; // avoid memory overflow 80 85 G4int fAddPrimitivePreambleNestingDepth; 81 86 -
trunk/source/visualization/OpenGL/include/G4OpenGLViewer.hh
r1332 r1340 25 25 // 26 26 // 27 // $Id: G4OpenGLViewer.hh,v 1.3 2 2009/05/14 16:38:23lgarnier Exp $27 // $Id: G4OpenGLViewer.hh,v 1.33 2010/10/05 15:45:19 lgarnier Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 // -
trunk/source/visualization/OpenGL/include/G4OpenGLViewerMessenger.hh
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4OpenGLViewerMessenger.hh,v 1. 7 2009/05/18 09:07:12 lgarnierExp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4OpenGLViewerMessenger.hh,v 1.8 2010/11/05 06:25:23 allison Exp $ 28 // GEANT4 tag $Name: $ 29 29 30 30 #ifndef G4OPENGLVIEWERMESSENGER_HH … … 41 41 class G4UIcmdWithABool; 42 42 class G4UIcmdWithAString; 43 class G4UIcmdWithAnInteger; 43 44 44 45 class G4OpenGLViewerMessenger: public G4UImessenger { … … 57 58 G4UIdirectory* fpDirectorySet; 58 59 G4UIcommand* fpCommandDisplayHeadTime; 60 G4UIcmdWithAnInteger* fpCommandDisplayListLimit; 59 61 G4UIcommand* fpCommandDisplayLightFront; 60 62 G4UIcommand* fpCommandEndTime; -
trunk/source/visualization/OpenGL/src/CVS/Entries
r1337 r1340 14 14 /G4OpenGLSceneHandler.cc/1.59/Thu Sep 30 06:16:59 2010// 15 15 /G4OpenGLStoredQt.cc/1.10/Thu Sep 30 06:16:59 2010// 16 /G4OpenGLStoredSceneHandler.cc/1.42/Thu Sep 30 06:16:59 2010//17 /G4OpenGLStoredViewer.cc/1.26/Thu Sep 30 06:16:59 2010//18 16 /G4OpenGLStoredWin32.cc/1.15/Thu Sep 30 06:17:00 2010// 19 17 /G4OpenGLStoredWin32Viewer.cc/1.22/Thu Sep 30 06:17:00 2010// … … 23 21 /G4OpenGLStoredXmViewer.cc/1.26/Thu Sep 30 06:17:00 2010// 24 22 /G4OpenGLTransform3D.cc/1.9/Thu Sep 30 06:17:00 2010// 25 /G4OpenGLViewer.cc/1.62/Thu Sep 30 06:17:00 2010//26 /G4OpenGLViewerMessenger.cc/1.18/Thu Sep 30 06:17:00 2010//27 23 /G4OpenGLWin32Viewer.cc/1.20/Thu Sep 30 06:17:00 2010// 28 24 /G4OpenGLXViewer.cc/1.55/Thu Sep 30 06:17:00 2010// … … 49 45 /G4OpenGLXmWindowHandlingCallbacks.cc/1.11/Thu Sep 30 06:17:09 2010// 50 46 /G4OpenGLImmediateQtViewer.cc/1.22/Thu Sep 30 11:54:33 2010// 51 /G4OpenGLQtViewer.cc/1.52/Thu Sep 30 11:54:33 2010//52 47 /G4OpenGLStoredQtViewer.cc/1.32/Thu Sep 30 11:54:33 2010// 48 /G4OpenGLViewer.cc/1.63/Tue Oct 5 15:45:19 2010// 49 /G4OpenGLStoredViewer.cc/1.29/Wed Oct 6 15:59:03 2010// 50 /G4OpenGLQtViewer.cc/1.55/Fri Oct 8 10:07:31 2010// 51 /G4OpenGLStoredSceneHandler.cc/1.43/Fri Nov 5 10:16:52 2010// 52 /G4OpenGLViewerMessenger.cc/1.19/Fri Nov 5 10:16:52 2010// 53 53 D -
trunk/source/visualization/OpenGL/src/G4OpenGLQtViewer.cc
r1335 r1340 25 25 // 26 26 // 27 // $Id: G4OpenGLQtViewer.cc,v 1.5 2 2010/06/23 13:29:23lgarnier Exp $27 // $Id: G4OpenGLQtViewer.cc,v 1.55 2010/10/08 10:07:31 lgarnier Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 // … … 79 79 #include <qgl.h> // include <qglwidget.h> 80 80 #include <qdialog.h> 81 #include <qcolordialog.h> 81 82 #include <qevent.h> //include <qcontextmenuevent.h> 82 83 … … 111 112 // fWindow->makeCurrent(); 112 113 113 #ifdef G4DEBUG_VIS_OGL114 #if QT_VERSION < 0x040000115 printf("G4OpenGLQtViewer::CreateMainWindow :: ++++++++++++++ add new TAB %s W:%d H:%d SizeHinX:%d SizeHintY:%d\n",name.ascii(),getWinWidth(),getWinHeight(),fVP.GetWindowSizeHintX(),fVP.GetWindowSizeHintY());116 #else117 printf("G4OpenGLQtViewer::CreateMainWindow :: ++++++++++++++ add new TAB %s W:%d H:%d SizeHinX:%d SizeHintY:%d\n",name.toStdString().c_str(),getWinWidth(),getWinHeight(),fVP.GetWindowSizeHintX(),fVP.GetWindowSizeHintY());118 #endif119 #endif120 114 //G4Qt* interactorManager = G4Qt::getInstance (); 121 115 … … 552 546 #endif 553 547 554 555 556 #if QT_VERSION < 0x040000 557 QPopupMenu *mBackground = new QPopupMenu(mStyle); 558 mStyle->insertItem("&Background color",mBackground); 548 // Background Color 549 550 QAction *backgroundColorChooser ; 551 #if QT_VERSION < 0x040000 552 QPopupMenu *mBackgroundColor = new QPopupMenu(mStyle); 553 mStyle->insertItem("&Background color",mBackgroundColor); 559 554 560 555 #if QT_VERSION < 0x030200 561 QAction *white = new QAction("&White","&White",CTRL+Key_W,mBackground,0,true); 562 QAction *black = new QAction("&Black","&Black",CTRL+Key_B,mBackground,0,true); 563 #else 564 QAction *white = new QAction("&White",CTRL+Key_W,mBackground); 565 QAction *black = new QAction("&Black",CTRL+Key_B,mBackground); 566 white->setToggleAction(true); 567 black->setToggleAction(true); 568 #endif 569 white->addTo(mBackground); 570 black->addTo(mBackground); 571 572 #else 573 QMenu *mBackground = mStyle->addMenu("&Background color"); 574 QAction *white = mBackground->addAction("White"); 575 QAction *black = mBackground->addAction("Black"); 576 577 #endif 578 if (background.GetRed() == 1. && 579 background.GetGreen() == 1. && 580 background.GetBlue() == 1.) { 581 createRadioAction(white,black,SLOT(toggleBackground(bool)),1); 582 } else { 583 createRadioAction(white,black,SLOT(toggleBackground(bool)),2); 584 } 556 backgroundColorChooser = new QAction("&Choose ...","&Choose ...",CTRL+Key_C,mBackgroundColor,0,true); 557 #else 558 backgroundColorChooser = new QAction("&Choose ...","&Choose ...",CTRL+Key_C,mBackgroundColor); 559 #endif 560 backgroundColorChooser->addTo(mBackgroundColor); 561 QObject ::connect(backgroundColorChooser, 562 SIGNAL(activated()), 563 this, 564 SLOT(actionChangeBackgroundColor())); 565 566 #else 567 // === Action Menu === 568 backgroundColorChooser = mStyle->addAction("Background color"); 569 QObject ::connect(backgroundColorChooser, 570 SIGNAL(triggered()), 571 this, 572 SLOT(actionChangeBackgroundColor())); 573 #endif 574 575 // Text Color 576 577 QAction *textColorChooser ; 578 #if QT_VERSION < 0x040000 579 QPopupMenu *mTextColor = new QPopupMenu(mStyle); 580 mStyle->insertItem("&Text color",mTextColor); 581 582 #if QT_VERSION < 0x030200 583 textColorChooser = new QAction("&Choose ...","&Choose ...",CTRL+Key_C,mTextColor,0,true); 584 #else 585 textColorChooser = new QAction("&Choose ...","&Choose ...",CTRL+Key_C,mTextColor); 586 #endif 587 textColorChooser->addTo(mTextColor); 588 QObject ::connect(textColorChooser, 589 SIGNAL(activated()), 590 this, 591 SLOT(actionChangeTextColor())); 592 593 #else 594 // === Action Menu === 595 textColorChooser = mStyle->addAction("Text color"); 596 QObject ::connect(textColorChooser, 597 SIGNAL(triggered()), 598 this, 599 SLOT(actionChangeTextColor())); 600 #endif 601 602 // Default Color 603 604 QAction *defaultColorChooser ; 605 #if QT_VERSION < 0x040000 606 QPopupMenu *mDefaultColor = new QPopupMenu(mStyle); 607 mStyle->insertItem("&Default color",mDefaultColor); 608 609 #if QT_VERSION < 0x030200 610 defaultColorChooser = new QAction("&Choose ...","&Choose ...",CTRL+Key_C,mDefaultColor,0,true); 611 #else 612 defaultColorChooser = new QAction("&Choose ...","&Choose ...",CTRL+Key_C,mDefaultColor); 613 #endif 614 defaultColorChooser->addTo(mDefaultColor); 615 QObject ::connect(defaultColorChooser, 616 SIGNAL(activated()), 617 this, 618 SLOT(actionChangeDefaultColor())); 619 620 #else 621 // === Action Menu === 622 defaultColorChooser = mStyle->addAction("Default color"); 623 QObject ::connect(defaultColorChooser, 624 SIGNAL(triggered()), 625 this, 626 SLOT(actionChangeDefaultColor())); 627 #endif 585 628 586 629 … … 1101 1144 1102 1145 if (check == 1) { 1103 fVP.SetFieldHalfAngle (0);1146 G4UImanager::GetUIpointer()->ApplyCommand("/vis/viewer/set/projection o"); 1104 1147 } else { 1105 1106 // look for the default parameter hidden in G4UIcommand parameters 1107 G4UImanager* UI = G4UImanager::GetUIpointer(); 1108 if(UI==NULL) 1109 return; 1110 G4UIcommandTree * treeTop = UI->GetTree(); 1111 1112 // find command 1113 G4UIcommand* command = treeTop->FindPath("/vis/viewer/set/projection"); 1114 if (!command) 1115 return; 1116 1117 // find param 1118 G4UIparameter * angleParam = NULL; 1119 for(G4int i=0; i<command->GetParameterEntries(); i++) 1120 { 1121 if( command->GetParameter(i)->GetParameterName() == "field-half-angle" ) { 1122 angleParam = command->GetParameter(i); 1123 } 1124 } 1125 if (!angleParam) 1126 return; 1127 1128 // find unit 1129 G4UIparameter * unitParam = NULL; 1130 for(G4int i=0; i<command->GetParameterEntries(); i++) 1131 { 1132 if( command->GetParameter(i)->GetParameterName() == "unit" ) { 1133 unitParam = command->GetParameter(i); 1134 } 1135 } 1136 if (!unitParam) 1137 return; 1138 1139 G4double defaultValue = command->ConvertToDouble(angleParam->GetDefaultValue()) 1140 * G4UnitDefinition::GetValueOf(unitParam->GetDefaultValue()); 1141 if (defaultValue > 89.5 || defaultValue <= 0.0) { 1142 G4cerr << "Field half angle should be 0 < angle <= 89.5 degrees. Check your default Field half angle parameter"; 1143 } else { 1144 G4cout << "Perspective view has been set to default value. Field half angle="<<angleParam->GetDefaultValue() <<" " << G4endl; 1145 fVP.SetFieldHalfAngle (defaultValue); 1146 SetView (); 1147 } 1148 G4UImanager::GetUIpointer()->ApplyCommand("/vis/viewer/set/projection p"); 1148 1149 } 1149 1150 updateQWidget(); 1150 1151 } 1151 1152 1152 1153 /**1154 SLOT Activate by a click on the background menu1155 @param check : 1 white, 0 black1156 */1157 void G4OpenGLQtViewer::toggleBackground(bool check) {1158 1159 // //I need to revisit the kernel if the background colour changes and1160 // //hidden line removal is enabled, because hlr drawing utilises the1161 // //background colour in its drawing...1162 // // (Note added by JA 13/9/2005) Background now handled in view1163 // // parameters. A kernel visit is triggered on change of background.1164 if (check == 1) {1165 ((G4ViewParameters&)this->GetViewParameters()).1166 SetBackgroundColour(G4Colour(1.,1.,1.)); // White1167 } else {1168 ((G4ViewParameters&)this->GetViewParameters()).1169 SetBackgroundColour(G4Colour(0.,0.,0.)); // Black1170 }1171 updateQWidget();1172 }1173 1153 1174 1154 /** … … 1230 1210 void G4OpenGLQtViewer::toggleAux(bool check) { 1231 1211 if (check) { 1212 fVP.SetAuxEdgeVisible(true); 1213 } else { 1232 1214 fVP.SetAuxEdgeVisible(false); 1233 } else {1234 fVP.SetAuxEdgeVisible(true);1235 1215 } 1236 1216 SetNeedKernelVisit (true); … … 1397 1377 } 1398 1378 1379 } 1380 1381 1382 void G4OpenGLQtViewer::actionChangeBackgroundColor() { 1383 1384 // //I need to revisit the kernel if the background colour changes and 1385 // //hidden line removal is enabled, because hlr drawing utilises the 1386 // //background colour in its drawing... 1387 // // (Note added by JA 13/9/2005) Background now handled in view 1388 // // parameters. A kernel visit is triggered on change of background. 1389 1390 QColor color; 1391 color = QColorDialog::getColor(Qt::black, fGLWindow); 1392 if (color.isValid()) { 1393 QString com = "/vis/viewer/set/background "; 1394 QString num; 1395 com += num.setNum(((float)color.red())/256)+" "; 1396 com += num.setNum(((float)color.green())/256)+" "; 1397 com += num.setNum(((float)color.blue())/256)+" "; 1398 G4UImanager::GetUIpointer()->ApplyCommand(com.toStdString().c_str()); 1399 updateQWidget(); 1400 } 1401 } 1402 1403 void G4OpenGLQtViewer::actionChangeTextColor() { 1404 1405 QColor color; 1406 color = QColorDialog::getColor(Qt::yellow, fGLWindow); 1407 if (color.isValid()) { 1408 QString com = "/vis/viewer/set/defaultTextColour "; 1409 QString num; 1410 com += num.setNum(((float)color.red())/256)+" "; 1411 com += num.setNum(((float)color.green())/256)+" "; 1412 com += num.setNum(((float)color.blue())/256)+" "; 1413 G4UImanager::GetUIpointer()->ApplyCommand(com.toStdString().c_str()); 1414 updateQWidget(); 1415 } 1416 } 1417 1418 void G4OpenGLQtViewer::actionChangeDefaultColor() { 1419 1420 QColor color; 1421 color = QColorDialog::getColor(Qt::white, fGLWindow); 1422 printf("actionChangeDefaultColor\n"); 1423 if (color.isValid()) { 1424 QString com = "/vis/viewer/set/defaultColour "; 1425 QString num; 1426 com += num.setNum(((float)color.red())/256)+" "; 1427 com += num.setNum(((float)color.green())/256)+" "; 1428 com += num.setNum(((float)color.blue())/256)+" "; 1429 G4UImanager::GetUIpointer()->ApplyCommand(com.toStdString().c_str()); 1430 updateQWidget(); 1431 } 1399 1432 } 1400 1433 … … 1510 1543 1511 1544 if (fMouseAction == STYLE1) { // rotate 1512 #ifdef G4DEBUG_VIS_OGL1513 printf("G4OpenGLQtViewer:: ___________________________________\n");1514 printf("G4OpenGLQtViewer:: mouse move\n");1515 #endif1516 1545 if (fNoKeyPress) { 1517 #ifdef G4DEBUG_VIS_OGL1518 printf("G4OpenGLQtViewer:: rotate normal\n");1519 #endif1520 1546 rotateQtScene(((float)delta.x())/correctionFactor,((float)delta.y())/correctionFactor); 1521 1547 } else if (fAltKeyPress) { 1522 #ifdef G4DEBUG_VIS_OGL1523 printf("G4OpenGLQtViewer:: rotate view\n");1524 #endif1525 1548 rotateQtSceneInViewDirection(((float)delta.x())/correctionFactor,((float)delta.y())/correctionFactor); 1526 1549 } … … 1529 1552 moveScene(-((float)delta.x())/correctionFactor,-((float)delta.y())/correctionFactor,0,true); 1530 1553 } 1531 #ifdef G4DEBUG_VIS_OGL1532 printf("G4OpenGLQtViewer::G4MouseReleaseEvent Fps:%f x:%d y:%d cycle:%f\n",(float)1000/lastMoveTime.elapsed(),delta.x(),delta.y(),correctionFactor);1533 #endif1534 1554 lastMoveTime.start(); 1535 1555 } … … 1583 1603 if (fMouseAction == STYLE1) { // rotate 1584 1604 if (mButtons & Qt::LeftButton) { 1585 #ifdef G4DEBUG_VIS_OGL1586 printf("G4OpenGLQtViewer:: ___________________________________\n");1587 printf("G4OpenGLQtViewer:: mouse move %f %f\n",((float)deltaX),((float)deltaY));1588 #endif1589 1605 if (fNoKeyPress) { 1590 #ifdef G4DEBUG_VIS_OGL1591 printf("G4OpenGLQtViewer:: rotate normal\n");1592 #endif1593 1606 rotateQtScene(((float)deltaX),((float)deltaY)); 1594 1607 } else if (fAltKeyPress) { 1595 #ifdef G4DEBUG_VIS_OGL1596 printf("G4OpenGLQtViewer:: rotate view\n");1597 #endif1598 1608 rotateQtSceneInViewDirection(((float)deltaX),((float)deltaY)); 1599 1609 } else if (fShiftKeyPress) { … … 1608 1618 moveScene(-(float)deltaX*factor,-(float)deltaY*factor,0,false); 1609 1619 } else if (fControlKeyPress) { 1610 #ifdef G4DEBUG_VIS_OGL1611 printf("G4OpenGLQtViewer:: zoom\n");1612 #endif1613 1620 fVP.SetZoomFactor(fVP.GetZoomFactor()*(1+((float)deltaY))); 1614 1621 } … … 2024 2031 } 2025 2032 #else 2026 #ifdef G4DEBUG_VIS_OGL2027 printf("G4OpenGLQtViewer:: ________________Key Press\n");2028 #endif2029 2033 if (modifier & Qt::AltModifier ) { 2030 2034 fAltKeyPress = true; 2031 2035 fNoKeyPress = false; 2032 #ifdef G4DEBUG_VIS_OGL2033 printf("G4OpenGLQtViewer:: ________________ALT\n");2034 #endif2035 2036 } 2036 2037 if (modifier & Qt::ShiftModifier ) { 2037 2038 fShiftKeyPress = true; 2038 2039 fNoKeyPress = false; 2039 #ifdef G4DEBUG_VIS_OGL2040 printf("G4OpenGLQtViewer:: ________________Shift\n");2041 #endif2042 2040 } 2043 2041 if (modifier & Qt::ControlModifier ) { 2044 2042 fControlKeyPress = true; 2045 2043 fNoKeyPress = false; 2046 #ifdef G4DEBUG_VIS_OGL2047 printf("G4OpenGLQtViewer:: ________________Control\n");2048 #endif2049 2044 } 2050 2045 #endif … … 2848 2843 // G4UImanager* UI = 2849 2844 G4UImanager::GetUIpointer(); 2850 #ifdef G4DEBUG_VIS_OGL2851 // printf("G4OpenGLQtViewer::getParentWidget :: UImanager %d G4Qt:%d et via GetUIQt:%d---------------------\n",UI,UI->GetSession(),interactorManager,interactorManager->GetUIVisWidget());2852 #endif2853 2845 2854 2846 bool found = false; -
trunk/source/visualization/OpenGL/src/G4OpenGLStoredQtViewer.cc
r1332 r1340 48 48 { 49 49 50 #ifdef G4DEBUG_VIS_OGL51 printf("G4OpenGLStoredQtViewer::constructor VVVVVVVVVVVV\n");52 #endif53 50 #if QT_VERSION < 0x040000 54 51 setFocusPolicy(QWidget::StrongFocus); // enable keybord events … … 59 56 fIsRepainting = false; 60 57 61 #ifdef G4DEBUG_VIS_OGL62 printf("G4OpenGLStoredQtViewer::constructor ^^^^^^^^^^^^\n");63 #endif64 58 if (fViewId < 0) return; // In case error in base class instantiation. 65 59 } … … 73 67 74 68 void G4OpenGLStoredQtViewer::Initialise() { 75 #ifdef G4DEBUG_VIS_OGL76 printf("G4OpenGLStoredQtViewer::Initialise VVVVVVVVVVVV\n");77 #endif78 69 fReadyToPaint = false; 79 70 CreateMainWindow (this,QString(GetName())); … … 81 72 82 73 fReadyToPaint = true; 83 #ifdef G4DEBUG_VIS_OGL84 printf("G4OpenGLStoredQtViewer::Initialise ^^^^^^^^^^^^\n");85 #endif86 74 } 87 75 88 76 void G4OpenGLStoredQtViewer::initializeGL () { 89 77 90 #ifdef G4DEBUG_VIS_OGL91 printf("G4OpenGLStoredQtViewer::InitialiseGL () 0\n");92 #endif93 78 // return; 94 79 InitializeGLView (); 95 80 96 #ifdef G4DEBUG_VIS_OGL97 printf("G4OpenGLStoredQtViewer::InitialiseGL () 1\n");98 #endif99 81 100 82 // clear the buffers and window. -
trunk/source/visualization/OpenGL/src/G4OpenGLStoredSceneHandler.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4OpenGLStoredSceneHandler.cc,v 1.4 2 2010/06/03 08:23:02allison Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4OpenGLStoredSceneHandler.cc,v 1.43 2010/11/05 06:25:23 allison Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 // … … 106 106 if (fMemoryForDisplayLists) { 107 107 fDisplayListId = glGenLists (1); 108 if (glGetError() == GL_OUT_OF_MEMORY) { // Could pre-allocate? 108 if (glGetError() == GL_OUT_OF_MEMORY || 109 fDisplayListId > fDisplayListLimit + fDisplayListBase) { 109 110 G4cout << 110 111 "********************* WARNING! ********************" 111 "\nUnable to allocate any more display lists in OpenGL." 112 "\n Continuing drawing in IMMEDIATE MODE." 112 "\n Display list limit reached in OpenGL." 113 "\n Continuing drawing in IMMEDIATE MODE." 114 "\n Current limit: " 115 << fDisplayListLimit << 116 ". Change with \"/vis/ogl/set/displayListLimit\"." 113 117 "\n***************************************************" 114 118 << G4endl; … … 351 355 glDeleteLists(fTOList[i].fDisplayListId, 1); 352 356 fTOList.clear (); 357 358 fDisplayListBase = fDisplayListId; 353 359 } 354 360 … … 361 367 glDeleteLists(fTOList[i].fDisplayListId, 1); 362 368 fTOList.clear (); 369 370 fDisplayListBase = fDisplayListId; 363 371 364 372 // Make sure screen corresponds to graphical database... … … 463 471 G4int G4OpenGLStoredSceneHandler::fSceneIdCount = 0; 464 472 473 G4int G4OpenGLStoredSceneHandler::fDisplayListLimit = 50000; 474 475 G4int G4OpenGLStoredSceneHandler::fDisplayListBase = 0; 476 465 477 #endif -
trunk/source/visualization/OpenGL/src/G4OpenGLStoredViewer.cc
r1314 r1340 25 25 // 26 26 // 27 // $Id: G4OpenGLStoredViewer.cc,v 1.2 6 2009/04/08 16:55:44 lgarnierExp $28 // GEANT4 tag $Name: vis-V09-03-06$27 // $Id: G4OpenGLStoredViewer.cc,v 1.29 2010/10/06 10:05:52 allison Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 // … … 88 88 (lastVP.GetNoOfSides () != fVP.GetNoOfSides ()) || 89 89 (lastVP.IsMarkerNotHidden () != fVP.IsMarkerNotHidden ()) || 90 (lastVP.GetDefaultVisAttributes()->GetColour() != 91 fVP.GetDefaultVisAttributes()->GetColour()) || 92 (lastVP.GetDefaultTextVisAttributes()->GetColour() != 93 fVP.GetDefaultTextVisAttributes()->GetColour()) || 90 94 (lastVP.GetBackgroundColour ()!= fVP.GetBackgroundColour ())|| 91 95 (lastVP.IsPicking () != fVP.IsPicking ()) … … 165 169 glMultMatrixd (oglt.GetGLMatrix ()); 166 170 if (fVP.IsPicking()) glLoadName(to.fPickName); 167 G4Colour& c = to.fColour; 171 const G4Colour& c = to.fColour; 172 const G4Colour& bg = fVP.GetBackgroundColour(); 168 173 G4double bsf = 1.; // Brightness scaling factor. 169 174 if (fFadeFactor > 0. && to.fEndTime < fEndTime) 170 175 bsf = 1. - fFadeFactor * 171 176 ((fEndTime - to.fEndTime) / (fEndTime - fStartTime)); 172 glColor3d(bsf * c.GetRed (), bsf * c.GetGreen (), bsf * c.GetBlue ()); 177 glColor3d 178 (bsf * c.GetRed() + (1. - bsf) * bg.GetRed(), 179 bsf * c.GetGreen() + (1. - bsf) * bg.GetGreen(), 180 bsf * c.GetBlue() + (1. - bsf) * bg.GetBlue()); 173 181 glCallList (to.fDisplayListId); 174 182 glPopMatrix(); -
trunk/source/visualization/OpenGL/src/G4OpenGLViewer.cc
r1335 r1340 25 25 // 26 26 // 27 // $Id: G4OpenGLViewer.cc,v 1.6 2 2010/05/11 10:22:37 allisonExp $27 // $Id: G4OpenGLViewer.cc,v 1.63 2010/10/05 15:45:19 lgarnier Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 // … … 113 113 glDisable (GL_POLYGON_SMOOTH); 114 114 115 // if (fVP != NULL) { 116 fWinSize_x = fVP.GetWindowSizeHintX(); 117 fWinSize_y = fVP.GetWindowSizeHintY(); 118 // } 115 fWinSize_x = fVP.GetWindowSizeHintX(); 116 fWinSize_y = fVP.GetWindowSizeHintY(); 119 117 } 120 118 … … 177 175 } 178 176 179 glViewport(0, 0, fWinSize_x,fWinSize_y); 180 181 # ifdef G4DEBUG_VIS_OGL182 printf("G4OpenGLViewer::ResizeGLView END %d %d &:%d\n",fWinSize_x,fWinSize_y,this);183 #endif 184 177 #ifdef G4DEBUG_VIS_OGL 178 printf("G4OpenGLViewer::ResizeGLView viewport X:%d Y:%d\n",fWinSize_x,fWinSize_y); 179 #endif 180 glViewport(0, 0, fWinSize_x,fWinSize_y); 181 182 185 183 } 186 184 … … 191 189 return; 192 190 } 193 #ifdef G4DEBUG_VIS_OGL194 printf("G4OpenGLViewer::SetView\n");195 #endif196 191 // Calculates view representation based on extent of object being 197 192 // viewed and (initial) viewpoint. (Note: it can change later due … … 338 333 background = fVP.GetBackgroundColour (); 339 334 340 #ifdef G4DEBUG_VIS_OGL341 printf("G4OpenGLViewer::SetView END\n");342 #endif343 335 } 344 336 … … 461 453 glGetIntegerv (GL_UNPACK_ALIGNMENT, &alignment); 462 454 455 #ifdef G4DEBUG_VIS_OGL 456 printf("G4OpenGLViewer::grabPixels colors:%d swap:%d lsb:%d rowlenght:%d sr:%d sp:%d align:%d\n",inColor,swapbytes, lsbfirst, rowlength,skiprows, skippixels, alignment); 457 #endif 458 459 463 460 glPixelStorei (GL_UNPACK_SWAP_BYTES, GL_FALSE); 464 461 glPixelStorei (GL_UNPACK_LSB_FIRST, GL_FALSE); … … 469 466 glPixelStorei (GL_UNPACK_ALIGNMENT, 1); 470 467 468 glFlush(); 471 469 glReadBuffer(GL_FRONT); 472 470 glReadPixels (0, 0, (GLsizei)width, (GLsizei)height, format, GL_UNSIGNED_BYTE, (GLvoid*) buffer); 473 471 // glReadPixels (0, 0, (GLsizei)width, (GLsizei)height, GL_RGB, GL_UNSIGNED_BYTE, (GLvoid*) buffer); 474 472 glPixelStorei (GL_UNPACK_SWAP_BYTES, swapbytes); 475 473 glPixelStorei (GL_UNPACK_LSB_FIRST, lsbfirst); … … 529 527 bool G4OpenGLViewer::printNonVectoredEPS () { 530 528 531 int width = getRealPrintSizeX(); 532 int height = getRealPrintSizeY(); 533 534 #ifdef G4DEBUG_VIS_OGL 535 printf("G4OpenGLViewer::printNonVectoredEPS file:%s Vec:%d X:%d Y:%d col:%d fWinX:%d fWinY:%d\n",getRealPrintFilename().c_str(),fVectoredPs,width,height,fPrintColour,fWinSize_x,fWinSize_y); 529 GLint viewport[4]; 530 glGetIntegerv(GL_VIEWPORT, viewport); 531 532 int width2 = getRealPrintSizeX(); 533 int height2 = getRealPrintSizeY(); 534 int width = viewport[2]; // FIXME : Why -1 ???? 535 int height = viewport[3]; 536 537 #ifdef G4DEBUG_VIS_OGL 538 printf("G4OpenGLViewer::printNonVectoredEPS file:%s Vec:%d X:%d Y:%d X2:%d Y2:%d col:%d fWinX:%d fWinY:%d\n",getRealPrintFilename().c_str(),fVectoredPs,width,height,width2,height2,fPrintColour,fWinSize_x,fWinSize_y); 536 539 #endif 537 540 FILE* fp; … … 621 624 int height = getRealPrintSizeY(); 622 625 626 #ifdef G4DEBUG_VIS_OGL 627 printf("G4OpenGLViewer::printGl2PS file:%s Vec:%d X:%d Y:%d col:%d fWinX:%d fWinY:%d\n",getRealPrintFilename().c_str(),fVectoredPs,width,height,fPrintColour,fWinSize_x,fWinSize_y); 628 #endif 629 623 630 if (!fGL2PSAction) return false; 624 631 … … 643 650 644 651 // Set the viewport 645 // fGL2PSAction->setViewport(0, 0, getRealPrintSizeX(),getRealPrintSizeY());652 // fGL2PSAction->setViewport(0, 0, width, height); 646 653 // By default, we choose the line width (trajectories...) 647 654 fGL2PSAction->setLineWidth(1); … … 693 700 return 0; 694 701 } 702 #ifdef G4DEBUG_VIS_OGL 703 printf("G4OpenGLViewer::getRealPrintSizeX %d\n",fPrintSizeX); 704 #endif 695 705 return fPrintSizeX; 696 706 } … … 712 722 return 0; 713 723 } 724 #ifdef G4DEBUG_VIS_OGL 725 printf("G4OpenGLViewer::getRealPrintSizeY %d\n",fPrintSizeY); 726 #endif 714 727 return fPrintSizeY; 715 728 } … … 825 838 //phi spin stuff here 826 839 827 828 #ifdef G4DEBUG_VIS_OGL829 printf("G4OpenGLViewer::rotateScene dx:%f dy:%f delta:%f\n",dx,dy, deltaRotation);830 #endif831 832 840 vp = fVP.GetViewpointDirection ().unit (); 833 841 up = fVP.GetUpVector ().unit (); 834 842 835 #ifdef G4DEBUG_VIS_OGL836 printf("G4OpenGLViewer::rotateScene vp: %f %f %f\n",vp.x(),vp.y(),vp.z());837 #endif838 843 yprime = (up.cross(vp)).unit(); 839 844 zprime = (vp.cross(yprime)).unit(); … … 855 860 // to allow more than 360° rotation 856 861 857 // const G4Point3D targetPoint858 // = fSceneHandler.GetScene()->GetStandardTargetPoint()859 // + fVP.GetCurrentTargetPoint ();860 // G4double radius = fSceneHandler.GetScene()->GetExtent().GetExtentRadius();861 // if(radius<=0.) radius = 1.;862 // const G4double cameraDistance = fVP.GetCameraDistance (radius);863 // const G4Point3D cameraPosition =864 // targetPoint + cameraDistance * fVP.GetViewpointDirection().unit();865 866 862 if (fVP.GetLightsMoveWithCamera()) { 867 #ifdef G4DEBUG_VIS_OGL868 printf("G4OpenGLViewer::rotateScene GetLightsMoveWithCamera: %f \n",new_vp.z()*vp.z());869 #endif870 863 new_up = (new_vp.cross(yprime)).unit(); 871 864 if (new_vp.z()*vp.z() <0) { 872 #ifdef G4DEBUG_VIS_OGL873 printf("G4OpenGLViewer::rotateScene R_____________________________________________\n");874 #endif875 865 new_up.set(new_up.x(),-new_up.y(),new_up.z()); 876 866 } 877 867 } else { 878 #ifdef G4DEBUG_VIS_OGL879 printf("G4OpenGLViewer::rotateScene : %f \n",new_vp.z()*vp.z());880 #endif881 868 new_up = up; 882 869 if (new_vp.z()*vp.z() <0) { 883 #ifdef G4DEBUG_VIS_OGL884 printf("G4OpenGLViewer::rotateScene X_____________________________________________\n");885 #endif886 870 new_up.set(new_up.x(),-new_up.y(),new_up.z()); 887 871 } … … 902 886 delta = a2 - a1; 903 887 // So new viewpoint is... 904 905 888 viewPoint = new_vp.unit() + delta; 906 907 #ifdef G4DEBUG_VIS_OGL 908 printf("G4OpenGLViewer::rotateScene up: %f %f %f\n",up.x(),up.y(),up.z()); 909 printf("G4OpenGLViewer::rotateScene new up: %f %f %f\n",new_up.x(),new_up.y(),new_up.z()); 910 printf("G4OpenGLViewer::rotateScene new vp: %f %f %f delta:%f %f %f\n",new_vp.x(),new_vp.y(),new_vp.z(),delta.x(),delta.y(),delta.z()); 911 #endif 912 913 889 914 890 fVP.SetViewAndLights (viewPoint); 915 916 917 891 } 918 892 -
trunk/source/visualization/OpenGL/src/G4OpenGLViewerMessenger.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4OpenGLViewerMessenger.cc,v 1.1 8 2009/05/14 16:38:23 lgarnierExp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4OpenGLViewerMessenger.cc,v 1.19 2010/11/05 06:25:23 allison Exp $ 28 // GEANT4 tag $Name: $ 29 29 30 30 #ifdef G4VIS_BUILD_OPENGL_DRIVER … … 41 41 #include "G4UIcmdWithABool.hh" 42 42 #include "G4UIcmdWithAString.hh" 43 #include "G4UIcmdWithAnInteger.hh" 43 44 #include "G4VisManager.hh" 44 45 #include <sstream> … … 179 180 fpCommandDisplayLightFront->SetParameter(parameter); 180 181 182 fpCommandDisplayListLimit = 183 new G4UIcmdWithAnInteger("/vis/ogl/set/displayListLimit", this); 184 fpCommandDisplayListLimit->SetGuidance 185 ("Set/reset display list limit (to avoid memory exhaustion)."); 186 fpCommandDisplayListLimit->SetParameterName 187 ("displayListLimit", omitable = true); 188 fpCommandDisplayListLimit->SetDefaultValue(50000); 189 181 190 fpCommandEndTime = 182 191 new G4UIcommand("/vis/ogl/set/endTime", this); … … 241 250 delete fpCommandFade; 242 251 delete fpCommandEndTime; 252 delete fpCommandDisplayListLimit; 243 253 delete fpCommandDisplayLightFront; 244 254 delete fpCommandDisplayHeadTime; … … 322 332 G4cout << 323 333 "G4OpenGLViewerMessenger::SetNewValue: Current viewer is not of type OGLS." 324 "\n Th e time slice viewing feature is only implemented for OGL Stored"325 "\n viewers at present.Use \"/vis/viewer/select\" or \"/vis/open OGLS...\"."334 "\n This feature is only implemented for OGL Stored viewers." 335 "\n Use \"/vis/viewer/select\" or \"/vis/open OGLS...\"." 326 336 << G4endl; 327 337 return; … … 414 424 } 415 425 426 G4OpenGLSceneHandler* pOGLSceneHandler = 427 dynamic_cast<G4OpenGLSceneHandler*>(pViewer->GetSceneHandler()); 428 429 if (!pOGLSceneHandler) { 430 G4cout << 431 "G4OpenGLViewerMessenger::SetNewValue: Current scene handler is not of type" 432 "\n OGL. Use \"/vis/sceneHandler/select\" or \"/vis/open\"." 433 << G4endl; 434 return; 435 } 436 437 G4OpenGLStoredSceneHandler* pOGLSSceneHandler = 438 dynamic_cast<G4OpenGLStoredSceneHandler*>(pViewer->GetSceneHandler()); 439 440 if (!pOGLSSceneHandler) { 441 G4cout << 442 "G4OpenGLViewerMessenger::SetNewValue: Current scene handler is not of type" 443 "\n OGLS (Stored). This feature is only implemented for OGL Stored" 444 "\n scene handlers. Use \"/vis/viewer/select\" or \"/vis/open OGLS...\"." 445 << G4endl; 446 return; 447 } 448 449 if (command == fpCommandDisplayListLimit) 450 { 451 G4int displayListLimit = 452 fpCommandDisplayListLimit->GetNewIntValue(newValue); 453 pOGLSSceneHandler->SetDisplayListLimit(displayListLimit); 454 } 416 455 } 417 456 -
trunk/source/visualization/OpenInventor/CVS/Entries
r1337 r1340 3 3 /CMakeLists.txt/1.1/Wed Sep 29 19:12:22 2010// 4 4 /GNUmakefile/1.10/Thu Sep 30 06:17:09 2010// 5 /History/1.105/Thu Sep 30 06:17:09 2010//6 5 /sources.cmake/1.1/Wed Sep 29 19:12:30 2010// 6 /History/1.107/Wed Oct 6 15:53:50 2010// -
trunk/source/visualization/OpenInventor/History
r1288 r1340 1 $Id: History,v 1.10 5 2010/05/26 14:30:46allison Exp $1 $Id: History,v 1.107 2010/10/06 15:46:21 allison Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 20 20 History file for visualization/OpenInventor 21 21 ------------------------------------------- 22 23 6th October 2010 John Allison (openinventor-V09-03-01) 24 - G4OpenInventorViewer.cc: 25 o Added default colour and default text colour to list of parameters 26 that trigger a kernel visit. 22 27 23 28 26th May 2010 John Allison (openinventor-V09-03-00) -
trunk/source/visualization/OpenInventor/src/CVS/Entries
r1337 r1340 2 2 /G4OpenInventorSceneHandler.cc/1.55/Thu Sep 30 06:17:10 2010// 3 3 /G4OpenInventorTransform3D.cc/1.8/Thu Sep 30 06:17:10 2010// 4 /G4OpenInventorViewer.cc/1.60/Thu Sep 30 06:17:10 2010//5 4 /G4OpenInventorWin.cc/1.8/Thu Sep 30 06:17:10 2010// 6 5 /G4OpenInventorWinViewer.cc/1.26/Thu Sep 30 06:17:10 2010// … … 22 21 /SoTrd.cc/1.8/Thu Sep 30 06:17:12 2010// 23 22 /SoTubs.cc/1.8/Thu Sep 30 06:17:12 2010// 23 /G4OpenInventorViewer.cc/1.61/Wed Oct 6 15:53:54 2010// 24 24 D -
trunk/source/visualization/OpenInventor/src/G4OpenInventorViewer.cc
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4OpenInventorViewer.cc,v 1.6 0 2009/02/16 15:31:05 lgarnierExp $27 // GEANT4 tag $Name: geant4-09-04-beta-01$26 // $Id: G4OpenInventorViewer.cc,v 1.61 2010/10/06 10:09:57 allison Exp $ 27 // GEANT4 tag $Name: $ 28 28 29 29 #ifdef G4VIS_BUILD_OI_DRIVER … … 177 177 (vp.GetNoOfSides () != fVP.GetNoOfSides ()) || 178 178 (vp.IsMarkerNotHidden () != fVP.IsMarkerNotHidden ()) || 179 (vp.GetDefaultVisAttributes()->GetColour() != 180 fVP.GetDefaultVisAttributes()->GetColour()) || 181 (vp.GetDefaultTextVisAttributes()->GetColour() != 182 fVP.GetDefaultTextVisAttributes()->GetColour()) || 179 183 (vp.GetBackgroundColour ()!= fVP.GetBackgroundColour ())|| 180 184 (vp.IsPicking () != fVP.IsPicking ()) || -
trunk/source/visualization/XXX/CVS/Entries
r1337 r1340 3 3 /CMakeLists.txt/1.1/Wed Sep 29 19:13:27 2010// 4 4 /GNUmakefile/1.8/Thu Sep 30 06:17:20 2010// 5 /History/1.28/Thu Sep 30 06:17:20 2010//6 5 /sources.cmake/1.1/Wed Sep 29 19:13:35 2010// 6 /History/1.30/Wed Oct 6 15:58:25 2010// -
trunk/source/visualization/XXX/History
r1140 r1340 1 $Id: History,v 1. 28 2009/10/21 15:28:53allison Exp $1 $Id: History,v 1.30 2010/10/06 15:49:24 allison Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 20 20 History file for visualization/XXX sub-category (a template graphics system) 21 21 --------------------------------------------------------------------------- 22 23 6th October 2010 John Allison (visXXX-V08-03-00) 24 - G4XXXSGViewer.cc, G4XXXStoredViewer.cc: 25 o Added default colour and default text colour to list of parameters 26 that trigger a kernel visit. 22 27 23 28 21st October 2009 John Allison (visXXX-V09-02-00 coworks greps-V09-02-02) -
trunk/source/visualization/XXX/src/CVS/Entries
r1337 r1340 5 5 /G4XXXSG.cc/1.2/Thu Sep 30 06:17:21 2010// 6 6 /G4XXXSGSceneHandler.cc/1.6/Thu Sep 30 06:17:21 2010// 7 /G4XXXSGViewer.cc/1.4/Thu Sep 30 06:17:21 2010//8 7 /G4XXXSceneHandler.cc/1.32/Thu Sep 30 06:17:21 2010// 9 8 /G4XXXStored.cc/1.2/Thu Sep 30 06:17:21 2010// 10 9 /G4XXXStoredSceneHandler.cc/1.9/Thu Sep 30 06:17:21 2010// 11 /G4XXXStoredViewer.cc/1.5/Thu Sep 30 06:17:28 2010//12 10 /G4XXXViewer.cc/1.9/Thu Sep 30 06:17:28 2010// 11 /G4XXXSGViewer.cc/1.5/Wed Oct 6 10:14:06 2010// 12 /G4XXXStoredViewer.cc/1.6/Wed Oct 6 10:14:07 2010// 13 13 D -
trunk/source/visualization/XXX/src/G4XXXSGViewer.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4XXXSGViewer.cc,v 1. 4 2006/08/29 16:11:25allison Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4XXXSGViewer.cc,v 1.5 2010/10/06 10:12:03 allison Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 // … … 133 133 (lastVP.GetNoOfSides () != fVP.GetNoOfSides ()) || 134 134 (lastVP.IsMarkerNotHidden () != fVP.IsMarkerNotHidden ()) || 135 (lastVP.GetDefaultVisAttributes()->GetColour() != 136 fVP.GetDefaultVisAttributes()->GetColour()) || 137 (lastVP.GetDefaultTextVisAttributes()->GetColour() != 138 fVP.GetDefaultTextVisAttributes()->GetColour()) || 135 139 (lastVP.GetBackgroundColour ()!= fVP.GetBackgroundColour ()) 136 140 ) { -
trunk/source/visualization/XXX/src/G4XXXStoredViewer.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4XXXStoredViewer.cc,v 1. 5 2006/08/29 16:11:25allison Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4XXXStoredViewer.cc,v 1.6 2010/10/06 10:12:03 allison Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 // … … 129 129 (lastVP.GetNoOfSides () != fVP.GetNoOfSides ()) || 130 130 (lastVP.IsMarkerNotHidden () != fVP.IsMarkerNotHidden ()) || 131 (lastVP.GetDefaultVisAttributes()->GetColour() != 132 fVP.GetDefaultVisAttributes()->GetColour()) || 133 (lastVP.GetDefaultTextVisAttributes()->GetColour() != 134 fVP.GetDefaultTextVisAttributes()->GetColour()) || 131 135 (lastVP.GetBackgroundColour ()!= fVP.GetBackgroundColour ()) 132 136 ) { -
trunk/source/visualization/externals/gl2ps/CVS/Entries
r1337 r1340 3 3 /CMakeLists.txt/1.1/Wed Sep 29 19:14:00 2010// 4 4 /GNUmakefile/1.5/Thu Sep 30 06:17:28 2010// 5 /History/1.16/Thu Sep 30 06:17:28 2010//6 5 /sources.cmake/1.1/Wed Sep 29 19:14:08 2010// 6 /History/1.18/Wed Nov 3 16:40:34 2010// -
trunk/source/visualization/externals/gl2ps/History
r1246 r1340 1 $Id: History,v 1.1 6 2010/04/26 16:28:18lgarnier Exp $1 $Id: History,v 1.18 2010/11/03 16:40:34 lgarnier Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 17 17 * Reverse chronological order (last date on top), please * 18 18 ---------------------------------------------------------- 19 20 21 3rd November 2010, Laurent Garnier 22 - Update gl2ps to 1.3.5 (before it was 1.3.3) 23 24 6th October 2010, John Allison (visexternal-V09-03-00) 25 - Tagged. 19 26 20 27 26th April 2010, Laurent Garnier -
trunk/source/visualization/externals/gl2ps/include/CVS/Entries
r1337 r1340 1 1 /G4OpenGL2PSAction.hh/1.4/Thu Sep 30 06:17:28 2010// 2 /Geant4_gl2ps.h/1. 2/Mon Jul 12 14:53:172010//3 /gl2ps.h/1. 2/Mon Jul 12 14:53:172010//2 /Geant4_gl2ps.h/1.3/Wed Nov 3 15:19:14 2010// 3 /gl2ps.h/1.3/Wed Nov 3 16:40:15 2010// 4 4 D -
trunk/source/visualization/externals/gl2ps/include/Geant4_gl2ps.h
r937 r1340 27 27 #define Geant4_gl2ps_h 28 28 29 // gl2ps-1.3. 329 // gl2ps-1.3.5 30 30 // The gl2ps code is prefixed by Geant4_ in order 31 31 // to avoid clashes with other gl2ps code that may come at link -
trunk/source/visualization/externals/gl2ps/include/gl2ps.h
r937 r1340 53 53 * to provide one. 54 54 * 55 * For the latest info about gl2ps, see http://www.geuz.org/gl2ps/. 55 * For the latest info about gl2ps and a full list of contributors, 56 * see http://www.geuz.org/gl2ps/. 57 * 56 58 * Please report all bugs and problems to <gl2ps@geuz.org>. 57 59 */ … … 68 70 # if defined(_MSC_VER) 69 71 # pragma warning(disable:4115) 72 # pragma warning(disable:4996) 70 73 # endif 71 74 # include <windows.h> … … 103 106 #define GL2PS_MAJOR_VERSION 1 104 107 #define GL2PS_MINOR_VERSION 3 105 #define GL2PS_PATCH_VERSION 3108 #define GL2PS_PATCH_VERSION 5 106 109 #define GL2PS_EXTRA_VERSION "" 107 110 -
trunk/source/visualization/externals/gl2ps/src/CVS/Entries
r1337 r1340 1 /G4OpenGL2PSAction.cc/1. 5/Thu Sep 30 06:17:282010//2 /gl2ps.cc/1. 8/Thu Sep 30 06:17:312010//1 /G4OpenGL2PSAction.cc/1.6/Wed Nov 3 16:40:34 2010// 2 /gl2ps.cc/1.9/Wed Nov 3 15:22:18 2010// 3 3 D -
trunk/source/visualization/externals/gl2ps/src/G4OpenGL2PSAction.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4OpenGL2PSAction.cc,v 1. 5 2010/04/26 16:28:18lgarnier Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4OpenGL2PSAction.cc,v 1.6 2010/11/03 16:40:34 lgarnier Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 // … … 139 139 if(!fFile) return; 140 140 int options = GL2PS_OCCLUSION_CULL | 141 GL2PS_BEST_ROOT | GL2PS_SILENT | GL2PS_DRAW_BACKGROUND; 141 GL2PS_BEST_ROOT | GL2PS_SILENT | GL2PS_DRAW_BACKGROUND | GL2PS_USE_CURRENT_VIEWPORT; 142 // int options = GL2PS_OCCLUSION_CULL | 143 // GL2PS_BEST_ROOT | GL2PS_SILENT | GL2PS_DRAW_BACKGROUND; 142 144 int sort = GL2PS_BSP_SORT; 143 145 //int sort = GL2PS_SIMPLE_SORT; -
trunk/source/visualization/externals/gl2ps/src/gl2ps.cc
r1228 r1340 62 62 * to provide one. 63 63 * 64 * Contributors: 65 * Michael Sweet <mike@easysw.com> 66 * Marc Ume <marc.ume@digitalgraphics.be> 67 * Jean-Francois Remacle <remacle@gce.ucl.ac.be> 68 * Bart Kaptein <B.L.Kaptein@lumc.nl> 69 * Quy Nguyen-Dai <quy@nguyendai.org> 70 * Sam Buss <sbuss@ucsd.edu> 71 * Shane Hill <Shane.Hill@dsto.defence.gov.au> 72 * Romain Boman <r_boman@yahoo.fr> 73 * Rouben Rostamian <rostamian@umbc.edu> 74 * Diego Santa Cruz <Diego.SantaCruz@epfl.ch> 75 * Shahzad Muzaffar <Shahzad.Muzaffar@cern.ch> 76 * Lassi Tuura <lassi.tuura@cern.ch> 77 * Guy Barrand <barrand@lal.in2p3.fr> 78 * Prabhu Ramachandran <prabhu@aero.iitm.ernet.in> 79 * Micha Bieber <bieber@traits.de> 80 * Olivier Couet <couet@mail.cern.ch> 81 * Shai Ayal <shaiay@gmail.com> 82 * Fabian Wenzel <wenzel@tu-harburg.de> 83 * Ian D. Gay <gay@sfu.ca> 84 * Cosmin Truta <cosmin@cs.toronto.edu> 85 * Baiju Devani <b.devani@gmail.com> 86 * Alexander Danilov <danilov@lanl.gov> 64 * For the latest info about gl2ps and a full list of contributors, 65 * see http://www.geuz.org/gl2ps/. 87 66 * 88 * For the latest info about gl2ps, see http://www.geuz.org/gl2ps/.89 67 * Please report all bugs and problems to <gl2ps@geuz.org>. 90 68 */ … … 92 70 #include "Geant4_gl2ps.h" 93 71 94 #include < cmath>72 #include <math.h> 95 73 #include <string.h> 96 74 #include <sys/types.h> … … 119 97 #define GL2PS_ZOFFSET 5.0e-2F 120 98 #define GL2PS_ZOFFSET_LARGE 20.0F 121 #define GL2PS_ZERO(arg) ( std::fabs(arg) < 1.e-20)99 #define GL2PS_ZERO(arg) (fabs(arg) < 1.e-20) 122 100 123 101 /* Primitive types */ … … 349 327 void *ptr; 350 328 351 if(!size) return (NULL);329 if(!size) return NULL; 352 330 ptr = malloc(size); 353 331 if(!ptr){ 354 332 gl2psMsg(GL2PS_ERROR, "Couldn't allocate requested memory"); 355 exit(1);356 } 357 return (ptr);333 return NULL; 334 } 335 return ptr; 358 336 } 359 337 360 338 static void *gl2psRealloc(void *ptr, size_t size) 361 339 { 362 if(!size) return (NULL);340 if(!size) return NULL; 363 341 ptr = realloc(ptr, size); 364 342 if(!ptr){ 365 343 gl2psMsg(GL2PS_ERROR, "Couldn't reallocate requested memory"); 366 exit(1);367 } 368 return (ptr);344 return NULL; 345 } 346 return ptr; 369 347 } 370 348 … … 589 567 list->array = NULL; 590 568 gl2psListRealloc(list, n); 591 return (list);569 return list; 592 570 } 593 571 … … 620 598 if(!list) 621 599 return 0; 622 return (list->n);600 return list->n; 623 601 } 624 602 … … 633 611 return NULL; 634 612 } 635 return (&list->array[index * list->size]);613 return &list->array[index * list->size]; 636 614 } 637 615 … … 747 725 748 726 for(i = 1; i < n; i++){ 749 if( std::fabs(rgba[0][0] - rgba[i][0]) > threshold[0] ||750 std::fabs(rgba[0][1] - rgba[i][1]) > threshold[1] ||751 std::fabs(rgba[0][2] - rgba[i][2]) > threshold[2])727 if(fabs(rgba[0][0] - rgba[i][0]) > threshold[0] || 728 fabs(rgba[0][1] - rgba[i][1]) > threshold[1] || 729 fabs(rgba[0][2] - rgba[i][2]) > threshold[2]) 752 730 return GL_FALSE; 753 731 } … … 1105 1083 static GLfloat gl2psComparePointPlane(GL2PSxyz point, GL2PSplane plane) 1106 1084 { 1107 return (plane[0] * point[0] +1108 plane[1] * point[1] +1109 plane[2] * point[2] +1110 plane[3]);1085 return (plane[0] * point[0] + 1086 plane[1] * point[1] + 1087 plane[2] * point[2] + 1088 plane[3]); 1111 1089 } 1112 1090 1113 1091 static GLfloat gl2psPsca(GLfloat *a, GLfloat *b) 1114 1092 { 1115 return (a[0]*b[0] + a[1]*b[1] + a[2]*b[2]);1093 return (a[0]*b[0] + a[1]*b[1] + a[2]*b[2]); 1116 1094 } 1117 1095 … … 1451 1429 q = *(GL2PSprimitive**)a; 1452 1430 w = *(GL2PSprimitive**)b; 1453 return (q->type < w->type ? 1 : -1);1431 return (q->type < w->type ? 1 : -1); 1454 1432 } 1455 1433 … … 1499 1477 } 1500 1478 1501 static void gl2psFreeImagemap(GL2PSimagemap *list){ 1479 static void gl2psFreeImagemap(GL2PSimagemap *list) 1480 { 1502 1481 GL2PSimagemap *next; 1503 1482 while(list != NULL){ … … 2393 2372 current += 2; used -= 2; 2394 2373 node->image->height = (GLint)current[2]; 2395 prim->verts[0].xyz[0] = prim->verts[0].xyz[0] - (int)(node->image->width / 2) + 0.5 ;2396 prim->verts[0].xyz[1] = prim->verts[0].xyz[1] - (int)(node->image->height / 2) + 0.5 ;2374 prim->verts[0].xyz[0] = prim->verts[0].xyz[0] - (int)(node->image->width / 2) + 0.5F; 2375 prim->verts[0].xyz[1] = prim->verts[0].xyz[1] - (int)(node->image->height / 2) + 0.5F; 2397 2376 for(i = 1; i < 4; i++){ 2398 2377 for(v = 0; v < 3; v++){ … … 2490 2469 for(col = 0; col < width; col++){ 2491 2470 gl2psGetRGB(im, col, row, &dr, &dg, &db); 2492 fgrey = (0.30 * dr + 0.59 * dg + 0.11* db);2471 fgrey = (0.30F * dr + 0.59F * dg + 0.11F * db); 2493 2472 grey = (unsigned char)(255. * fgrey); 2494 2473 gl2psWriteByte(grey); … … 3353 3332 } 3354 3333 3355 static void gl2psPrintTeXBeginViewport(GLint [4])3334 static void gl2psPrintTeXBeginViewport(GLint viewport[4]) 3356 3335 { 3357 3336 glRenderMode(GL_FEEDBACK); … … 3446 3425 static void gl2psPutPDFText(GL2PSstring *text, int cnt, GLfloat x, GLfloat y) 3447 3426 { 3448 gl2ps->streamlength += 3449 gl2psPrintf("BT\n" 3450 "/F%d %d Tf\n" 3451 "%f %f Td\n" 3452 "(%s) Tj\n" 3453 "ET\n", 3454 cnt, text->fontsize, x, y, text->str); 3427 GLfloat rad, crad, srad; 3428 3429 if(text->angle == 0.0F){ 3430 gl2ps->streamlength += gl2psPrintf 3431 ("BT\n" 3432 "/F%d %d Tf\n" 3433 "%f %f Td\n" 3434 "(%s) Tj\n" 3435 "ET\n", 3436 cnt, text->fontsize, x, y, text->str); 3437 } 3438 else{ 3439 rad = M_PI * text->angle / 180.0F; 3440 srad = (GLfloat)sin(rad); 3441 crad = (GLfloat)cos(rad); 3442 gl2ps->streamlength += gl2psPrintf 3443 ("BT\n" 3444 "/F%d %d Tf\n" 3445 "%f %f %f %f %f %f Tm\n" 3446 "(%s) Tj\n" 3447 "ET\n", 3448 cnt, text->fontsize, crad, srad, -srad, crad, x, y, text->str); 3449 } 3455 3450 } 3456 3451 3457 3452 static void gl2psPutPDFImage(GL2PSimage *image, int cnt, GLfloat x, GLfloat y) 3458 3453 { 3459 gl2ps->streamlength += 3460 gl2psPrintf("q\n"3461 "%d 0 0 %d %f %f cm\n"3462 "/Im%d Do\n"3463 "Q\n",3464 (int)image->width, (int)image->height, x, y, cnt);3454 gl2ps->streamlength += gl2psPrintf 3455 ("q\n" 3456 "%d 0 0 %d %f %f cm\n" 3457 "/Im%d Do\n" 3458 "Q\n", 3459 (int)image->width, (int)image->height, x, y, cnt); 3465 3460 } 3466 3461 … … 4526 4521 int gray) 4527 4522 { 4528 int x, y ;4523 int x, y, shift; 4529 4524 GLfloat r, g, b, a; 4530 4525 … … 4532 4527 return 0; 4533 4528 4534 if(gray && gray != 8 && gray != 16)4529 if(gray && gray != 8 && gray != 16) 4535 4530 gray = 8; 4536 4531 4537 4532 gray /= 8; 4538 4533 4534 shift = (sizeof(unsigned long) - 1) * 8; 4535 4539 4536 for(y = 0; y < im->height; ++y){ 4540 4537 for(x = 0; x < im->width; ++x){ 4541 4538 a = gl2psGetRGB(im, x, y, &r, &g, &b); 4542 4539 if(im->format == GL_RGBA && gray){ 4543 (*action)((unsigned long)(a *255) << 24, gray);4540 (*action)((unsigned long)(a * 255) << shift, gray); 4544 4541 } 4545 4542 else{ 4546 (*action)((unsigned long)(r *255) << 24, 1);4547 (*action)((unsigned long)(g *255) << 24, 1);4548 (*action)((unsigned long)(b *255) << 24, 1);4543 (*action)((unsigned long)(r * 255) << shift, 1); 4544 (*action)((unsigned long)(g * 255) << shift, 1); 4545 (*action)((unsigned long)(b * 255) << shift, 1); 4549 4546 } 4550 4547 } … … 4962 4959 for(i = 0; i < 3; i++){ 4963 4960 xyz2[0][i] = xyz[0][i]; 4964 xyz2[1][i] = 0.5 * (xyz[0][i] + xyz[1][i]);4965 xyz2[2][i] = 0.5 * (xyz[0][i] + xyz[2][i]);4961 xyz2[1][i] = 0.5F * (xyz[0][i] + xyz[1][i]); 4962 xyz2[2][i] = 0.5F * (xyz[0][i] + xyz[2][i]); 4966 4963 } 4967 4964 for(i = 0; i < 4; i++){ 4968 4965 rgba2[0][i] = rgba[0][i]; 4969 rgba2[1][i] = 0.5 * (rgba[0][i] + rgba[1][i]);4970 rgba2[2][i] = 0.5 * (rgba[0][i] + rgba[2][i]);4966 rgba2[1][i] = 0.5F * (rgba[0][i] + rgba[1][i]); 4967 rgba2[2][i] = 0.5F * (rgba[0][i] + rgba[2][i]); 4971 4968 } 4972 4969 gl2psPrintSVGSmoothTriangle(xyz2, rgba2); 4973 4970 for(i = 0; i < 3; i++){ 4974 xyz2[0][i] = 0.5 * (xyz[0][i] + xyz[1][i]);4971 xyz2[0][i] = 0.5F * (xyz[0][i] + xyz[1][i]); 4975 4972 xyz2[1][i] = xyz[1][i]; 4976 xyz2[2][i] = 0.5 * (xyz[1][i] + xyz[2][i]);4973 xyz2[2][i] = 0.5F * (xyz[1][i] + xyz[2][i]); 4977 4974 } 4978 4975 for(i = 0; i < 4; i++){ 4979 rgba2[0][i] = 0.5 * (rgba[0][i] + rgba[1][i]);4976 rgba2[0][i] = 0.5F * (rgba[0][i] + rgba[1][i]); 4980 4977 rgba2[1][i] = rgba[1][i]; 4981 rgba2[2][i] = 0.5 * (rgba[1][i] + rgba[2][i]);4978 rgba2[2][i] = 0.5F * (rgba[1][i] + rgba[2][i]); 4982 4979 } 4983 4980 gl2psPrintSVGSmoothTriangle(xyz2, rgba2); 4984 4981 for(i = 0; i < 3; i++){ 4985 xyz2[0][i] = 0.5 * (xyz[0][i] + xyz[2][i]);4982 xyz2[0][i] = 0.5F * (xyz[0][i] + xyz[2][i]); 4986 4983 xyz2[1][i] = xyz[2][i]; 4987 xyz2[2][i] = 0.5 * (xyz[1][i] + xyz[2][i]);4984 xyz2[2][i] = 0.5F * (xyz[1][i] + xyz[2][i]); 4988 4985 } 4989 4986 for(i = 0; i < 4; i++){ 4990 rgba2[0][i] = 0.5 * (rgba[0][i] + rgba[2][i]);4987 rgba2[0][i] = 0.5F * (rgba[0][i] + rgba[2][i]); 4991 4988 rgba2[1][i] = rgba[2][i]; 4992 rgba2[2][i] = 0.5 * (rgba[1][i] + rgba[2][i]);4989 rgba2[2][i] = 0.5F * (rgba[1][i] + rgba[2][i]); 4993 4990 } 4994 4991 gl2psPrintSVGSmoothTriangle(xyz2, rgba2); 4995 4992 for(i = 0; i < 3; i++){ 4996 xyz2[0][i] = 0.5 * (xyz[0][i] + xyz[1][i]);4997 xyz2[1][i] = 0.5 * (xyz[1][i] + xyz[2][i]);4998 xyz2[2][i] = 0.5 * (xyz[0][i] + xyz[2][i]);4993 xyz2[0][i] = 0.5F * (xyz[0][i] + xyz[1][i]); 4994 xyz2[1][i] = 0.5F * (xyz[1][i] + xyz[2][i]); 4995 xyz2[2][i] = 0.5F * (xyz[0][i] + xyz[2][i]); 4999 4996 } 5000 4997 for(i = 0; i < 4; i++){ 5001 rgba2[0][i] = 0.5 * (rgba[0][i] + rgba[1][i]);5002 rgba2[1][i] = 0.5 * (rgba[1][i] + rgba[2][i]);5003 rgba2[2][i] = 0.5 * (rgba[0][i] + rgba[2][i]);4998 rgba2[0][i] = 0.5F * (rgba[0][i] + rgba[1][i]); 4999 rgba2[1][i] = 0.5F * (rgba[1][i] + rgba[2][i]); 5000 rgba2[2][i] = 0.5F * (rgba[0][i] + rgba[2][i]); 5004 5001 } 5005 5002 gl2psPrintSVGSmoothTriangle(xyz2, rgba2); … … 5035 5032 } 5036 5033 5037 #if defined(GL2PS_HAVE_LIBPNG)5038 5034 static void gl2psPrintSVGPixmap(GLfloat x, GLfloat y, GL2PSimage *pixmap) 5039 #else5040 static void gl2psPrintSVGPixmap(GLfloat, GLfloat, GL2PSimage *)5041 #endif5042 5035 { 5043 5036 #if defined(GL2PS_HAVE_LIBPNG) … … 5066 5059 gl2psListDelete(png); 5067 5060 #else 5068 gl2psMsg(GL2PS_WARNING, "GL2PS has tobe compiled with PNG support in "5061 gl2psMsg(GL2PS_WARNING, "GL2PS must be compiled with PNG support in " 5069 5062 "order to embed images in SVG streams"); 5070 5063 #endif … … 5144 5137 gl2psPrintf("<text fill=\"%s\" x=\"%g\" y=\"%g\" font-size=\"%d\" ", 5145 5138 col, xyz[0][0], xyz[0][1], prim->data.text->fontsize); 5139 if(prim->data.text->angle) 5140 gl2psPrintf("transform=\"rotate(%g, %g, %g)\" ", 5141 -prim->data.text->angle, xyz[0][0], xyz[0][1]); 5146 5142 if(!strcmp(prim->data.text->fontname, "Times-Roman")) 5147 5143 gl2psPrintf("font-family=\"Times\">"); -
trunk/source/visualization/externals/zlib/CVS/Entries
r1337 r1340 1 1 D/include//// 2 2 D/src//// 3 /CMakeLists.txt/1.1/Wed Sep 29 19:14:16 2010//4 3 /GNUmakefile/1.1/Thu Sep 30 06:17:31 2010// 5 4 /History/1.1/Thu Sep 30 06:17:31 2010// 6 5 /README/1.1/Mon Jul 12 14:53:17 2010// 7 6 /sources.cmake/1.1/Wed Sep 29 19:14:24 2010// 7 /CMakeLists.txt/1.2/Fri Oct 8 10:03:41 2010// -
trunk/source/visualization/management/CVS/Entries
r1337 r1340 4 4 /Doxyfile/1.2/Mon Jul 12 14:53:19 2010// 5 5 /GNUmakefile/1.17/Thu Sep 30 06:17:35 2010// 6 /History/1.153/Thu Sep 30 11:54:27 2010//7 6 /sources.cmake/1.1/Wed Sep 29 19:15:02 2010// 7 /History/1.155/Fri Oct 8 10:03:41 2010// -
trunk/source/visualization/management/History
r1337 r1340 1 $Id: History,v 1.15 3 2010/09/03 15:57:22 gcosmoExp $1 $Id: History,v 1.155 2010/10/07 07:31:43 allison Exp $ 2 2 3 3 ------------------------------------------------------------------- … … 26 26 History file for visualization management sub-category 27 27 ------------------------------------------------------ 28 29 4th November 2010 Laurent Garnier Allison 30 - Added initialization of fGeometryMask (according to coverity.cern.ch) 31 32 6th October 2010 John Allison (visman-V09-03-12) 33 - Added /vis/viewer/set/defaultColour and /vis/viewer/set/defaultTextColour. 28 34 29 35 3rd September 2010 Gabriele Cosmo (visman-V09-03-11) -
trunk/source/visualization/management/include/CVS/Entries
r1337 r1340 26 26 /G4VisCommandsSceneHandler.hh/1.8/Thu Sep 30 06:17:37 2010// 27 27 /G4VisCommandsViewer.hh/1.23/Thu Sep 30 06:17:37 2010// 28 /G4VisCommandsViewerSet.hh/1.23/Thu Sep 30 06:17:37 2010//29 28 /G4VisExecutive.hh/1.10/Thu Sep 30 06:17:38 2010// 30 29 /G4VisExecutive.icc/1.26/Thu Sep 30 06:17:38 2010// … … 39 38 /G4VisModelManager.hh/1.4/Thu Sep 30 06:17:38 2010// 40 39 /G4VisStateDependent.hh/1.5/Thu Sep 30 06:17:38 2010// 40 /G4VisCommandsViewerSet.hh/1.24/Wed Oct 6 15:52:57 2010// 41 41 D -
trunk/source/visualization/management/include/G4VisCommandsViewerSet.hh
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4VisCommandsViewerSet.hh,v 1.2 3 2009/05/13 18:17:25allison Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4VisCommandsViewerSet.hh,v 1.24 2010/10/06 10:15:38 allison Exp $ 28 // GEANT4 tag $Name: $ 29 29 30 30 // /vis/viewer/set commands - John Allison 16th May 2000 … … 59 59 G4UIcommand* fpCommandCulling; 60 60 G4UIcmdWithAString* fpCommandCutawayMode; 61 G4UIcommand* fpCommandDefaultColour; 62 G4UIcommand* fpCommandDefaultTextColour; 61 63 G4UIcmdWithABool* fpCommandEdge; 62 64 G4UIcommand* fpCommandExplodeFactor; -
trunk/source/visualization/management/src/CVS/Entries
r1337 r1340 16 16 /G4VisCommandsSceneHandler.cc/1.32/Thu Sep 30 06:17:41 2010// 17 17 /G4VisCommandsViewer.cc/1.76/Thu Sep 30 06:17:42 2010// 18 /G4VisCommandsViewerSet.cc/1.50/Thu Sep 30 06:17:42 2010//19 18 /G4VisFeaturesOfDAWNFILE.cc/1.6/Thu Sep 30 06:17:42 2010// 20 19 /G4VisFeaturesOfFukuiRenderer.cc/1.5/Thu Sep 30 06:17:42 2010// … … 24 23 /G4VisStateDependent.cc/1.6/Thu Sep 30 06:17:43 2010// 25 24 /G4ViewParameters.cc/1.37/Thu Sep 30 11:54:33 2010// 25 /G4VisCommandsViewerSet.cc/1.52/Mon Oct 11 09:00:12 2010// 26 26 D -
trunk/source/visualization/management/src/G4ViewParameters.cc
r1337 r1340 49 49 fXNegative(0x0010), 50 50 fYNegative(0x0020), 51 fGeometryMask(0), 51 52 fDrawingStyle (wireframe), 52 53 fAuxEdgeVisible (false), -
trunk/source/visualization/management/src/G4VisCommandsViewerSet.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4VisCommandsViewerSet.cc,v 1.5 0 2009/05/13 18:17:25allison Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4VisCommandsViewerSet.cc,v 1.52 2010/10/08 12:41:52 allison Exp $ 28 // GEANT4 tag $Name: $ 29 29 30 30 // /vis/viewer/set commands - John Allison 16th May 2000 … … 143 143 fpCommandCutawayMode->SetDefaultValue("union"); 144 144 145 fpCommandDefaultColour = new G4UIcommand 146 ("/vis/viewer/set/defaultColour",this); 147 fpCommandDefaultColour->SetGuidance 148 ("Set defaultColour colour and transparency (default white and opaque)."); 149 fpCommandDefaultColour->SetGuidance 150 ("Accepts (a) RGB triplet. e.g., \".3 .4 .5\", or" 151 "\n(b) string such as \"white\", \"black\", \"grey\", \"red\"..." 152 "\n(c) an additional number for opacity, e.g., \".3 .4 .5 .6\"" 153 "\n or \"grey ! ! .6\" (note \"!\"'s for unused green and blue parameters)," 154 "\n e.g. \"! ! ! 0.\" for a transparent colour."); 155 parameter = new G4UIparameter("red_or_string", 's', omitable = true); 156 parameter -> SetDefaultValue ("1."); 157 fpCommandDefaultColour -> SetParameter (parameter); 158 parameter = new G4UIparameter("green", 'd', omitable = true); 159 parameter -> SetDefaultValue (1.); 160 fpCommandDefaultColour -> SetParameter (parameter); 161 parameter = new G4UIparameter ("blue", 'd', omitable = true); 162 parameter -> SetDefaultValue (1.); 163 fpCommandDefaultColour -> SetParameter (parameter); 164 parameter = new G4UIparameter ("opacity", 'd', omitable = true); 165 parameter -> SetDefaultValue (1.); 166 fpCommandDefaultColour -> SetParameter (parameter); 167 168 fpCommandDefaultTextColour = new G4UIcommand 169 ("/vis/viewer/set/defaultTextColour",this); 170 fpCommandDefaultTextColour->SetGuidance 171 ("Set defaultTextColour colour and transparency (default white and opaque)."); 172 fpCommandDefaultTextColour->SetGuidance 173 ("Accepts (a) RGB triplet. e.g., \".3 .4 .5\", or" 174 "\n(b) string such as \"white\", \"black\", \"grey\", \"red\"..." 175 "\n(c) an additional number for opacity, e.g., \".3 .4 .5 .6\"" 176 "\n or \"grey ! ! .6\" (note \"!\"'s for unused green and blue parameters)," 177 "\n e.g. \"! ! ! 0.\" for a transparent colour."); 178 parameter = new G4UIparameter("red_or_string", 's', omitable = true); 179 parameter -> SetDefaultValue ("1."); 180 fpCommandDefaultTextColour -> SetParameter (parameter); 181 parameter = new G4UIparameter("green", 'd', omitable = true); 182 parameter -> SetDefaultValue (1.); 183 fpCommandDefaultTextColour -> SetParameter (parameter); 184 parameter = new G4UIparameter ("blue", 'd', omitable = true); 185 parameter -> SetDefaultValue (1.); 186 fpCommandDefaultTextColour -> SetParameter (parameter); 187 parameter = new G4UIparameter ("opacity", 'd', omitable = true); 188 parameter -> SetDefaultValue (1.); 189 fpCommandDefaultTextColour -> SetParameter (parameter); 190 145 191 fpCommandEdge = new G4UIcmdWithABool("/vis/viewer/set/edge",this); 146 192 fpCommandEdge->SetGuidance … … 267 313 parameter = new G4UIparameter("field-half-angle",'d',omitable = true); 268 314 parameter->SetDefaultValue(30.); 315 parameter->SetCurrentAsDefault(true); 269 316 fpCommandProjection->SetParameter(parameter); 270 317 parameter = new G4UIparameter("unit",'s',omitable = true); 271 318 parameter->SetDefaultValue("deg"); 319 parameter->SetCurrentAsDefault(true); 272 320 fpCommandProjection->SetParameter(parameter); 273 321 … … 401 449 delete fpCommandCulling; 402 450 delete fpCommandCutawayMode; 451 delete fpCommandDefaultColour; 452 delete fpCommandDefaultTextColour; 403 453 delete fpCommandEdge; 404 454 delete fpCommandExplodeFactor; … … 611 661 } 612 662 663 else if (command == fpCommandDefaultColour) { 664 G4String redOrString; 665 G4double green, blue, opacity; 666 std::istringstream iss(newValue); 667 iss >> redOrString >> green >> blue >> opacity; 668 G4Colour colour(1.,1.,1.); // Default white and opaque. 669 const size_t iPos0 = 0; 670 if (std::isalpha(redOrString[iPos0])) { 671 G4Colour::GetColour(redOrString, colour); // Remains default (white) if 672 // not found. 673 } else { 674 colour = G4Colour(G4UIcommand::ConvertTo3Vector(newValue)); 675 } 676 colour = G4Colour(colour.GetRed(), colour.GetGreen(), colour.GetBlue(), opacity); 677 G4VisAttributes va = vp.GetDefaultVisAttributes(); 678 va.SetColour(colour); 679 vp.SetDefaultVisAttributes(va); 680 if (verbosity >= G4VisManager::confirmations) { 681 G4cout << "Default colour " 682 << vp.GetDefaultVisAttributes()->GetColour() 683 << " requested." 684 << G4endl; 685 } 686 } 687 688 else if (command == fpCommandDefaultTextColour) { 689 G4String redOrString; 690 G4double green, blue, opacity; 691 std::istringstream iss(newValue); 692 iss >> redOrString >> green >> blue >> opacity; 693 G4Colour colour(1.,1.,1.); // Default white and opaque. 694 const size_t iPos0 = 0; 695 if (std::isalpha(redOrString[iPos0])) { 696 G4Colour::GetColour(redOrString, colour); // Remains default (white) if 697 // not found. 698 } else { 699 colour = G4Colour(G4UIcommand::ConvertTo3Vector(newValue)); 700 } 701 colour = G4Colour(colour.GetRed(), colour.GetGreen(), colour.GetBlue(), opacity); 702 G4VisAttributes va = vp.GetDefaultTextVisAttributes(); 703 va.SetColour(colour); 704 vp.SetDefaultTextVisAttributes(va); 705 if (verbosity >= G4VisManager::confirmations) { 706 G4cout << "Default colour " 707 << vp.GetDefaultTextVisAttributes()->GetColour() 708 << " requested." 709 << G4endl; 710 } 711 } 712 613 713 else if (command == fpCommandEdge) { 614 714 G4ViewParameters::DrawingStyle existingStyle = vp.GetDrawingStyle(); -
trunk/source/visualization/test/G4History.macro
r1197 r1340 6 6 /vis/scene/create 7 7 /vis/scene/add/volume 8 /vis/sceneHandler/create OGL SXm8 /vis/sceneHandler/create OGLIQt 9 9 /vis/sceneHandler/attach 10 10 /vis/scene/add/volume … … 25 25 /vis/viewer/refresh viewer-0 26 26 /vis/viewer/update viewer-0 27 /vis/ogl/set/printMode vectored 28 /vis/ogl/set/printFilename output-OGLIQt/output-test19-1 29 /vis/ogl/printEPS 27 30 /vis/viewer/create 28 31 /vis/viewer/refresh … … 32 35 /vis/viewer/refresh 33 36 /vis/viewer/set/projection perspective 30 34 /vis/viewer/refresh35 37 /vis/viewer/flush 36 38 /vis/viewer/refresh viewer-1 37 39 /vis/viewer/update viewer-1 40 /vis/ogl/set/printMode vectored 41 /vis/ogl/set/printFilename output-OGLIQt/output-test19-2 42 /vis/ogl/printEPS 38 43 /vis/viewer/create 39 44 /vis/viewer/refresh … … 45 50 /vis/viewer/refresh 46 51 /vis/viewer/set/projection perspective 30 47 /vis/viewer/refresh48 52 /vis/viewer/flush 49 53 /vis/viewer/refresh viewer-2 50 54 /vis/viewer/update viewer-2 55 /vis/ogl/set/printMode vectored 56 /vis/ogl/set/printFilename output-OGLIQt/output-test19-3 57 /vis/ogl/printEPS 51 58 /vis/viewer/create 52 59 /vis/viewer/refresh … … 58 65 /vis/viewer/refresh 59 66 /vis/viewer/set/projection perspective 30 60 /vis/viewer/refresh61 67 /vis/viewer/flush 62 68 /vis/viewer/refresh viewer-3 63 69 /vis/viewer/update viewer-3 70 /vis/ogl/set/printMode vectored 71 /vis/ogl/set/printFilename output-OGLIQt/output-test19-4 72 /vis/ogl/printEPS 64 73 /run/beamOn 65 74 /vis/scene/create 66 75 /vis/scene/add/logicalVolume expHall_L 67 76 /vis/scene/notifyHandlers 68 /vis/sceneHandler/create OGLIQt69 /vis/sceneHandler/attach70 77 /vis/viewer/create 71 78 /vis/viewer/refresh … … 76 83 /vis/viewer/refresh viewer-4 77 84 /vis/viewer/update viewer-4 85 /vis/ogl/set/printMode vectored 86 /vis/ogl/set/printFilename output-OGLIQt/output-test19-5 87 /vis/ogl/printEPS 78 88 /vis/scene/create 79 89 /vis/scene/add/logicalVolume intersection_L 80 90 /vis/scene/notifyHandlers 81 /vis/sceneHandler/create OGLIQt82 /vis/sceneHandler/attach83 91 /vis/viewer/create 84 92 /vis/viewer/refresh … … 91 99 /vis/viewer/refresh viewer-5 92 100 /vis/viewer/update viewer-5 101 /vis/ogl/set/printMode vectored 102 /vis/ogl/set/printFilename /output-OGLIQtoutput-test19-6 103 /vis/ogl/printEPS 93 104 /vis/scene/create 94 105 /vis/scene/add/logicalVolume subtraction_L … … 102 113 /vis/viewer/refresh viewer-5 103 114 /vis/viewer/update viewer-5 115 /vis/ogl/set/printMode vectored 116 /vis/ogl/set/printFilename output-OGLIQt/output-test19-7 117 /vis/ogl/printEPS 104 118 /vis/scene/create 105 119 /vis/scene/add/logicalVolume union_L … … 113 127 /vis/viewer/refresh viewer-5 114 128 /vis/viewer/update viewer-5 129 /vis/ogl/set/printMode vectored 130 /vis/ogl/set/printFilename /output-OGLIQtoutput-test19-8 131 /vis/ogl/printEPS 115 132 /vis/scene/create 116 133 /vis/scene/endOfEventAction accumulate … … 121 138 /tracking/storeTrajectory 1 122 139 /vis/scene/notifyHandlers 123 /vis/sceneHandler/create OGLIQt124 /vis/sceneHandler/attach125 140 /vis/viewer/create 126 141 /vis/viewer/refresh … … 136 151 /vis/viewer/refresh viewer-6 137 152 /vis/viewer/update viewer-6 153 /vis/ogl/set/printMode vectored 154 /vis/ogl/set/printFilename output-OGLIQt/output-test19-9 155 /vis/ogl/printEPS 138 156 /vis/viewer/reset 139 157 /vis/viewer/refresh … … 157 175 /vis/viewer/refresh viewer-6 158 176 /vis/viewer/update viewer-6 177 /vis/ogl/set/printMode vectored 178 /vis/ogl/set/printFilename output-OGLIQt/output-test19-10 179 /vis/ogl/printEPS 159 180 /vis/viewer/reset 160 181 /vis/viewer/refresh … … 202 223 /vis/viewer/refresh viewer-6 203 224 /vis/viewer/update viewer-6 225 /vis/ogl/set/printMode vectored 226 /vis/ogl/set/printFilename output-OGLIQt/output-test19-11 227 /vis/ogl/printEPS 204 228 /vis/viewer/reset 205 229 /vis/viewer/refresh … … 231 255 /vis/viewer/refresh viewer-6 232 256 /vis/viewer/update viewer-6 257 /vis/ogl/set/printMode vectored 258 /vis/ogl/set/printFilename output-OGLIQt/output-test19-12 259 /vis/ogl/printEPS 233 260 /vis/viewer/reset 234 261 /vis/viewer/refresh … … 244 271 /vis/viewer/refresh viewer-6 245 272 /vis/viewer/update viewer-6 273 /vis/ogl/set/printMode vectored 274 /vis/ogl/set/printFilename output-OGLIQt/output-test19-13 275 /vis/ogl/printEPS 246 276 /vis/viewer/reset 247 277 /vis/viewer/refresh … … 307 337 /vis/viewer/refresh viewer-6 308 338 /vis/viewer/update viewer-6 339 /vis/ogl/set/printMode vectored 340 /vis/ogl/set/printFilename output-OGLIQt/output-test19-14 341 /vis/ogl/printEPS 309 342 /vis/viewer/reset 310 343 /vis/viewer/refresh … … 345 378 /vis/viewer/refresh viewer-6 346 379 /vis/viewer/update viewer-6 380 /vis/ogl/set/printMode vectored 381 /vis/ogl/set/printFilename output-OGLIQt/output-test19-15 382 /vis/ogl/printEPS 347 383 /vis/viewer/set/viewpointThetaPhi 30 30 348 384 /vis/viewer/refresh 349 385 /vis/viewer/set/projection perspective 30 350 /vis/viewer/ refresh351 /vis/viewer/ flush352 /vis/viewer/ refreshviewer-6353 /vis/ viewer/update viewer-6354 /vis/ sceneHandler/create OGLIQt355 /vis/ sceneHandler/attach386 /vis/viewer/flush 387 /vis/viewer/refresh viewer-6 388 /vis/viewer/update viewer-6 389 /vis/ogl/set/printMode vectored 390 /vis/ogl/set/printFilename output-OGLIQt/output-test19-16 391 /vis/ogl/printEPS 356 392 /vis/viewer/create ! ! 200 357 393 /vis/viewer/refresh … … 361 397 /vis/viewer/refresh viewer-7 362 398 /vis/viewer/update viewer-7 399 /vis/ogl/set/printMode vectored 400 /vis/ogl/set/printFilename output-OGLIQt/output-test19-17 401 /vis/ogl/printEPS 363 402 /vis/rayTracer/column 150 364 403 /vis/rayTracer/row 100 … … 368 407 /vis/viewer/refresh 369 408 /vis/viewer/set/projection perspective 30 370 /vis/viewer/refresh371 409 /vis/viewer/set/viewpointThetaPhi 45 45 372 410 /vis/viewer/refresh … … 374 412 /vis/viewer/refresh viewer-8 375 413 /vis/viewer/update viewer-8 414 /vis/ogl/set/printMode vectored 415 /vis/ogl/set/printFilename output-OGLIQt/output-test19-18 416 /vis/ogl/printEPS 376 417 /vis/viewer/create ! ! 200 377 418 /vis/viewer/refresh … … 379 420 /vis/viewer/refresh viewer-9 380 421 /vis/viewer/update viewer-9 422 /vis/ogl/set/printMode vectored 423 /vis/ogl/set/printFilename output-OGLIQt/output-test19-19 424 /vis/ogl/printEPS -
trunk/source/visualization/test/History
r1274 r1340 1 $Id: History,v 1.12 3 2010/05/11 12:06:08 allison Exp $1 $Id: History,v 1.126 2010/10/27 11:17:48 allison Exp $ 2 2 3 3 History file for visualization/test subdirectory … … 5 5 6 6 $Log: History,v $ 7 Revision 1.126 2010/10/27 11:17:48 allison 8 Sorry.. vistest-V09-03-01 9 10 Revision 1.125 2010/10/27 11:16:59 allison 11 vistest-V09-03-00 12 13 Revision 1.124 2010/10/26 16:17:44 allison 14 Replaced MyPhysicsList by QGSP_BERT. 15 7 16 Revision 1.123 2010/05/11 12:06:08 allison 8 17 vistest-V09-03-00 -
trunk/source/visualization/test/test19.cc
r1228 r1340 25 25 // 26 26 // 27 // $Id: test19.cc,v 1.3 2 2009/11/06 16:01:57allison Exp $27 // $Id: test19.cc,v 1.34 2010/10/26 16:17:44 allison Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 // … … 40 40 //#include "SharedSolidDetectorConstruction.hh" 41 41 #include "test19DetectorConstruction.hh" 42 #include " MyPhysicsList.hh"42 #include "QGSP_BERT.hh" 43 43 #include "MyRunAction.hh" 44 44 #include "MyPrimaryGeneratorAction.hh" … … 90 90 runManager -> SetUserInitialization (new test19DetectorConstruction); 91 91 //runManager -> SetUserInitialization (new SharedSolidDetectorConstruction); 92 runManager -> SetUserInitialization (new MyPhysicsList);92 runManager -> SetUserInitialization (new QGSP_BERT); 93 93 94 94 // UserAction classes. -
trunk/source/visualization/test/test19.g4m
r1274 r1340 6 6 /control/saveHistory 7 7 /vis/verbose confirmations 8 # 9 # See list of detector possibilities. 10 /test19det/detector 11 # Select detector. 12 #/test19det/detector 1 13 #/test19det/detector 4 14 # 15 # Initialise run, i.e., create geometry, set cuts, etc. 16 /run/initialize 17 # 18 # Set gun for demo (detector 1) 19 #/gun/particle e+ 20 #/gun/position 0 -100 0 cm 21 #/gun/direction 0 1 0 22 # 23 # for drawing the tracks 24 /tracking/storeTrajectory 1 25 # if too many tracks cause core dump =storeTrajectory 0 26 # 27 # Create empty scene. 28 /vis/scene/create 29 # 30 # Add volume to scene - "world" is default. 31 /vis/scene/add/volume 32 # 33 # See list of graphics systems possibilities. 34 # help /vis/sceneHandler/create 35 # 36 # Create a scene handler for a specific graphics system. 37 # Edit the next line(s) to choose another graphic system 38 #/vis/sceneHandler/create DAWNFILE 39 #/vis/sceneHandler/create DAWN 40 #/vis/sceneHandler/create OGLIXm 41 #/vis/sceneHandler/create OGLSXm 42 #/vis/sceneHandler/create OGLIX 43 /vis/sceneHandler/create OGLSX 44 #/vis/sceneHandler/create OGLSXm 45 #/vis/sceneHandler/create VRML1 46 #/vis/sceneHandler/create VRML1FILE 47 # 48 # Add world volume. 49 /vis/scene/add/volume 50 /vis/scene/add/axes 0 0 0 2 m 51 /vis/scene/add/text 0 0 0 mm 50 -120 -200 test19 example text 52 # 53 # Add logo 54 /vis/scene/add/logo 55 # 56 # Add scale 57 /vis/scene/add/scale 58 # 59 # Add event id 60 /vis/scene/add/eventID 61 # 62 # Create a viewer. 63 /vis/viewer/create 64 # 65 # John's personal preferences 66 /vis/viewer/set/lightsMove camera 67 /vis/viewer/set/hiddenMarker true 68 # 69 /vis/viewer/set/lineSegmentsPerCircle 100 70 # flush not necessary for auto-refresh drivers like OGL abd OI, but leave 71 # (all that happens is an extra refresh). 72 /vis/viewer/flush 73 /vis/ogl/set/printMode vectored 74 /vis/ogl/set/printSize 800 600 75 /vis/ogl/set/printFilename output-test19-1 76 /vis/ogl/printEPS 77 # 78 # Create another viewer. 79 /vis/viewer/create 80 # 81 /vis/viewer/set/viewpointThetaPhi 35 35 82 /vis/viewer/set/style surface 83 /vis/viewer/set/projection perspective 30 84 # 85 /vis/viewer/flush 86 /vis/ogl/set/printMode vectored 87 /vis/ogl/set/printSize 800 600 88 /vis/ogl/set/printFilename output-test19-2 89 /vis/ogl/printEPS 90 # 91 # Now hidden line removal. 92 /vis/viewer/create 93 # 94 /vis/viewer/set/viewpointThetaPhi 35 35 95 /vis/viewer/set/style wireframe 96 /vis/viewer/set/hiddenEdge 97 /vis/viewer/set/projection perspective 30 98 # 99 /vis/viewer/flush 100 /vis/ogl/set/printMode vectored 101 /vis/ogl/set/printSize 800 600 102 /vis/ogl/set/printFilename output-test19-3 103 /vis/ogl/printEPS 104 # 105 # Now hidden line *and* hidden surface removal. 106 /vis/viewer/create 107 # 108 /vis/viewer/set/viewpointThetaPhi 35 35 109 /vis/viewer/set/style surface 110 /vis/viewer/set/hiddenEdge 111 /vis/viewer/set/projection perspective 30 112 # 113 /vis/viewer/flush 114 /vis/ogl/set/printMode vectored 115 /vis/ogl/set/printSize 800 600 116 /vis/ogl/set/printFilename output-test19-4 117 /vis/ogl/printEPS 118 # 119 # Start a run to initialise/optimise geometry and draw user-drawn transients. 120 /run/beamOn 121 # 122 # Test logical volume model... 123 /vis/scene/create 124 /vis/scene/add/logicalVolume expHall_L 125 /vis/sceneHandler/create OGLIQt 126 /vis/viewer/create 127 /vis/viewer/set/viewpointThetaPhi 35 35 128 /vis/scene/notifyHandlers 129 /vis/viewer/flush 130 /vis/ogl/set/printMode vectored 131 /vis/ogl/set/printSize 800 600 132 /vis/ogl/set/printFilename output-test19-5 133 /vis/ogl/printEPS 134 # 135 # Logical volume of Boolean solids... 136 /vis/scene/create 137 /vis/scene/add/logicalVolume intersection_L 138 /vis/sceneHandler/create OGLIQt 139 /vis/viewer/create 140 /vis/viewer/reset 141 /vis/viewer/set/viewpointThetaPhi 35 35 142 /vis/scene/notifyHandlers 143 /vis/viewer/flush 144 /vis/ogl/set/printMode vectored 145 /vis/ogl/set/printSize 800 600 146 /vis/ogl/set/printFilename output-test19-6 147 /vis/ogl/printEPS 148 # 149 /vis/scene/create 150 /vis/scene/add/logicalVolume subtraction_L 151 /vis/sceneHandler/attach 152 /vis/viewer/reset 153 /vis/viewer/set/viewpointThetaPhi 35 35 154 /vis/viewer/flush 155 /vis/ogl/set/printMode vectored 156 /vis/ogl/set/printSize 800 600 157 /vis/ogl/set/printFilename output-test19-7 158 /vis/ogl/printEPS 159 # 160 /vis/scene/create 161 /vis/scene/add/logicalVolume union_L 162 /vis/sceneHandler/attach 163 /vis/viewer/reset 164 /vis/viewer/set/viewpointThetaPhi 35 35 165 /vis/viewer/flush 166 /vis/ogl/set/printMode vectored 167 /vis/ogl/set/printSize 800 600 168 /vis/ogl/set/printFilename output-test19-8 169 /vis/ogl/printEPS 170 # 171 # Send geantino through... 172 /vis/scene/create 173 /vis/scene/endOfEventAction accumulate 174 /vis/scene/endOfRunAction accumulate 175 /vis/scene/add/volume 176 /vis/scene/add/trajectories 5000 177 #/vis/sceneHandler/create OGLSX 178 /vis/sceneHandler/create OGLIQt 179 /vis/viewer/create 180 /vis/viewer/reset 181 /vis/viewer/set/viewpointThetaPhi 35 35 182 /vis/scene/notifyHandlers 183 /tracking/verbose 2 184 /run/beamOn 1 185 /tracking/verbose 0 186 /vis/viewer/flush 187 /vis/ogl/set/printMode vectored 188 /vis/ogl/set/printSize 800 600 189 /vis/ogl/set/printFilename output-test19-9 190 /vis/ogl/printEPS 191 # 192 # Rotated tracker tube 193 /vis/viewer/reset 194 #/vis/viewer/panTo 0 -200 cm 195 /vis/viewer/set/upVector 1 0 0 196 /vis/viewer/set/viewpointVector 0 1 0 197 #/vis/viewer/zoom 5 198 /vis/viewer/set/auxiliaryEdge true 199 /vis/viewer/refresh 200 /gun/direction 1 0 0 201 /gun/position -200 -200 150 cm 202 /run/beamOn 203 /gun/position -200 -200 200 cm 204 /run/beamOn 205 /gun/position -200 -200 250 cm 206 /run/beamOn 207 /gun/position -200 -200 300 cm 208 /run/beamOn 209 /vis/viewer/flush 210 /vis/ogl/set/printMode vectored 211 /vis/ogl/set/printSize 800 600 212 /vis/ogl/set/printFilename output-test19-10 213 /vis/ogl/printEPS 214 # 215 # G4Trap1 216 /vis/viewer/reset 217 #/vis/viewer/panTo -200 200 cm # Originally intended to be absolute coords. 218 /vis/viewer/pan -275 75 cm 219 /vis/viewer/zoom 5 220 /vis/viewer/refresh 221 /gun/direction -1 0 0 222 /gun/position -20 120 -200 cm 223 /run/beamOn 224 /gun/position -20 130 -200 cm 225 /run/beamOn 226 /gun/position -20 140 -200 cm 227 /run/beamOn 228 /gun/position -20 150 -200 cm 229 /run/beamOn 230 /gun/position -20 160 -200 cm 231 /run/beamOn 232 /gun/position -20 170 -200 cm 233 /run/beamOn 234 /gun/position -20 180 -200 cm 235 /run/beamOn 236 /gun/position -20 190 -200 cm 237 /run/beamOn 238 /gun/position -20 200 -200 cm 239 /run/beamOn 240 /gun/position -20 210 -200 cm 241 /run/beamOn 242 /gun/position -20 220 -200 cm 243 /run/beamOn 244 /gun/position -20 230 -200 cm 245 /run/beamOn 246 /gun/position -20 240 -200 cm 247 /run/beamOn 248 /gun/position -20 250 -200 cm 249 /run/beamOn 250 /gun/position -20 260 -200 cm 251 /run/beamOn 252 /gun/position -20 270 -200 cm 253 /run/beamOn 254 /gun/position -20 280 -200 cm 255 /run/beamOn 256 /vis/viewer/flush 257 /vis/ogl/set/printMode vectored 258 /vis/ogl/set/printSize 800 600 259 /vis/ogl/set/printFilename output-test19-11 260 /vis/ogl/printEPS 261 # 262 # G4Trap2 263 /vis/viewer/reset 264 #/vis/viewer/panTo -200 400 cm 265 /vis/viewer/pan -275 275 cm 266 /vis/viewer/set/viewpointThetaPhi 90 180 267 #/vis/viewer/panTo -200 0 cm 268 /vis/viewer/pan -200 0 cm 269 /vis/viewer/zoom 5 270 /vis/viewer/refresh 271 /gun/direction 0 0 -1 272 /gun/position -200 400 -20 cm 273 /run/beamOn 274 /gun/position -200 380 -20 cm 275 /run/beamOn 276 /gun/position -200 420 -20 cm 277 /run/beamOn 278 /gun/position -200 360 -20 cm 279 /run/beamOn 280 /gun/position -200 440 -20 cm 281 /run/beamOn 282 /gun/position -200 340 -20 cm 283 /run/beamOn 284 /gun/position -200 460 -20 cm 285 /run/beamOn 286 /vis/viewer/flush 287 /vis/ogl/set/printMode vectored 288 /vis/ogl/set/printSize 800 600 289 /vis/ogl/set/printFilename output-test19-12 290 /vis/ogl/printEPS 291 # 292 # Displaced solid. 293 /vis/viewer/reset 294 #/vis/viewer/panTo 200 -200 cm 295 /vis/viewer/pan 125 -325 cm 296 /vis/viewer/zoom 5 297 /vis/viewer/refresh 298 /gun/position 100 -180 0 cm 299 /gun/direction 1 0 0 300 /run/beamOn 301 /vis/viewer/flush 302 /vis/ogl/set/printMode vectored 303 /vis/ogl/set/printSize 800 600 304 /vis/ogl/set/printFilename output-test19-13 305 /vis/ogl/printEPS 306 # 307 # Boolean solid. 308 /vis/viewer/reset 309 #/vis/viewer/panTo 250 -50 cm 310 /vis/viewer/pan 175 -175 cm 311 /vis/viewer/zoom 3 312 /vis/viewer/refresh 313 /gun/direction 1 0 0 314 /gun/position 50 -105 0 cm 315 /run/beamOn 316 /gun/position 50 -100 0 cm 317 /run/beamOn 318 /gun/position 50 -95 0 cm 319 /run/beamOn 320 /gun/position 50 -90 0 cm 321 /run/beamOn 322 /gun/position 50 -85 0 cm 323 /run/beamOn 324 /gun/position 50 -80 0 cm 325 /run/beamOn 326 /gun/position 50 -75 0 cm 327 /run/beamOn 328 /gun/position 50 -70 0 cm 329 /run/beamOn 330 /gun/position 50 -65 0 cm 331 /run/beamOn 332 /gun/position 50 -60 0 cm 333 /run/beamOn 334 /gun/position 50 -55 0 cm 335 /run/beamOn 336 /gun/position 50 -50 0 cm 337 /run/beamOn 338 /gun/position 50 -45 0 cm 339 /run/beamOn 340 /gun/position 50 -40 0 cm 341 /run/beamOn 342 /gun/position 50 -35 0 cm 343 /run/beamOn 344 /gun/position 50 -30 0 cm 345 /run/beamOn 346 /gun/position 50 -25 0 cm 347 /run/beamOn 348 /gun/position 50 -20 0 cm 349 /run/beamOn 350 /gun/position 50 -15 0 cm 351 /run/beamOn 352 /gun/position 50 -10 0 cm 353 /run/beamOn 354 /gun/position 50 -5 0 cm 355 /run/beamOn 356 /gun/position 50 0 0 cm 357 /run/beamOn 358 /gun/position 50 5 0 cm 359 /run/beamOn 360 /gun/position 50 10 0 cm 361 /run/beamOn 362 /gun/position 50 15 0 cm 363 /run/beamOn 364 /gun/position 50 20 0 cm 365 /run/beamOn 366 /vis/viewer/flush 367 /vis/ogl/set/printMode vectored 368 /vis/ogl/set/printSize 800 600 369 /vis/ogl/set/printFilename output-test19-14 370 /vis/ogl/printEPS 371 # 372 # To view replicas... 373 # Investigating BaBar problem... 374 # G4SmartVoxelHeader::BuildNodes - PANIC! Daughter physical volume 375 # name = EB20 is entirely outside mother logical volume name = EBMX 376 /vis/viewer/reset 377 #/vis/viewer/panTo -200 0 cm 378 /vis/viewer/pan -275 -125 cm 379 /vis/viewer/zoom 7 380 /vis/viewer/refresh 381 /gun/direction 0 1 0 382 # The following just crash with replicas... 383 /gun/position -200 -100 0 cm 384 /run/beamOn 385 /gun/position -195 -100 0 cm 386 /run/beamOn 387 /gun/position -190 -100 0 cm 388 /run/beamOn 389 /gun/position -185 -100 0 cm 390 /run/beamOn 391 /gun/position -180 -100 0 cm 392 /run/beamOn 393 /gun/position -160 -100 0 cm 394 /run/beamOn 395 #...end 396 /gun/position -200 0 0 cm 397 # The following just crash with replicas... 398 /gun/direction 1 1 0 399 /run/beamOn 400 /gun/direction 0 1 0 401 /run/beamOn 402 /gun/direction 1 .2 0 403 /run/beamOn 404 /gun/direction -1 1 0 405 /run/beamOn 406 /gun/direction -1 -1 0 407 /run/beamOn 408 /gun/direction 0 -1 0 409 /run/beamOn 410 /gun/direction 1 -1 0 411 /run/beamOn 412 /vis/viewer/flush 413 /vis/ogl/set/printMode vectored 414 /vis/ogl/set/printSize 800 600 415 /vis/ogl/set/printFilename output-test19-15 416 /vis/ogl/printEPS 417 #...end 418 # 419 /vis/viewer/set/viewpointThetaPhi 30 30 420 /vis/viewer/set/projection perspective 30 421 /vis/viewer/flush 422 /vis/ogl/set/printMode vectored 423 /vis/ogl/set/printSize 800 600 424 /vis/ogl/set/printFilename output-test19-16 425 /vis/ogl/printEPS 426 # 427 #/vis/sceneHandler/create OIX 428 /vis/sceneHandler/create OGLIQt 429 #/vis/viewer/create 430 /vis/viewer/create ! ! 200 431 /vis/viewer/set/viewpointThetaPhi 30 30 432 /vis/viewer/flush 433 /vis/ogl/set/printMode vectored 434 /vis/ogl/set/printSize 800 600 435 /vis/ogl/set/printFilename output-test19-17 436 /vis/ogl/printEPS 437 # 438 # You can use /vis/rayTracer/... commands 439 /vis/rayTracer/column 150 440 /vis/rayTracer/row 100 441 /vis/rayTracer/backgroundColour .3 .2 .1 442 /vis/rayTracer/trace 443 # 444 /vis/viewer/create ! ! 200x300 445 /vis/viewer/set/projection perspective 30 446 /vis/viewer/set/viewpointThetaPhi 45 45 447 /vis/viewer/flush 448 /vis/ogl/set/printMode vectored 449 /vis/ogl/set/printSize 800 600 450 /vis/ogl/set/printFilename output-test19-18 451 /vis/ogl/printEPS 452 # 453 # Odd!!? JPEG image seems upside down for default view direction... 454 /vis/viewer/create ! ! 200 455 /vis/viewer/flush 456 /vis/ogl/set/printMode vectored 457 /vis/ogl/set/printSize 800 600 458 /vis/ogl/set/printFilename output-test19-19 459 /vis/ogl/printEPS 8 9 #/control/execute test19-OGLSX.g4m 10 #/control/execute test19-OGLIX.g4m 11 /control/execute test19-OGLIQt.g4m 12 #/control/execute test19-OGLSQt.g4m 460 13 exit
Note:
See TracChangeset
for help on using the changeset viewer.
