31 #ifdef G4VIS_BUILD_OPENGLQT_DRIVER
43 G4OpenGLStoredQtSceneHandler::G4OpenGLStoredQtSceneHandler
46 G4OpenGLStoredSceneHandler (system, name)
49 G4OpenGLStoredQtSceneHandler::~G4OpenGLStoredQtSceneHandler ()
52 G4bool G4OpenGLStoredQtSceneHandler::ExtraPOProcessing
55 G4bool usesGLCommands =
true;
59 G4TextPlus* pG4TextPlus =
new G4TextPlus(g4Text);
60 pG4TextPlus->fProcessing2D = fProcessing2D;
61 fPOList[currentPOListIndex].fpG4TextPlus = pG4TextPlus;
62 usesGLCommands =
false;
64 catch (
const std::bad_cast&) {}
70 if (pPVModel && !pLVModel) {
96 G4OpenGLQtViewer* pGLViewer =
dynamic_cast<G4OpenGLQtViewer*
>(fpViewer);
98 pGLViewer->addPVSceneTreeElement(fpModel->GetCurrentDescription(),pPVModel,currentPOListIndex);
107 G4OpenGLQtViewer* pGLViewer =
dynamic_cast<G4OpenGLQtViewer*
>(fpViewer);
109 pGLViewer->addNonPVSceneTreeElement(fpModel->GetType(),currentPOListIndex,fpModel->GetCurrentDescription().data(),
visible);
114 return usesGLCommands;
117 G4bool G4OpenGLStoredQtSceneHandler::ExtraTOProcessing
118 (
const G4Visible& visible,
size_t currentTOListIndex)
121 G4bool usesGLCommands =
true;
125 G4TextPlus* pG4TextPlus =
new G4TextPlus(g4Text);
126 pG4TextPlus->fProcessing2D = fProcessing2D;
127 fTOList[currentTOListIndex].fpG4TextPlus = pG4TextPlus;
128 usesGLCommands =
false;
130 catch (
const std::bad_cast&) {}
132 return usesGLCommands;
135 void G4OpenGLStoredQtSceneHandler::ClearStore () {
139 G4OpenGLStoredSceneHandler::ClearStore ();
141 G4OpenGLQtViewer* pGLQtViewer =
dynamic_cast<G4OpenGLQtViewer*
>(fpViewer);
143 pGLQtViewer->clearTreeWidget();
147 void G4OpenGLStoredQtSceneHandler::ClearTransientStore () {
151 G4OpenGLStoredSceneHandler::ClearTransientStore ();
157 fpViewer -> SetView ();
158 fpViewer -> ClearView ();
159 fpViewer -> DrawView ();
163 void G4OpenGLStoredQtSceneHandler::SetScene(
G4Scene* pScene){
165 if (pScene != fpScene) {
166 G4OpenGLQtViewer* pGLQtViewer =
dynamic_cast<G4OpenGLQtViewer*
>(fpViewer);
168 pGLQtViewer->clearTreeWidget();