Ignore:
Timestamp:
Feb 26, 2009, 12:23:47 PM (17 years ago)
Author:
garnier
Message:

John update

Location:
trunk/source/visualization/management
Files:
3 edited

Legend:

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

    r912 r933  
    1 $Id: History,v 1.115 2009/01/22 15:39:55 lgarnier Exp $
     1$Id: History,v 1.116 2009/02/25 18:28:00 lgarnier Exp $
    22
    33-------------------------------------------------------------------
     
    2626History file for visualization management sub-category
    2727------------------------------------------------------
     28
     2925th February 2009  Laurent Garnier
     30- Notify handler send by G4VVisManager is implemented in G4VisManager
    2831
    293222th January 2009  Laurent Garnier
  • trunk/source/visualization/management/include/G4VisManager.hh

    r907 r933  
    2525//
    2626//
    27 // $Id: G4VisManager.hh,v 1.69 2009/01/13 09:55:15 lgarnier Exp $
     27// $Id: G4VisManager.hh,v 1.70 2009/02/25 18:28:00 lgarnier Exp $
    2828// GEANT4 tag $Name:  $
    2929//
     
    300300  void GeometryHasChanged ();
    301301  // Used by run manager to notify change.
     302
     303  void NotifyHandlers();
     304  // Notify scene handlers (G4VGraphicsScene objects) that the scene
     305  // has changed so that they may rebuild their graphics database, if
     306  // any, and redraw all views.
    302307
    303308  void DispatchToModel(const G4VTrajectory&, G4int i_mode);
  • trunk/source/visualization/management/src/G4VisManager.cc

    r907 r933  
    2424// ********************************************************************
    2525//
    26 // $Id: G4VisManager.cc,v 1.116 2009/01/13 09:55:15 lgarnier Exp $
     26// $Id: G4VisManager.cc,v 1.117 2009/02/25 18:28:00 lgarnier Exp $
    2727// GEANT4 tag $Name:  $
    2828//
     
    800800
    801801}
     802void G4VisManager::NotifyHandlers () {
     803
     804  if (fVerbosity >= confirmations) {
     805    G4cout << "G4VisManager::NotifyHandler() called." << G4endl;
     806  }
     807
     808  // Check scenes.
     809  G4SceneList& sceneList = fSceneList;
     810  G4int iScene, nScenes = sceneList.size ();
     811  for (iScene = 0; iScene < nScenes; iScene++) {
     812    G4Scene* pScene = sceneList [iScene];
     813    std::vector<G4VModel*>& modelList = pScene -> SetRunDurationModelList ();
     814   
     815    if (modelList.size ()) {
     816      pScene->CalculateExtent();
     817      G4UImanager::GetUIpointer () ->
     818        ApplyCommand (G4String("/vis/scene/notifyHandlers " + pScene->GetName()));
     819    }
     820  }
     821
     822  // Check the manager's current scene...
     823  if (fpScene && fpScene -> GetRunDurationModelList ().size () == 0) {
     824    if (fVerbosity >= warnings) {
     825      G4cout << "WARNING: The current scene \""
     826             << fpScene -> GetName ()
     827             << "\" has no models."
     828             << G4endl;
     829    }
     830  }
     831
     832}
    802833
    803834G4bool G4VisManager::FilterTrajectory(const G4VTrajectory& trajectory)
Note: See TracChangeset for help on using the changeset viewer.