G4VVisCommand Class Reference

#include <G4VVisCommand.hh>

Inheritance diagram for G4VVisCommand:

G4UImessenger G4VisCommandAbortReviewKeptEvents G4VisCommandDrawTree G4VisCommandDrawView G4VisCommandDrawVolume G4VisCommandEnable G4VisCommandInitialize G4VisCommandList G4VisCommandModelCreate< Factory > G4VisCommandOpen G4VisCommandReviewKeptEvents G4VisCommandSceneHandlerAttach G4VisCommandSceneHandlerCreate G4VisCommandSceneHandlerList G4VisCommandSceneHandlerSelect G4VisCommandSetColour G4VisCommandSetLineWidth G4VisCommandSetTextColour G4VisCommandSetTextLayout G4VisCommandSetTouchable G4VisCommandSpecify G4VisCommandVerbose G4VisCommandViewerDefaultHiddenEdge G4VisCommandViewerDefaultStyle G4VVisCommandGeometry G4VVisCommandScene G4VVisCommandViewer

Public Member Functions

 G4VVisCommand ()
virtual ~G4VVisCommand ()

Static Public Member Functions

static void SetVisManager (G4VisManager *)

Protected Member Functions

void UpdateVisManagerScene (const G4String &sceneName="")

Static Protected Member Functions

static G4String ConvertToString (G4double x, G4double y, const char *unitName)
static void ConvertToDoublePair (const G4String &paramString, G4double &xval, G4double &yval)

Static Protected Attributes

static G4VisManagerfpVisManager = 0
static G4Colour fCurrentColour = G4Colour::White()
static G4Colour fCurrentTextColour = G4Colour::Blue()
static G4Text::Layout fCurrentTextLayout = G4Text::left
static G4double fCurrentLineWidth = 1.
static G4ModelingParameters::PVNameCopyNoPath fCurrentTouchablePath

Detailed Description

Definition at line 47 of file G4VVisCommand.hh.


Constructor & Destructor Documentation

G4VVisCommand::G4VVisCommand (  ) 

Definition at line 48 of file G4VVisCommand.cc.

00048 {}

G4VVisCommand::~G4VVisCommand (  )  [virtual]

Definition at line 50 of file G4VVisCommand.cc.

00050 {}


Member Function Documentation

void G4VVisCommand::ConvertToDoublePair ( const G4String paramString,
G4double xval,
G4double yval 
) [static, protected]

Definition at line 64 of file G4VVisCommand.cc.

References G4UIcommand::ValueOf().

Referenced by G4VisCommandViewerPan::SetNewValue().

00067 {
00068   G4double x, y;
00069   char unts[30];
00070   
00071   std::istringstream is(paramString);
00072   is >> x >> y >> unts;
00073   G4String unt = unts;
00074 
00075   xval = x*G4UIcommand::ValueOf(unt);
00076   yval = y*G4UIcommand::ValueOf(unt);
00077 
00078   return;
00079 }

G4String G4VVisCommand::ConvertToString ( G4double  x,
G4double  y,
const char *  unitName 
) [static, protected]

Definition at line 55 of file G4VVisCommand.cc.

References G4UIcommand::ValueOf().

Referenced by G4VisCommandViewerPan::GetCurrentValue().

00056 {
00057   G4double uv = G4UIcommand::ValueOf(unitName);
00058   
00059   std::ostringstream oss;
00060   oss << x/uv << " " << y/uv << " " << unitName;
00061   return oss.str();
00062 }

void G4VVisCommand::SetVisManager ( G4VisManager  )  [inline, static]

Definition at line 32 of file G4VVisCommand.icc.

References fpVisManager.

Referenced by G4VisManager::G4VisManager().

00032                                                                    {
00033   fpVisManager = pVisManager;
00034 }

void G4VVisCommand::UpdateVisManagerScene ( const G4String sceneName = ""  )  [protected]

Definition at line 82 of file G4VVisCommand.cc.

References G4cout, G4endl, G4UImanager::GetUIpointer(), and G4VisManager::warnings.

Referenced by G4VisCommandViewerRefresh::SetNewValue(), G4VisCommandSceneAddVolume::SetNewValue(), G4VisCommandSceneAddTrajectories::SetNewValue(), G4VisCommandSceneAddText2D::SetNewValue(), G4VisCommandSceneAddText::SetNewValue(), G4VisCommandSceneAddScale::SetNewValue(), G4VisCommandSceneAddLogo2D::SetNewValue(), G4VisCommandSceneAddLogo::SetNewValue(), G4VisCommandSceneAddLogicalVolume::SetNewValue(), G4VisCommandSceneAddLine2D::SetNewValue(), G4VisCommandSceneAddLine::SetNewValue(), G4VisCommandSceneAddHits::SetNewValue(), G4VisCommandSceneAddGhosts::SetNewValue(), G4VisCommandSceneAddFrame::SetNewValue(), G4VisCommandSceneAddEventID::SetNewValue(), G4VisCommandSceneAddDigis::SetNewValue(), G4VisCommandSceneAddDate::SetNewValue(), G4VisCommandSceneAddAxes::SetNewValue(), G4VisCommandSceneAddArrow2D::SetNewValue(), G4VisCommandSceneAddArrow::SetNewValue(), G4VisCommandSceneSelect::SetNewValue(), and G4VisCommandSceneActivateModel::SetNewValue().

