Geant4 11.1.1
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4VRML2FileViewer Class Reference

#include <G4VRML2FileViewer.hh>

+ Inheritance diagram for G4VRML2FileViewer:

Public Member Functions

 G4VRML2FileViewer (G4VRML2FileSceneHandler &scene, const G4String &name="")
 
virtual ~G4VRML2FileViewer ()
 
void ClearView ()
 
void DrawView ()
 
void ShowView ()
 
void FinishView ()
 
- Public Member Functions inherited from G4VViewer
 G4VViewer (G4VSceneHandler &, G4int id, const G4String &name="")
 
virtual ~G4VViewer ()
 
virtual void Initialise ()
 
virtual void ResetView ()
 
virtual void SetView ()=0
 
virtual void ClearView ()=0
 
virtual void DrawView ()=0
 
void RefreshView ()
 
virtual void ShowView ()
 
virtual void FinishView ()
 
std::vector< G4ThreeVectorComputeFlyThrough (G4Vector3D *)
 
const G4StringGetName () const
 
const G4StringGetShortName () const
 
void SetName (const G4String &)
 
G4int GetViewId () const
 
G4VSceneHandlerGetSceneHandler () const
 
const G4ViewParametersGetViewParameters () const
 
const G4ViewParametersGetDefaultViewParameters () const
 
G4double GetKernelVisitElapsedTimeSeconds () const
 
virtual const std::vector< G4ModelingParameters::VisAttributesModifier > * GetPrivateVisAttributesModifiers () const
 
void SetViewParameters (const G4ViewParameters &vp)
 
void SetDefaultViewParameters (const G4ViewParameters &vp)
 
const G4VisAttributesGetApplicableVisAttributes (const G4VisAttributes *) const
 
void SetNeedKernelVisit (G4bool need)
 
void NeedKernelVisit ()
 
void ProcessView ()
 

Additional Inherited Members

- Protected Member Functions inherited from G4VViewer
void SetTouchable (const std::vector< G4PhysicalVolumeModel::G4PhysicalVolumeNodeID > &fullPath)
 
void TouchableSetVisibility (const std::vector< G4PhysicalVolumeModel::G4PhysicalVolumeNodeID > &fullPath, G4bool visibility)
 
void TouchableSetColour (const std::vector< G4PhysicalVolumeModel::G4PhysicalVolumeNodeID > &fullPath, const G4Colour &)
 
- Protected Attributes inherited from G4VViewer
G4VSceneHandlerfSceneHandler
 
G4int fViewId
 
G4String fName
 
G4String fShortName
 
G4ViewParameters fVP
 
G4ViewParameters fDefaultVP
 
G4double fKernelVisitElapsedTimeSeconds = 999.
 
G4bool fNeedKernelVisit
 

Detailed Description

Definition at line 40 of file G4VRML2FileViewer.hh.

Constructor & Destructor Documentation

◆ G4VRML2FileViewer()

G4VRML2FileViewer::G4VRML2FileViewer ( G4VRML2FileSceneHandler scene,
const G4String name = "" 
)

Definition at line 43 of file G4VRML2FileViewer.cc.

45 : G4VViewer(sceneHandler, sceneHandler.IncrementViewCount(), name)
46 , fSceneHandler(sceneHandler)
47 , fDest(sceneHandler.fDest)
48{
49 fViewHalfAngle = 30. * deg;
50 fsin_VHA = std::sin(fViewHalfAngle);
51}

◆ ~G4VRML2FileViewer()

G4VRML2FileViewer::~G4VRML2FileViewer ( )
virtual

Definition at line 53 of file G4VRML2FileViewer.cc.

53{}

Member Function Documentation

◆ ClearView()

void G4VRML2FileViewer::ClearView ( void  )
virtual

Implements G4VViewer.

Definition at line 84 of file G4VRML2FileViewer.cc.

85{
86#if defined DEBUG_FR_VIEW
88 G4cout << "***** G4VRML2File1View::ClearView()" << G4endl;
89#endif
90 if(fSceneHandler.fFlagDestOpen)
91 {
92 fSceneHandler.fDest.close();
93 // Re-open with same filename...
94 fSceneHandler.fDest.open(fSceneHandler.fVRMLFileName);
95 fSceneHandler.fDest << "#VRML V2.0 utf8"
96 << "\n";
97 fSceneHandler.fDest << "# Generated by VRML 2.0 driver of GEANT4\n"
98 << "\n";
99 }
100}
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
static Verbosity GetVerbosity()

◆ DrawView()

void G4VRML2FileViewer::DrawView ( )
virtual

Implements G4VViewer.

Definition at line 66 of file G4VRML2FileViewer.cc.

67{
68#if defined DEBUG_FR_VIEW
70 G4cout << "***** G4VRML2FileViewer::DrawView()" << G4endl;
71#endif
72
73 fSceneHandler.VRMLBeginModeling();
74
75 // Viewpoint node
76 SendViewParameters();
77
78 // Here is a minimal DrawView() function.
81 FinishView();
82}
void ProcessView()
Definition: G4VViewer.cc:107
void NeedKernelVisit()
Definition: G4VViewer.cc:80

◆ FinishView()

void G4VRML2FileViewer::FinishView ( void  )
virtual

Reimplemented from G4VViewer.

Definition at line 111 of file G4VRML2FileViewer.cc.

112{
113#if defined DEBUG_FR_VIEW
115 G4cout << "***** G4VRML2FileViewer::FinishView(): No effects" << G4endl;
116#endif
117}

Referenced by DrawView().

◆ ShowView()

void G4VRML2FileViewer::ShowView ( void  )
virtual

Reimplemented from G4VViewer.

Definition at line 102 of file G4VRML2FileViewer.cc.

103{
104#if defined DEBUG_FR_VIEW
106 G4cout << "***** G4VRML2FileViewer::ShowView()" << G4endl;
107#endif
108 fSceneHandler.VRMLEndModeling();
109}

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