Ignore:
Timestamp:
Jun 18, 2010, 11:42:07 AM (14 years ago)
Author:
garnier
Message:

update geant4-09-04-beta-cand-01 interfaces-V09-03-09 vis-V09-03-08

Location:
trunk/source/visualization
Files:
21 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/visualization/HepRep/History

    r1294 r1315  
    1 .$Id: History,v 1.133 2010/05/30 10:28:02 allison Exp $
     1.$Id: History,v 1.134 2010/06/05 06:25:03 perl Exp $
    22-------------------------------------------------------------------
    33
     
    2020History file for visualization/HepRep sub-category
    2121--------------------------------------------------
     22
     234th June 2010  Joseph Perl  (vis-HepRep-V09-03-02)
     24- G4HepRepMessenger: Add command renderCylAsPolygons
     25- G4HepRepFileSceneHandler: Use new command
    2226
    232730th May 2010  John Allison  (vis-HepRep-V09-03-00)
  • trunk/source/visualization/HepRep/include/G4HepRepMessenger.hh

    r1228 r1315  
    2424// ********************************************************************
    2525//
    26 // $Id: G4HepRepMessenger.hh,v 1.8 2009/11/23 05:42:28 perl Exp $
    27 // GEANT4 tag $Name: $
     26// $Id: G4HepRepMessenger.hh,v 1.9 2010/06/05 06:25:03 perl Exp $
     27// GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
    2828//
    2929//
     
    5151        virtual G4bool getOverwrite();
    5252        virtual G4bool getCullInvisibles();
     53                virtual G4bool renderCylAsPolygons();
    5354       
    5455        // Used by HepRepXML
     
    7677                G4bool cullInvisibles;
    7778                G4UIcmdWithABool* setCullInvisiblesCommand;
    78        
     79       
     80                G4bool cylAsPolygons;
     81                G4UIcmdWithABool* renderCylAsPolygonsCommand;
     82       
    7983        G4String suffix;
    8084        G4UIcmdWithAString* setEventNumberSuffixCommand;
  • trunk/source/visualization/HepRep/src/G4HepRepFileSceneHandler.cc

    r1228 r1315  
    2424// ********************************************************************
    2525//
    26 // $Id: G4HepRepFileSceneHandler.cc,v 1.68 2009/12/16 17:51:21 gunter Exp $
    27 // GEANT4 tag $Name: $
     26// $Id: G4HepRepFileSceneHandler.cc,v 1.69 2010/06/05 06:25:03 perl Exp $
     27// GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
    2828//
    2929//
     
    210210#endif
    211211       
     212        // HepRApp does not correctly represent the end faces of cones at
     213        // non-standard angles, let the base class convert these solids to polygons.   
     214        CLHEP::HepRotation r = fpObjectTransformation->getRotation();   
     215        G4bool linedUpWithAnAxis = (std::fabs(r.phiX())<=.001 || 
     216                                                                std::fabs(r.phiY())<=.001 ||
     217                                                                std::fabs(r.phiZ())<=.001 ||
     218                                                                std::fabs(r.phiX()-pi)<=.001 ||
     219                                                                std::fabs(r.phiY()-pi)<=.001 ||
     220                                                                std::fabs(r.phiZ()-pi)<=.001); 
     221        //G4cout << "Angle X:" << r.phiX() << ", Angle Y:" << r.phiY() << ", Angle Z:" << r.phiZ() << G4endl;
     222        //G4cout << "linedUpWithAnAxis:" << linedUpWithAnAxis << G4endl;
     223       
    212224        // HepRep does not have a primitive for a cut cone,
    213225        // so if this cone is cut, let the base class convert this
    214226        // solid to polygons.
    215         if (cons.GetDeltaPhiAngle() < twopi) {
     227        G4HepRepMessenger* messenger = G4HepRepMessenger::GetInstance();
     228        if (cons.GetDeltaPhiAngle() < twopi || !linedUpWithAnAxis || messenger->renderCylAsPolygons())
     229        {
    216230                G4VSceneHandler::AddSolid(cons);  // Invoke default action.
    217231        } else {
     
    278292        // so if this cylinder is cut, let the base class convert this
    279293        // solid to polygons.
    280         if (tubs.GetDeltaPhiAngle() < twopi || !linedUpWithAnAxis)
     294        G4HepRepMessenger* messenger = G4HepRepMessenger::GetInstance();
     295        if (tubs.GetDeltaPhiAngle() < twopi || !linedUpWithAnAxis || messenger->renderCylAsPolygons())
    281296        {
    282297                G4VSceneHandler::AddSolid(tubs);  // Invoke default action.
     
    291306                haveVisible = false;
    292307                AddHepRepInstance("Cylinder", NULL);
    293                
    294                 G4HepRepMessenger* messenger = G4HepRepMessenger::GetInstance();
    295308               
    296309                if (fpVisAttribs && (fpVisAttribs->IsVisible()==0) && messenger->getCullInvisibles())
     
    475488        if (!pTrModel) G4Exception
    476489                ("G4HepRepFileSceneHandler::AddCompound(const G4VTrajectory&): Not a G4TrajectoriesModel.");
    477         G4int drawingMode = pTrModel->GetDrawingMode();
    478490       
    479491        // Pointers to hold trajectory attribute values and definitions.
     
    551563                // Would rather be able to get these attDefs without needing a reference from any
    552564                // particular point, but don't know how to do that.
    553                 if ((drawingMode!=0 || trajContext->GetDrawStepPts() || trajContext->GetDrawAuxPts())
     565                if ((trajContext->GetDrawStepPts() || trajContext->GetDrawAuxPts())
    554566                        && traj.GetPointEntries()>0) {
    555567                        G4VTrajectoryPoint* aTrajectoryPoint = traj.GetPoint(0);
     
    626638       
    627639        // Draw step points.
    628         if (drawingMode!=0 || trajContext->GetDrawStepPts()) {
     640        if (trajContext->GetDrawStepPts()) {
    629641                if (!doneInitTraj)
    630642                        InitTrajectory();
     
    642654                G4bool visible;
    643655                G4bool square;
    644                 if (drawingMode==0) {
    645                         G4Colour colour = trajContext->GetStepPtsColour();
    646                         redness = colour.GetRed();
    647                         greenness = colour.GetGreen();
    648                         blueness = colour.GetBlue();
    649                         markSize = (G4int) trajContext->GetStepPtsSize();
    650                         visible = (G4int) trajContext->GetStepPtsVisible();
    651                         square = (trajContext->GetStepPtsType()==G4Polymarker::squares);
    652                 } else {
    653                         redness = 1.;
    654                         greenness = 1.;
    655                         blueness = 1.;
    656                         markSize = std::abs(drawingMode/1000);
    657                         visible = true;
    658                         square = false;
    659                 }
     656                G4Colour colour = trajContext->GetStepPtsColour();
     657                redness = colour.GetRed();
     658                greenness = colour.GetGreen();
     659                blueness = colour.GetBlue();
     660                markSize = (G4int) trajContext->GetStepPtsSize();
     661                visible = (G4int) trajContext->GetStepPtsVisible();
     662                square = (trajContext->GetStepPtsType()==G4Polymarker::squares);
    660663
    661664                // Avoiding drawing anything black on black. 
     
    735738       
    736739        // Draw Auxiliary Points
    737         if (drawingMode!=0 || trajContext->GetDrawAuxPts()) {
     740        if (trajContext->GetDrawAuxPts()) {
    738741                if (!doneInitTraj)
    739742                        InitTrajectory();
     
    751754                G4bool visible;
    752755                G4bool square;
    753                 if (drawingMode==0) {
    754                         G4Colour colour = trajContext->GetAuxPtsColour();
    755                         redness = colour.GetRed();
    756                         greenness = colour.GetGreen();
    757                         blueness = colour.GetBlue();
    758                         markSize = (G4int) trajContext->GetAuxPtsSize();
    759                         visible = (G4int) trajContext->GetAuxPtsVisible();
    760                         square = (trajContext->GetAuxPtsType()==G4Polymarker::squares);
    761                 } else {
    762                         redness = 1.;
    763                         greenness = 1.;
    764                         blueness = 1.;
    765                         markSize = std::abs(drawingMode/1000);
    766                         visible = true;
    767                         square = false;
    768                 }
     756                G4Colour colour = trajContext->GetAuxPtsColour();
     757                redness = colour.GetRed();
     758                greenness = colour.GetGreen();
     759                blueness = colour.GetBlue();
     760                markSize = (G4int) trajContext->GetAuxPtsSize();
     761                visible = (G4int) trajContext->GetAuxPtsVisible();
     762                square = (trajContext->GetAuxPtsType()==G4Polymarker::squares);
    769763
    770764                // Avoiding drawing anything black on black. 
  • trunk/source/visualization/HepRep/src/G4HepRepMessenger.cc

    r1228 r1315  
    2424// ********************************************************************
    2525//
    26 // $Id: G4HepRepMessenger.cc,v 1.11 2009/11/23 05:42:28 perl Exp $
    27 // GEANT4 tag $Name: $
     26// $Id: G4HepRepMessenger.cc,v 1.12 2010/06/05 06:25:03 perl Exp $
     27// GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
    2828//
    2929#include "G4HepRepMessenger.hh"
     
    100100        }
    101101        setCullInvisiblesCommand->AvailableForStates(G4State_Idle);
     102               
     103        renderCylAsPolygonsCommand = new G4UIcmdWithABool("/vis/heprep/renderCylAsPolygons", this);
     104        renderCylAsPolygonsCommand->SetGuidance("Render cylinders and cones as polygons.");
     105        renderCylAsPolygonsCommand->SetGuidance("This command is used by HepRepFile, not by HepRepXML.");
     106        renderCylAsPolygonsCommand->SetParameterName("flag",false);
     107        renderCylAsPolygonsCommand->SetDefaultValue(true);
     108        renderCylAsPolygonsCommand->AvailableForStates(G4State_Idle);
    102109               
    103110    setEventNumberSuffixCommand = new G4UIcmdWithAString("/vis/heprep/setEventNumberSuffix", this);
     
    122129    addPointAttributesCommand->SetDefaultValue(false);
    123130    addPointAttributesCommand->AvailableForStates(G4State_Idle);
    124 
    125     useSolidsCommand = new G4UIcmdWithABool("/vis/heprep/useSolids", this);
    126     useSolidsCommand->SetGuidance("Use HepRep Solids, rather than Geant4 Primitives.");
    127         useSolidsCommand->SetGuidance("This command is used by HepRepXML, not by HepRepFile.");
    128     useSolidsCommand->SetParameterName("flag",false);
    129     useSolidsCommand->SetDefaultValue(true);
    130     useSolidsCommand->AvailableForStates(G4State_Idle);
     131               
     132        useSolidsCommand = new G4UIcmdWithABool("/vis/heprep/useSolids", this);
     133        useSolidsCommand->SetGuidance("Use HepRep Solids, rather than Geant4 Primitives.");
     134        useSolidsCommand->SetGuidance("This command is used by HepRepXML, not by HepRepFile..");
     135        useSolidsCommand->SetParameterName("flag",false);
     136        useSolidsCommand->SetDefaultValue(true);
     137        useSolidsCommand->AvailableForStates(G4State_Idle);
    131138}
    132139
     
    136143        delete setOverwriteCommand;
    137144        delete setCullInvisiblesCommand;
     145    delete renderCylAsPolygonsCommand;
    138146    delete setEventNumberSuffixCommand;
    139147    delete appendGeometryCommand;
     
    152160    } else if (command==setCullInvisiblesCommand) {
    153161        return cullInvisibles;
     162    } else if (command==renderCylAsPolygonsCommand) {
     163        return renderCylAsPolygonsCommand->ConvertToString(cylAsPolygons);
    154164    } else if (command==setEventNumberSuffixCommand) {
    155165        return suffix;
     
    174184    } else if (command==setCullInvisiblesCommand) {
    175185                cullInvisibles = setCullInvisiblesCommand->GetNewBoolValue(newValue);
     186    } else if (command==renderCylAsPolygonsCommand) {
     187        cylAsPolygons = renderCylAsPolygonsCommand->GetNewBoolValue(newValue);
    176188    } else if (command==setEventNumberSuffixCommand) {
    177189        suffix = newValue;
     
    201213}
    202214
     215G4bool G4HepRepMessenger::renderCylAsPolygons() {
     216    return cylAsPolygons;
     217}
     218
    203219G4String G4HepRepMessenger::getEventNumberSuffix() {
    204220    return suffix;
  • trunk/source/visualization/History

    r1290 r1315  
    1 $Id: History,v 1.475 2010/06/01 16:20:18 allison Exp $
     1$Id: History,v 1.481 2010/06/15 16:41:14 allison Exp $
    22-------------------------------------------------------------------
    33
     
    2424History file for visualization category
    2525---------------------------------------
     26
     2715th June 2010  John Allison  (vis-V09-03-08)
     28- visman-V09-03-10:
     29  o Added virtual destructors to fix compilation warnings.
     30  o Improved action after "/vis/geometry/..." commands.
     31- raytracer-V09-03-02 (Gabriele Cosmo):
     32  o Added virtual destructors to fix compilation warnings.
     33
     344th June 2010  Joseph Perl  (vis-V09-03-07)
     35- vis-HepRep-V09-03-02
     36  o Added command renderCylAsPolygon
     37- opengl-V09-03-07
     38  o G4OpenGLImmediate/StoredQtViewer : Add protection against multiple
     39  repaint call. Add protection against resizeGl with bad values
     40
     413rd June 2010  John Allison
     42- opengl-V09-03-06:
     43  o Restored all behaviour-sensitive changes to geant4-09-03.
     44- visman-V09-03-09:
     45  o Fixed unchecked pointer.
     46  o Changed /vis/scene/add/digiti[sz]ations to /vis/scene/add/digis.
     47- opengl-V09-03-05:
     48  o Restored some changes to geant4-09-03 to preserve behaviour.
     49
     501st June 2010  John Allison
     51- modeling-V09-03-03: Added default colours to G4TrajectoryDrawByParticleID.
    2652
    27531st June 2010  John Allison  (vis-V09-03-06)
  • trunk/source/visualization/OpenGL/History

    r1307 r1315  
    1 $Id: History,v 1.178 2010/06/04 15:27:47 lgarnier Exp $
     1$Id: History,v 1.179 2010/06/05 06:26:38 perl Exp $
    22-------------------------------------------------------------------
    33
     
    1818     ----------------------------------------------------------
    1919
    20 4th June 2010  Laurent Garnier
     204th June 2010  Laurent Garnier (opengl-V09-03-07)
    2121- G4OpenGLImmediate/StoredQtViewer : Add protection against multiple
    2222  repaint call. Add protection against resizeGl with bad values
  • trunk/source/visualization/OpenGL/src/G4OpenGLViewer.cc

    r1314 r1315  
    113113  glDisable (GL_POLYGON_SMOOTH);
    114114
    115   if (fVP) {
     115  //  if (fVP != NULL) {
    116116    fWinSize_x = fVP.GetWindowSizeHintX();
    117117    fWinSize_y = fVP.GetWindowSizeHintY();
    118   }
     118    //  }
    119119
    120120
  • trunk/source/visualization/RayTracer/History

    r1294 r1315  
    1 $Id: History,v 1.63 2010/05/30 10:22:26 allison Exp $
     1$Id: History,v 1.64 2010/06/14 14:33:34 gcosmo Exp $
    22-------------------------------------------------------------------
    33
     
    2424History file for Ray Tracer category
    2525---------------------------------------
     26
     2714th June 2010  Gabriele Cosmo  (raytracer-V09-03-02)
     28- Added missing virtual destructor to G4VRTScanner, G4RTXScanner and
     29  G4RTSimpleScanner.
    2630
    273130th May 2010  John Allison  (raytracer-V09-03-01)
  • trunk/source/visualization/RayTracer/include/G4RTSimpleScanner.hh

    r954 r1315  
    2525//
    2626//
    27 // $Id: G4RTSimpleScanner.hh,v 1.3 2006/06/29 21:23:25 gunter Exp $
    28 // GEANT4 tag $Name: $
     27// $Id: G4RTSimpleScanner.hh,v 1.4 2010/06/14 14:33:34 gcosmo Exp $
     28// GEANT4 tag $Name: vis-V09-03-08 $
    2929//
    3030//
     
    4545
    4646  G4RTSimpleScanner();
     47  virtual ~G4RTSimpleScanner();
    4748
    48   // Compiler defaults for destructor, copy constructor and
    49   // assignmemt.
     49  // Compiler defaults for copy constructor and assignmemt.
    5050
    5151  virtual const G4String& GetGSName() const;
  • trunk/source/visualization/RayTracer/include/G4RTXScanner.hh

    r954 r1315  
    2525//
    2626//
    27 // $Id: G4RTXScanner.hh,v 1.4 2006/06/29 21:23:31 gunter Exp $
    28 // GEANT4 tag $Name: $
     27// $Id: G4RTXScanner.hh,v 1.5 2010/06/14 14:33:34 gcosmo Exp $
     28// GEANT4 tag $Name: vis-V09-03-08 $
    2929//
    3030//
     
    5353
    5454  G4RTXScanner();
     55  virtual ~G4RTXScanner();
    5556
    56   // Compiler defaults for destructor, copy constructor and
    57   // assignmemt.
     57  // Compiler defaults for copy constructor and assignmemt.
    5858
    5959  virtual const G4String& GetGSName() const;
  • trunk/source/visualization/RayTracer/include/G4VRTScanner.hh

    r954 r1315  
    2525//
    2626//
    27 // $Id: G4VRTScanner.hh,v 1.5 2006/06/29 21:23:53 gunter Exp $
    28 // GEANT4 tag $Name: $
     27// $Id: G4VRTScanner.hh,v 1.6 2010/06/14 14:33:34 gcosmo Exp $
     28// GEANT4 tag $Name: vis-V09-03-08 $
    2929//
    3030//
     
    4444public: // with description
    4545
     46  G4VRTScanner();
     47  virtual ~G4VRTScanner();
     48 
    4649  virtual const G4String& GetGSName() const = 0;
    4750  // Get name that acts as graphics system name.
     
    6669};
    6770
    68 inline void G4VRTScanner::Draw
    69 (unsigned char, unsigned char, unsigned char)
    70 {}
     71inline
     72void G4VRTScanner::Draw(unsigned char, unsigned char, unsigned char) {}
    7173
    7274#endif
  • trunk/source/visualization/RayTracer/src/G4RTSimpleScanner.cc

    r954 r1315  
    2525//
    2626//
    27 // $Id: G4RTSimpleScanner.cc,v 1.4 2007/05/22 17:10:42 allison Exp $
    28 // GEANT4 tag $Name: $
     27// $Id: G4RTSimpleScanner.cc,v 1.5 2010/06/14 14:33:34 gcosmo Exp $
     28// GEANT4 tag $Name: vis-V09-03-08 $
    2929//
    3030//
     
    3333
    3434G4RTSimpleScanner::G4RTSimpleScanner():
    35   theNRow(0), theNColumn(0), theIRow(0), theIColumn(0)
     35  G4VRTScanner(), theNRow(0), theNColumn(0), theIRow(0), theIColumn(0)
    3636{
    3737  theGSName = "RayTracer";
    3838  theGSNickname = "RayTracer";
    3939}
     40
     41G4RTSimpleScanner::~G4RTSimpleScanner(){}
    4042
    4143const G4String& G4RTSimpleScanner::GetGSName() const
  • trunk/source/visualization/RayTracer/src/G4RTXScanner.cc

    r1136 r1315  
    2525//
    2626//
    27 // $Id: G4RTXScanner.cc,v 1.7 2009/09/16 16:56:52 allison Exp $
    28 // GEANT4 tag $Name: $
     27// $Id: G4RTXScanner.cc,v 1.8 2010/06/14 14:33:34 gcosmo Exp $
     28// GEANT4 tag $Name: vis-V09-03-08 $
    2929//
    3030//
     
    4848
    4949G4RTXScanner::G4RTXScanner():
    50   theNRow(0), theNColumn(0), theIRow(0), theIColumn(0)
     50  G4VRTScanner(), theNRow(0), theNColumn(0), theIRow(0), theIColumn(0)
    5151{
    5252  theGSName = "RayTracerX";
    5353  theGSNickname = "RayTracerX";
    5454}
     55
     56G4RTXScanner::~G4RTXScanner() {}
    5557
    5658const G4String& G4RTXScanner::GetGSName() const
  • trunk/source/visualization/management/History

    r1288 r1315  
    1 $Id: History,v 1.150 2010/06/01 16:14:10 allison Exp $
     1$Id: History,v 1.152 2010/06/15 16:34:43 allison Exp $
    22
    33-------------------------------------------------------------------
     
    2626History file for visualization management sub-category
    2727------------------------------------------------------
     28
     2915th June 2010  John Allison  (visman-V09-03-10)
     30- G4VisCommandsGeometrySet.hh: Added virtual destructors to fix
     31  compilation warnings.
     32- G4VisCommandsGeometrySet.cc: Changed "/vis/viewer/rebuild" to
     33  "/vis/scene/notifyHandlers", the command to be executed after a
     34  "/vis/geometry/..." command.  "/vis/scene/notifyHandlers" causes
     35  rebuild if viewer is "auto-refresh", otherwiae a message advises a
     36  rebuild.  This prevents over-enthusiatic rebuildin.
     37
     383rd June 2010  John Allison  (visman-V09-03-09)
     39- G4VisManager.cc: Checked valid view in DispatchToModel.
     40- Changed /vis/scene/add/digiti[sz]ations to /vis/scene/add/digis.
    2841
    29421st June 2010  John Allison  (visman-V09-03-07)
  • trunk/source/visualization/management/include/G4VisCommandsGeometrySet.hh

    r954 r1315  
    2525//
    2626//
    27 // $Id: G4VisCommandsGeometrySet.hh,v 1.3 2007/01/05 16:24:19 allison Exp $
    28 // GEANT4 tag $Name: $
     27// $Id: G4VisCommandsGeometrySet.hh,v 1.4 2010/06/15 16:33:55 allison Exp $
     28// GEANT4 tag $Name: vis-V09-03-08 $
    2929
    3030// /vis/geometry commands - John Allison  31st January 2006
     
    4040class G4VVisCommandGeometrySetFunction {
    4141public:
     42  virtual ~G4VVisCommandGeometrySetFunction() {}
    4243  virtual void operator()(G4VisAttributes*) const = 0;
    4344};
     
    4647  public G4VVisCommandGeometrySetFunction {
    4748public:
     49  virtual ~G4VisCommandGeometrySetColourFunction() {}
    4850  G4VisCommandGeometrySetColourFunction
    4951  (const G4Colour& colour):
     
    5961  public G4VVisCommandGeometrySetFunction {
    6062public:
     63  virtual ~G4VisCommandGeometrySetDaughtersInvisibleFunction() {}
    6164  G4VisCommandGeometrySetDaughtersInvisibleFunction
    6265  (G4bool daughtersInvisible):
     
    7275  public G4VVisCommandGeometrySetFunction {
    7376public:
     77  virtual ~G4VisCommandGeometrySetForceAuxEdgeVisibleFunction() {}
    7478  G4VisCommandGeometrySetForceAuxEdgeVisibleFunction
    7579  (G4bool forceAuxEdgeVisible):
     
    8589  public G4VVisCommandGeometrySetFunction {
    8690public:
     91  virtual ~G4VisCommandGeometrySetForceLineSegmentsPerCircleFunction() {}
    8792  G4VisCommandGeometrySetForceLineSegmentsPerCircleFunction
    8893  (G4int lineSegmentsPerCircle):
     
    98103  public G4VVisCommandGeometrySetFunction {
    99104public:
     105  virtual ~G4VisCommandGeometrySetForceSolidFunction() {}
    100106  G4VisCommandGeometrySetForceSolidFunction
    101107  (G4bool forceSolid):
     
    111117  public G4VVisCommandGeometrySetFunction {
    112118public:
     119  virtual ~G4VisCommandGeometrySetForceWireframeFunction() {}
    113120  G4VisCommandGeometrySetForceWireframeFunction
    114121  (G4bool forceWireframe):
     
    124131  public G4VVisCommandGeometrySetFunction {
    125132public:
     133  virtual ~G4VisCommandGeometrySetLineStyleFunction() {}
    126134  G4VisCommandGeometrySetLineStyleFunction
    127135  (G4VisAttributes::LineStyle lineStyle):
     
    137145  public G4VVisCommandGeometrySetFunction {
    138146public:
     147  virtual ~G4VisCommandGeometrySetLineWidthFunction() {}
    139148  G4VisCommandGeometrySetLineWidthFunction
    140149  (G4double lineWidth):
     
    150159  public G4VVisCommandGeometrySetFunction {
    151160public:
     161  virtual ~G4VisCommandGeometrySetVisibilityFunction() {}
    152162  G4VisCommandGeometrySetVisibilityFunction
    153163  (G4bool visibility):
  • trunk/source/visualization/management/include/G4VisCommandsSceneAdd.hh

    r1288 r1315  
    2525//
    2626//
    27 // $Id: G4VisCommandsSceneAdd.hh,v 1.20 2010/05/30 11:30:49 allison Exp $
    28 // GEANT4 tag $Name: $
     27// $Id: G4VisCommandsSceneAdd.hh,v 1.21 2010/06/03 10:17:44 allison Exp $
     28// GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
    2929
    3030// /vis/scene commands - John Allison  9th August 1998
     
    6363  G4VisCommandSceneAddDigis& operator = (const G4VisCommandSceneAddDigis&);
    6464  G4UIcmdWithoutParameter* fpCommand;
    65   G4UIcmdWithoutParameter* fpCommandUS;
    6665};
    6766
  • trunk/source/visualization/management/src/G4VisCommandsGeometrySet.cc

    r954 r1315  
    2525//
    2626//
    27 // $Id: G4VisCommandsGeometrySet.cc,v 1.7 2007/01/05 16:24:19 allison Exp $
    28 // GEANT4 tag $Name: $
     27// $Id: G4VisCommandsGeometrySet.cc,v 1.8 2010/06/15 16:34:30 allison Exp $
     28// GEANT4 tag $Name: vis-V09-03-08 $
    2929
    3030// /vis/geometry commands - John Allison  31st January 2006
     
    6464  }
    6565  if (fpVisManager->GetCurrentViewer()) {
    66     G4UImanager::GetUIpointer()->ApplyCommand("/vis/viewer/rebuild");
     66    G4UImanager::GetUIpointer()->ApplyCommand("/vis/scene/notifyHandlers");
    6767  }
    6868}
  • trunk/source/visualization/management/src/G4VisCommandsSceneAdd.cc

    r1288 r1315  
    2525//
    2626//
    27 // $Id: G4VisCommandsSceneAdd.cc,v 1.81 2010/06/01 16:08:15 allison Exp $
    28 // GEANT4 tag $Name: $
     27// $Id: G4VisCommandsSceneAdd.cc,v 1.82 2010/06/03 10:17:44 allison Exp $
     28// GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
    2929// /vis/scene commands - John Allison  9th August 1998
    3030
     
    162162
    163163G4VisCommandSceneAddDigis::G4VisCommandSceneAddDigis () {
    164   fpCommand = new G4UIcmdWithoutParameter ("/vis/scene/add/digitisations", this);
     164  fpCommand = new G4UIcmdWithoutParameter ("/vis/scene/add/digis", this);
    165165  fpCommand -> SetGuidance ("Adds digis to current scene.");
    166166  fpCommand -> SetGuidance
    167167    ("Digis are drawn at end of event when the scene in which"
    168168     "\nthey are added is current.");
    169 
    170   fpCommandUS = new G4UIcmdWithoutParameter ("/vis/scene/add/digitizations", this);
    171   fpCommandUS -> SetGuidance ("Adds digis to current scene.");
    172   fpCommandUS -> SetGuidance
    173     ("Digis are drawn at end of event when the scene in which"
    174      "\nthey are added is current.");
    175169}
    176170
    177171G4VisCommandSceneAddDigis::~G4VisCommandSceneAddDigis () {
    178   delete fpCommandUS;
    179172  delete fpCommand;
    180173}
  • trunk/source/visualization/management/src/G4VisManager.cc

    r1292 r1315  
    2424// ********************************************************************
    2525//
    26 // $Id: G4VisManager.cc,v 1.128 2010/06/01 16:08:15 allison Exp $
    27 // GEANT4 tag $Name: $
     26// $Id: G4VisManager.cc,v 1.129 2010/06/03 10:16:11 allison Exp $
     27// GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
    2828//
    2929//
     
    940940  assert (0 != trajectoryModel); // Should exist
    941941
    942   G4TrajectoriesModel* trajectoriesModel =
    943     dynamic_cast<G4TrajectoriesModel*>(fpSceneHandler->GetModel());
    944   if (trajectoriesModel) {
    945     if (trajectoriesModel->IsDrawingModeSet()) {
     942  if (IsValidView()) {
     943    G4TrajectoriesModel* trajectoriesModel =
     944      dynamic_cast<G4TrajectoriesModel*>(fpSceneHandler->GetModel());
     945    if (trajectoriesModel) {
     946      if (trajectoriesModel->IsDrawingModeSet()) {
     947        trajectoryModel->Draw(trajectory, i_mode, visible);
     948      } else {
     949        trajectoryModel->Draw(trajectory, visible);
     950      }
     951    } else {
     952      // Just draw at user's request
    946953      trajectoryModel->Draw(trajectory, i_mode, visible);
    947     } else {
    948       trajectoryModel->Draw(trajectory, visible);
    949     }
    950   } else {
    951     // Just draw at user's request
    952     trajectoryModel->Draw(trajectory, i_mode, visible);
     954    }
    953955  }
    954956}
     
    13611363    if (eventID < nEventsToBeProcessed - 1) {
    13621364      fpViewer->ShowView();
     1365      fpViewer->DrawView();
    13631366      fpSceneHandler->SetMarkForClearingTransientStore(true);
    13641367    } else {  // Last event...
  • trunk/source/visualization/modeling/History

    r1288 r1315  
    1 $Id: History,v 1.119 2010/05/30 11:24:57 allison Exp $
     1$Id: History,v 1.121 2010/06/01 21:49:49 allison Exp $
    22-------------------------------------------------------------------
    33
     
    2020History file for visualization/modeling
    2121---------------------------------------
     22
     231st June 2010  John Allison  (modeling-V09-03-03)
     24- G4TrajectoryDrawByParticleID.cc: Set some defaults:
     25    Set("gamma", "green");
     26    Set("e-", "red");
     27    Set("e+", "blue");
     28    Set("pi+", "magenta");
     29    Set("pi-", "magenta");
     30    Set("proton", "cyan");
     31    Set("neutron", "yellow");
    2232
    233330th May 2010  John Allison  (modeling-V09-03-02)
  • trunk/source/visualization/modeling/src/G4TrajectoryDrawByParticleID.cc

    r1288 r1315  
    2424// ********************************************************************
    2525//
    26 // $Id: G4TrajectoryDrawByParticleID.cc,v 1.10 2010/05/28 02:00:59 allison Exp $
    27 // GEANT4 tag $Name: $
     26// $Id: G4TrajectoryDrawByParticleID.cc,v 1.11 2010/06/01 21:17:41 allison Exp $
     27// GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
    2828//
    2929// Jane Tinslay, John Allison, Joseph Perl November 2005
     
    3838  :G4VTrajectoryModel(name, context)
    3939  ,fDefault(G4Colour::Grey())
    40 {}
     40{
     41  Set("gamma", "green");
     42  Set("e-", "red");
     43  Set("e+", "blue");
     44  Set("pi+", "magenta");
     45  Set("pi-", "magenta");
     46  Set("proton", "cyan");
     47  Set("neutron", "yellow");
     48}
    4149
    4250G4TrajectoryDrawByParticleID::~G4TrajectoryDrawByParticleID() {}
Note: See TracChangeset for help on using the changeset viewer.