Geant4-11
Public Member Functions | Data Fields | Protected Member Functions | Protected Attributes | Private Attributes
G4VtkQtViewer Class Reference

#include <G4VtkQtViewer.hh>

Inheritance diagram for G4VtkQtViewer:
G4VtkViewer G4VViewer

Public Member Functions

void ClearView ()
 
std::vector< G4ThreeVectorComputeFlyThrough (G4Vector3D *)
 
virtual void CreateMainWindow (QVTKOpenGLNativeWidget *, const QString &)
 
void DrawShadows ()
 
void DrawView ()
 
void DrawViewHUD ()
 
void ExportOBJScene (G4String)
 
void ExportScreenShot (G4String, G4String)
 
void ExportView ()
 
void ExportVRMLScene (G4String)
 
void ExportVTPScene (G4String)
 
void FinishView ()
 
 G4VtkQtViewer (G4VSceneHandler &, const G4String &name)
 
const G4VisAttributesGetApplicableVisAttributes (const G4VisAttributes *) const
 
const G4ViewParametersGetDefaultViewParameters () const
 
const G4StringGetName () const
 
virtual const std::vector< G4ModelingParameters::VisAttributesModifier > * GetPrivateVisAttributesModifiers () const
 
G4VSceneHandlerGetSceneHandler () const
 
const G4StringGetShortName () const
 
G4int GetViewId () const
 
const G4ViewParametersGetViewParameters () const
 
void Initialise ()
 
void NeedKernelVisit ()
 
void ProcessView ()
 
void RefreshView ()
 
virtual void ResetView ()
 
void SetDefaultViewParameters (const G4ViewParameters &vp)
 
void SetGeant4View ()
 
void SetName (const G4String &)
 
void SetNeedKernelVisit (G4bool need)
 
void SetView ()
 
void SetViewParameters (const G4ViewParameters &vp)
 
void ShowView ()
 
virtual ~G4VtkQtViewer ()
 

Data Fields

vtkRenderWindow * _renderWindow
 
vtkNew< vtkCamera > camera
 
vtkNew< vtkGeant4Callbackgeant4Callback
 
vtkNew< vtkInfoCallbackinfoCallback
 
vtkNew< vtkTextActor > infoTextActor
 
vtkSmartPointer< vtkLight > light
 
vtkNew< vtkRenderer > renderer
 
vtkRenderWindowInteractor * renderWindowInteractor
 

Protected Member Functions

void SetTouchable (const std::vector< G4PhysicalVolumeModel::G4PhysicalVolumeNodeID > &fullPath)
 
void TouchableSetColour (const std::vector< G4PhysicalVolumeModel::G4PhysicalVolumeNodeID > &fullPath, const G4Colour &)
 
void TouchableSetVisibility (const std::vector< G4PhysicalVolumeModel::G4PhysicalVolumeNodeID > &fullPath, G4bool visibility)
 

Protected Attributes

G4ViewParameters fDefaultVP
 
G4String fName
 
G4bool fNeedKernelVisit
 
G4VSceneHandlerfSceneHandler
 
G4String fShortName
 
G4int fViewId
 
G4ViewParameters fVP
 

Private Attributes

G4bool firstSetView = true
 
G4UIQtfUiQt
 

Detailed Description

Definition at line 39 of file G4VtkQtViewer.hh.

Constructor & Destructor Documentation

◆ G4VtkQtViewer()

G4VtkQtViewer::G4VtkQtViewer ( G4VSceneHandler sceneHandler,
const G4String name 
)

Definition at line 47 of file G4VtkQtViewer.cc.

47 :
48 G4VtkViewer(sceneHandler, name) {
49}
G4VtkViewer(G4VSceneHandler &, const G4String &name)
Definition: G4VtkViewer.cc:62
const char * name(G4int ptype)

◆ ~G4VtkQtViewer()

G4VtkQtViewer::~G4VtkQtViewer ( )
virtual

Definition at line 51 of file G4VtkQtViewer.cc.

51{}

Member Function Documentation

◆ ClearView()

void G4VtkViewer::ClearView ( void  )
virtualinherited

Implements G4VViewer.

Definition at line 205 of file G4VtkViewer.cc.

205 {
206 vtkActorCollection *actors = renderer->GetActors();
207 vtkActor *actor = actors->GetLastActor();
208
209 while(actor) {
210#ifdef G4VTKDEBUG
211 G4cout << "G4VtkViewer::ClearView() remove actor " << actor << G4endl;
212#endif
213 renderer->RemoveActor(actor);
214 actor = actors->GetLastActor();
215 }
216
217 vtkPropCollection *props = renderer->GetViewProps();
218 vtkProp *prop = props->GetLastProp();
219
220 while(prop) {
221#ifdef G4VTKDEBUG
222 G4cout << "G4VtkViewer::ClearView() remove prop " << prop << G4endl;
223#endif
224 renderer->RemoveViewProp(prop);
225 prop = props->GetLastProp();
226 }
227
228 G4VtkSceneHandler& fVtkSceneHandler =
229 dynamic_cast<G4VtkSceneHandler&>(fSceneHandler);
230 fVtkSceneHandler.Clear();
231}
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
G4VSceneHandler & fSceneHandler
Definition: G4VViewer.hh:215
vtkNew< vtkRenderer > renderer
Definition: G4VtkViewer.hh:185

References G4VtkSceneHandler::Clear(), G4VViewer::fSceneHandler, G4cout, G4endl, and G4VtkViewer::renderer.

◆ ComputeFlyThrough()

std::vector< G4ThreeVector > G4VViewer::ComputeFlyThrough ( G4Vector3D )
inherited

Definition at line 215 of file G4VViewer.cc.

216{
217 enum CurveType {
218 Bezier,
219 G4SplineTest};
220
221 // Choose a curve type (for testing)
222// int myCurveType = Bezier;
223
224 // number if step points
225 int stepPoints = 500;
226
227
228 G4Spline spline;
229
230
231 // At the moment we don't use the aVect parameters, but build it here :
232 // Good step points for exampleB5
233 spline.AddSplinePoint(G4Vector3D(0,1000,-14000));
234 spline.AddSplinePoint(G4Vector3D(0,1000,0));
235 spline.AddSplinePoint(G4Vector3D(-4000,1000,4000));
236
237
238 std::vector <G4ThreeVector> viewVect;
239
240// if(myCurveType == Bezier) {
241
242
243 // Draw the spline
244
245 for (int i = 0; i < stepPoints; i++) {
246 float t = (float)i / (float)stepPoints;
247 G4Vector3D cameraPosition = spline.GetInterpolatedSplinePoint(t);
248 // G4Vector3D targetPoint = spline.GetInterpolatedSplinePoint(t);
249
250 // viewParam->SetViewAndLights(G4ThreeVector (cameraPosition.x(), cameraPosition.y(), cameraPosition.z()));
251 // viewParam->SetCurrentTargetPoint(targetPoint);
252 G4cout << "FLY CR("<< i << "):" << cameraPosition << G4endl;
253 viewVect.push_back(G4ThreeVector (cameraPosition.x(), cameraPosition.y(), cameraPosition.z()));
254 }
255
256// } else if (myCurveType == G4SplineTest) {
257 /*
258 This method is a inspire from a Bezier curve. The problem of the Bezier curve is that the path does not go straight between two waypoints.
259 This method add "stay straight" parameter which could be between 0 and 1 where the pass will follow exactly the line between the waypoints
260 Ex : stay straight = 50%
261 m1 = 3*(P1+P0)/2
262
263 Ex : stay straight = 0%
264 m1 = (P1+P0)/2
265
266 P1
267 / \
268 / \
269 a--x--b
270 / ° ° \
271 / ° ° \
272 m1 m2
273 / \
274 / \
275 / \
276 / \
277 P0 P2
278
279 */
280// G4Vector3D a;
281// G4Vector3D b;
282// G4Vector3D m1;
283// G4Vector3D m2;
284// G4Vector3D P0;
285// G4Vector3D P1;
286// G4Vector3D P2;
287// G4double stayStraight = 0;
288// G4double bezierSpeed = 0.4; // Spend 40% time in bezier curve (time between m1-m2 is 40% of time between P0-P1)
289//
290// G4Vector3D firstPoint;
291// G4Vector3D lastPoint;
292//
293// float nbBezierSteps = (stepPoints * bezierSpeed*(1-stayStraight)) * (2./spline.GetNumPoints());
294// float nbFirstSteps = ((stepPoints/2-nbBezierSteps/2) /(1+stayStraight)) * (2./spline.GetNumPoints());
295//
296// // First points
297// firstPoint = spline.GetPoint(0);
298// lastPoint = (firstPoint + spline.GetPoint(1))/2;
299//
300// for( float j=0; j<1; j+= 1/nbFirstSteps) {
301// G4ThreeVector pt = firstPoint + (lastPoint - firstPoint) * j;
302// viewVect.push_back(pt);
303// G4cout << "FLY Bezier A1("<< viewVect.size()<< "):" << pt << G4endl;
304// }
305//
306// for (int i = 0; i < spline.GetNumPoints()-2; i++) {
307// P0 = spline.GetPoint(i);
308// P1 = spline.GetPoint(i+1);
309// P2 = spline.GetPoint(i+2);
310//
311// m1 = P1 - (P1-P0)*(1-stayStraight)/2;
312// m2 = P1 + (P2-P1)*(1-stayStraight)/2;
313//
314// // We have to get straight path from (middile of P0-P1) to (middile of P0-P1 + (dist P0-P1) * stayStraight/2)
315// if (stayStraight >0) {
316//
317// firstPoint = (P0 + P1)/2;
318// lastPoint = (P0 + P1)/2 + (P1-P0)*stayStraight/2;
319//
320// for( float j=0; j<1; j+= 1/(nbFirstSteps*stayStraight)) {
321// G4ThreeVector pt = firstPoint + (lastPoint - firstPoint)* j;
322// viewVect.push_back(pt);
323// G4cout << "FLY Bezier A2("<< viewVect.size()<< "):" << pt << G4endl;
324// }
325// }
326// // Compute Bezier curve
327// for( float delta = 0 ; delta < 1 ; delta += 1/nbBezierSteps)
328// {
329// // The Green Line
330// a = m1 + ( (P1 - m1) * delta );
331// b = P1 + ( (m2 - P1) * delta );
332//
333// // Final point
334// G4ThreeVector pt = a + ((b-a) * delta );
335// viewVect.push_back(pt);
336// G4cout << "FLY Bezier("<< viewVect.size()<< "):" << pt << G4endl;
337// }
338//
339// // We have to get straight path
340// if (stayStraight >0) {
341// firstPoint = (P1 + P2)/2 - (P2-P1)*stayStraight/2;
342// lastPoint = (P1 + P2)/2;
343//
344// for( float j=0; j<1; j+= 1/(nbFirstSteps*stayStraight)) {
345// G4ThreeVector pt = firstPoint + (lastPoint - firstPoint)* j;
346// viewVect.push_back(pt);
347// G4cout << "FLY Bezier B1("<< viewVect.size()<< "):" << pt << G4endl;
348// }
349// }
350// }
351//
352// // last points
353// firstPoint = spline.GetPoint(spline.GetNumPoints()-2);
354// lastPoint = spline.GetPoint(spline.GetNumPoints()-1);
355// for( float j=1; j>0; j-= 1/nbFirstSteps) {
356// G4ThreeVector pt = lastPoint - ((lastPoint-firstPoint)*((1-stayStraight)/2) * j );
357// viewVect.push_back(pt);
358// G4cout << "FLY Bezier B2("<< viewVect.size()<< "):" << pt << G4endl;
359// }
360// }
361 return viewVect;
362}
HepGeom::Vector3D< G4double > G4Vector3D
Definition: G4Vector3D.hh:34

References G4VViewer::G4Spline::AddSplinePoint(), G4cout, G4endl, G4VViewer::G4Spline::GetInterpolatedSplinePoint(), HepGeom::BasicVector3D< T >::x(), HepGeom::BasicVector3D< T >::y(), and HepGeom::BasicVector3D< T >::z().

◆ CreateMainWindow()

void G4VtkQtViewer::CreateMainWindow ( QVTKOpenGLNativeWidget *  vtkWidget,
const QString &  name 
)
virtual

Definition at line 73 of file G4VtkQtViewer.cc.

74 {
75 // G4Qt* interactorManager = G4Qt::getInstance ();
77 fUiQt = static_cast<G4UIQt*> (UI->GetG4UIWindow());
78 fUiQt->AddTabWidget((QWidget*)vtkWidget,name);
79}
bool AddTabWidget(QWidget *, QString)
Definition: G4UIQt.cc:1860
G4UIsession * GetG4UIWindow() const
Definition: G4UImanager.hh:188
static G4UImanager * GetUIpointer()
Definition: G4UImanager.cc:77
G4UIQt * fUiQt

References G4UIQt::AddTabWidget(), fUiQt, G4UImanager::GetG4UIWindow(), G4UImanager::GetUIpointer(), and G4InuclParticleNames::name().

Referenced by Initialise().

◆ DrawShadows()

void G4VtkViewer::DrawShadows ( )
inherited

Definition at line 266 of file G4VtkViewer.cc.

267{
268 _renderWindow->SetMultiSamples(0);
269
270 vtkNew<vtkShadowMapPass> shadows;
271 vtkNew<vtkSequencePass> seq;
272
273 vtkNew<vtkRenderPassCollection> passes;
274 passes->AddItem(shadows->GetShadowMapBakerPass());
275 passes->AddItem(shadows);
276 seq->SetPasses(passes);
277
278 vtkNew<vtkCameraPass> cameraP;
279 cameraP->SetDelegatePass(seq);
280
281 // tell the renderer to use our render pass pipeline
282 vtkOpenGLRenderer* glrenderer = dynamic_cast<vtkOpenGLRenderer*>(renderer.GetPointer());
283 glrenderer->SetPass(cameraP);
284}
vtkRenderWindow * _renderWindow
Definition: G4VtkViewer.hh:186

