Geant4  10.03.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
perspective.cc File Reference

Main program of the visualization/perspective example. More...

#include "globals.hh"
#include "G4VisExecutive.hh"
#include "G4VisExtent.hh"
#include "G4UImanager.hh"
#include "G4UIExecutive.hh"
#include "G4SystemOfUnits.hh"
#include "PerspectiveVisAction.hh"
Include dependency graph for perspective.cc:

Go to the source code of this file.

Functions

int main (int argc, char **argv)
 

Detailed Description

Main program of the visualization/perspective example.

Definition in file perspective.cc.

Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 47 of file perspective.cc.

47  {
48 
49  G4VisManager* visManager = new G4VisExecutive;
50  visManager->Initialise();
51 
52  visManager->SetUserAction
54  G4VisExtent(-100*m,100*m,-100*m,100*m,-100*m,100*m));
55 
56  G4String command = "/control/execute ";
57  G4String fileName = "vis.mac";
58  if (argc > 1) { // Macro name supplied.
59  fileName = argv[1];
60  }
61  G4UIExecutive* ui = new G4UIExecutive(argc,argv);
62  G4UImanager::GetUIpointer()->ApplyCommand(command+fileName);
63  ui->SessionStart();
64 
65  delete ui;
66  delete visManager;
67 }
void Initialise()
static G4UImanager * GetUIpointer()
Definition: G4UImanager.cc:59
static constexpr double m
Definition: G4SIunits.hh:129
void SetUserAction(G4VUserVisAction *pVisAction, const G4VisExtent &=G4VisExtent::NullExtent)
G4int ApplyCommand(const char *aCommand)
Definition: G4UImanager.cc:447

Here is the call graph for this function: