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*);
133 int OWwidth, OWheight;
135 void (*escapeCallback)();
137 void* examinerObject;
138 SbBool lshiftdown, rshiftdown, lctrldown, rctrldown;
146 QMessageBox* helpmsgbox;
150 QAction* FileOpenBookmark;
151 QAction* FileNewBookmark;
152 QAction* FileLoadRefPath;
153 QAction* FileSaveRefPath;
154 QAction* FileLoadSceneGraph;
155 QAction* FileSaveSceneGraph;
157 QAction* ToolsAnimateRefParticle;
158 QAction* ToolsRefPathStart;
159 QAction* ToolsRefPathInvert;
162 QAction* HelpControls;
165 QPushButton* saveViewPtButton;
166 QPushButton* nextViewPtButton;
167 QPushButton* prevViewPtButton;
168 QPushButton* abbrOutputButton;
169 QPushButton* pickRefPathButton;
170 QPushButton* switchWireFrameButton;
171 QPushButton* switchAxesButton;
172 QPushButton* detachButton;
174 QListWidgetItem* saveViewPtItem;
180 QWidget* viewerParent;
181 QWidget* viewerParent2;
184 int processSoEventCount;
190 const char* name = NULL,
192 SoQtFullViewer::BuildFlag flag = BUILD_ALL,
193 SoQtViewer::Type type = BROWSER);
197 template <
class T>
void parseString(T &t,
const std::string &s,
bool &error);
255 void zoom(
const float);
256 void moveCamera(
float dist = 0,
bool lookdown =
false);
263 static void mouseoverCB(
void *aThis, SoEventCallback *eventCB);
264 static void pickingCB(
void *aThis, SoEventCallback *eventCB);
289 float sqrlen(
const SbVec3f&);
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 *)
SbBool processSoEvent(const SoEvent *const event)
void renameViewPt(char *vpName)
SoFont * mouseOverFontMaterial
std::vector< float > refZPositions
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
virtual G4bool Notify(G4ApplicationState requestedState)
G4bool operator<(elementForSorting const &other) const
float distanceToBeamlineStart