30#ifndef G4OPENINVENTORQTEXAMINERVIEWER_HH
31#define G4OPENINVENTORQTEXAMINERVIEWER_HH
57#include <Inventor/SbLinear.h>
58#include <Inventor/nodes/SoLineSet.h>
59#include <Inventor/nodes/SoEventCallback.h>
60#include <Inventor/Qt/viewers/SoQtExaminerViewer.h>
61#include <Inventor/events/SoKeyboardEvent.h>
88 public SoQtExaminerViewer {
98 void FileOpenBookmarkCB();
99 void FileNewBookmarkCB();
100 void FileLoadRefPathCB();
101 void FileSaveRefPathCB();
102 void FileLoadSceneGraphCB();
103 void FileSaveSceneGraphCB();
105 void ToolsAnimateRefParticleCB();
106 void ToolsRefPathStartCB();
107 void ToolsRefPathInvertCB();
109 void HelpControlsCB();
115 void AbbrOutputCB(
bool);
116 void PickRefPathCB();
117 void SwitchWireFrameCB(
bool);
118 void SwitchAxesCB(
bool);
122 void LoadBookmarkCB(QListWidgetItem*);
123 void DeleteBookmarkCB();
124 void RenameBookmarkCB();
125 void SortBookmarksCB();
126 void LookAtSceneElementCB(QListWidgetItem*);
130#if QT_VERSION < 0x060000
137#if QT_VERSION < 0x060000
138 int OWwidth, OWheight;
140 void (*escapeCallback)();
141 void* examinerObject;
144 SbBool lshiftdown, rshiftdown, lctrldown, rctrldown;
152 QMessageBox* helpmsgbox;
156 QAction* FileOpenBookmark;
157 QAction* FileNewBookmark;
158 QAction* FileLoadRefPath;
159 QAction* FileSaveRefPath;
160 QAction* FileLoadSceneGraph;
161 QAction* FileSaveSceneGraph;
163 QAction* ToolsAnimateRefParticle;
164 QAction* ToolsRefPathStart;
165 QAction* ToolsRefPathInvert;
168 QAction* HelpControls;
171 QPushButton* saveViewPtButton;
172 QPushButton* nextViewPtButton;
173 QPushButton* prevViewPtButton;
174 QPushButton* abbrOutputButton;
175 QPushButton* pickRefPathButton;
176 QPushButton* switchWireFrameButton;
177 QPushButton* switchAxesButton;
178 QPushButton* detachButton;
180 QListWidgetItem* saveViewPtItem;
186#if QT_VERSION < 0x060000
187 QWidget* viewerParent;
188 QWidget* viewerParent2;
192 int processSoEventCount;
193#if QT_VERSION < 0x060000
200 const char* name = NULL,
202 SoQtFullViewer::BuildFlag flag = BUILD_ALL,
203 SoQtViewer::Type type = BROWSER);
207 template <
class T>
void parseString(T &t,
const std::string &s,
bool &error);
209#if QT_VERSION < 0x060000
225#if QT_VERSION < 0x060000
237#if 0x060000 <= QT_VERSION
254#if QT_VERSION < 0x060000
257 void setupSceneGraph();
278 void zoom(
const float);
279 void moveCamera(
float dist = 0,
bool lookdown =
false);
286 static void mouseoverCB(
void *aThis, SoEventCallback *eventCB);
287 static void pickingCB(
void *aThis, SoEventCallback *eventCB);
312 float sqrlen(
const SbVec3f&);
341#if QT_VERSION < 0x060000
413#if QT_VERSION < 0x060000
static void mouseoverCB(void *aThis, SoEventCallback *eventCB)
SoTranslation * mouseOverTransMaterial
SoCoordinate3 * getCoordsNode(SoFullPath *path)
static void superimpositionCB(void *closure, SoAction *action)
static void animateSensorRotationCB(void *, SoSensor *)
SoText2 * mouseOverTextMaterial
SoSearchAction * searcher
void moveCamera(float dist=0, bool lookdown=false)
virtual void afterRealizeHook()
SoSwitch * animSpeedSwitch
SoNode * getSuperimpositionNode(SoNode *, const char *name)
void animateRefParticle()
std::string saveRefCoordsFileName
SoSeparator * newSceneGraph
SoTranslation * curInfoTrans
~G4OpenInventorQtExaminerViewer()
SoTranslation * mouseOverTransZPos
void addEscapeCallback(void(*cb)())
void buildWidget(QWidget *parent)
void parseString(T &t, const std::string &s, bool &error)
SoTranslation * mouseOverTransSolid
void setReferencePathZPos()
SbRotation camStartOrient
static void pickingCB(void *aThis, SoEventCallback *eventCB)
SoFont * mouseOverFontZPos
static void sceneChangeCB(void *, SoSensor *)
friend class HookEventProcState
SbBool processSoEvent(const SoEvent *const event)
void renameViewPt(char *vpName)
SoFont * mouseOverFontMaterial
friend class G4OpenInventorQtViewer
std::vector< float > refZPositions
G4OpenInventorQtExaminerViewer(QWidget *parent=NULL, const char *name=NULL, SbBool embed=TRUE, SoQtFullViewer::BuildFlag flag=BUILD_ALL, SoQtViewer::Type type=BROWSER)
static void animateRefParticleCB()
SoTranslation * stranslation
SoTranslation * mouseOverTransLogName
void sortViewPts(std::vector< std::string >)
void deleteViewPt(char *vpName=NULL)
SoNodeSensor * sceneChangeSensor
bool viewingBeforePickRef
void cleanUpAfterPrevFile()
SoTimerSensor * animateSensor
virtual void actualRedraw(void)
void createElementsList()
void setOrigWindowSize(int w, int h)
void updateViewParams(SoKeyboardEvent::Key)
void setReferencePath(SoLineSet *, SoCoordinate3 *, bool append=false)
void saveViewPt(char *name)
void updateSpeedIndicator(void)
void construct(const SbBool build)
SoFont * mouseOverFontLogName
void superimpositionEvent(SoAction *action)
SoText2 * mouseOverTextZPos
std::string saveScenegraphFileName
SoTimerSensor * animateSensorRotation
std::vector< sceneElement > sceneElements
void distanceToTrajectory(const SbVec3f &, float &, SbVec3f &, int &)
void evenOutRefParticlePts()
viewPtData camB4Animation
double animateBtwPtsPeriod
SoSwitch * animSpeedOutlineSwitch
std::vector< viewPtData > viewPtList
SoFont * mouseOverFontSolid
std::vector< SbVec3f > refParticleTrajectory
SoText2 * mouseOverTextSolid
static void animateSensorCB(void *, SoSensor *)
float sqrlen(const SbVec3f &)
SoText2 * mouseOverTextLogName
SoCoordinate3 * sgeometry
void setStartingPtForAnimation()
std::string viewPtAutoName()
HookEventProcState * hookBeamOn
G4VStateDependent(G4bool bottom=false)
virtual G4bool Notify(G4ApplicationState requestedState)
HookEventProcState(G4OpenInventorQtExaminerViewer *)
G4bool operator<(elementForSorting const &other) const
float distanceToBeamlineStart