Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
|
#include <G4OpenGLViewer.hh>
Protected Member Functions | |
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 | |
G4bool | fPrintColour |
G4bool | fVectoredPs |
G4OpenGLSceneHandler & | fOpenGLSceneHandler |
G4Colour | background |
G4bool | transparency_enabled |
G4bool | antialiasing_enabled |
G4bool | haloing_enabled |
G4gl2ps * | fGL2PSAction |
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 | |
G4VSceneHandler & | fSceneHandler |
G4int | fViewId |
G4String | fName |
G4String | fShortName |
G4ViewParameters | fVP |
G4ViewParameters | fDefaultVP |
G4double | fKernelVisitElapsedTimeSeconds = 999. |
SceneTreeScene | fSceneTreeScene |
G4SceneTreeItem | fSceneTree |
G4bool | fNeedKernelVisit |
Friends | |
class | G4OpenGLSceneHandler |
class | G4OpenGLImmediateSceneHandler |
class | G4OpenGLStoredSceneHandler |
class | G4OpenGLFileSceneHandler |
class | G4OpenGLViewerMessenger |
Definition at line 95 of file G4OpenGLViewer.hh.
|
protected |
Definition at line 58 of file G4OpenGLViewer.cc.
|
protectedvirtual |
Definition at line 119 of file G4OpenGLViewer.cc.
|
protected |
Definition at line 1243 of file G4OpenGLViewer.cc.
Referenced by G4OpenGLQtViewer::G4OpenGLQtViewer(), and G4OpenGLViewer().
|
protected |
Change LineSize on gl2ps if needed
Definition at line 756 of file G4OpenGLViewer.cc.
Referenced by G4OpenGLSceneHandler::AddPrimitive(), G4OpenGLSceneHandler::AddPrimitive(), G4OpenGLSceneHandler::AddPrimitive(), HaloingFirstPass(), and HaloingSecondPass().
|
protected |
Change PointSize on gl2ps if needed
Definition at line 744 of file G4OpenGLViewer.cc.
Referenced by G4OpenGLSceneHandler::AddPrimitive().
|
virtual |
Implements G4VViewer.
Definition at line 150 of file G4OpenGLViewer.cc.
Referenced by G4OpenGLXmViewer::antialias_callback(), G4OpenGLXmViewer::aux_edge_callback(), G4OpenGLXmViewer::background_color_callback(), G4OpenGLXmViewer::dolly_callback(), G4OpenGLXmViewer::drawing_style_callback(), G4OpenGLStoredWin32Viewer::DrawView(), G4OpenGLStoredXmViewer::DrawView(), G4OpenGLStoredXViewer::DrawView(), G4OpenGLXmViewer::haloing_callback(), G4OpenGLImmediateWin32Viewer::Initialise(), G4OpenGLStoredWin32Viewer::Initialise(), InitializeGLView(), G4OpenGLXmViewer::left_right_pan_callback(), G4OpenGLImmediateQtViewer::paintGL(), G4OpenGLStoredQtViewer::paintGL(), G4OpenGLXmViewer::projection_callback(), G4OpenGLXmViewer::reset_callback(), G4OpenGLXmViewer::rotate_in_phi(), G4OpenGLXmViewer::rotate_in_theta(), G4OpenGLXmViewer::transparency_callback(), G4OpenGLXmViewer::up_down_pan_callback(), G4OpenGLXmViewer::wobble_timer_callback(), and G4OpenGLXmViewer::zoom_callback().
void G4OpenGLViewer::ClearViewWithoutFlush | ( | ) |
Definition at line 161 of file G4OpenGLViewer.cc.
Referenced by ClearView().
|
inlineprotectedvirtual |
Reimplemented in G4OpenGLXViewer.
Definition at line 135 of file G4OpenGLViewer.hh.
Referenced by G4OpenGLImmediateWin32Viewer::Initialise(), G4OpenGLImmediateXmViewer::Initialise(), G4OpenGLStoredWin32Viewer::Initialise(), and G4OpenGLStoredXmViewer::Initialise().
|
protectedvirtual |
Reimplemented in G4OpenGLQtViewer, and G4OpenGLXViewer.
Definition at line 704 of file G4OpenGLViewer.cc.
Referenced by G4OpenGLSceneHandler::AddPrimitive(), G4OpenGLQtViewer::DrawText(), and G4OpenGLXViewer::DrawText().
|
virtual |
Export image with the given name with width and height Several cases : If name is "", filename will have the default value If name is "toto.png", set the name to "toto" and the format to "png". No incremented suffix is added. If name is "toto", set the name to "toto" and the format to default (or current format if specify). Will also add an incremented suffix at the end of the file
Reimplemented in G4OpenGLQtViewer.
Definition at line 773 of file G4OpenGLViewer.cc.
Referenced by G4OpenGLQtViewer::exportImage(), G4OpenGLXmViewer::print_callback(), and G4OpenGLViewerMessenger::SetNewValue().
|
protected |
Definition at line 1422 of file G4OpenGLViewer.cc.
Referenced by SetView().
|
protected |
Definition at line 1400 of file G4OpenGLViewer.cc.
Referenced by G4OpenGLImmediateSceneHandler::BeginPrimitives2D(), G4OpenGLStoredViewer::DrawDisplayLists(), and SetView().
|
protected |
Definition at line 1320 of file G4OpenGLViewer.cc.
Referenced by SetView().
|
protected |
Definition at line 1278 of file G4OpenGLViewer.cc.
Referenced by GetPickDetails().
|
protected |
Definition at line 434 of file G4OpenGLViewer.cc.
Referenced by Pick(), and G4OpenGLQtViewer::updatePickInfosWidget().
|
protected |
Definition at line 1021 of file G4OpenGLViewer.cc.
Referenced by G4OpenGLQtViewer::exportImage(), exportImage(), G4OpenGLXmViewer::misc_callback(), and setExportFilename().
|
protected |
Definition at line 1066 of file G4OpenGLViewer.cc.
Referenced by G4OpenGLQtViewer::moveScene().
|
protected |
Definition at line 1049 of file G4OpenGLViewer.cc.
|
protected |
Definition at line 1034 of file G4OpenGLViewer.cc.
Referenced by G4OpenGLQtViewer::G4MousePressEvent(), and G4OpenGLQtViewer::moveScene().
|
protected |
Definition at line 932 of file G4OpenGLViewer.cc.
Referenced by G4OpenGLQtViewer::CreateMainWindow(), G4OpenGLWin32Viewer::CreateMainWindow(), G4OpenGLXmViewer::CreateMainWindow(), G4OpenGLXViewer::CreateMainWindow(), G4OpenGLQtViewer::DrawText(), G4OpenGLImmediateWin32Viewer::DrawView(), G4OpenGLStoredWin32Viewer::DrawView(), G4OpenGLQtViewer::G4MouseMoveEvent(), G4OpenGLQtViewer::G4MousePressEvent(), G4OpenGLQtViewer::moveScene(), G4OpenGLImmediateQtViewer::paintGL(), and G4OpenGLStoredQtViewer::paintGL().
|
protected |
Definition at line 928 of file G4OpenGLViewer.cc.
Referenced by G4OpenGLQtViewer::CreateMainWindow(), G4OpenGLWin32Viewer::CreateMainWindow(), G4OpenGLXmViewer::CreateMainWindow(), G4OpenGLXViewer::CreateMainWindow(), G4OpenGLQtViewer::DrawText(), G4OpenGLImmediateWin32Viewer::DrawView(), G4OpenGLStoredWin32Viewer::DrawView(), G4OpenGLQtViewer::G4MouseMoveEvent(), G4OpenGLQtViewer::G4MousePressEvent(), G4OpenGLQtViewer::moveScene(), G4OpenGLImmediateQtViewer::paintGL(), and G4OpenGLStoredQtViewer::paintGL().
|
protected |
Definition at line 387 of file G4OpenGLViewer.cc.
Referenced by G4OpenGLImmediateWin32Viewer::DrawView(), G4OpenGLImmediateXmViewer::DrawView(), G4OpenGLImmediateXViewer::DrawView(), G4OpenGLStoredWin32Viewer::DrawView(), G4OpenGLStoredXmViewer::DrawView(), and G4OpenGLStoredXViewer::DrawView().
|
protected |
Definition at line 409 of file G4OpenGLViewer.cc.
Referenced by G4OpenGLImmediateWin32Viewer::DrawView(), G4OpenGLImmediateXmViewer::DrawView(), G4OpenGLImmediateXViewer::DrawView(), G4OpenGLStoredWin32Viewer::DrawView(), G4OpenGLStoredXmViewer::DrawView(), and G4OpenGLStoredXViewer::DrawView().
|
protected |
|
protected |
|
protected |
|
protected |
Definition at line 124 of file G4OpenGLViewer.cc.
Referenced by G4OpenGLImmediateXmViewer::Initialise(), G4OpenGLImmediateXViewer::Initialise(), G4OpenGLStoredXmViewer::Initialise(), G4OpenGLStoredXViewer::Initialise(), G4OpenGLImmediateQtViewer::initializeGL(), and G4OpenGLStoredQtViewer::initializeGL().
|
protected |
Definition at line 676 of file G4OpenGLViewer.cc.
Referenced by ClearView(), ClearViewWithoutFlush(), G4OpenGLImmediateQtViewer::paintEvent(), and G4OpenGLStoredQtViewer::paintEvent().
|
protected |
Return if gl2ps is currently writing
Definition at line 666 of file G4OpenGLViewer.cc.
Referenced by ChangeLineWidth(), ChangePointSize(), G4OpenGLQtViewer::DrawText(), DrawText(), and G4OpenGLXViewer::DrawText().
|
protectedvirtual |
Definition at line 418 of file G4OpenGLViewer.cc.
Referenced by G4OpenGLXViewer::ShowView().
|
protectedvirtual |
Reimplemented from G4VViewer.
Reimplemented in G4OpenGLXmViewer.
Definition at line 380 of file G4OpenGLViewer.cc.
Referenced by G4OpenGLQtViewer::ResetView(), and G4OpenGLXmViewer::ResetView().
|
protected |
Set the viewport of the scene MAXIMUM SIZE is : GLint dims[2]; glGetIntegerv(GL_MAX_VIEWPORT_DIMS, dims);
Definition at line 197 of file G4OpenGLViewer.cc.
Referenced by SetView().
|
protected |
Definition at line 181 of file G4OpenGLViewer.cc.
Referenced by G4OpenGLQtViewer::CreateMainWindow(), G4OpenGLWin32Viewer::CreateMainWindow(), G4OpenGLXmViewer::CreateMainWindow(), G4OpenGLXViewer::CreateMainWindow(), G4OpenGLXmViewer::expose_callback(), G4OpenGLImmediateQtViewer::resizeGL(), and G4OpenGLStoredQtViewer::resizeGL().
Definition at line 1083 of file G4OpenGLViewer.cc.
Referenced by G4OpenGLXmViewer::rotate_in_phi(), G4OpenGLXmViewer::rotate_in_theta(), and G4OpenGLQtViewer::rotateQtScene().
Definition at line 1098 of file G4OpenGLViewer.cc.
Referenced by G4OpenGLQtViewer::rotateQtSceneToggle().
If name is "" or "!", filename and extension will have the default value. If name is "toto.png", set the name to "toto" and the format to "png". No incremented suffix is added. If name is "toto", set the name to "toto" and the format to default (or current format if specify). If name is the same as previous, do not reset incremented suffix.
Definition at line 989 of file G4OpenGLViewer.cc.
Referenced by G4OpenGLQtViewer::exportImage(), exportImage(), and G4OpenGLViewerMessenger::SetNewValue().
bool G4OpenGLViewer::setExportImageFormat | ( | std::string | format, |
bool | quiet = false ) |
Definition at line 1247 of file G4OpenGLViewer.cc.
Referenced by exportImage(), G4OpenGLImmediateQtViewer::initializeGL(), G4OpenGLStoredQtViewer::initializeGL(), setExportFilename(), and G4OpenGLViewerMessenger::SetNewValue().
Definition at line 978 of file G4OpenGLViewer.cc.
Referenced by G4OpenGLQtViewer::exportImage(), exportImage(), and G4OpenGLViewerMessenger::SetNewValue().
|
protectedvirtual |
Implements G4VViewer.
Reimplemented in G4OpenGLWin32Viewer, and G4OpenGLXViewer.
Definition at line 224 of file G4OpenGLViewer.cc.
Referenced by G4OpenGLImmediateQtViewer::paintGL(), G4OpenGLStoredQtViewer::paintGL(), G4OpenGLWin32Viewer::SetView(), and G4OpenGLXViewer::SetView().
|
protected |
Definition at line 936 of file G4OpenGLViewer.cc.
Referenced by G4OpenGLImmediateQtViewer::resizeGL(), and G4OpenGLStoredQtViewer::resizeGL().
|
friend |
Definition at line 100 of file G4OpenGLViewer.hh.
|
friend |
Definition at line 98 of file G4OpenGLViewer.hh.
|
friend |
Definition at line 97 of file G4OpenGLViewer.hh.
|
friend |
Definition at line 99 of file G4OpenGLViewer.hh.
|
friend |
Definition at line 101 of file G4OpenGLViewer.hh.
|
protected |
Definition at line 188 of file G4OpenGLViewer.hh.
Referenced by G4OpenGLXmViewer::antialias_callback(), and G4OpenGLXmViewer::CreateMainWindow().
|
protected |
Definition at line 185 of file G4OpenGLViewer.hh.
Referenced by ClearViewWithoutFlush(), G4OpenGLXmViewer::CreateMainWindow(), and SetView().
|
protected |
Definition at line 197 of file G4OpenGLViewer.hh.
|
protected |
Definition at line 199 of file G4OpenGLViewer.hh.
Referenced by G4OpenGLQtViewer::exportImage(), exportImage(), getRealPrintFilename(), setExportFilename(), and setExportImageFormat().
|
protected |
Definition at line 198 of file G4OpenGLViewer.hh.
Referenced by exportImage(), getRealPrintFilename(), and setExportImageFormat().
|
protected |
Definition at line 196 of file G4OpenGLViewer.hh.
Referenced by addExportImageFormat(), and setExportImageFormat().
|
protected |
Definition at line 190 of file G4OpenGLViewer.hh.
Referenced by ChangeLineWidth(), ChangePointSize(), DrawText(), exportImage(), G4OpenGLViewer(), isGl2psWriting(), and ~G4OpenGLViewer().
|
protected |
Definition at line 184 of file G4OpenGLViewer.hh.
Referenced by GetPickDetails().
|
protected |
Definition at line 193 of file G4OpenGLViewer.hh.
Referenced by G4OpenGLXmViewer::actions_callback(), G4OpenGLXmViewer::left_right_pan_callback(), G4OpenGLQtViewer::moveScene(), ResetView(), G4OpenGLXmViewer::ResetView(), G4OpenGLXmViewer::set_pan_sens_callback(), and G4OpenGLXmViewer::up_down_pan_callback().
|
protected |
Definition at line 181 of file G4OpenGLViewer.hh.
Referenced by G4OpenGLXmViewer::misc_callback(), G4OpenGLXmViewer::set_print_colour_callback(), and G4OpenGLXmViewer::set_print_style_callback().
|
protected |
Definition at line 200 of file G4OpenGLViewer.hh.
Referenced by setExportSize().
|
protected |
Definition at line 201 of file G4OpenGLViewer.hh.
Referenced by setExportSize().
|
protected |
Definition at line 192 of file G4OpenGLViewer.hh.
Referenced by G4OpenGLXmViewer::actions_callback(), G4OpenGLQtViewer::G4keyPressEvent(), ResetView(), and G4OpenGLXmViewer::set_rot_sens_callback().
|
protected |
Definition at line 182 of file G4OpenGLViewer.hh.
Referenced by exportImage(), G4OpenGLXmViewer::misc_callback(), G4OpenGLXmViewer::set_print_style_callback(), and G4OpenGLViewerMessenger::SetNewValue().
|
protected |
Definition at line 194 of file G4OpenGLViewer.hh.
Referenced by G4OpenGLQtViewer::CreateMainWindow(), getWinWidth(), InitializeGLView(), ResizeGLView(), ResizeWindow(), and SetView().
|
protected |
Definition at line 195 of file G4OpenGLViewer.hh.
Referenced by G4OpenGLQtViewer::CreateMainWindow(), getWinHeight(), InitializeGLView(), ResizeGLView(), ResizeWindow(), and SetView().
|
protected |
Definition at line 189 of file G4OpenGLViewer.hh.
Referenced by G4OpenGLXmViewer::CreateMainWindow(), G4OpenGLImmediateWin32Viewer::DrawView(), G4OpenGLImmediateXmViewer::DrawView(), G4OpenGLImmediateXViewer::DrawView(), G4OpenGLStoredWin32Viewer::DrawView(), G4OpenGLStoredXmViewer::DrawView(), G4OpenGLStoredXViewer::DrawView(), and G4OpenGLXmViewer::haloing_callback().
|
protected |
Definition at line 187 of file G4OpenGLViewer.hh.
Referenced by G4OpenGLXmViewer::CreateMainWindow(), G4OpenGLStoredViewer::DrawDisplayLists(), G4OpenGLViewerMessenger::SetNewValue(), and G4OpenGLXmViewer::transparency_callback().