Import Geant4 11.0.0.beta source tree
This commit is contained in:
@@ -65,6 +65,8 @@ private:
|
||||
|
||||
#include <qobject.h>
|
||||
|
||||
class G4UIQt;
|
||||
|
||||
class SoCoordinate3;
|
||||
class SoFont;
|
||||
class SoText2;
|
||||
@@ -116,6 +118,8 @@ private Q_SLOTS :
|
||||
void AbbrOutputCB(bool); // Includes mouse-over fcns
|
||||
void PickRefPathCB();
|
||||
void SwitchWireFrameCB(bool);
|
||||
void SwitchAxesCB(bool);
|
||||
void DetachCB();
|
||||
|
||||
// Lists Window
|
||||
void LoadBookmarkCB(QListWidgetItem*);
|
||||
@@ -127,10 +131,12 @@ private Q_SLOTS :
|
||||
private:
|
||||
|
||||
static G4OpenInventorQtExaminerViewer* viewer;
|
||||
const char* fName;
|
||||
QString* fName;
|
||||
|
||||
int OWwidth, OWheight;
|
||||
|
||||
void (*escapeCallback)();
|
||||
// void (*escapeCallback)(void*);
|
||||
|
||||
void* examinerObject;
|
||||
SbBool lshiftdown, rshiftdown, lctrldown, rctrldown;
|
||||
|
||||
@@ -163,16 +169,23 @@ private:
|
||||
QPushButton* nextViewPtButton;
|
||||
QPushButton* prevViewPtButton;
|
||||
QPushButton* abbrOutputButton;
|
||||
// QRadioButton* abbrOutputButton;
|
||||
QPushButton* pickRefPathButton;
|
||||
QPushButton* switchWireFrameButton;
|
||||
// QRadioButton* switchWireFrameButton;
|
||||
QPushButton* switchAxesButton;
|
||||
QPushButton* detachButton;
|
||||
|
||||
QListWidgetItem* saveViewPtItem;
|
||||
|
||||
Ui_Dialog* AuxWindowDialog;
|
||||
QDialog* AuxWindow;
|
||||
|
||||
|
||||
G4UIQt* uiQt;
|
||||
QWidget* viewerParent;
|
||||
QWidget* viewerParent2;
|
||||
int uiQtTabIndex;
|
||||
|
||||
int processSoEventCount;
|
||||
|
||||
public:
|
||||
|
||||
G4OpenInventorQtExaminerViewer(QWidget* parent = NULL,
|
||||
@@ -185,6 +198,9 @@ public:
|
||||
|
||||
template <class T> void parseString(T &t, const std::string &s, bool &error);
|
||||
|
||||
// In case the viewer is embedded and then detached:
|
||||
void setOrigWindowSize(int w, int h) { OWwidth = w; OWheight = h; }
|
||||
|
||||
// Menubar information needed by G4OpenInventorQtViewer
|
||||
// for common menu items:
|
||||
QMenuBar* getMenubar() { return menubar; }
|
||||
@@ -199,7 +215,6 @@ public:
|
||||
std::string saveRefCoordsFileName;
|
||||
|
||||
void addEscapeCallback(void (*cb)());
|
||||
// void addEscapeCallback(void (*cb)(void *), void *);
|
||||
|
||||
bool abbrOutputFlag;
|
||||
bool pickRefPathFlag;
|
||||
@@ -227,7 +242,6 @@ protected:
|
||||
|
||||
static void sceneChangeCB(void*, SoSensor*);
|
||||
|
||||
// FWJ try to handle events as in XtExaminerViewer
|
||||
SbBool processSoEvent(const SoEvent* const event);
|
||||
|
||||
void saveViewPt(char* name);
|
||||
@@ -240,6 +254,7 @@ protected:
|
||||
void renameViewPt(char *vpName);
|
||||
void sortViewPts(std::vector<std::string>);
|
||||
|
||||
void zoom(const float);
|
||||
void moveCamera(float dist = 0, bool lookdown = false);
|
||||
std::string curEltName;
|
||||
SbVec3f camUpVec;
|
||||
|
||||
@@ -36,9 +36,10 @@
|
||||
|
||||
#include <Inventor/nodes/SoEventCallback.h>
|
||||
|
||||
//class SoQtExaminerViewer;
|
||||
class G4OpenInventorQtExaminerViewer;
|
||||
|
||||
class SoQtViewer;
|
||||
|
||||
#include <qobject.h>
|
||||
|
||||
class QMenuBar;
|
||||
@@ -46,7 +47,6 @@ class QFont;
|
||||
class QAction;
|
||||
|
||||
|
||||
//class G4OpenInventorQtViewer: public G4OpenInventorViewer {
|
||||
class G4OpenInventorQtViewer: public QObject,
|
||||
public G4OpenInventorViewer {
|
||||
|
||||
@@ -92,20 +92,22 @@ private:
|
||||
|
||||
public:
|
||||
|
||||
G4OpenInventorQtViewer(G4OpenInventorSceneHandler& scene,
|
||||
G4OpenInventorQtViewer(G4OpenInventorSceneHandler& scene,
|
||||
const G4String& name = "");
|
||||
virtual ~G4OpenInventorQtViewer();
|
||||
void Initialise();
|
||||
virtual ~G4OpenInventorQtViewer();
|
||||
void Initialise();
|
||||
|
||||
public: //G4VViewer
|
||||
|
||||
virtual void FinishView();
|
||||
virtual void SetView();
|
||||
virtual void FinishView();
|
||||
virtual void SetView();
|
||||
|
||||
protected:
|
||||
|
||||
virtual void ViewerRender();
|
||||
virtual SoCamera* GetCamera();
|
||||
virtual void ViewerRender();
|
||||
virtual SoCamera* GetCamera();
|
||||
// FWJ found insufficient to replace group and camera sensors
|
||||
// static void FinishCB(void*, SoQtViewer*);
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
@@ -56,18 +56,15 @@ public:
|
||||
|
||||
G4OpenInventorSceneHandler (G4OpenInventor& system, const G4String& name = "");
|
||||
virtual ~G4OpenInventorSceneHandler ();
|
||||
|
||||
using G4VSceneHandler::AddPrimitive;
|
||||
void AddPrimitive (const G4Polyline& line);
|
||||
void AddPrimitive (const G4Text&);
|
||||
void AddPrimitive (const G4Circle&);
|
||||
void AddPrimitive (const G4Square&);
|
||||
void AddPrimitive (const G4Polyhedron& p);
|
||||
void AddPrimitive (const G4Polymarker&);
|
||||
////////////////////////////////////////////////////////////////
|
||||
// Explicitly invoke base class methods to avoid warnings about
|
||||
// hiding of base class methods.
|
||||
void AddPrimitive (const G4Scale& scale) {
|
||||
G4VSceneHandler::AddPrimitive (scale);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////
|
||||
// Other inherited functions.
|
||||
void ClearStore ();
|
||||
|
||||
@@ -59,6 +59,7 @@ public:
|
||||
G4OpenInventorViewer(G4OpenInventorSceneHandler& scene,
|
||||
const G4String& name = "");
|
||||
virtual ~G4OpenInventorViewer();
|
||||
|
||||
protected:
|
||||
virtual void ViewerRender() = 0;
|
||||
virtual SoCamera* GetCamera() = 0;
|
||||
@@ -77,11 +78,11 @@ protected:
|
||||
void SetReducedWireFrame(bool);
|
||||
void UpdateScene();
|
||||
G4String Help(const G4String& topic = "controls");
|
||||
|
||||
private:
|
||||
//static void SelectionCB(void*,SoPath*);
|
||||
//static void DeselectionCB(void*,SoPath*);
|
||||
static void GroupCameraSensorCB(void*,SoSensor*);
|
||||
static void CameraSensorCB(void*,SoSensor*);
|
||||
// FWJ no longer needed:
|
||||
// static void CameraSensorCB(void*,SoSensor*);
|
||||
static void pointAt(SoCamera*,const SbVec3f & targetpoint, const SbVec3f & upvector);
|
||||
static void lookAt(SoCamera*,const SbVec3f & dir, const SbVec3f & up);
|
||||
static void lookedAt(SoCamera*,SbVec3f & dir, SbVec3f & up);
|
||||
@@ -98,7 +99,8 @@ protected:
|
||||
Geant4_SoImageWriter* fSoImageWriter;
|
||||
Geant4_SoGL2PSAction* fGL2PSAction;
|
||||
SoNodeSensor* fGroupCameraSensor;
|
||||
SoNodeSensor* fCameraSensor;
|
||||
// FWJ no longer needed:
|
||||
// SoNodeSensor* fCameraSensor;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user