References G4VtkViewer::_renderWindow, and G4VtkViewer::renderer.

◆ DrawView()

void G4VtkViewer::DrawView ( )
virtualinherited

Implements G4VViewer.

Definition at line 233 of file G4VtkViewer.cc.

233 {
234 // First, a view should decide when to re-visit the G4 kernel.
235 // Sometimes it might not be necessary, e.g., if the scene is stored
236 // in a graphical database (e.g., OpenGL's display lists) and only
237 // the viewing angle has changed. But graphics systems without a
238 // graphical database will always need to visit the G4 kernel.
239
240 NeedKernelVisit(); // Default is - always visit G4 kernel.
241 // Note: this routine sets the fNeedKernelVisit flag of *all* the
242 // views of the scene.
243
244 ProcessView(); // The basic logic is here.
245
246 // Add HUD
247 DrawViewHUD();
248
249 // ...before finally...
250 FinishView(); // Flush streams and/or swap buffers.
251}
void ProcessView()
Definition: G4VViewer.cc:105
void NeedKernelVisit()
Definition: G4VViewer.cc:78
void FinishView()
Definition: G4VtkViewer.cc:316
void DrawViewHUD()
Definition: G4VtkViewer.cc:253

References G4VtkViewer::DrawViewHUD(), G4VtkViewer::FinishView(), G4VViewer::NeedKernelVisit(), and G4VViewer::ProcessView().

◆ DrawViewHUD()

void G4VtkViewer::DrawViewHUD ( )
inherited

Definition at line 253 of file G4VtkViewer.cc.

254{
255 // make sure text is always visible
257 infoTextActor->GetTextProperty()->SetColor(std::fmod(colour.GetRed() + 0.5, 1.0),
258 std::fmod(colour.GetGreen() + 0.5, 1.0),
259 std::fmod(colour.GetBlue() + 0.5, 1.0));
260 infoTextActor->GetTextProperty()->SetFontSize(20);
261 infoCallback->SetTextActor(infoTextActor);
262 renderer->AddObserver(vtkCommand::EndEvent, infoCallback);
263 renderer->AddActor(infoTextActor);
264}
G4double GetBlue() const
Definition: G4Colour.hh:154
G4double GetRed() const
Definition: G4Colour.hh:152
G4double GetGreen() const
Definition: G4Colour.hh:153
G4ViewParameters fVP
Definition: G4VViewer.hh:219
const G4Colour & GetBackgroundColour() const
vtkNew< vtkTextActor > infoTextActor
Definition: G4VtkViewer.hh:178
vtkNew< vtkInfoCallback > infoCallback
Definition: G4VtkViewer.hh:181

References G4VViewer::fVP, G4ViewParameters::GetBackgroundColour(), G4Colour::GetBlue(), G4Colour::GetGreen(), G4Colour::GetRed(), G4VtkViewer::infoCallback, G4VtkViewer::infoTextActor, and G4VtkViewer::renderer.

Referenced by G4VtkViewer::DrawView().

◆ ExportOBJScene()

void G4VtkViewer::ExportOBJScene ( G4String  path)
inherited

Definition at line 371 of file G4VtkViewer.cc.

372{
373 vtkSmartPointer<vtkRenderWindow> _rw1 = vtkSmartPointer<vtkRenderWindow>::New();
374 _rw1->AddRenderer(_renderWindow->GetRenderers()->GetFirstRenderer());
375 vtkSmartPointer<vtkOBJExporter> exporter = vtkSmartPointer<vtkOBJExporter>::New();
376 exporter->SetRenderWindow(_rw1);
377 exporter->SetFilePrefix(path.c_str());
378 exporter->Write();
379}

References G4VtkViewer::_renderWindow.

◆ ExportScreenShot()

void G4VtkViewer::ExportScreenShot ( G4String  path,
G4String  format 
)
inherited

Definition at line 325 of file G4VtkViewer.cc.

326{
327
328 vtkImageWriter *imWriter = nullptr;
329
330 if(format == "bmp") {
331 imWriter = vtkBMPWriter::New();
332 }
333 else if (format == "jpg") {
334 imWriter = vtkJPEGWriter::New();
335 }
336 else if (format == "pnm") {
337 imWriter = vtkPNMWriter::New();
338 }
339 else if (format == "png") {
340 imWriter = vtkPNGWriter::New();
341 }
342 else if (format == "tiff") {
343 imWriter = vtkTIFFWriter::New();
344 }
345 else if (format == "ps") {
346 imWriter = vtkPostScriptWriter::New();
347 }
348 else {
349 imWriter = vtkPNGWriter::New();
350 }
351
352 _renderWindow->Render();
353
354 vtkSmartPointer<vtkWindowToImageFilter> winToImage = vtkSmartPointer<vtkWindowToImageFilter>::New();
355 winToImage->SetInput(_renderWindow);
356 winToImage->SetScale(1);
357 if(format == "ps")
358 {
359 winToImage->SetInputBufferTypeToRGB();
360 winToImage->ReadFrontBufferOff();
361 winToImage->Update();
362 }
363 else
364 {winToImage->SetInputBufferTypeToRGBA();}
365
366 imWriter->SetFileName((path+"."+format).c_str());
367 imWriter->SetInputConnection(winToImage->GetOutputPort());
368 imWriter->Write();
369}

References G4VtkViewer::_renderWindow.

◆ ExportView()

void G4VtkViewer::ExportView ( )
inlineinherited

Definition at line 177 of file G4VtkViewer.hh.

177{};

◆ ExportVRMLScene()

void G4VtkViewer::ExportVRMLScene ( G4String  path)
inherited

Definition at line 381 of file G4VtkViewer.cc.

382{
383 vtkSmartPointer<vtkRenderWindow> _rw1 = vtkSmartPointer<vtkRenderWindow>::New();
384 _rw1->AddRenderer(_renderWindow->GetRenderers()->GetFirstRenderer());
385 vtkSmartPointer<vtkVRMLExporter> exporter = vtkSmartPointer<vtkVRMLExporter>::New();
386 exporter->SetRenderWindow(_rw1);
387 exporter->SetFileName((path+".vrml").c_str());
388 exporter->Write();
389}

References G4VtkViewer::_renderWindow.

◆ ExportVTPScene()

void G4VtkViewer::ExportVTPScene ( G4String  path)
inherited

Definition at line 391 of file G4VtkViewer.cc.

392{
393 vtkSmartPointer<vtkRenderWindow> _rw1 = vtkSmartPointer<vtkRenderWindow>::New();
394 _rw1->AddRenderer(_renderWindow->GetRenderers()->GetFirstRenderer());
395 vtkSmartPointer<vtkSingleVTPExporter> exporter = vtkSmartPointer<vtkSingleVTPExporter>::New();
396 exporter->SetRenderWindow(_rw1);
397 exporter->SetFileName((path+".vtp").c_str());
398 exporter->Write();
399}