00082                             {
00083 
00084   G4VisManager::Verbosity verbosity = fpVisManager->GetVerbosity();
00085 
00086   const G4SceneList& sceneList = fpVisManager -> GetSceneList ();
00087 
00088   G4int iScene, nScenes = sceneList.size ();
00089   for (iScene = 0; iScene < nScenes; iScene++) {
00090     if (sceneList [iScene] -> GetName () == sceneName) break;
00091   }
00092 
00093   G4Scene* pScene = 0;  // Zero unless scene has been found...
00094   if (iScene < nScenes) {
00095     pScene = sceneList [iScene];
00096   }
00097 
00098   if (!pScene) {
00099     if (verbosity >= G4VisManager::warnings) {
00100       G4cout << "WARNING: Scene \"" << sceneName << "\" not found."
00101              << G4endl;
00102     }
00103     return;
00104   }
00105 
00106   fpVisManager -> SetCurrentScene (pScene);
00107 
00108   // Scene has changed.  Refresh viewers of all sceneHandlers using
00109   // this scene...
00110   G4VViewer* pViewer = fpVisManager -> GetCurrentViewer();
00111   G4VSceneHandler* sceneHandler = fpVisManager -> GetCurrentSceneHandler();
00112   if (sceneHandler && sceneHandler -> GetScene ()) {
00113     if (pViewer) {
00114       G4UImanager::GetUIpointer () ->
00115         ApplyCommand ("/vis/scene/notifyHandlers");
00116     }
00117   }
00118 }


Field Documentation

G4Colour G4VVisCommand::fCurrentColour = G4Colour::White() [static, protected]

Definition at line 70 of file G4VVisCommand.hh.

Referenced by G4VisCommandSetColour::SetNewValue(), G4VisCommandSceneAddLine2D::SetNewValue(), G4VisCommandSceneAddLine::SetNewValue(), G4VisCommandSceneAddFrame::SetNewValue(), G4VisCommandSceneAddArrow2D::SetNewValue(), and G4VisCommandSceneAddArrow::SetNewValue().

G4double G4VVisCommand::fCurrentLineWidth = 1. [static, protected]

Definition at line 73 of file G4VVisCommand.hh.

Referenced by G4VisCommandSetLineWidth::SetNewValue(), G4VisCommandSceneAddLine2D::SetNewValue(), G4VisCommandSceneAddLine::SetNewValue(), G4VisCommandSceneAddFrame::SetNewValue(), G4VisCommandSceneAddAxes::SetNewValue(), G4VisCommandSceneAddArrow2D::SetNewValue(), and G4VisCommandSceneAddArrow::SetNewValue().

G4Colour G4VVisCommand::fCurrentTextColour = G4Colour::Blue() [static, protected]

Definition at line 71 of file G4VVisCommand.hh.

Referenced by G4VisCommandSetTextColour::SetNewValue(), G4VisCommandSceneAddText2D::SetNewValue(), and G4VisCommandSceneAddText::SetNewValue().

G4Text::Layout G4VVisCommand::fCurrentTextLayout = G4Text::left [static, protected]

Definition at line 72 of file G4VVisCommand.hh.

Referenced by G4VisCommandSetTextLayout::SetNewValue(), G4VisCommandSceneAddText2D::SetNewValue(), and G4VisCommandSceneAddText::SetNewValue().

G4ModelingParameters::PVNameCopyNoPath G4VVisCommand::fCurrentTouchablePath [static, protected]

Definition at line 77 of file G4VVisCommand.hh.

Referenced by G4VisCommandSetTouchable::SetNewValue().

G4VisManager * G4VVisCommand::fpVisManager = 0 [static, protected]

Definition at line 67 of file G4VVisCommand.hh.

