32 #ifdef G4VIS_BUILD_OPENGLQT_DRIVER
44 G4OpenGLStoredQtSceneHandler::G4OpenGLStoredQtSceneHandler
47 G4OpenGLStoredSceneHandler (system, name)
50 G4OpenGLStoredQtSceneHandler::~G4OpenGLStoredQtSceneHandler ()
53 G4bool G4OpenGLStoredQtSceneHandler::ExtraPOProcessing
54 (
const G4Visible& visible,
size_t currentPOListIndex)
56 G4bool usesGLCommands =
true;
59 const G4Text& g4Text =
dynamic_cast<const G4Text&
>(visible);
60 G4TextPlus* pG4TextPlus =
new G4TextPlus(g4Text);
61 pG4TextPlus->fProcessing2D = fProcessing2D;
62 fPOList[currentPOListIndex].fpG4TextPlus = pG4TextPlus;
63 usesGLCommands =
false;
65 catch (
const std::bad_cast&) {}
71 if (pPVModel && !pLVModel) {
97 G4OpenGLQtViewer* pGLViewer =
dynamic_cast<G4OpenGLQtViewer*
>(fpViewer);
99 pGLViewer->addPVSceneTreeElement(fpModel->GetCurrentDescription(),pPVModel,currentPOListIndex);
108 G4OpenGLQtViewer* pGLViewer =
dynamic_cast<G4OpenGLQtViewer*
>(fpViewer);
110 pGLViewer->addNonPVSceneTreeElement(fpModel->GetType(),currentPOListIndex,fpModel->GetCurrentDescription().data(),visible);
115 return usesGLCommands;
118 G4bool G4OpenGLStoredQtSceneHandler::ExtraTOProcessing
119 (
const G4Visible& visible,
size_t currentTOListIndex)
122 G4bool usesGLCommands =
true;
125 const G4Text& g4Text =
dynamic_cast<const G4Text&
>(visible);
126 G4TextPlus* pG4TextPlus =
new G4TextPlus(g4Text);
127 pG4TextPlus->fProcessing2D = fProcessing2D;
128 fTOList[currentTOListIndex].fpG4TextPlus = pG4TextPlus;
129 usesGLCommands =
false;
131 catch (
const std::bad_cast&) {}
133 return usesGLCommands;
136 void G4OpenGLStoredQtSceneHandler::ClearStore () {
140 G4OpenGLStoredSceneHandler::ClearStore ();
142 G4OpenGLQtViewer* pGLQtViewer =
dynamic_cast<G4OpenGLQtViewer*
>(fpViewer);
144 pGLQtViewer->clearTreeWidget();
148 void G4OpenGLStoredQtSceneHandler::ClearTransientStore () {
152 G4OpenGLStoredSceneHandler::ClearTransientStore ();
158 fpViewer -> SetView ();
159 fpViewer -> ClearView ();
160 fpViewer -> DrawView ();
164 void G4OpenGLStoredQtSceneHandler::SetScene(
G4Scene* pScene){
166 if (pScene != fpScene) {
167 G4OpenGLQtViewer* pGLQtViewer =
dynamic_cast<G4OpenGLQtViewer*
>(fpViewer);
169 pGLQtViewer->clearTreeWidget();
system("rm -rf microbeam.root")
virtual void SetScene(G4Scene *)