References G4VtkViewer::_renderWindow.

◆ FinishView()

void G4VtkQtViewer::FinishView ( void  )
virtual

Reimplemented from G4VViewer.

Definition at line 81 of file G4VtkQtViewer.cc.

82{
84 // force a widget repaint as there should already
85 // be a rendered buffer when visualiser starts up
86 // paintGL();
87 // repaint();
88}

References G4VtkViewer::FinishView().

◆ GetApplicableVisAttributes()

const G4VisAttributes * G4VViewer::GetApplicableVisAttributes ( const G4VisAttributes ) const
inherited

◆ GetDefaultViewParameters()

const G4ViewParameters & G4VViewer::GetDefaultViewParameters ( ) const
inherited

◆ GetName()

const G4String & G4VViewer::GetName ( ) const
inherited

◆ GetPrivateVisAttributesModifiers()

virtual const std::vector< G4ModelingParameters::VisAttributesModifier > * G4VViewer::GetPrivateVisAttributesModifiers ( ) const
virtualinherited

◆ GetSceneHandler()

G4VSceneHandler * G4VViewer::GetSceneHandler ( ) const
inherited

◆ GetShortName()

const G4String & G4VViewer::GetShortName ( ) const
inherited

◆ GetViewId()

G4int G4VViewer::GetViewId ( ) const
inherited

◆ GetViewParameters()

const G4ViewParameters & G4VViewer::GetViewParameters ( ) const
inherited

Referenced by G4OpenGLXmViewer::actions_callback(), G4OpenInventorSceneHandler::AddCircleSquare(), G4Qt3DSceneHandler::AddPrimitive(), G4ToolsSGSceneHandler::AddPrimitive(), G4OpenInventorSceneHandler::AddPrimitive(), G4OpenGLSceneHandler::AddPrimitive(), G4OpenGLImmediateSceneHandler::AddPrimitivePreambleInternal(), G4OpenGLStoredSceneHandler::AddPrimitivePreambleInternal(), G4OpenInventorSceneHandler::AddTransform(), G4OpenGLXmViewer::background_color_callback(), G4OpenGLImmediateQtViewer::ComputeView(), G4OpenGLStoredQtViewer::ComputeView(), G4VSceneHandler::CreateSectionSolid(), G4VisManager::CreateViewer(), G4OpenGLImmediateWin32Viewer::DrawView(), G4OpenGLImmediateXmViewer::DrawView(), G4OpenGLImmediateXViewer::DrawView(), G4OpenGLStoredWin32Viewer::DrawView(), G4OpenGLStoredXmViewer::DrawView(), G4OpenGLStoredXViewer::DrawView(), G4OpenGLStoredSceneHandler::EndModeling(), G4VisManager::EndOfRun(), G4VSceneHandler::GetAuxEdgeVisible(), G4VSceneHandler::GetColour(), G4VSceneHandler::GetDrawingStyle(), G4VSceneHandler::GetNoOfSides(), G4VSceneHandler::GetNumberOfCloudPoints(), G4VSceneHandler::GetTextColour(), G4VVisCommand::RefreshIfRequired(), G4VSceneHandler::RequestPrimitives(), G4VisCommandDrawView::SetNewValue(), G4VisCommandDrawLogicalVolume::SetNewValue(), G4VisCommandGeometrySetDaughtersInvisible::SetNewValue(), G4VisCommandGeometrySetVisibility::SetNewValue(), G4VisCommandSceneNotifyHandlers::SetNewValue(), G4VisCommandSceneAddLogo::SetNewValue(), G4VisCommandSceneAddScale::SetNewValue(), G4VisCommandSceneHandlerCreate::SetNewValue(), G4VisCommandsTouchable::SetNewValue(), G4VisCommandsTouchableSet::SetNewValue(), G4VisCommandViewerAddCutawayPlane::SetNewValue(), G4VisCommandViewerCentreOn::SetNewValue(), G4VisCommandViewerChangeCutawayPlane::SetNewValue(), G4VisCommandViewerClearCutawayPlanes::SetNewValue(), G4VisCommandViewerClearVisAttributesModifiers::SetNewValue(), G4VisCommandViewerClone::SetNewValue(), G4VisCommandViewerColourByDensity::SetNewValue(), G4VisCommandViewerCopyViewFrom::SetNewValue(), G4VisCommandViewerCreate::SetNewValue(), G4VisCommandViewerDolly::SetNewValue(), G4VisCommandViewerInterpolate::SetNewValue(), G4VisCommandViewerPan::SetNewValue(), G4VisCommandViewerSave::SetNewValue(), G4VisCommandViewerScale::SetNewValue(), G4VisCommandViewerZoom::SetNewValue(), G4VisCommandsViewerSet::SetNewValue(), G4VisCommandGeometrySetVisibility::SetNewValueOnLV(), G4OpenInventorViewer::SetReducedWireFrame(), G4OpenInventorViewer::SetSolid(), and G4OpenInventorViewer::SetWireFrame().

◆ Initialise()

void G4VtkQtViewer::Initialise ( )
virtual

Reimplemented from G4VViewer.

Definition at line 53 of file G4VtkQtViewer.cc.

54{
55 CreateMainWindow(this, QString(GetName()));
56
57 // Specific GL render window and interactor for Qt
58 _renderWindow = vtkGenericOpenGLRenderWindow::New();
59 renderWindowInteractor = vtkRenderWindowInteractor::New();
60
61 _renderWindow->AddRenderer(renderer);
62#if VTK_MAJOR_VERSION == 8
63 this->SetRenderWindow(_renderWindow);
64#else
65 this->setRenderWindow(_renderWindow);
66#endif
67
68 // Set callback to match VTK parameters to Geant4
69 geant4Callback->SetGeant4ViewParameters(&fVP);
70 renderer->AddObserver(vtkCommand::EndEvent, geant4Callback);
71}
const G4String & GetName() const
virtual void CreateMainWindow(QVTKOpenGLNativeWidget *, const QString &)
vtkNew< vtkGeant4Callback > geant4Callback
Definition: G4VtkViewer.hh:182
vtkRenderWindowInteractor * renderWindowInteractor
Definition: G4VtkViewer.hh:187

References G4VtkViewer::_renderWindow, CreateMainWindow(), G4VViewer::fVP, G4VtkViewer::geant4Callback, G4VViewer::GetName(), G4VtkViewer::renderer, and G4VtkViewer::renderWindowInteractor.

◆ NeedKernelVisit()

void G4VViewer::NeedKernelVisit ( )
inherited

Definition at line 78 of file G4VViewer.cc.

