33#ifdef G4VIS_BUILD_OPENGLQT_DRIVER
45G4OpenGLStoredQtSceneHandler::G4OpenGLStoredQtSceneHandler
48G4OpenGLStoredSceneHandler (system, name)
51G4OpenGLStoredQtSceneHandler::~G4OpenGLStoredQtSceneHandler ()
54G4bool G4OpenGLStoredQtSceneHandler::ExtraPOProcessing
55(
const G4Visible& visible,
size_t currentPOListIndex)
57 G4bool usesGLCommands =
true;
60 const G4Text& g4Text =
dynamic_cast<const G4Text&
>(visible);
61 G4TextPlus* pG4TextPlus =
new G4TextPlus(g4Text);
62 pG4TextPlus->fProcessing2D = fProcessing2D;
63 fPOList[currentPOListIndex].fpG4TextPlus = pG4TextPlus;
64 usesGLCommands =
false;
66 catch (std::bad_cast) {}
72 if (pPVModel && !pLVModel) {
81 typedef std::vector<PVNodeID>
PVPath;
98 G4OpenGLQtViewer* pGLViewer =
dynamic_cast<G4OpenGLQtViewer*
>(fpViewer);
100 pGLViewer->addPVSceneTreeElement(fpModel->GetCurrentDescription(),pPVModel,currentPOListIndex);
109 G4OpenGLQtViewer* pGLViewer =
dynamic_cast<G4OpenGLQtViewer*
>(fpViewer);
111 pGLViewer->addNonPVSceneTreeElement(fpModel->GetType(),currentPOListIndex,fpModel->GetCurrentDescription().data(),visible);
116 return usesGLCommands;
119G4bool G4OpenGLStoredQtSceneHandler::ExtraTOProcessing
120(
const G4Visible& visible,
size_t currentTOListIndex)
123 G4bool usesGLCommands =
true;
126 const G4Text& g4Text =
dynamic_cast<const G4Text&
>(visible);
127 G4TextPlus* pG4TextPlus =
new G4TextPlus(g4Text);
128 pG4TextPlus->fProcessing2D = fProcessing2D;
129 fTOList[currentTOListIndex].fpG4TextPlus = pG4TextPlus;
130 usesGLCommands =
false;
132 catch (std::bad_cast) {}
134 return usesGLCommands;
137void G4OpenGLStoredQtSceneHandler::ClearStore () {
141 G4OpenGLStoredSceneHandler::ClearStore ();
143 G4OpenGLQtViewer* pGLQtViewer =
dynamic_cast<G4OpenGLQtViewer*
>(fpViewer);
145#ifdef G4DEBUG_VIS_OGL
146 printf(
"G4OpenGLStoredQtSceneHandler::ClearStore_________________________________\n" );
148 pGLQtViewer->clearTreeWidget();
152void G4OpenGLStoredQtSceneHandler::ClearTransientStore () {
156 G4OpenGLStoredSceneHandler::ClearTransientStore ();
159 G4OpenGLQtViewer* pGLQtViewer =
dynamic_cast<G4OpenGLQtViewer*
>(fpViewer);
161#ifdef G4DEBUG_VIS_OGL
162 printf(
"G4OpenGLStoredQtSceneHandler::ClearTransient_________________________________\n" );
169 fpViewer -> SetView ();
170 fpViewer -> ClearView ();
171 fpViewer -> DrawView ();
175void G4OpenGLStoredQtSceneHandler::SetScene(
G4Scene* pScene){
177 if (pScene != fpScene) {
178 G4OpenGLQtViewer* pGLQtViewer =
dynamic_cast<G4OpenGLQtViewer*
>(fpViewer);
180 pGLQtViewer->clearTreeWidget();
virtual void SetScene(G4Scene *)
G4PhysicalVolumeModel::G4PhysicalVolumeNodeID PVNodeID
std::vector< PVNodeID > PVPath