Geant4 11.1.1
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. |
G4bool | fNeedKernelVisit |
Friends | |
class | G4OpenGLSceneHandler |
class | G4OpenGLImmediateSceneHandler |
class | G4OpenGLStoredSceneHandler |
class | G4OpenGLFileSceneHandler |
class | G4OpenGLViewerMessenger |
Definition at line 98 of file G4OpenGLViewer.hh.
|
protected |
Definition at line 65 of file G4OpenGLViewer.cc.
|
protectedvirtual |
Definition at line 138 of file G4OpenGLViewer.cc.
|
protected |
Definition at line 1312 of file G4OpenGLViewer.cc.
Referenced by G4OpenGLQtViewer::G4OpenGLQtViewer(), and G4OpenGLViewer().
|
protected |
Change LineSize on gl2ps if needed
Definition at line 825 of file G4OpenGLViewer.cc.
Referenced by G4OpenGLSceneHandler::AddPrimitive(), HaloingFirstPass(), and HaloingSecondPass().
|
protected |
Change PointSize on gl2ps if needed
Definition at line 813 of file G4OpenGLViewer.cc.
Referenced by G4OpenGLSceneHandler::AddPrimitive().
|
virtual |
Implements G4VViewer.
Definition at line 219 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 230 of file G4OpenGLViewer.cc.
Referenced by ClearView().
|
inlineprotectedvirtual |
Reimplemented in G4OpenGLXViewer.
Definition at line 148 of file G4OpenGLViewer.hh.
Referenced by G4OpenGLImmediateWin32Viewer::Initialise(), G4OpenGLImmediateXmViewer::Initialise(), G4OpenGLStoredWin32Viewer::Initialise(), and G4OpenGLStoredXmViewer::Initialise().
|
protectedvirtual |
Reimplemented in G4OpenGLQtViewer, and G4OpenGLXViewer.
Definition at line 773 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 842 of file G4OpenGLViewer.cc.
Referenced by G4OpenGLQtViewer::exportImage(), G4OpenGLXmViewer::print_callback(), and G4OpenGLViewerMessenger::SetNewValue().
|
protected |
Definition at line 1491 of file G4OpenGLViewer.cc.
Referenced by SetView().
|
protected |
Definition at line 1469 of file G4OpenGLViewer.cc.
Referenced by G4OpenGLImmediateSceneHandler::BeginPrimitives2D(), G4OpenGLStoredViewer::DrawDisplayLists(), and SetView().
|
protected |
Definition at line 1389 of file G4OpenGLViewer.cc.
Referenced by SetView().
|
protected |
Definition at line 1347 of file G4OpenGLViewer.cc.
Referenced by GetPickDetails().
|
protected |
Definition at line 503 of file G4OpenGLViewer.cc.
Referenced by Pick(), and G4OpenGLQtViewer::updatePickInfosWidget().
|
protected |
Definition at line 1090 of file G4OpenGLViewer.cc.
Referenced by G4OpenGLQtViewer::exportImage(), exportImage(), G4OpenGLXmViewer::misc_callback(), and setExportFilename().
|
protected |
Definition at line 1135 of file G4OpenGLViewer.cc.
Referenced by G4OpenGLQtViewer::moveScene().
|
protected |
Definition at line 1118 of file G4OpenGLViewer.cc.
|
protected |
Definition at line 1103 of file G4OpenGLViewer.cc.
Referenced by G4OpenGLQtViewer::G4MousePressEvent(), and G4OpenGLQtViewer::moveScene().
|
protected |
Definition at line 1001 of file G4OpenGLViewer.cc.
Referenced by G4OpenGLWin32Viewer::CreateMainWindow(), G4OpenGLXmViewer::CreateMainWindow(), G4OpenGLXViewer::CreateMainWindow(), G4OpenGLQtViewer::CreateMainWindow(), G4OpenGLQtViewer::DrawText(), G4OpenGLImmediateWin32Viewer::DrawView(), G4OpenGLStoredWin32Viewer::DrawView(), G4OpenGLQtViewer::G4MouseMoveEvent(), G4OpenGLQtViewer::G4MousePressEvent(), G4OpenGLQtViewer::moveScene(), G4OpenGLImmediateQtViewer::paintGL(), and G4OpenGLStoredQtViewer::paintGL().
|
protected |
Definition at line 997 of file G4OpenGLViewer.cc.
Referenced by G4OpenGLWin32Viewer::CreateMainWindow(), G4OpenGLXmViewer::CreateMainWindow(), G4OpenGLXViewer::CreateMainWindow(), G4OpenGLQtViewer::CreateMainWindow(), G4OpenGLQtViewer::DrawText(), G4OpenGLImmediateWin32Viewer::DrawView(), G4OpenGLStoredWin32Viewer::DrawView(), G4OpenGLQtViewer::G4MouseMoveEvent(), G4OpenGLQtViewer::G4MousePressEvent(), G4OpenGLQtViewer::moveScene(), G4OpenGLImmediateQtViewer::paintGL(), and G4OpenGLStoredQtViewer::paintGL().
|
protected |
Definition at line 456 of file G4OpenGLViewer.cc.
Referenced by G4OpenGLImmediateWin32Viewer::DrawView(), G4OpenGLImmediateXmViewer::DrawView(), G4OpenGLImmediateXViewer::DrawView(), G4OpenGLStoredWin32Viewer::DrawView(), G4OpenGLStoredXmViewer::DrawView(), and G4OpenGLStoredXViewer::DrawView().
|
protected |
Definition at line 478 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 143 of file G4OpenGLViewer.cc.
Referenced by G4OpenGLImmediateXmViewer::Initialise(), G4OpenGLImmediateXViewer::Initialise(), G4OpenGLStoredXmViewer::Initialise(), G4OpenGLStoredXViewer::Initialise(), G4OpenGLImmediateQtViewer::initializeGL(), and G4OpenGLStoredQtViewer::initializeGL().
|
protected |
Definition at line 745 of file G4OpenGLViewer.cc.
Referenced by ClearView(), ClearViewWithoutFlush(), G4OpenGLImmediateQtViewer::paintEvent(), and G4OpenGLStoredQtViewer::paintEvent().
|
protected |
Return if gl2ps is currently writing
Definition at line 735 of file G4OpenGLViewer.cc.
Referenced by ChangeLineWidth(), ChangePointSize(), G4OpenGLQtViewer::DrawText(), DrawText(), and G4OpenGLXViewer::DrawText().
|
protectedvirtual |
Definition at line 487 of file G4OpenGLViewer.cc.
Referenced by G4OpenGLXViewer::ShowView().
|
protectedvirtual |
Reimplemented from G4VViewer.
Reimplemented in G4OpenGLXmViewer.
Definition at line 449 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 266 of file G4OpenGLViewer.cc.
Referenced by SetView().
|
protected |
Definition at line 250 of file G4OpenGLViewer.cc.
Referenced by G4OpenGLWin32Viewer::CreateMainWindow(), G4OpenGLXmViewer::CreateMainWindow(), G4OpenGLXViewer::CreateMainWindow(), G4OpenGLQtViewer::CreateMainWindow(), G4OpenGLXmViewer::expose_callback(), G4OpenGLImmediateQtViewer::resizeGL(), and G4OpenGLStoredQtViewer::resizeGL().
Definition at line 1152 of file G4OpenGLViewer.cc.
Referenced by G4OpenGLXmViewer::rotate_in_phi(), G4OpenGLXmViewer::rotate_in_theta(), and G4OpenGLQtViewer::rotateQtScene().
Definition at line 1167 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 1058 of file G4OpenGLViewer.cc.
Referenced by G4OpenGLQtViewer::exportImage(), exportImage(), and G4OpenGLViewerMessenger::SetNewValue().
bool G4OpenGLViewer::setExportImageFormat | ( | std::string | format, |
bool | quiet = false |
||
) |
Definition at line 1316 of file G4OpenGLViewer.cc.
Referenced by exportImage(), G4OpenGLImmediateQtViewer::initializeGL(), G4OpenGLStoredQtViewer::initializeGL(), setExportFilename(), and G4OpenGLViewerMessenger::SetNewValue().
Definition at line 1047 of file G4OpenGLViewer.cc.
Referenced by G4OpenGLQtViewer::exportImage(), exportImage(), and G4OpenGLViewerMessenger::SetNewValue().
|
protectedvirtual |
Implements G4VViewer.
Reimplemented in G4OpenGLWin32Viewer, and G4OpenGLXViewer.
Definition at line 293 of file G4OpenGLViewer.cc.
Referenced by G4OpenGLImmediateQtViewer::paintGL(), G4OpenGLStoredQtViewer::paintGL(), G4OpenGLWin32Viewer::SetView(), and G4OpenGLXViewer::SetView().
|
protected |
Definition at line 1005 of file G4OpenGLViewer.cc.
Referenced by G4OpenGLImmediateQtViewer::resizeGL(), and G4OpenGLStoredQtViewer::resizeGL().
|
friend |
Definition at line 103 of file G4OpenGLViewer.hh.
|
friend |
Definition at line 101 of file G4OpenGLViewer.hh.
|
friend |
Definition at line 100 of file G4OpenGLViewer.hh.
|
friend |
Definition at line 102 of file G4OpenGLViewer.hh.
|
friend |
Definition at line 104 of file G4OpenGLViewer.hh.
|
protected |
Definition at line 201 of file G4OpenGLViewer.hh.
Referenced by G4OpenGLXmViewer::antialias_callback(), and G4OpenGLXmViewer::CreateMainWindow().
|
protected |
Definition at line 198 of file G4OpenGLViewer.hh.
Referenced by ClearViewWithoutFlush(), G4OpenGLXmViewer::CreateMainWindow(), and SetView().
|
protected |
Definition at line 210 of file G4OpenGLViewer.hh.
|
protected |
Definition at line 212 of file G4OpenGLViewer.hh.
Referenced by G4OpenGLQtViewer::exportImage(), exportImage(), getRealPrintFilename(), setExportFilename(), and setExportImageFormat().
|
protected |
Definition at line 211 of file G4OpenGLViewer.hh.
Referenced by exportImage(), getRealPrintFilename(), and setExportImageFormat().
|
protected |
Definition at line 209 of file G4OpenGLViewer.hh.
Referenced by addExportImageFormat(), and setExportImageFormat().
|
protected |
Definition at line 203 of file G4OpenGLViewer.hh.
Referenced by ChangeLineWidth(), ChangePointSize(), DrawText(), exportImage(), G4OpenGLViewer(), isGl2psWriting(), and ~G4OpenGLViewer().
|
protected |
Definition at line 197 of file G4OpenGLViewer.hh.
Referenced by GetPickDetails().
|
protected |
Definition at line 206 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 194 of file G4OpenGLViewer.hh.
Referenced by G4OpenGLXmViewer::misc_callback(), G4OpenGLXmViewer::set_print_colour_callback(), and G4OpenGLXmViewer::set_print_style_callback().
|
protected |
Definition at line 213 of file G4OpenGLViewer.hh.
Referenced by setExportSize().
|
protected |
Definition at line 214 of file G4OpenGLViewer.hh.
Referenced by setExportSize().
|
protected |
Definition at line 205 of file G4OpenGLViewer.hh.
Referenced by G4OpenGLXmViewer::actions_callback(), G4OpenGLQtViewer::G4keyPressEvent(), ResetView(), and G4OpenGLXmViewer::set_rot_sens_callback().
|
protected |
Definition at line 195 of file G4OpenGLViewer.hh.
Referenced by exportImage(), G4OpenGLXmViewer::misc_callback(), G4OpenGLXmViewer::set_print_style_callback(), and G4OpenGLViewerMessenger::SetNewValue().
|
protected |
Definition at line 207 of file G4OpenGLViewer.hh.
Referenced by G4OpenGLQtViewer::CreateMainWindow(), getWinWidth(), InitializeGLView(), ResizeGLView(), ResizeWindow(), and SetView().
|
protected |
Definition at line 208 of file G4OpenGLViewer.hh.
Referenced by G4OpenGLQtViewer::CreateMainWindow(), getWinHeight(), InitializeGLView(), ResizeGLView(), ResizeWindow(), and SetView().
|
protected |
Definition at line 202 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 200 of file G4OpenGLViewer.hh.
Referenced by G4OpenGLXmViewer::CreateMainWindow(), G4OpenGLStoredViewer::DrawDisplayLists(), G4OpenGLViewerMessenger::SetNewValue(), and G4OpenGLXmViewer::transparency_callback().