78 {
79
80 fNeedKernelVisit = true;
81
82 // At one time I thought we'd better notify all viewers. But I guess
83 // each viewer can take care of itself, so the following code is
84 // redundant (but keep it commented out for now). (John Allison)
85 // Notify all viewers that a kernel visit is required.
86 // const G4ViewerList& viewerList = fSceneHandler.GetViewerList ();
87 // G4ViewerListConstIterator i;
88 // for (i = viewerList.begin(); i != viewerList.end(); i++) {
89 // (*i) -> SetNeedKernelVisit ();
90 // }
91 // ??...but, there's a problem in OpenGL Stored which seems to
92 // require *all* viewers to revisit the kernel, so...
93 // const G4ViewerList& viewerList = fSceneHandler.GetViewerList ();
94 // G4ViewerListConstIterator i;
95 // for (i = viewerList.begin(); i != viewerList.end(); i++) {
96 // (*i) -> SetNeedKernelVisit (true);
97 // }
98 // Feb 2005 - commented out. Let's fix OpenGL if necessary.
99}
G4bool fNeedKernelVisit
Definition: G4VViewer.hh:224

References G4VViewer::fNeedKernelVisit.

Referenced by G4OpenGLImmediateQtViewer::ComputeView(), G4DAWNFILEViewer::DrawView(), G4GMocrenFileViewer::DrawView(), G4HepRepFileViewer::DrawView(), G4OpenGLImmediateWin32Viewer::DrawView(), G4OpenGLImmediateXmViewer::DrawView(), G4OpenGLImmediateXViewer::DrawView(), G4VTreeViewer::DrawView(), G4VRML2FileViewer::DrawView(), G4VtkViewer::DrawView(), G4VisManager::GeometryHasChanged(), G4OpenGLStoredViewer::KernelVisitDecision(), G4OpenInventorViewer::KernelVisitDecision(), G4Qt3DViewer::KernelVisitDecision(), G4ToolsSGViewer< SG_SESSION, SG_VIEWER >::KernelVisitDecision(), G4VisManager::NotifyHandlers(), G4OpenGLImmediateViewer::ProcessView(), G4VisCommandViewerRebuild::SetNewValue(), G4OpenInventorViewer::SetPreview(), G4OpenInventorViewer::SetPreviewAndFull(), G4OpenInventorViewer::SetReducedWireFrame(), and G4OpenInventorViewer::UpdateScene().

◆ ProcessView()

void G4VViewer::ProcessView ( )
inherited

Definition at line 105 of file G4VViewer.cc.

106{
107 // If the scene has changed, or if the concrete viewer has decided
108 // that it necessary to visit the kernel, perhaps because the view
109 // parameters have changed significantly (this should be done in the
110 // concrete viewer's DrawView)...
111 if (fNeedKernelVisit) {
112 // Reset flag. This must be done before ProcessScene to prevent
113 // recursive calls when recomputing transients...
114 fNeedKernelVisit = false;
117 }
118}
virtual void ProcessScene()
virtual void ClearStore()

References G4VSceneHandler::ClearStore(), G4VViewer::fNeedKernelVisit, G4VViewer::fSceneHandler, and G4VSceneHandler::ProcessScene().

Referenced by G4OpenGLStoredQtViewer::ComputeView(), G4DAWNFILEViewer::DrawView(), G4GMocrenFileViewer::DrawView(), G4HepRepFileViewer::DrawView(), G4OpenGLStoredWin32Viewer::DrawView(), G4OpenGLStoredXmViewer::DrawView(), G4OpenGLStoredXViewer::DrawView(), G4OpenInventorViewer::DrawView(), G4Qt3DViewer::DrawView(), G4RayTracerViewer::DrawView(), G4ToolsSGViewer< SG_SESSION, SG_VIEWER >::DrawView(), G4VTreeViewer::DrawView(), G4VRML2FileViewer::DrawView(), G4VtkViewer::DrawView(), and G4OpenGLImmediateViewer::ProcessView().

◆ RefreshView()

void G4VViewer::RefreshView ( )
inherited

◆ ResetView()

virtual void G4VViewer::ResetView ( )
virtualinherited

◆ SetDefaultViewParameters()

void G4VViewer::SetDefaultViewParameters ( const G4ViewParameters vp)
inherited

◆ SetGeant4View()

void G4VtkViewer::SetGeant4View ( )
inlineinherited

Definition at line 178 of file G4VtkViewer.hh.

178{};

◆ SetName()

void G4VViewer::SetName ( const G4String name)
inherited

Definition at line 72 of file G4VViewer.cc.

72 {
73 fName = name;
74 fShortName = fName.substr(0, fName.find (' '));
76}
G4String fShortName
Definition: G4VViewer.hh:218
G4String fName
Definition: G4VViewer.hh:217
void strip(G4String &str, char c=' ')
Remove leading and trailing characters from string.

References G4VViewer::fName, G4VViewer::fShortName, G4InuclParticleNames::name(), and G4StrUtil::strip().

◆ SetNeedKernelVisit()

void G4VViewer::SetNeedKernelVisit ( G4bool  need)
inherited

◆ SetTouchable()

void G4VViewer::SetTouchable ( const std::vector< G4PhysicalVolumeModel::G4PhysicalVolumeNodeID > &  fullPath)
protectedinherited

Definition at line 124 of file G4VViewer.cc.

126{
127 // Set the touchable for /vis/touchable/set/... commands.
128 std::ostringstream oss;
129 const auto& pvStore = G4PhysicalVolumeStore::GetInstance();
130 for (const auto& pvNodeId: fullPath) {
131 const auto& pv = pvNodeId.GetPhysicalVolume();
132 auto iterator = find(pvStore->begin(),pvStore->end(),pv);
133 if (iterator == pvStore->end()) {
135 ed << "Volume no longer in physical volume store.";
136 G4Exception("G4VViewer::SetTouchable", "visman0501", JustWarning, ed);
137 } else {
138 oss
139 << ' ' << pvNodeId.GetPhysicalVolume()->GetName()
140 << ' ' << pvNodeId.GetCopyNo();
141 }
142 }
143 G4UImanager::GetUIpointer()->ApplyCommand("/vis/set/touchable" + oss.str());
144}
@ JustWarning
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:35
std::ostringstream G4ExceptionDescription
Definition: G4Exception.hh:40
static G4PhysicalVolumeStore * GetInstance()
G4int ApplyCommand(const char *aCommand)
Definition: G4UImanager.cc:485

References G4UImanager::ApplyCommand(), G4Exception(), G4PhysicalVolumeStore::GetInstance(), G4UImanager::GetUIpointer(), and JustWarning.

Referenced by G4OpenGLQtViewer::changeColorAndTransparency(), and G4OpenGLQtViewer::setCheckComponent().

◆ SetView()

void G4VtkViewer::SetView ( )
virtualinherited

Implements G4VViewer.

Definition at line 113 of file G4VtkViewer.cc.

