Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4VViewer.cc
Go to the documentation of this file.
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26//
27//
28//
29// John Allison 27th March 1996
30// Abstract interface class for graphics views.
31
32#include "G4VViewer.hh"
33
35#include "G4Scene.hh"
36#include "G4Timer.hh"
37#include "G4Transform3D.hh"
38#include "G4UImanager.hh"
39#include "G4UIsession.hh"
40#include "G4VGraphicsSystem.hh"
42#include "G4VPhysicalVolume.hh"
43#include "G4VSceneHandler.hh"
44#include "G4VisManager.hh"
45#include "G4ios.hh"
46
47#include <sstream>
48
49G4VViewer::G4VViewer(G4VSceneHandler& sceneHandler, G4int id, const G4String& name)
50: fSceneHandler(sceneHandler)
51, fViewId(id)
52, fNeedKernelVisit(true)
54{
55 if (name == "") {
56 std::ostringstream ost;
57 ost << fSceneHandler.GetName() << '-' << fViewId;
58 fName = ost.str();
59 }
60 else {
61 fName = name;
62 }
63 fShortName = fName.substr(0, fName.find(' '));
65
66 fVP = G4VisManager::GetInstance()->GetDefaultViewParameters();
68
70 fSceneTree.SetDescription(fName);
71}
72
74{
75 fSceneHandler.RemoveViewerFromList(this);
76}
77
79{
80 fName = name;
81 fShortName = fName.substr(0, fName.find(' '));
83}
84
86{
87 fNeedKernelVisit = true;
88
89 // At one time I thought we'd better notify all viewers. But I guess
90 // each viewer can take care of itself, so the following code is
91 // redundant (but keep it commented out for now). (John Allison)
92 // Notify all viewers that a kernel visit is required.
93 // const G4ViewerList& viewerList = fSceneHandler.GetViewerList ();
94 // G4ViewerListConstIterator i;
95 // for (i = viewerList.begin(); i != viewerList.end(); i++) {
96 // (*i) -> SetNeedKernelVisit ();
97 // }
98 // ??...but, there's a problem in OpenGL Stored which seems to
99 // require *all* viewers to revisit the kernel, so...
100 // const G4ViewerList& viewerList = fSceneHandler.GetViewerList ();
101 // G4ViewerListConstIterator i;
102 // for (i = viewerList.begin(); i != viewerList.end(); i++) {
103 // (*i) -> SetNeedKernelVisit (true);
104 // }
105 // Feb 2005 - commented out. Let's fix OpenGL if necessary.
106}
107
109
111
113{
114 // If the scene has changed, or if the concrete viewer has decided
115 // that it necessary to visit the kernel, perhaps because the view
116 // parameters have changed significantly (this should be done in the
117 // concrete viewer's DrawView)...
118 if (fNeedKernelVisit) {
119 // Reset flag. This must be done before ProcessScene to prevent
120 // recursive calls when recomputing transients...
121 G4Timer timer;
122 timer.Start();
123 fNeedKernelVisit = false;
124 fSceneHandler.ClearStore();
125 fSceneHandler.ProcessScene();
128 timer.Stop();
130 }
131}
132
134{
135 // If transients change, e.g., a time window change...
137 // First, reset the flag - see comment above about recursive calls.
139 fSceneHandler.ClearTransientStore();
140 fSceneHandler.ProcessTransients();
141 }
142}
143
145
146 G4double sceneWidth = GetSceneNearWidth();
147 unsigned int winWidth = 0, winHeight = 0;
148 G4bool winSizeOk = GetWindowSize(winWidth, winHeight);
149
150 if ((fVP.IsZoomToCursor() || shift) && sceneWidth > 0 && winSizeOk) {
151
152 // Compute mouse position in scene coordinates
153 G4double minWidth = winWidth > winHeight ? winHeight : winWidth;
154 G4double px = xPos - G4double(winWidth) / 2;
155 G4double py = -(yPos - G4double(winHeight) / 2);
156 G4double xi = px * sceneWidth / minWidth;
157 G4double yi = py * sceneWidth / minWidth;
158
159 // ZoomToCursor enabled
160 if (fVP.GetFieldHalfAngle() == 0.) {
161 // Orthographic projection
162 G4double zoomFactor = 1. + std::abs(double(delta)) / 1200;
163 if (delta < 0) zoomFactor = 1. / zoomFactor;
164
165 G4double xf = xi / zoomFactor;
166 G4double yf = yi / zoomFactor;
167
168 G4double deltaX = xf - xi;
169 G4double deltaY = yf - yi;
170
171 fVP.MultiplyZoomFactor(zoomFactor);
172 fVP.IncrementPan(-deltaX, -deltaY, 0);
173 }
174 else {
175 // Perspective projection
176 G4double radius = fSceneHandler.GetScene()->GetExtent().GetExtentRadius();
177 if (radius <= 0.) radius = 1.;
178 const G4double cameraDistance = fVP.GetCameraDistance(radius);
179 const G4double pnear = fVP.GetNearDistance(cameraDistance, radius);
180
181 G4double deltaDolly = 0.1 * cameraDistance * std::abs(delta) / 120;
182 if (delta < 0) deltaDolly = -deltaDolly;
183
184 G4double deltaX = -xi * deltaDolly / pnear;
185 G4double deltaY = -yi * deltaDolly / pnear;
186
187 // This condition prevents going too deeply into the scene, but what if there are volumes with very different sizes?
188 // if(deltaDolly<0 || cameraDistance > radius / std::sin(fVP.GetFieldHalfAngle()) * 1e-2)
189 fVP.IncrementDolly(deltaDolly);
190 fVP.IncrementPan(-deltaX, -deltaY, 0);
191 }
192 }
193 else {
194 // ZoomToCursor disabled
195 if (fVP.GetFieldHalfAngle() == 0.) {
196 // Orthographic projection
197 G4double zoomFactor = 1. + std::abs(double(delta)) / 1200;
198 if (delta < 0) zoomFactor = 1. / zoomFactor;
199 fVP.MultiplyZoomFactor(zoomFactor);
200 }
201 else {
202 // Perspective projection
203 G4double radius = fSceneHandler.GetScene()->GetExtent().GetExtentRadius();
204 if (radius <= 0.) radius = 1.;
205 const G4double cameraDistance = fVP.GetCameraDistance(radius);
206
207 G4double deltaDolly = 0.1 * cameraDistance * std::abs(delta) / 120;
208 if (delta < 0) deltaDolly = -deltaDolly;
209 // This condition prevents going too deeply into the scene, but what if there are volumes with very different sizes?
210 //if (deltaDolly < 0 || cameraDistance > radius / std::sin(fVP.GetFieldHalfAngle()) * 1e-2)
211 fVP.IncrementDolly(deltaDolly);
212 }
213 }
214}
215
217{
218 fVP = vp;
219}
220
222 const std::vector<G4PhysicalVolumeModel::G4PhysicalVolumeNodeID>& fullPath)
223{
224 // Set the touchable for /vis/touchable/set/... commands.
225 std::ostringstream oss;
226 const auto& pvStore = G4PhysicalVolumeStore::GetInstance();
227 for (const auto& pvNodeId : fullPath) {
228 const auto& pv = pvNodeId.GetPhysicalVolume();
229 auto iterator = find(pvStore->cbegin(), pvStore->cend(), pv);
230 if (iterator == pvStore->cend()) {
232 ed << "Volume no longer in physical volume store.";
233 G4Exception("G4VViewer::SetTouchable", "visman0401", JustWarning, ed);
234 }
235 else {
236 oss << ' ' << pvNodeId.GetPhysicalVolume()->GetName() << ' ' << pvNodeId.GetCopyNo();
237 }
238 }
239 G4UImanager::GetUIpointer()->ApplyCommand("/vis/set/touchable" + oss.str());
240}
241
243 const std::vector<G4PhysicalVolumeModel::G4PhysicalVolumeNodeID>& fullPath, G4bool visibiity)
244{
245 // Changes the Vis Attribute Modifiers and scene tree WITHOUT triggering a rebuild.
246
247 // The following is equivalent to
248 // G4UImanager::GetUIpointer()->ApplyCommand("/vis/touchable/set/visibility ...");
249 // (assuming the touchable has already been set), but avoids view rebuild.
250
251 // Instantiate a working copy of a G4VisAttributes object...
252 G4VisAttributes workingVisAtts;
253 // and set the visibility.
254 workingVisAtts.SetVisibility(visibiity);
255
256 fVP.AddVisAttributesModifier(G4ModelingParameters::VisAttributesModifier(
259 // G4ModelingParameters::VASVisibility (VAS = Vis Attribute Signifier)
260 // signifies that it is the visibility that should be picked out
261 // and merged with the touchable's normal vis attributes.
262
263 // Find scene tree item and set visibility
264 // The scene tree works with strings
265 G4String fullPathString = G4PhysicalVolumeModel::GetPVNamePathString(fullPath);
266 std::list<G4SceneTreeItem>::iterator foundIter;
267 if (fSceneTree.FindTouchableFromRoot(fullPathString, foundIter)) {
268 foundIter->AccessVisAttributes().SetVisibility(visibiity);
270 }
271 else {
273 ed << "Touchable \"" << fullPath << "\" not found";
274 G4Exception("G4VViewer::TouchableSetVisibility", "visman0402", JustWarning, ed);
275 }
276}
277
279 const std::vector<G4PhysicalVolumeModel::G4PhysicalVolumeNodeID>& fullPath,
280 const G4Colour& colour)
281{
282 // Changes the Vis Attribute Modifiers and scene tree WITHOUT triggering a rebuild.
283
284 // The following is equivalent to
285 // G4UImanager::GetUIpointer()->ApplyCommand("/vis/touchable/set/colour ...");
286 // (assuming the touchable has already been set), but avoids view rebuild.
287
288 // Instantiate a working copy of a G4VisAttributes object...
289 G4VisAttributes workingVisAtts;
290 // and set the colour.
291 workingVisAtts.SetColour(colour);
292
293 fVP.AddVisAttributesModifier(G4ModelingParameters::VisAttributesModifier(
294 workingVisAtts, G4ModelingParameters::VASColour,
296 // G4ModelingParameters::VASColour (VAS = Vis Attribute Signifier)
297 // signifies that it is the colour that should be picked out
298 // and merged with the touchable's normal vis attributes.
299
300 // Find scene tree item and set colour
301 // The scene tree works with strings
302 G4String fullPathString = G4PhysicalVolumeModel::GetPVNamePathString(fullPath);
303 std::list<G4SceneTreeItem>::iterator foundIter;
304 if (fSceneTree.FindTouchableFromRoot(fullPathString, foundIter)) {
305 foundIter->AccessVisAttributes().SetColour(colour);
307 }
308 else {
310 ed << "Touchable \"" << fullPath << "\" not found";
311 G4Exception("G4VViewer::TouchableSetColour", "visman0403", JustWarning, ed);
312 }
313}
314
316{
318 auto uiWindow = dynamic_cast<G4VInteractiveSession*>(UI->GetG4UIWindow());
319 if (uiWindow) uiWindow->UpdateSceneTree(fSceneTree);
320}
321
327
329{
331 auto uiWindow = dynamic_cast<G4VInteractiveSession*>(UI->GetG4UIWindow());
332 if (uiWindow) uiWindow->UpdateDrawingStyle(fVP.GetDrawingStyle());
333}
336 auto uiWindow = dynamic_cast<G4VInteractiveSession*>(UI->GetG4UIWindow());
337 if (uiWindow) uiWindow->UpdateProjectionStyle(fVP.GetFieldHalfAngle() == 0 ? 0 : 1);
338}
341 auto uiWindow = dynamic_cast<G4VInteractiveSession*>(UI->GetG4UIWindow());
342 if (uiWindow)
343 uiWindow->UpdateTransparencySlider(fVP.GetTransparencyByDepth(), fVP.GetTransparencyByDepthOption());
344}
345
347{
348 const auto& modelType = model->GetType();
349 const auto& modelDescription = model->GetGlobalDescription();
350
351 auto type = G4SceneTreeItem::model;
352 auto pvModel = dynamic_cast<G4PhysicalVolumeModel*>(model);
353 if (pvModel) type = G4SceneTreeItem::pvmodel;
354
355 fCurtailDescent = false; // This is used later in SceneTreeScene::ProcessVolume
356 G4String furtherInfo;
357 static G4bool firstWarning = true;
358 G4bool warned = false;
359 if (pvModel) {
360 const auto& nAllTouchables = pvModel->GetTotalAllTouchables();
361 if (nAllTouchables > fMaxAllTouchables) {
362 std::ostringstream oss;
363 oss << nAllTouchables << " touchables - too many for scene tree";
364 furtherInfo = oss.str();
365 if (firstWarning) {
366 warned = true;
367 if (G4VisManager::GetInstance()->GetVerbosity() >= G4VisManager::warnings) {
369 ed << pvModel->GetGlobalDescription() <<
370 ":\n Too many touchables (" << nAllTouchables
371 << ") for scene tree. Scene tree for this model will be empty.";
372 G4Exception("G4VViewer::InsertModelInSceneTree", "visman0404", JustWarning, ed);
373 }
374 }
375 fCurtailDescent = true; // This is used later in SceneTreeScene::ProcessVolume
376 }
377 }
378 if (warned) firstWarning = false;
379
380 // Find appropriate model
381 auto& modelItems = fSceneTree.AccessChildren();
382 auto modelIter = modelItems.begin();
383 auto pvModelIter = modelItems.end();
384 for (; modelIter != modelItems.end(); ++modelIter) {
385 if (modelIter->GetType() == G4SceneTreeItem::pvmodel) {
386 pvModelIter = modelIter; // Last pre-existing PV model (if any)
387 }
388 if (modelIter->GetModelDescription() == modelDescription) break;
389 }
390
391 if (modelIter == modelItems.end()) { // Model not seen before
392 G4SceneTreeItem modelItem(type);
393 modelItem.SetDescription("model");
394 modelItem.SetModelType(modelType);
395 modelItem.SetModelDescription(modelDescription);
396 modelItem.SetFurtherInfo(furtherInfo);
397 if (pvModelIter != modelItems.end() && // There was pre-existing PV Model...
398 type == G4SceneTreeItem::pvmodel) { // ...and the new model is also PV...
399 fSceneTree.InsertChild(++pvModelIter, modelItem); // ...insert after, else...
400 } else {
401 fSceneTree.InsertChild(modelIter, modelItem); // ...insert at end
402 }
403 } else { // Existing model - mark visible == active
404 modelIter->AccessVisAttributes().SetVisibility(true);
405 }
406}
407
409: fpViewer (pViewer)
410, fpPVModel(pPVModel)
411{
412 if (fpPVModel == nullptr) {
413 G4Exception("G4VViewer::SceneTreeScene::SceneTreeScene", "visman0405", FatalException,
414 "G4PhysicalVolumeModel pointer is null");
415 return; // To keep Coverity happy
416 }
417
418 // Limit the expanded depth to limit the number expanded so as not to swamp the GUI
419 G4int expanded = 0;
420 for (const auto& dn : fpPVModel->GetMapOfDrawnTouchables()) {
421 expanded += dn.second;
422 if (fMaximumExpandedDepth < dn.first) fMaximumExpandedDepth = dn.first;
423 if (expanded > fMaximumExpanded) break;
424 }
425
426 // Find appropriate model and its iterator
427 const auto& modelID = fpPVModel->GetGlobalDescription();
428 auto& modelItems = fpViewer->fSceneTree.AccessChildren();
429 fModelIter = modelItems.begin();
430 for (; fModelIter != modelItems.end(); ++fModelIter) {
431 if (fModelIter->GetModelDescription() == modelID) break;
432 }
433 if (fModelIter == modelItems.end()) {
434 G4Exception("G4VViewer::SceneTreeScene::SceneTreeScene", "visman0406", JustWarning,
435 "Model not found");
436 }
437}
438
439void G4VViewer::SceneTreeScene::ProcessVolume(const G4VSolid&)
440{
441 if (fpViewer->fCurtailDescent) {
442 fpPVModel->CurtailDescent();
443 return;
444 }
445
446 const auto& modelID = fpPVModel->GetGlobalDescription();
447
448 std::ostringstream oss;
449 oss << fpPVModel->GetFullPVPath(); // of this volume
450 G4String fullPathString(oss.str()); // Has a leading space
451
452 // Navigate scene tree and find or insert touchables one by one
453 // Work down the path - "name id", then "name id name id", etc.
454 const auto& nodeIDs = fpPVModel->GetFullPVPath();
455 G4String partialPathString;
456 auto currentIter = fModelIter;
457 G4int depth = 0;
458 for (const auto& nodeID : nodeIDs) {
459 std::ostringstream oss1;
460 oss1 << nodeID;
461 partialPathString += ' ' + oss1.str();
462 currentIter =
463 FindOrInsertTouchable(modelID, *currentIter, ++depth, partialPathString, fullPathString);
464 }
465}
466
467// clang-format off
468std::list<G4SceneTreeItem>::iterator G4VViewer::SceneTreeScene::FindOrInsertTouchable
469 (const G4String& modelID, G4SceneTreeItem& mother,
470 G4int depth, const G4String& partialPathString, const G4String& fullPathString)
471{
472 auto& children = mother.AccessChildren();
473 auto childIter = children.begin();
474 for (; childIter != children.end(); ++childIter) {
475 if (childIter->GetPVPath() == partialPathString) break;
476 }
477 if (childIter != children.end()) {
478
479 // Item already exists
480
481 if (childIter->GetType() == G4SceneTreeItem::ghost) {
482
483 // Previously it was a ghost - but maybe this time it's real
484
485 if (partialPathString == fullPathString) {
486 // Partial path string refers to the actual volume so it's a touchable
487 childIter->SetType(G4SceneTreeItem::touchable);
488 // Populate with information
489 childIter->SetDescription(fpPVModel->GetCurrentTag());
490 childIter->SetModelType(fpPVModel->GetType());
491 childIter->SetModelDescription(modelID);
492 childIter->SetPVPath(partialPathString);
493 if (fpVisAttributes) childIter->SetVisAttributes(*fpVisAttributes);
494 childIter->SetAttDefs(fpPVModel->GetAttDefs());
495 childIter->SetAttValues(fpPVModel->CreateCurrentAttValues());
496 } // Partial path string refers to an ancester - do nothing
497
498 } else {
499
500 // Already a pre-existing full touchable
501
502 if (partialPathString == fullPathString) {
503 // Partial path string refers to the actual volume
504 // Replace vis attributes (if any) - they might have changed
505 if (fpVisAttributes) childIter->SetVisAttributes(*fpVisAttributes);
506 } // Partial path string refers to an ancester - do nothing
507
508 }
509
510 } else {
511
512 // Item does not yet exist
513
514 if (partialPathString == fullPathString) {
515
516 // Partial path string refers to the actual volume
517 // Insert new touchable item
518 G4SceneTreeItem touchable(G4SceneTreeItem::touchable);
519 touchable.SetExpanded(depth > fMaximumExpandedDepth? false: true);
520 touchable.SetDescription(fpPVModel->GetCurrentTag());
521 touchable.SetModelType(fpPVModel->GetType());
522 touchable.SetModelDescription(modelID);
523 touchable.SetPVPath(partialPathString);
524 if (fpVisAttributes) touchable.SetVisAttributes(*fpVisAttributes);
525 touchable.SetAttDefs(fpPVModel->GetAttDefs());
526 touchable.SetAttValues(fpPVModel->CreateCurrentAttValues());
527 childIter = mother.InsertChild(childIter,touchable);
528
529 } else {
530
531 // Partial path string refers to an ancester - it's what we call a "ghost"
532 G4SceneTreeItem ghost(G4SceneTreeItem::ghost);
533 ghost.SetExpanded(depth > fMaximumExpandedDepth? false: true);
534 // Create a tag from the partial path
535 std::istringstream iss(partialPathString);
536 G4String name, copyNo;
537 while (iss >> name >> copyNo);
538 std::ostringstream oss;
539 oss << name << ':' << copyNo;
540 ghost.SetDescription(oss.str());
541 ghost.SetModelType(fpPVModel->GetType());
542 ghost.SetModelDescription(modelID);
543 ghost.SetPVPath(partialPathString);
544 ghost.AccessVisAttributes().SetVisibility(false);
545 childIter = mother.InsertChild(childIter,ghost);
546 }
547 }
548
549 return childIter;
550}
551// clang-format on
552
553std::ostream& operator<<(std::ostream& os, const G4VViewer& v)
554{
555 os << "View " << v.fName << ":\n";
556 os << v.fVP;
557 return os;
558}
@ JustWarning
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
double G4double
Definition G4Types.hh:83
bool G4bool
Definition G4Types.hh:86
int G4int
Definition G4Types.hh:85
static G4String GetPVNamePathString(const std::vector< G4PhysicalVolumeNodeID > &)
static G4ModelingParameters::PVNameCopyNoPath GetPVNameCopyNoPath(const std::vector< G4PhysicalVolumeNodeID > &)
static G4PhysicalVolumeStore * GetInstance()
void SetModelDescription(const G4String &modelDescription)
void SetDescription(const G4String &description)
std::list< G4SceneTreeItem > & AccessChildren()
std::list< G4SceneTreeItem >::iterator InsertChild(std::list< G4SceneTreeItem >::iterator pos, const G4SceneTreeItem &item)
void SetFurtherInfo(const G4String &furtherInfo)
void SetModelType(const G4String &modelType)
void Stop()
void Start()
G4double GetRealElapsed() const
Definition G4Timer.cc:113
G4int ApplyCommand(const char *aCommand)
G4UIsession * GetG4UIWindow() const
static G4UImanager * GetUIpointer()
virtual void UpdateTransparencySlider(G4double depth, G4int option)
virtual void UpdateSceneTree(const G4SceneTreeItem &)
virtual void UpdateDrawingStyle(G4int style)
virtual void UpdateProjectionStyle(G4int style)
const G4String & GetGlobalDescription() const
const G4String & GetType() const
G4VSolid is an abstract base class for solids, physical shapes that can be tracked through....
Definition G4VSolid.hh:80
SceneTreeScene(G4VViewer *, G4PhysicalVolumeModel *)
Definition G4VViewer.cc:408
void SetTouchable(const std::vector< G4PhysicalVolumeModel::G4PhysicalVolumeNodeID > &fullPath)
Definition G4VViewer.cc:221
G4bool fNeedKernelVisit
Definition G4VViewer.hh:280
void SetName(const G4String &)
Definition G4VViewer.cc:78
friend std::ostream & operator<<(std::ostream &os, const G4VViewer &v)
Definition G4VViewer.cc:553
const G4int fMaxAllTouchables
Definition G4VViewer.hh:198
virtual G4double GetSceneNearWidth()
Definition G4VViewer.hh:243
void ProcessView()
Definition G4VViewer.cc:112
G4VSceneHandler & fSceneHandler
Definition G4VViewer.hh:268
G4String fShortName
Definition G4VViewer.hh:271
G4double fKernelVisitElapsedTimeSeconds
Definition G4VViewer.hh:274
void UpdateGUITransparencySlider()
Definition G4VViewer.cc:339
virtual ~G4VViewer()
Definition G4VViewer.cc:73
void ProcessTransients()
Definition G4VViewer.cc:133
void UpdateGUIControlWidgets()
Definition G4VViewer.cc:322
void UpdateGUISceneTree()
Definition G4VViewer.cc:315
G4String fName
Definition G4VViewer.hh:270
void InsertModelInSceneTree(G4VModel *)
Definition G4VViewer.cc:346
void NeedKernelVisit()
Definition G4VViewer.cc:85
G4ViewParameters fDefaultVP
Definition G4VViewer.hh:273
G4int fViewId
Definition G4VViewer.hh:269
G4bool fCurtailDescent
Definition G4VViewer.hh:199
G4bool fTransientsNeedRedrawing
Definition G4VViewer.hh:281
void UpdateGUIDrawingStyle()
Definition G4VViewer.cc:328
virtual G4bool GetWindowSize(unsigned int &a_w, unsigned int &a_h)
Definition G4VViewer.hh:242
void TouchableSetVisibility(const std::vector< G4PhysicalVolumeModel::G4PhysicalVolumeNodeID > &fullPath, G4bool visibility)
Definition G4VViewer.cc:242
G4ViewParameters fVP
Definition G4VViewer.hh:272
void UpdateGUIProjectionStyle()
Definition G4VViewer.cc:334
virtual void FinishView()
Definition G4VViewer.cc:108
G4VViewer(G4VSceneHandler &, G4int id, const G4String &name="")
Definition G4VViewer.cc:49
void SetViewParameters(const G4ViewParameters &vp)
Definition G4VViewer.cc:216
void TouchableSetColour(const std::vector< G4PhysicalVolumeModel::G4PhysicalVolumeNodeID > &fullPath, const G4Colour &)
Definition G4VViewer.cc:278
virtual void ShowView()
Definition G4VViewer.cc:110
void ZoomFromMouseWheel(G4double delta, G4bool shift=false, G4double xPos=0, G4double yPos=0)
Definition G4VViewer.cc:144
G4SceneTreeItem fSceneTree
Definition G4VViewer.hh:276
void SetColour(const G4Colour &)
void SetVisibility(G4bool=true)
static G4VisManager * GetInstance()
const char * name(G4int ptype)
void strip(G4String &str, char ch=' ')
Remove leading and trailing characters from string.