Geant4  10.02.p03
G4VisCommandViewerScale Class Reference

#include <G4VisCommandsViewer.hh>

Inheritance diagram for G4VisCommandViewerScale:
Collaboration diagram for G4VisCommandViewerScale:

Public Member Functions

 G4VisCommandViewerScale ()
 
virtual ~G4VisCommandViewerScale ()
 
G4String GetCurrentValue (G4UIcommand *command)
 
void SetNewValue (G4UIcommand *command, G4String newValue)
 
- Public Member Functions inherited from G4VVisCommandViewer
 G4VVisCommandViewer ()
 
virtual ~G4VVisCommandViewer ()
 
- Public Member Functions inherited from G4VVisCommand
 G4VVisCommand ()
 
virtual ~G4VVisCommand ()
 
- Public Member Functions inherited from G4UImessenger
 G4UImessenger ()
 
 G4UImessenger (const G4String &path, const G4String &dsc, G4bool commandsToBeBroadcasted=true)
 
virtual ~G4UImessenger ()
 
G4bool operator== (const G4UImessenger &messenger) const
 
G4bool CommandsShouldBeInMaster () const
 

Private Member Functions

 G4VisCommandViewerScale (const G4VisCommandViewerScale &)
 
G4VisCommandViewerScaleoperator= (const G4VisCommandViewerScale &)
 

Private Attributes

G4UIcmdWith3VectorfpCommandScale
 
G4UIcmdWith3VectorfpCommandScaleTo
 
G4Vector3D fScaleMultiplier
 
G4Vector3D fScaleTo
 

Additional Inherited Members

- Static Public Member Functions inherited from G4VVisCommand
static void SetVisManager (G4VisManager *)
 
static const G4ColourGetCurrentColour ()
 
static G4double GetCurrentLineWidth ()
 
static const G4ColourGetCurrentTextColour ()
 
static G4Text::Layout GetCurrentTextLayout ()
 
static G4double GetCurrentTextSize ()
 
- Protected Member Functions inherited from G4VVisCommandViewer
void SetViewParameters (G4VViewer *, const G4ViewParameters &)
 
void RefreshIfRequired (G4VViewer *)
 
- Protected Member Functions inherited from G4VVisCommand
void UpdateVisManagerScene (const G4String &sceneName="")
 
- Protected Member Functions inherited from G4UImessenger
G4String ItoS (G4int i)
 
G4String DtoS (G4double a)
 
G4String BtoS (G4bool b)
 
G4int StoI (G4String s)
 
G4double StoD (G4String s)
 
G4bool StoB (G4String s)
 
void AddUIcommand (G4UIcommand *newCommand)
 
void CreateDirectory (const G4String &path, const G4String &dsc, G4bool commandsToBeBroadcasted=true)
 
template<typename T >
T * CreateCommand (const G4String &cname, const G4String &dsc)
 
- Static Protected Member Functions inherited from G4VVisCommand
static G4String ConvertToString (G4double x, G4double y, const char *unitName)
 
static void ConvertToDoublePair (const G4String &paramString, G4double &xval, G4double &yval)
 
- Protected Attributes inherited from G4UImessenger
G4UIdirectorybaseDir
 
G4String baseDirName
 
G4bool commandsShouldBeInMaster
 
- Static Protected Attributes inherited from G4VVisCommand
static G4VisManagerfpVisManager = 0
 
static G4Colour fCurrentColour = G4Colour::White()
 
static G4double fCurrentLineWidth = 1.
 
static G4Colour fCurrentTextColour = G4Colour::Blue()
 
static G4Text::Layout fCurrentTextLayout = G4Text::left
 
static G4double fCurrentTextSize = 12.
 
static G4ModelingParameters::PVNameCopyNoPath fCurrentTouchablePath
 

Detailed Description

Definition at line 260 of file G4VisCommandsViewer.hh.

Constructor & Destructor Documentation

◆ G4VisCommandViewerScale() [1/2]

G4VisCommandViewerScale::G4VisCommandViewerScale ( )

Definition at line 1434 of file G4VisCommandsViewer.cc.

1434  :
1435  fScaleMultiplier (G4Vector3D (1., 1., 1.)),
1436  fScaleTo (G4Vector3D (1., 1., 1.))
1437 {
1438  G4bool omitable, currentAsDefault;
1439 
1441  ("/vis/viewer/scale", this);
1442  fpCommandScale -> SetGuidance ("Incremental (non-uniform) scaling.");
1443  fpCommandScale -> SetGuidance
1444  ("Multiplies components of current scaling by components of this factor."
1445  "\n Scales (x,y,z) by corresponding components of the resulting factor.");
1446  fpCommandScale -> SetGuidance
1447  ("");
1448  fpCommandScale -> SetParameterName
1449  ("x-scale-multiplier","y-scale-multiplier","z-scale-multiplier",
1450  omitable=true, currentAsDefault=true);
1451 
1453  ("/vis/viewer/scaleTo", this);
1454  fpCommandScaleTo -> SetGuidance ("Absolute (non-uniform) scaling.");
1455  fpCommandScaleTo -> SetGuidance
1456  ("Scales (x,y,z) by corresponding components of this factor.");
1457  fpCommandScaleTo -> SetParameterName
1458  ("x-scale-factor","y-scale-factor","z-scale-factor",
1459  omitable=true, currentAsDefault=true);
1460 }
G4UIcmdWith3Vector * fpCommandScaleTo
bool G4bool
Definition: G4Types.hh:79
G4UIcmdWith3Vector * fpCommandScale