113 {
114
115 // background colour
116 const G4Colour backgroundColour = fVP.GetBackgroundColour();
117 renderer->SetBackground(backgroundColour.GetRed(), backgroundColour.GetGreen(), backgroundColour.GetBlue());
118
119 // target and camera positions
121 if(radius <= 0.)
122 {radius = 1.;}
123 G4double cameraDistance = fVP.GetCameraDistance(radius);
124 G4Point3D viewpointDirection = fVP.GetViewpointDirection();
125 G4Point3D targetPoint = fVP.GetCurrentTargetPoint();
126 G4Point3D cameraPosition =
127 targetPoint + viewpointDirection.unit() * cameraDistance;
128 renderer->GetActiveCamera()->SetFocalPoint(targetPoint.x(),
129 targetPoint.y(),
130 targetPoint.z());
131 renderer->GetActiveCamera()->SetPosition(cameraPosition.x(),
132 cameraPosition.y(),
133 cameraPosition.z());
134 renderer->GetActiveCamera()->SetParallelScale(cameraDistance);
135
136 // need to set camera distance and parallel scale on first set view
137 if(firstSetView)
138 {
139 geant4Callback->SetVtkInitialValues(cameraDistance, cameraDistance);
140 firstSetView = false;
141 }
142
143 // projection type and view angle and zoom factor
144 G4double fieldHalfAngle = fVP.GetFieldHalfAngle();
145 G4double zoomFactor = fVP.GetZoomFactor();
146 vtkCamera* activeCamera = renderer->GetActiveCamera();
147 if(fieldHalfAngle == 0) {
148 activeCamera->SetParallelProjection(1);
149 activeCamera->SetParallelScale(activeCamera->GetParallelScale()/zoomFactor);
150 }
151 else {
152 activeCamera->SetParallelProjection(0);
153 activeCamera->SetViewAngle(2*fieldHalfAngle/M_PI*180);
154 activeCamera->SetPosition(cameraPosition.x()/zoomFactor,
155 cameraPosition.y()/zoomFactor,
156 cameraPosition.z()/zoomFactor);
157 }
158
159 // camera roll
160 // renderer->GetActiveCamera()->SetRoll(0);
161
162 // camera up direction
163 const G4Vector3D upVector = fVP.GetUpVector();
164 renderer->GetActiveCamera()->SetViewUp(upVector.x(),
165 upVector.y(),
166 upVector.z());
167
168 // Light
169 const G4Vector3D lightDirection = fVP.GetLightpointDirection();
170 G4bool lightsMoveWithCamera = fVP.GetLightsMoveWithCamera();
171 G4Vector3D lightPosition =
172 targetPoint + lightDirection.unit() * cameraDistance;
173
174 vtkLightCollection* currentLights = renderer->GetLights();
175 if (currentLights->GetNumberOfItems() != 0)
176 {
177 auto currentLight = dynamic_cast<vtkLight*>(currentLights->GetItemAsObject(0));
178 if (currentLight)
179 {
180 currentLight->SetPosition(lightPosition.x(),
181 lightPosition.y(),
182 lightPosition.z());
183 if (lightsMoveWithCamera)
184 {currentLight->SetLightTypeToCameraLight();}
185 else
186 {currentLight->SetLightTypeToSceneLight();}
187 }
188 }
189
190 // Rotation style
192 if (rotationStyle == G4ViewParameters::RotationStyle::freeRotation) {
193 vtkSmartPointer<vtkInteractorStyleTrackballCamera> style =
194 vtkSmartPointer<vtkInteractorStyleTrackballCamera>::New();
195 renderWindowInteractor->SetInteractorStyle(style);
196 }
197 else if(rotationStyle == G4ViewParameters::RotationStyle::constrainUpDirection) {
198 // camera->SetViewUp(upVector.x(), upVector.y(), upVector.z());
199 vtkSmartPointer<vtkInteractorStyleTerrain> style =
200 vtkSmartPointer<vtkInteractorStyleTerrain>::New();
201 renderWindowInteractor->SetInteractorStyle(style);
202 }
203}
double G4double
Definition: G4Types.hh:83
bool G4bool
Definition: G4Types.hh:86
#define M_PI
Definition: SbMath.h:33
virtual const G4VisExtent & GetExtent() const
G4double GetCameraDistance(G4double radius) const
const G4Vector3D & GetLightpointDirection() const
const G4Vector3D & GetViewpointDirection() const
const G4Point3D & GetCurrentTargetPoint() const
G4double GetFieldHalfAngle() const
G4double GetZoomFactor() const
const G4Vector3D & GetUpVector() const
RotationStyle GetRotationStyle() const
G4bool GetLightsMoveWithCamera() const
G4double GetExtentRadius() const
Definition: G4VisExtent.cc:75
G4bool firstSetView
Definition: G4VtkViewer.hh:190
BasicVector3D< T > unit() const

References G4VtkViewer::firstSetView, G4VViewer::fSceneHandler, G4VViewer::fVP, G4VtkViewer::geant4Callback, G4ViewParameters::GetBackgroundColour(), G4Colour::GetBlue(), G4ViewParameters::GetCameraDistance(), G4ViewParameters::GetCurrentTargetPoint(), G4VSceneHandler::GetExtent(), G4VisExtent::GetExtentRadius(), G4ViewParameters::GetFieldHalfAngle(), G4Colour::GetGreen(), G4ViewParameters::GetLightpointDirection(), G4ViewParameters::GetLightsMoveWithCamera(), G4Colour::GetRed(), G4ViewParameters::GetRotationStyle(), G4ViewParameters::GetUpVector(), G4ViewParameters::GetViewpointDirection(), G4ViewParameters::GetZoomFactor(), M_PI, G4VtkViewer::renderer, G4VtkViewer::renderWindowInteractor, HepGeom::BasicVector3D< T >::unit(), HepGeom::BasicVector3D< T >::x(), HepGeom::BasicVector3D< T >::y(), and HepGeom::BasicVector3D< T >::z().

◆ SetViewParameters()

void G4VViewer::SetViewParameters ( const G4ViewParameters vp)
inherited

◆ ShowView()

void G4VtkViewer::ShowView ( void  )
virtualinherited

Reimplemented from G4VViewer.

Definition at line 286 of file G4VtkViewer.cc.

287{
288#ifdef G4VTKDEBUG
289 G4cout << "G4VtkViewer::ShowView() called." << G4endl;
290 // static_cast<G4VtkSceneHandler&>(fSceneHandler).PrintStores();
291#endif
292
293 G4VtkSceneHandler& fVtkSceneHandler =
294 dynamic_cast<G4VtkSceneHandler&>(fSceneHandler);
295 fVtkSceneHandler.Modified();
296
297 infoTextActor->GetTextProperty()->SetFontSize(28);
299
300 // make sure text is always visible
301 infoTextActor->GetTextProperty()->SetColor(std::fmod(colour.GetRed() + 0.5, 1.0),
302 std::fmod(colour.GetGreen() + 0.5, 1.0),
303 std::fmod(colour.GetBlue() + 0.5, 1.0));
304 infoTextActor->GetTextProperty()->SetFontSize(20);
305 infoCallback->SetTextActor(infoTextActor);
306 renderer->AddObserver(vtkCommand::EndEvent, infoCallback);
307 geant4Callback->SetGeant4ViewParameters(&fVP);
308 renderer->AddObserver(vtkCommand::EndEvent, geant4Callback);
309 renderer->AddActor(infoTextActor);
310
311 _renderWindow->Render();
312 renderWindowInteractor->Initialize();
313 renderWindowInteractor->Start();
314}

