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

#include <G4OpenGLImmediateViewer.hh>

+ Inheritance diagram for G4OpenGLImmediateViewer:

Public Member Functions

 G4OpenGLImmediateViewer (G4OpenGLImmediateSceneHandler &scene)
 
void ProcessView ()
 
- Public Member Functions inherited from G4OpenGLViewer
void ClearView ()
 
void ClearViewWithoutFlush ()
 
virtual bool exportImage (std::string name="", int width=-1, int height=-1)
 
bool setExportImageFormat (std::string format, bool quiet=false)
 
- 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 G4OpenGLViewer
 G4OpenGLViewer (G4OpenGLSceneHandler &scene)
 
virtual ~G4OpenGLViewer ()
 
void SetView ()
 
void ResetView ()
 
virtual void DrawText (const G4Text &)
 
void ChangePointSize (G4double size)
 
void ChangeLineWidth (G4double width)
 
void HaloingFirstPass ()
 
void HaloingSecondPass ()
 
void HLRFirstPass ()
 
void HLRSecondPass ()
 
void HLRThirdPass ()
 
void InitializeGLView ()
 
void ResizeGLView ()
 
void ResizeWindow (unsigned int, unsigned int)
 
virtual G4String Pick (GLdouble x, GLdouble y)
 
const std::vector< G4OpenGLViewerPickMap * > & GetPickDetails (GLdouble x, GLdouble y)
 
virtual void CreateFontLists ()
 
void rotateScene (G4double dx, G4double dy)
 
void rotateSceneToggle (G4double dx, G4double dy)
 
void setExportSize (G4int, G4int)
 
bool setExportFilename (G4String name, G4bool inc=true)
 
std::string getRealPrintFilename ()
 
unsigned int getWinWidth () const
 
unsigned int getWinHeight () const
 
G4bool sizeHasChanged ()
 
GLdouble getSceneNearWidth ()
 
GLdouble getSceneFarWidth ()
 
GLdouble getSceneDepth ()
 
void addExportImageFormat (std::string format)
 
G4bool isGl2psWriting ()
 
G4bool isFramebufferReady ()
 
void g4GluPickMatrix (GLdouble x, GLdouble y, GLdouble width, GLdouble height, GLint viewport[4])
 
void g4GluLookAt (GLdouble eyex, GLdouble eyey, GLdouble eyez, GLdouble centerx, GLdouble centery, GLdouble centerz, GLdouble upx, GLdouble upy, GLdouble upz)
 
void g4GlOrtho (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble near, GLdouble far)
 
void g4GlFrustum (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble near, GLdouble far)
 
- 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 G4OpenGLViewer
G4bool fPrintColour
 
G4bool fVectoredPs
 
G4OpenGLSceneHandlerfOpenGLSceneHandler
 
G4Colour background
 
G4bool transparency_enabled
 
G4bool antialiasing_enabled
 
G4bool haloing_enabled
 
G4gl2psfGL2PSAction
 
G4double fRot_sens
 
G4double fPan_sens
 
unsigned int fWinSize_x
 
unsigned int fWinSize_y
 
std::vector< std::string > fExportImageFormatVector
 
std::string fDefaultExportImageFormat
 
std::string fExportImageFormat
 
int fExportFilenameIndex
 
G4int fPrintSizeX
 
G4int fPrintSizeY
 
- 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 43 of file G4OpenGLImmediateViewer.hh.

Constructor & Destructor Documentation

◆ G4OpenGLImmediateViewer()

G4OpenGLImmediateViewer::G4OpenGLImmediateViewer ( G4OpenGLImmediateSceneHandler scene)

Definition at line 37 of file G4OpenGLImmediateViewer.cc.

37 :
38G4VViewer (scene, -1),
39G4OpenGLViewer (scene)
40{}

Member Function Documentation

◆ ProcessView()

void G4OpenGLImmediateViewer::ProcessView ( )

Definition at line 42 of file G4OpenGLImmediateViewer.cc.

43{
44 const G4Planes& cutaways = fVP.GetCutawayPlanes();
45 G4bool cutawayUnion = fVP.IsCutaway() &&
47 size_t nPasses = cutawayUnion? cutaways.size(): 1;
48 for (size_t i = 0; i < nPasses; ++i) {
49
50 if (cutawayUnion) {
51 double a[4];
52 a[0] = cutaways[i].a();
53 a[1] = cutaways[i].b();
54 a[2] = cutaways[i].c();
55 a[3] = cutaways[i].d();
56 glClipPlane (GL_CLIP_PLANE2, a);
57 glEnable (GL_CLIP_PLANE2);
58 }
59
60 NeedKernelVisit (); // Always need to visit G4 kernel.
62
63 if (cutawayUnion) glDisable (GL_CLIP_PLANE2);
64 }
65}
bool G4bool
Definition: G4Types.hh:86
std::vector< G4Plane3D > G4Planes
void ProcessView()
Definition: G4VViewer.cc:107
void NeedKernelVisit()
Definition: G4VViewer.cc:80
G4ViewParameters fVP
Definition: G4VViewer.hh:220
CutawayMode GetCutawayMode() const
G4bool IsCutaway() const
const G4Planes & GetCutawayPlanes() const

Referenced by G4OpenGLImmediateWin32Viewer::DrawView(), G4OpenGLImmediateXmViewer::DrawView(), and G4OpenGLImmediateXViewer::DrawView().


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