Referenced by G4VVisCommandScene::CurrentSceneName(), G4VisCommandOpen::G4VisCommandOpen(), G4VisCommandSceneHandlerCreate::G4VisCommandSceneHandlerCreate(), G4VisCommandViewerUpdate::GetCurrentValue(), G4VisCommandViewerReset::GetCurrentValue(), G4VisCommandViewerRefresh::GetCurrentValue(), G4VisCommandViewerRebuild::GetCurrentValue(), G4VisCommandViewerCreate::GetCurrentValue(), G4VisCommandViewerClone::GetCurrentValue(), G4VisCommandViewerClearTransients::GetCurrentValue(), G4VisCommandViewerClear::GetCurrentValue(), G4VisCommandSceneHandlerCreate::GetCurrentValue(), G4VisCommandSceneHandlerAttach::GetCurrentValue(), G4VVisCommandViewer::RefreshIfRequired(), G4VisCommandViewerDefaultStyle::SetNewValue(), G4VisCommandViewerDefaultHiddenEdge::SetNewValue(), G4VisCommandViewerZoom::SetNewValue(), G4VisCommandViewerUpdate::SetNewValue(), G4VisCommandViewerSelect::SetNewValue(), G4VisCommandViewerScale::SetNewValue(), G4VisCommandViewerSave::SetNewValue(), G4VisCommandViewerReset::SetNewValue(), G4VisCommandViewerRefresh::SetNewValue(), G4VisCommandViewerRebuild::SetNewValue(), G4VisCommandViewerPan::SetNewValue(), G4VisCommandViewerList::SetNewValue(), G4VisCommandViewerFlush::SetNewValue(), G4VisCommandViewerDolly::SetNewValue(), G4VisCommandViewerCreate::SetNewValue(), G4VisCommandViewerCopyViewFrom::SetNewValue(), G4VisCommandViewerClone::SetNewValue(), G4VisCommandViewerClearTransients::SetNewValue(), G4VisCommandViewerClearCutawayPlanes::SetNewValue(), G4VisCommandViewerClear::SetNewValue(), G4VisCommandViewerChangeCutawayPlane::SetNewValue(), G4VisCommandViewerAddCutawayPlane::SetNewValue(), G4VisCommandSetTouchable::SetNewValue(), G4VisCommandSetTextLayout::SetNewValue(), G4VisCommandSetTextColour::SetNewValue(), G4VisCommandSetLineWidth::SetNewValue(), G4VisCommandSetColour::SetNewValue(), G4VisCommandSceneHandlerSelect::SetNewValue(), G4VisCommandSceneHandlerList::SetNewValue(), G4VisCommandSceneHandlerCreate::SetNewValue(), G4VisCommandSceneHandlerAttach::SetNewValue(), G4VisCommandSceneAddVolume::SetNewValue(), G4VisCommandSceneAddTrajectories::SetNewValue(), G4VisCommandSceneAddText2D::SetNewValue(), G4VisCommandSceneAddText::SetNewValue(), G4VisCommandSceneAddScale::SetNewValue(), G4VisCommandSceneAddLogo2D::SetNewValue(), G4VisCommandSceneAddLogo::SetNewValue(), G4VisCommandSceneAddLogicalVolume::SetNewValue(), G4VisCommandSceneAddLine2D::SetNewValue(), G4VisCommandSceneAddLine::SetNewValue(), G4VisCommandSceneAddHits::SetNewValue(), G4VisCommandSceneAddGhosts::SetNewValue(), G4VisCommandSceneAddFrame::SetNewValue(), G4VisCommandSceneAddEventID::SetNewValue(), G4VisCommandSceneAddDigis::SetNewValue(), G4VisCommandSceneAddDate::SetNewValue(), G4VisCommandSceneAddAxes::SetNewValue(), G4VisCommandSceneAddArrow2D::SetNewValue(), G4VisCommandSceneAddArrow::SetNewValue(), G4VisCommandSceneSelect::SetNewValue(), G4VisCommandSceneNotifyHandlers::SetNewValue(), G4VisCommandSceneList::SetNewValue(), G4VisCommandSceneEndOfRunAction::SetNewValue(), G4VisCommandSceneEndOfEventAction::SetNewValue(), G4VisCommandSceneCreate::SetNewValue(), G4VisCommandSceneActivateModel::SetNewValue(), G4VisCommandGeometryRestore::SetNewValue(), G4VisCommandGeometryList::SetNewValue(), G4VisCommandSpecify::SetNewValue(), G4VisCommandOpen::SetNewValue(), G4VisCommandDrawVolume::SetNewValue(), G4VisCommandDrawView::SetNewValue(), G4VisCommandDrawTree::SetNewValue(), G4VisCommandVerbose::SetNewValue(), G4VisCommandReviewKeptEvents::SetNewValue(), G4VisCommandList::SetNewValue(), G4VisCommandInitialize::SetNewValue(), G4VisCommandEnable::SetNewValue(), G4VisCommandAbortReviewKeptEvents::SetNewValue(), G4VisCommandModelCreate< Factory >::SetNewValue(), and SetVisManager().


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:53:58 2013 for Geant4 by  doxygen 1.4.7