References G4VtkViewer::_renderWindow, G4VViewer::fSceneHandler, G4VViewer::fVP, G4cout, G4endl, G4VtkViewer::geant4Callback, G4ViewParameters::GetBackgroundColour(), G4Colour::GetBlue(), G4Colour::GetGreen(), G4Colour::GetRed(), G4VtkViewer::infoCallback, G4VtkViewer::infoTextActor, G4VtkSceneHandler::Modified(), G4VtkViewer::renderer, and G4VtkViewer::renderWindowInteractor.

◆ TouchableSetColour()

void G4VViewer::TouchableSetColour ( const std::vector< G4PhysicalVolumeModel::G4PhysicalVolumeNodeID > &  fullPath,
const G4Colour colour 
)
protectedinherited

Definition at line 180 of file G4VViewer.cc.

183{
184 // Changes the Vis Attribute Modifiers WITHOUT triggering a rebuild.
185
186 std::ostringstream oss;
187 oss << "/vis/touchable/set/colour "
188 << colour.GetRed() << ' ' << colour.GetGreen()
189 << ' ' << colour.GetBlue() << ' ' << colour.GetAlpha();
190
191 // The following is equivalent to
192 // G4UImanager::GetUIpointer()->ApplyCommand(oss.str());
193 // (assuming the touchable has already been set), but avoids view rebuild.
194
195 // Instantiate a working copy of a G4VisAttributes object...
196 G4VisAttributes workingVisAtts;
197 // and set the colour.
198 workingVisAtts.SetColour(colour);
199
202 (workingVisAtts,
205 // G4ModelingParameters::VASColour (VAS = Vis Attribute Signifier)
206 // signifies that it is the colour that should be picked out
207 // and merged with the touchable's normal vis attributes.
208
209 // Record on G4cout (with #) for information.
210 if (G4UImanager::GetUIpointer()->GetVerboseLevel() >= 2) {
211 G4cout << "# " << oss.str() << G4endl;
212 }
213}
G4double GetAlpha() const
Definition: G4Colour.hh:155
static G4ModelingParameters::PVNameCopyNoPath GetPVNameCopyNoPath(const std::vector< G4PhysicalVolumeNodeID > &)
void AddVisAttributesModifier(const G4ModelingParameters::VisAttributesModifier &)
void SetColour(const G4Colour &)

References G4ViewParameters::AddVisAttributesModifier(), G4VViewer::fVP, G4cout, G4endl, G4Colour::GetAlpha(), G4Colour::GetBlue(), G4Colour::GetGreen(), G4PhysicalVolumeModel::GetPVNameCopyNoPath(), G4Colour::GetRed(), G4UImanager::GetUIpointer(), G4VisAttributes::SetColour(), and G4ModelingParameters::VASColour.

Referenced by G4OpenGLQtViewer::changeColorAndTransparency().

◆ TouchableSetVisibility()

void G4VViewer::TouchableSetVisibility ( const std::vector< G4PhysicalVolumeModel::G4PhysicalVolumeNodeID > &  fullPath,
G4bool  visibility 
)
protectedinherited

Definition at line 146 of file G4VViewer.cc.

149{
150 // Changes the Vis Attribute Modifiers WITHOUT triggering a rebuild.
151
152 std::ostringstream oss;
153 oss << "/vis/touchable/set/visibility ";
154 if (visibiity) oss << "true"; else oss << "false";
155
156 // The following is equivalent to
157 // G4UImanager::GetUIpointer()->ApplyCommand(oss.str());
158 // (assuming the touchable has already been set), but avoids view rebuild.
159
160 // Instantiate a working copy of a G4VisAttributes object...
161 G4VisAttributes workingVisAtts;
162 // and set the visibility.
163 workingVisAtts.SetVisibility(visibiity);
164
167 (workingVisAtts,
170 // G4ModelingParameters::VASVisibility (VAS = Vis Attribute Signifier)
171 // signifies that it is the visibility that should be picked out
172 // and merged with the touchable's normal vis attributes.
173
174 // Record on G4cout (with #) for information.
175 if (G4UImanager::GetUIpointer()->GetVerboseLevel() >= 2) {
176 G4cout << "# " << oss.str() << G4endl;
177 }
178}
void SetVisibility(G4bool=true)

References G4ViewParameters::AddVisAttributesModifier(), G4VViewer::fVP, G4cout, G4endl, G4PhysicalVolumeModel::GetPVNameCopyNoPath(), G4UImanager::GetUIpointer(), G4VisAttributes::SetVisibility(), and G4ModelingParameters::VASVisibility.

Referenced by G4OpenGLQtViewer::setCheckComponent().

Field Documentation

◆ _renderWindow

vtkRenderWindow* G4VtkViewer::_renderWindow
inherited

◆ camera

vtkNew<vtkCamera> G4VtkViewer::camera
inherited

Definition at line 184 of file G4VtkViewer.hh.

Referenced by G4VtkViewer::Initialise().

◆ fDefaultVP

G4ViewParameters G4VViewer::fDefaultVP
protectedinherited

◆ firstSetView

G4bool G4VtkViewer::firstSetView = true
privateinherited

Definition at line 190 of file G4VtkViewer.hh.

Referenced by G4VtkViewer::SetView().

◆ fName

G4String G4VViewer::fName
protectedinherited

◆ fNeedKernelVisit

G4bool G4VViewer::fNeedKernelVisit
protectedinherited

◆ fSceneHandler

G4VSceneHandler& G4VViewer::fSceneHandler
protectedinherited

◆ fShortName

G4String G4VViewer::fShortName
protectedinherited

◆ fUiQt

G4UIQt* G4VtkQtViewer::fUiQt
private

Definition at line 49 of file G4VtkQtViewer.hh.

Referenced by CreateMainWindow().

◆ fViewId

G4int G4VViewer::fViewId
protectedinherited

◆ fVP

G4ViewParameters G4VViewer::fVP
protectedinherited

Definition at line 219 of file G4VViewer.hh.

Referenced by G4OpenGLQtViewer::actionChangeBackgroundColor(), G4OpenGLQtViewer::actionChangeDefaultColor(), G4OpenGLQtViewer::actionChangeTextColor(), G4OpenGLXmViewer::actions_callback(), G4OpenGLSceneHandler::AddPrimitive(), G4OpenGLImmediateSceneHandler::AddPrimitivePreambleInternal(), G4OpenGLStoredSceneHandler::AddPrimitivePreambleInternal(), G4OpenGLXmViewer::aux_edge_callback(), G4OpenGLQtViewer::changeDepthInSceneTree(), G4OpenGLStoredQtViewer::CompareForKernelVisit(), G4OpenGLStoredViewer::CompareForKernelVisit(), G4OpenInventorViewer::CompareForKernelVisit(), G4Qt3DViewer::CompareForKernelVisit(), G4ToolsSGViewer< SG_SESSION, SG_VIEWER >::CompareForKernelVisit(), G4OpenGLStoredQtViewer::ComputeView(), G4OpenGLWin32Viewer::CreateMainWindow(), G4OpenGLXmViewer::CreateMainWindow(), G4OpenGLXViewer::CreateMainWindow(), G4OpenGLQtViewer::CreateMainWindow(), G4OpenGLQtViewer::createPopupMenu(), G4OpenGLXmViewer::dolly_callback(), G4OpenGLStoredViewer::DrawDisplayLists(), G4OpenGLXmViewer::drawing_style_callback(), G4OpenGLStoredWin32Viewer::DrawView(), G4OpenGLStoredXmViewer::DrawView(), G4OpenGLStoredXViewer::DrawView(), G4OpenInventorViewer::DrawView(), G4Qt3DViewer::DrawView(), G4RayTracerViewer::DrawView(), G4ToolsSGViewer< SG_SESSION, SG_VIEWER >::DrawView(), G4VtkViewer::DrawViewHUD(), G4ToolsSGViewer< SG_SESSION, SG_VIEWER >::Export(), G4ASCIITreeViewer::G4ASCIITreeViewer(), G4HepRepFileViewer::G4HepRepFileViewer(), G4OpenGLQtViewer::G4keyPressEvent(), G4OpenGLQtViewer::G4MouseMoveEvent(), G4OpenGLQtViewer::G4MousePressEvent(), G4OpenGLQtViewer::G4MouseReleaseEvent(), G4OpenGLViewer::G4OpenGLViewer(), G4OpenInventorViewer::G4OpenInventorViewer(), G4VtkViewer::G4VtkViewer(), G4VViewer::G4VViewer(), G4OpenGLQtViewer::G4wheelEvent(), G4OpenGLViewer::getSceneDepth(), G4OpenGLViewer::getSceneFarWidth(), G4OpenGLViewer::getSceneNearWidth(), G4OpenGLXmViewer::GetXmConnection(), G4OpenInventorViewer::GroupCameraSensorCB(), G4OpenInventorQtViewer::Initialise(), G4OpenInventorWinViewer::Initialise(), G4OpenInventorXtExtendedViewer::Initialise(), G4OpenInventorXtViewer::Initialise(), G4Qt3DViewer::Initialise(), G4RayTracerViewer::Initialise(), G4RayTracerXViewer::Initialise(), G4ToolsSGViewer< SG_SESSION, SG_VIEWER >::Initialise(), Initialise(), G4VtkViewer::Initialise(), G4OpenGLViewer::InitializeGLView(), G4OpenGLXmViewer::left_right_pan_callback(), G4OpenGLXmViewer::misc_callback(), G4ToolsSGViewer< SG_SESSION, SG_VIEWER >::mouse_move(), G4Qt3DViewer::mouseMoveEvent(), G4OpenGLQtViewer::moveScene(), G4OpenGLImmediateViewer::ProcessView(), G4OpenGLXmViewer::projection_callback(), G4OpenGLXmViewer::reset_callback(), G4OpenGLXmViewer::ResetView(), G4OpenGLViewer::rotateScene(), G4OpenGLViewer::rotateSceneInViewDirection(), G4OpenGLViewer::rotateSceneThetaPhi(), G4OpenGLViewer::rotateSceneToggle(), G4DAWNFILEViewer::SendDrawingStyleToDAWNGUI(), G4DAWNFILEViewer::SendViewParameters(), G4VRML2FileViewer::SendViewParameters(), G4OpenGLXmViewer::set_rot_subject_callback(), G4OpenGLViewerMessenger::SetNewValue(), G4OpenGLXmViewerMessenger::SetNewValue(), G4OpenGLWin32Viewer::SetRotation(), G4OpenGLWin32Viewer::SetShift(), G4OpenGLViewer::SetView(), G4OpenInventorQtViewer::SetView(), G4OpenInventorViewer::SetView(), G4OpenInventorWinViewer::SetView(), G4OpenInventorXtExtendedViewer::SetView(), G4OpenInventorXtViewer::SetView(), G4Qt3DViewer::SetView(), G4RayTracerViewer::SetView(), G4ToolsSGQtViewer::SetView(), G4ToolsSGViewer< SG_SESSION, SG_VIEWER >::SetView(), G4VtkViewer::SetView(), G4VViewer::SetViewParameters(), G4OpenGLWin32Viewer::SetZoom(), G4OpenGLXViewer::ShowView(), G4VtkViewer::ShowView(), G4OpenGLQtViewer::toggleAux(), G4OpenGLQtViewer::toggleHiddenMarkers(), G4OpenGLQtViewer::togglePicking(), G4OpenGLQtViewer::toggleProjection(), G4OpenGLQtViewer::toggleSurfaceAction(), G4VViewer::TouchableSetColour(), G4VViewer::TouchableSetVisibility(), G4OpenGLXmViewer::up_down_pan_callback(), G4OpenGLXmViewer::update_panels_callback(), G4OpenGLXmViewer::UpdateControlPanel(), G4OpenGLQtViewer::updateToolbarAndMouseContextMenu(), G4OpenGLQtViewer::updateViewerPropertiesTableWidget(), G4ToolsSGViewer< SG_SESSION, SG_VIEWER >::wheel_rotate(), G4Qt3DViewer::wheelEvent(), G4OpenGLXmViewer::wobble_callback(), G4OpenGLXmViewer::wobble_timer_callback(), and G4OpenGLXmViewer::zoom_callback().

◆ geant4Callback

vtkNew<vtkGeant4Callback> G4VtkViewer::geant4Callback
inherited

◆ infoCallback

vtkNew<vtkInfoCallback> G4VtkViewer::infoCallback
inherited

Definition at line 181 of file G4VtkViewer.hh.

Referenced by G4VtkViewer::DrawViewHUD(), and G4VtkViewer::ShowView().

◆ infoTextActor

vtkNew<vtkTextActor> G4VtkViewer::infoTextActor
inherited

Definition at line 180 of file G4VtkViewer.hh.

Referenced by G4VtkViewer::DrawViewHUD(), and G4VtkViewer::ShowView().

◆ light

vtkSmartPointer<vtkLight> G4VtkViewer::light
inherited

Definition at line 183 of file G4VtkViewer.hh.

◆ renderer

vtkNew<vtkRenderer> G4VtkViewer::renderer
inherited

◆ renderWindowInteractor

vtkRenderWindowInteractor* G4VtkViewer::renderWindowInteractor
inherited

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