◆ ~G4VisCommandViewerScale()

G4VisCommandViewerScale::~G4VisCommandViewerScale ( )
virtual

Definition at line 1462 of file G4VisCommandsViewer.cc.

1462  {
1463  delete fpCommandScale;
1464  delete fpCommandScaleTo;
1465 }
G4UIcmdWith3Vector * fpCommandScaleTo
G4UIcmdWith3Vector * fpCommandScale

◆ G4VisCommandViewerScale() [2/2]

G4VisCommandViewerScale::G4VisCommandViewerScale ( const G4VisCommandViewerScale )
private

Member Function Documentation

◆ GetCurrentValue()

G4String G4VisCommandViewerScale::GetCurrentValue ( G4UIcommand command)
virtual

Reimplemented from G4UImessenger.

Definition at line 1467 of file G4VisCommandsViewer.cc.

1467  {
1468  G4String currentValue;
1469  if (command == fpCommandScale) {
1471  }
1472  else if (command == fpCommandScaleTo) {
1474  }
1475  return currentValue;
1476 }
CLHEP::Hep3Vector G4ThreeVector
static G4String ConvertToString(G4bool boolVal)
Definition: G4UIcommand.cc:371
G4UIcmdWith3Vector * fpCommandScaleTo
G4UIcmdWith3Vector * fpCommandScale
Here is the call graph for this function:

◆ operator=()

G4VisCommandViewerScale& G4VisCommandViewerScale::operator= ( const G4VisCommandViewerScale )
private

◆ SetNewValue()

void G4VisCommandViewerScale::SetNewValue ( G4UIcommand command,
G4String  newValue 
)
virtual

Reimplemented from G4UImessenger.

Definition at line 1478 of file G4VisCommandsViewer.cc.

1479  {
1480 
1481 
1483 
1484  G4VViewer* currentViewer = fpVisManager->GetCurrentViewer();
1485  if (!currentViewer) {
1486  if (verbosity >= G4VisManager::errors) {
1487  G4cerr <<
1488  "ERROR: G4VisCommandsViewerScale::SetNewValue: no current viewer."
1489  << G4endl;
1490  }
1491  return;
1492  }
1493 
1494  G4ViewParameters vp = currentViewer->GetViewParameters();
1495 
1496  if (command == fpCommandScale) {
1499  }
1500  else if (command == fpCommandScaleTo) {
1503  }
1504 
1505  if (verbosity >= G4VisManager::confirmations) {
1506  G4cout << "Scale factor changed to " << vp.GetScaleFactor() << G4endl;
1507  }
1508 
1509  SetViewParameters(currentViewer, vp);
1510 }
G4VViewer * GetCurrentViewer() const
void SetScaleFactor(const G4Vector3D &scaleFactor)
void SetViewParameters(G4VViewer *, const G4ViewParameters &)
G4UIcmdWith3Vector * fpCommandScaleTo
G4GLOB_DLL std::ostream G4cout
static G4ThreeVector GetNew3VectorValue(const char *paramString)
const G4Vector3D & GetScaleFactor() const
G4UIcmdWith3Vector * fpCommandScale
static Verbosity GetVerbosity()
const G4ViewParameters & GetViewParameters() const
#define G4endl
Definition: G4ios.hh:61
void MultiplyScaleFactor(const G4Vector3D &scaleFactorMultiplier)
G4GLOB_DLL std::ostream G4cerr
static G4VisManager * fpVisManager
Here is the call graph for this function:

Member Data Documentation

◆ fpCommandScale

G4UIcmdWith3Vector* G4VisCommandViewerScale::fpCommandScale
private

Definition at line 269 of file G4VisCommandsViewer.hh.

◆ fpCommandScaleTo

G4UIcmdWith3Vector* G4VisCommandViewerScale::fpCommandScaleTo
private

Definition at line 270 of file G4VisCommandsViewer.hh.

◆ fScaleMultiplier

G4Vector3D G4VisCommandViewerScale::fScaleMultiplier
private

Definition at line 271 of file G4VisCommandsViewer.hh.

◆ fScaleTo

G4Vector3D G4VisCommandViewerScale::fScaleTo
private

Definition at line 272 of file G4VisCommandsViewer.hh.


The documentation for this class was generated from the following files: