Geant4 10.7.0
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
 
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
 
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 44 of file G4VRML2FileViewer.cc.

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

◆ ~G4VRML2FileViewer()

G4VRML2FileViewer::~G4VRML2FileViewer ( )
virtual

Definition at line 56 of file G4VRML2FileViewer.cc.

57{}

Member Function Documentation

◆ ClearView()

void G4VRML2FileViewer::ClearView ( void  )
virtual

Implements G4VViewer.

Definition at line 89 of file G4VRML2FileViewer.cc.

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

◆ DrawView()

void G4VRML2FileViewer::DrawView ( )
virtual

Implements G4VViewer.

Definition at line 71 of file G4VRML2FileViewer.cc.

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

◆ FinishView()

void G4VRML2FileViewer::FinishView ( void  )
virtual

Reimplemented from G4VViewer.

Definition at line 113 of file G4VRML2FileViewer.cc.

114{
115#if defined DEBUG_FR_VIEW
117 G4cout << "***** G4VRML2FileViewer::FinishView(): No effects" << G4endl;
118#endif
119}

Referenced by DrawView().

◆ ShowView()

void G4VRML2FileViewer::ShowView ( void  )
virtual

Reimplemented from G4VViewer.

Definition at line 104 of file G4VRML2FileViewer.cc.

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

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