Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4OpenGLImmediateWtViewer.hh
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// Class G4OpenGLImmediateWtViewer : a class derived from
30// G4OpenGLWtViewer and G4OpenGLImmediateViewer.
31
32#if defined (G4VIS_BUILD_OPENGLWT_DRIVER) || defined (G4VIS_USE_OPENGLWT)
33
34#ifndef G4OPENGLIMMEDIATEWTVIEWER_HH
35#define G4OPENGLIMMEDIATEWTVIEWER_HH
36
38#include "G4OpenGLWtViewer.hh"
39#include <Wt/WEvent>
40
41#include "globals.hh"
42
43class G4OpenGLImmediateSceneHandler;
44
45class G4OpenGLImmediateWtViewer :
46public G4OpenGLWtViewer, public G4OpenGLImmediateViewer, public Wt::WGLWidget {
47
48public:
49 G4OpenGLImmediateWtViewer (G4OpenGLImmediateSceneHandler& scene, Wt::WContainerWidget*, const G4String& name = "");
50 ~G4OpenGLImmediateWtViewer ();
51 void Initialise ();
52 void resizeGL(int, int);
53 void paintGL();
54 void initializeGL ();
55 void DrawView();
56 void ShowView();
57 //
58 void popMatrix();
59 void pushMatrix();
60 void multMatrixd(const GLdouble*);
61 void setMatrixUniforms();
62 void loadIdentity();
63
64 void ComputeView ();
65 void FinishView();
66
67private:
68 // void showEvent(QShowEvent event );
69 void mousePressEvent(Wt::WMouseEvent *event);
70 void mouseMoveEvent(Wt::WMouseEvent *event);
71 void mouseDoubleClickEvent(Wt::WMouseEvent *event);
72 void mouseReleaseEvent(Wt::WMouseEvent event);
73 // void WtContextMenuEvent(QContextMenuEvent e);
74 void keyPressEvent (Wt::WKeyEvent *event);
75 void paintEvent(Wt::WPaintDevice * event);
76
77 void updateWWidget();
78
79 // A client-side JavaScript matrix variable
80 JavaScriptMatrix4x4 jsMatrix_;
81
82 // void ComputeView ();
83 // implements G4VViewer::SetView() and ClearView()
84 // void SetView ();
85 // void ClearView ();
86
87};
88
89#endif
90
91#endif