Import Geant4 11.3.0.beta source tree
This commit is contained in:
@@ -0,0 +1,498 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
|
||||
// Frederick Jones TRIUMF 07 January 2018
|
||||
|
||||
|
||||
#ifndef G4OPENINVENTORQTEXAMINERVIEWER_HH
|
||||
#define G4OPENINVENTORQTEXAMINERVIEWER_HH
|
||||
|
||||
// Set up notification of event processing
|
||||
|
||||
#include "G4VStateDependent.hh"
|
||||
|
||||
class G4OpenInventorQtExaminerViewer;
|
||||
|
||||
class HookEventProcState : public G4VStateDependent
|
||||
{
|
||||
public:
|
||||
HookEventProcState(G4OpenInventorQtExaminerViewer*);
|
||||
~HookEventProcState();
|
||||
virtual G4bool Notify(G4ApplicationState requestedState);
|
||||
private:
|
||||
G4OpenInventorQtExaminerViewer* viewer;
|
||||
};
|
||||
|
||||
|
||||
#include "G4String.hh"
|
||||
|
||||
//#include "G4OpenInventorViewer.hh"
|
||||
|
||||
#include <map>
|
||||
#include <vector>
|
||||
#include <fstream>
|
||||
#include <Inventor/SbLinear.h>
|
||||
#include <Inventor/nodes/SoLineSet.h>
|
||||
#include <Inventor/nodes/SoEventCallback.h>
|
||||
#include <Inventor/Qt/viewers/SoQtExaminerViewer.h>
|
||||
#include <Inventor/events/SoKeyboardEvent.h>
|
||||
|
||||
#include <qobject.h>
|
||||
|
||||
class G4UIQt;
|
||||
|
||||
class SoCoordinate3;
|
||||
class SoFont;
|
||||
class SoText2;
|
||||
class SoPointSet;
|
||||
|
||||
class QWidget;
|
||||
class QDialog;
|
||||
class QMenuBar;
|
||||
class QMenu;
|
||||
class QAction;
|
||||
class QListWidgetItem;
|
||||
class QPushButton;
|
||||
class QRadioButton;
|
||||
class QMessageBox;
|
||||
class QFont;
|
||||
|
||||
// The Aux Window dialog created with Qt Designer:
|
||||
class Ui_Dialog;
|
||||
|
||||
|
||||
class G4OpenInventorQtExaminerViewer: public QObject,
|
||||
public SoQtExaminerViewer {
|
||||
|
||||
Q_OBJECT
|
||||
|
||||
// friend class G4OpenInventorQtExaminerViewerMessenger;
|
||||
// FWJ
|
||||
friend class G4OpenInventorQtViewer;
|
||||
|
||||
private Q_SLOTS :
|
||||
|
||||
void FileOpenBookmarkCB();
|
||||
void FileNewBookmarkCB();
|
||||
void FileLoadRefPathCB();
|
||||
void FileSaveRefPathCB();
|
||||
void FileLoadSceneGraphCB();
|
||||
void FileSaveSceneGraphCB();
|
||||
|
||||
void ToolsAnimateRefParticleCB();
|
||||
void ToolsRefPathStartCB();
|
||||
void ToolsRefPathInvertCB();
|
||||
|
||||
void HelpControlsCB();
|
||||
|
||||
// For added viewer buttons
|
||||
void SaveViewPtCB();
|
||||
void NextViewPtCB();
|
||||
void PrevViewPtCB();
|
||||
void AbbrOutputCB(bool); // Includes mouse-over fcns
|
||||
void PickRefPathCB();
|
||||
void SwitchWireFrameCB(bool);
|
||||
void SwitchAxesCB(bool);
|
||||
void DetachCB();
|
||||
|
||||
// Lists Window
|
||||
void LoadBookmarkCB(QListWidgetItem*);
|
||||
void DeleteBookmarkCB();
|
||||
void RenameBookmarkCB();
|
||||
void SortBookmarksCB();
|
||||
void LookAtSceneElementCB(QListWidgetItem*);
|
||||
|
||||
private:
|
||||
|
||||
#if QT_VERSION < 0x060000
|
||||
static G4OpenInventorQtExaminerViewer* viewer;
|
||||
QString* fName;
|
||||
#else
|
||||
QString fName;
|
||||
#endif
|
||||
|
||||
#if QT_VERSION < 0x060000
|
||||
int OWwidth, OWheight;
|
||||
|
||||
void (*escapeCallback)();
|
||||
void* examinerObject;
|
||||
#endif
|
||||
|
||||
SbBool lshiftdown, rshiftdown, lctrldown, rctrldown;
|
||||
|
||||
QFont* font;
|
||||
QMenuBar* menubar;
|
||||
QMenu* filemenu;
|
||||
QMenu* toolsmenu;
|
||||
QMenu* etcmenu;
|
||||
QMenu* helpmenu;
|
||||
QMessageBox* helpmsgbox;
|
||||
|
||||
bool externalQtApp;
|
||||
|
||||
QAction* FileOpenBookmark;
|
||||
QAction* FileNewBookmark;
|
||||
QAction* FileLoadRefPath;
|
||||
QAction* FileSaveRefPath;
|
||||
QAction* FileLoadSceneGraph;
|
||||
QAction* FileSaveSceneGraph;
|
||||
|
||||
QAction* ToolsAnimateRefParticle;
|
||||
QAction* ToolsRefPathStart;
|
||||
QAction* ToolsRefPathInvert;
|
||||
|
||||
// KEEP in the viewer
|
||||
QAction* HelpControls;
|
||||
|
||||
// Added viewer buttons
|
||||
QPushButton* saveViewPtButton;
|
||||
QPushButton* nextViewPtButton;
|
||||
QPushButton* prevViewPtButton;
|
||||
QPushButton* abbrOutputButton;
|
||||
QPushButton* pickRefPathButton;
|
||||
QPushButton* switchWireFrameButton;
|
||||
QPushButton* switchAxesButton;
|
||||
QPushButton* detachButton;
|
||||
|
||||
QListWidgetItem* saveViewPtItem;
|
||||
|
||||
Ui_Dialog* AuxWindowDialog;
|
||||
QDialog* AuxWindow;
|
||||
|
||||
G4UIQt* uiQt;
|
||||
#if QT_VERSION < 0x060000
|
||||
QWidget* viewerParent;
|
||||
QWidget* viewerParent2;
|
||||
int uiQtTabIndex;
|
||||
#endif
|
||||
|
||||
int processSoEventCount;
|
||||
#if QT_VERSION < 0x060000
|
||||
G4String empty = "";
|
||||
#endif
|
||||
|
||||
public:
|
||||
|
||||
G4OpenInventorQtExaminerViewer(QWidget* parent = NULL,
|
||||
const char* name = NULL,
|
||||
SbBool embed = TRUE,
|
||||
SoQtFullViewer::BuildFlag flag = BUILD_ALL,
|
||||
SoQtViewer::Type type = BROWSER);
|
||||
|
||||
~G4OpenInventorQtExaminerViewer();
|
||||
|
||||
template <class T> void parseString(T &t, const std::string &s, bool &error);
|
||||
|
||||
#if QT_VERSION < 0x060000
|
||||
G4UIQt* GetUIQt() {return uiQt;}
|
||||
|
||||
// In case the viewer is embedded and then detached:
|
||||
void setOrigWindowSize(int w, int h) { OWwidth = w; OWheight = h; }
|
||||
#endif
|
||||
|
||||
// Menubar information needed by G4OpenInventorQtViewer
|
||||
// for common menu items:
|
||||
QMenuBar* getMenubar() { return menubar; }
|
||||
QMenu* getFileMenu() { return filemenu; }
|
||||
QMenu* getEtcMenu() { return etcmenu; }
|
||||
QFont* getFont() { return font; };
|
||||
|
||||
void setExternalQtApp() { externalQtApp = TRUE; }
|
||||
|
||||
#if QT_VERSION < 0x060000
|
||||
// Needed?
|
||||
std::string saveScenegraphFileName;
|
||||
std::string saveRefCoordsFileName;
|
||||
|
||||
void addEscapeCallback(void (*cb)());
|
||||
#endif
|
||||
|
||||
bool abbrOutputFlag;
|
||||
bool pickRefPathFlag;
|
||||
bool viewingBeforePickRef;
|
||||
|
||||
#if 0x060000 <= QT_VERSION
|
||||
void addInTab();
|
||||
#endif
|
||||
|
||||
protected:
|
||||
// FWJ Constructor with build flag added (as in parent)
|
||||
// Need for this TBD.
|
||||
// G4OpenInventorQtExaminerViewer(QWidget parent,
|
||||
// const char *name,
|
||||
// SbBool embed,
|
||||
// SoQtFullViewer::BuildFlag flag,
|
||||
// SoQtViewer::Type type,
|
||||
// SbBool build);
|
||||
|
||||
void construct(const SbBool build);
|
||||
void buildWidget(QWidget* parent);
|
||||
|
||||
#if QT_VERSION < 0x060000
|
||||
virtual void afterRealizeHook();
|
||||
#else
|
||||
void setupSceneGraph();
|
||||
#endif
|
||||
|
||||
HookEventProcState* hookBeamOn;
|
||||
friend class HookEventProcState;
|
||||
bool newEvents;
|
||||
|
||||
static void sceneChangeCB(void*, SoSensor*);
|
||||
|
||||
SbBool processSoEvent(const SoEvent* const event);
|
||||
|
||||
void saveViewPt(char* name);
|
||||
bool loadViewPts();
|
||||
void addViewPoints();
|
||||
void setViewPt();
|
||||
void writeViewPtIdx();
|
||||
void cleanUpAfterPrevFile();
|
||||
void deleteViewPt(char *vpName = NULL);
|
||||
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;
|
||||
SbVec3f camDir;
|
||||
void rotateCamera();
|
||||
void updateViewParams(SoKeyboardEvent::Key);
|
||||
|
||||
static void mouseoverCB(void *aThis, SoEventCallback *eventCB);
|
||||
static void pickingCB(void *aThis, SoEventCallback *eventCB);
|
||||
|
||||
|
||||
// Animation
|
||||
static void animateRefParticleCB();
|
||||
static void animateSensorCB(void *, SoSensor *);
|
||||
static void animateSensorRotationCB(void *, SoSensor *);
|
||||
void animateRefParticle();
|
||||
void saveCurCamera();
|
||||
void restoreCamera();
|
||||
double animateBtwPtsPeriod, speedStep;
|
||||
void incSpeed();
|
||||
void decSpeed();
|
||||
|
||||
SoTimerSensor *animateSensor;
|
||||
SoTimerSensor *animateSensorRotation;
|
||||
SoNodeSensor *sceneChangeSensor;
|
||||
SbVec3f camStartPos, camEndPos;
|
||||
SbRotation camStartOrient, camEndOrient;
|
||||
|
||||
void setReferencePath(SoLineSet*, SoCoordinate3*, bool append = false);
|
||||
void setReferencePathZPos();
|
||||
void findAndSetRefPath();
|
||||
SoCoordinate3* getCoordsNode(SoFullPath *path);
|
||||
void getSceneElements(); // reads elements from the scene graph
|
||||
float sqrlen(const SbVec3f&);
|
||||
void distanceToTrajectory(const SbVec3f&, float&, SbVec3f&, int&);
|
||||
void sortElements();
|
||||
void createElementsList();
|
||||
// static void closeMainWindowCB(Widget, XtPointer, XtPointer);
|
||||
void evenOutRefParticlePts();
|
||||
|
||||
// static void gotoRefPathStartCB(Widget, XtPointer, XtPointer);
|
||||
void gotoRefPathStart();
|
||||
// static void invertRefPathCB(Widget, XtPointer, XtPointer);
|
||||
void invertRefPath();
|
||||
|
||||
|
||||
enum CameraType {
|
||||
PERSPECTIVE,
|
||||
ORTHOGRAPHIC
|
||||
};
|
||||
enum State {
|
||||
GENERAL,
|
||||
BEAMLINE,
|
||||
VIEWPOINT,
|
||||
ANIMATION,
|
||||
REVERSED_ANIMATION,
|
||||
PAUSED_ANIMATION,
|
||||
ROTATING
|
||||
};
|
||||
|
||||
// For storing the view point
|
||||
struct viewPtData {
|
||||
#if QT_VERSION < 0x060000
|
||||
char* viewPtName{nullptr};
|
||||
#else
|
||||
std::string viewPtName;
|
||||
#endif
|
||||
int viewportMapping{0};
|
||||
SbVec3f position{0.0, 0.0, 0.0} ;
|
||||
SbRotation orientation{};
|
||||
float aspectRatio{0.0};
|
||||
float nearDistance{0.0};
|
||||
float farDistance{0.0};
|
||||
float focalDistance{0.0};
|
||||
CameraType camType{PERSPECTIVE};
|
||||
float height{0.0};
|
||||
};
|
||||
|
||||
struct sceneElement {
|
||||
std::string name;
|
||||
SoFullPath* path;
|
||||
SbVec3f center;
|
||||
float closestPointZCoord;
|
||||
};
|
||||
|
||||
struct elementForSorting {
|
||||
float closestPointZCoord;
|
||||
SbVec3f closestPoint;
|
||||
float smallestDistance;
|
||||
float distanceToBeamlineStart;
|
||||
std::string name;
|
||||
|
||||
G4bool operator<(elementForSorting const &other) const
|
||||
{
|
||||
if (closestPointZCoord < other.closestPointZCoord)
|
||||
return true;
|
||||
if (closestPointZCoord > other.closestPointZCoord)
|
||||
return false;
|
||||
|
||||
// otherwise closestPointZCoord == other.closestPointZCoord.
|
||||
// Compare the distances from the center of the element to
|
||||
// the start of the beamline.
|
||||
if (distanceToBeamlineStart < other.distanceToBeamlineStart)
|
||||
return true;
|
||||
if (distanceToBeamlineStart > other.distanceToBeamlineStart)
|
||||
return false;
|
||||
|
||||
// In case both closestPointZCoord and smallestDistance are
|
||||
// equal, we have two exactly overlapping elements, if so
|
||||
// the order doesn't matter
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
bool zcoordSetFlag;
|
||||
|
||||
std::vector<sceneElement> sceneElements;
|
||||
std::vector<viewPtData> viewPtList;
|
||||
std::string fileName;
|
||||
std::ifstream fileIn;
|
||||
std::ofstream fileOut;
|
||||
int viewPtIdx;
|
||||
int MAX_VP_IDX;
|
||||
int MAX_VP_NAME;
|
||||
|
||||
// For storing coordinate points of the reference particle
|
||||
std::vector<SbVec3f> refParticleTrajectory;
|
||||
// For displaying distance during anim and beamline modes
|
||||
std::vector<float> refZPositions;
|
||||
|
||||
int refParticleIdx;
|
||||
int prevRefIdx;
|
||||
float distance;
|
||||
State currentState, prevState, beforePausing;
|
||||
#if QT_VERSION < 0x060000
|
||||
char* curViewPtName;
|
||||
#else
|
||||
std::string curViewPtName;
|
||||
#endif
|
||||
|
||||
int step;
|
||||
SbVec3f prevPt;
|
||||
SbVec3f prevParticleDir;
|
||||
void* prevColorField;
|
||||
|
||||
viewPtData camB4Animation;
|
||||
bool returnToSaveVP;
|
||||
bool returnToAnim;
|
||||
SoCamera* myCam;
|
||||
void setStartingPtForAnimation();
|
||||
float left_right, up_down;
|
||||
SbVec3f rotAxis; // For 90 degree rotations
|
||||
int rotCnt; // # of steps rotation is split into
|
||||
|
||||
std::string viewPtAutoName();
|
||||
|
||||
////////////////////////ANIM_SPEED_INDICATOR///////////////////////
|
||||
|
||||
SoSearchAction * searcher;
|
||||
|
||||
SoNode * superimposition;
|
||||
SoCoordinate3 * sgeometry;
|
||||
SoScale * sscale;
|
||||
|
||||
SoTranslation * stranslation;
|
||||
SoTranslation * curInfoTrans;
|
||||
SoTranslation * mouseOverTransSolid;
|
||||
SoTranslation * mouseOverTransMaterial;
|
||||
SoTranslation * mouseOverTransLogName;
|
||||
SoTranslation * mouseOverTransZPos;
|
||||
|
||||
// Used for 2 similar purposes: 1. Displays z position during animation
|
||||
// 2. Displays name of the current viewpoint
|
||||
SoText2 * curInfoText;
|
||||
|
||||
// Need to use many different fields for mouseover
|
||||
// because newlines are ignored when the scene is rendered
|
||||
SoText2* mouseOverTextSolid;
|
||||
SoText2* mouseOverTextMaterial;
|
||||
SoText2* mouseOverTextLogName;
|
||||
SoText2* mouseOverTextZPos;
|
||||
|
||||
SoFont* curInfoFont;
|
||||
SoFont* mouseOverFontSolid;
|
||||
SoFont* mouseOverFontMaterial;
|
||||
SoFont* mouseOverFontLogName;
|
||||
SoFont* mouseOverFontZPos;
|
||||
SoSwitch* axisSwitch;
|
||||
SoSwitch* animSpeedOutlineSwitch;
|
||||
SoSwitch* animSpeedSwitch;
|
||||
SoSwitch* curInfoSwitch;
|
||||
|
||||
SoNode* getSuperimpositionNode(SoNode*, const char* name);
|
||||
|
||||
void superimpositionEvent(SoAction* action);
|
||||
static void superimpositionCB(void* closure, SoAction* action);
|
||||
|
||||
|
||||
virtual void actualRedraw(void);
|
||||
void updateSpeedIndicator(void);
|
||||
|
||||
float maxSpeed;
|
||||
|
||||
////////////////////////ANIM_SPEED_INDICATOR///////////////////////
|
||||
|
||||
// FWJ added for Ortho camera
|
||||
float defaultHeight;
|
||||
float defaultHeightAngle;
|
||||
// FWJ add look-ahead for animation tracking on curves
|
||||
G4int pathLookahead;
|
||||
|
||||
// Used by G4 app during element rotations, stores previous view
|
||||
SbVec3f upVector, offsetFromCenter, center;
|
||||
bool rotUpVec;
|
||||
|
||||
SoSeparator* newSceneGraph;
|
||||
|
||||
};
|
||||
|
||||
#endif /* G4OPENINVENTORQTEXAMINERVIEWER_HH */
|
||||
@@ -0,0 +1,141 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
|
||||
// Frederick Jones TRIUMF 07 November 2017
|
||||
// Open Inventor viewer using SoQt.
|
||||
|
||||
#ifndef G4OPENINVENTORQTVIEWER_HH
|
||||
#define G4OPENINVENTORQTVIEWER_HH
|
||||
|
||||
// Inheritance :
|
||||
#include "G4OpenInventorViewer.hh"
|
||||
|
||||
#include <Inventor/nodes/SoEventCallback.h>
|
||||
|
||||
class G4OpenInventorQtExaminerViewer;
|
||||
|
||||
class SoQtViewer;
|
||||
|
||||
#include <qobject.h>
|
||||
|
||||
class QMenuBar;
|
||||
class QFont;
|
||||
class QAction;
|
||||
|
||||
#if 0x060000 <= QT_VERSION
|
||||
class G4OpenInventorQtDestroyCallback;
|
||||
#endif
|
||||
|
||||
class G4OpenInventorQtViewer: public QObject,
|
||||
public G4OpenInventorViewer {
|
||||
|
||||
Q_OBJECT
|
||||
|
||||
private Q_SLOTS :
|
||||
|
||||
// File menu
|
||||
void FileWritePSCB();
|
||||
void FileWritePDFCB();
|
||||
void FileWriteIVCB();
|
||||
void FileEscapeCB();
|
||||
|
||||
// Etc menu
|
||||
void EtcEraseDetectorCB();
|
||||
void EtcEraseEventCB();
|
||||
void EtcSetSolidCB();
|
||||
void EtcSetReducedWireframeCB();
|
||||
void EtcSetFullWireframeCB();
|
||||
void EtcVisibMInvisibDCB();
|
||||
void EtcVisibMVisibDCB();
|
||||
void EtcUpdateSceneCB();
|
||||
void EtcSceneGraphStatsCB();
|
||||
|
||||
private:
|
||||
|
||||
// File menu
|
||||
QAction* FileWritePS{nullptr};
|
||||
QAction* FileWritePDF{nullptr};
|
||||
QAction* FileWriteIV{nullptr};
|
||||
QAction* FileEscape{nullptr};
|
||||
|
||||
// Etc menu
|
||||
QAction* EtcEraseDetector{nullptr};
|
||||
QAction* EtcEraseEvent{nullptr};
|
||||
QAction* EtcSetSolid{nullptr};
|
||||
QAction* EtcSetReducedWireframe{nullptr};
|
||||
QAction* EtcSetFullWireframe{nullptr};
|
||||
QAction* EtcVisibMInvisibD{nullptr};
|
||||
QAction* EtcVisibMVisibD{nullptr};
|
||||
QAction* EtcUpdateScene{nullptr};
|
||||
QAction* EtcSceneGraphStats{nullptr};
|
||||
|
||||
public:
|
||||
|
||||
G4OpenInventorQtViewer(G4OpenInventorSceneHandler& scene,
|
||||
const G4String& name = "");
|
||||
virtual ~G4OpenInventorQtViewer();
|
||||
void Initialise();
|
||||
|
||||
public: //G4VViewer
|
||||
|
||||
virtual void FinishView();
|
||||
virtual void SetView();
|
||||
|
||||
protected:
|
||||
|
||||
virtual void ViewerRender();
|
||||
virtual SoCamera* GetCamera();
|
||||
// FWJ found insufficient to replace group and camera sensors
|
||||
// static void FinishCB(void*, SoQtViewer*);
|
||||
|
||||
protected:
|
||||
|
||||
//SoQtExaminerViewer* fViewer;
|
||||
G4OpenInventorQtExaminerViewer* fViewer;
|
||||
|
||||
#if 0x060000 <= QT_VERSION
|
||||
G4OpenInventorQtDestroyCallback* fDestroyCallback;
|
||||
#endif
|
||||
};
|
||||
|
||||
//G.Barrand: I don't put the below class within "#if 0x060000 <= QT_VERSION"
|
||||
// since Qt6/moc does not handle it correctly! (With it, Qt6/moc
|
||||
// will anyway NOT handle this class. It looks to be a known Qt problem).
|
||||
//#if 0x060000 <= QT_VERSION
|
||||
class G4OpenInventorQtDestroyCallback : public QObject {
|
||||
Q_OBJECT
|
||||
public:
|
||||
G4OpenInventorQtDestroyCallback(G4OpenInventorQtViewer* a_viewer):fViewer(a_viewer) {}
|
||||
virtual ~G4OpenInventorQtDestroyCallback() = default;
|
||||
public slots:
|
||||
void execute(){
|
||||
delete fViewer;
|
||||
}
|
||||
private:
|
||||
G4OpenInventorQtViewer* fViewer;
|
||||
};
|
||||
//#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,102 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
// J Kallenbach 27th Aug 1996
|
||||
// OpenInventor scene handler - creates OpenInventor Display lists.
|
||||
// 20 dec 1996 jck Add HEPVis primitives - trd, box, etc.
|
||||
|
||||
#ifndef G4OPENINVENTORSCENEHANDLER_HH
|
||||
#define G4OPENINVENTORSCENEHANDLER_HH
|
||||
|
||||
// Inheritance :
|
||||
#include "G4VSceneHandler.hh"
|
||||
|
||||
#include "G4PhysicalVolumeModel.hh"
|
||||
|
||||
#include <map>
|
||||
|
||||
class G4OpenInventor;
|
||||
class SoSeparator;
|
||||
class Geant4_SoStyleCache;
|
||||
class G4VisAttributes;
|
||||
|
||||
// Base class for various OpenInventorScene classes.
|
||||
class G4OpenInventorSceneHandler: public G4VSceneHandler {
|
||||
|
||||
friend class G4OpenInventorViewer;
|
||||
|
||||
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&);
|
||||
|
||||
using G4VSceneHandler::AddCompound;
|
||||
void AddCompound (const G4Mesh&);
|
||||
|
||||
///////////////////////////////////////////////////////////////
|
||||
// Other inherited functions.
|
||||
void ClearStore ();
|
||||
void ClearTransientStore ();
|
||||
|
||||
//
|
||||
// Primitives for use of HEPVis
|
||||
//
|
||||
void PreAddSolid (const G4Transform3D& objectTransformation,
|
||||
const G4VisAttributes& visAttribs);
|
||||
void BeginPrimitives (const G4Transform3D& objectTransformation);
|
||||
|
||||
private:
|
||||
|
||||
static G4int fSceneIdCount; // static counter for OpenInventor scenes.
|
||||
enum G4OIMarker {G4OICircle, G4OISquare};
|
||||
void AddCircleSquare (G4OIMarker markerType, const G4VMarker&);
|
||||
void GeneratePrerequisites();
|
||||
void AddProperties(const G4VisAttributes*);
|
||||
// AddTransform takes fObjectTransformation and "adds" a translation.
|
||||
void AddTransform(const G4Point3D& translation = G4Point3D());
|
||||
std::map <G4LogicalVolume*, SoSeparator*,
|
||||
std::less <G4LogicalVolume*> > fSeparatorMap;
|
||||
SoSeparator* fRoot;
|
||||
SoSeparator* fDetectorRoot;
|
||||
SoSeparator* fTransientRoot;
|
||||
SoSeparator* fCurrentSeparator;
|
||||
G4bool fModelingSolid;
|
||||
G4bool fReducedWireFrame;
|
||||
Geant4_SoStyleCache* fStyleCache;
|
||||
bool fPreviewAndFull;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,53 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
// jck 17 Dec 1996
|
||||
// G4OpenGLInventorTransform3D provides SoSFMatrix transformation matrix
|
||||
// from G4Transform3D.
|
||||
|
||||
#ifndef G4OPENINVENTORTRANSFORM3D_HH
|
||||
#define G4OPENINVENTORTRANSFORM3D_HH
|
||||
|
||||
#include "G4Types.hh"
|
||||
#include "G4Transform3D.hh"
|
||||
|
||||
class SbMatrix;
|
||||
|
||||
class G4OpenInventorTransform3D : public G4Transform3D
|
||||
{
|
||||
public:
|
||||
|
||||
G4OpenInventorTransform3D (const G4Transform3D &t);
|
||||
SbMatrix* GetSbMatrix () const;
|
||||
|
||||
private:
|
||||
|
||||
G4float m[16];
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,104 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
|
||||
#ifndef G4OPENINVENTORVIEWER_HH
|
||||
#define G4OPENINVENTORVIEWER_HH
|
||||
|
||||
// Inheritance :
|
||||
#include "G4VViewer.hh"
|
||||
|
||||
class SoSelection;
|
||||
class SoPath;
|
||||
class SoCamera;
|
||||
class SoSensor;
|
||||
class SoNodeSensor;
|
||||
|
||||
class Geant4_SoImageWriter;
|
||||
class Geant4_SoGL2PSAction;
|
||||
class G4OpenInventorSceneHandler;
|
||||
class G4VInteractorManager;
|
||||
class SbVec3f;
|
||||
|
||||
//
|
||||
// Base class for various OpenInventorView classes.
|
||||
//
|
||||
class G4OpenInventorViewer: public G4VViewer {
|
||||
public: //G4VViewer
|
||||
virtual void DrawView();
|
||||
virtual void ShowView();
|
||||
virtual void ClearView();
|
||||
virtual void SetView();
|
||||
virtual void KernelVisitDecision();
|
||||
public:
|
||||
G4OpenInventorViewer(G4OpenInventorSceneHandler& scene,
|
||||
const G4String& name = "");
|
||||
virtual ~G4OpenInventorViewer();
|
||||
|
||||
protected:
|
||||
virtual void ViewerRender() = 0;
|
||||
virtual SoCamera* GetCamera() = 0;
|
||||
void Escape();
|
||||
void WritePostScript(const G4String& file = "g4out.ps");
|
||||
void WritePDF(const G4String& file = "g4out.pdf");
|
||||
void WritePixmapPostScript(const G4String& file = "g4out.ps");
|
||||
void WriteInventor(const G4String& file = "g4out.iv");
|
||||
void SceneGraphStatistics();
|
||||
void EraseDetector();
|
||||
void EraseEvent();
|
||||
void SetPreviewAndFull();
|
||||
void SetPreview();
|
||||
void SetSolid();
|
||||
void SetWireFrame();
|
||||
void SetReducedWireFrame(bool);
|
||||
void UpdateScene();
|
||||
G4String Help(const G4String& topic = "controls");
|
||||
|
||||
private:
|
||||
static void GroupCameraSensorCB(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);
|
||||
private:
|
||||
G4bool CompareForKernelVisit(G4ViewParameters&);
|
||||
void DrawDetector();
|
||||
private:
|
||||
G4ViewParameters fLastVP; // Memory for making kernel visit decisions.
|
||||
protected:
|
||||
static void SelectionCB(void*,SoPath*);
|
||||
G4OpenInventorSceneHandler& fG4OpenInventorSceneHandler;
|
||||
G4VInteractorManager* fInteractorManager;
|
||||
SoSelection* fSoSelection;
|
||||
Geant4_SoImageWriter* fSoImageWriter;
|
||||
Geant4_SoGL2PSAction* fGL2PSAction;
|
||||
SoNodeSensor* fGroupCameraSensor;
|
||||
// FWJ no longer needed:
|
||||
// SoNodeSensor* fCameraSensor;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,62 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
// Jeff Kallenbach 01 Aug 1996
|
||||
// OpenInventor viewer - opens window, hard copy, etc.
|
||||
|
||||
#ifndef G4OPENINVENTORWINVIEWER_HH
|
||||
#define G4OPENINVENTORWINVIEWER_HH
|
||||
|
||||
// Inheritance :
|
||||
#include "G4OpenInventorViewer.hh"
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
class Geant4_SoWinExaminerViewer;
|
||||
|
||||
class G4OpenInventorWinViewer: public G4OpenInventorViewer {
|
||||
public: //G4VViewer
|
||||
virtual void FinishView();
|
||||
virtual void SetView();
|
||||
protected:
|
||||
virtual void ViewerRender();
|
||||
virtual SoCamera* GetCamera();
|
||||
public:
|
||||
G4OpenInventorWinViewer(G4OpenInventorSceneHandler& scene,
|
||||
const G4String& name = "");
|
||||
virtual ~G4OpenInventorWinViewer();
|
||||
void Initialise();
|
||||
|
||||
private:
|
||||
static LRESULT CALLBACK WindowProc(HWND,UINT,WPARAM,LPARAM);
|
||||
private:
|
||||
HWND fShell;
|
||||
Geant4_SoWinExaminerViewer* fViewer;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,402 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// Open Inventor Xt Extended Viewer - 30 Oct 2012
|
||||
// Rastislav Ondrasek, Pierre-Luc Gagnon, Frederick Jones TRIUMF
|
||||
|
||||
#ifndef HookEventProcState_H
|
||||
#define HookEventProcState_H 1
|
||||
#include "G4VStateDependent.hh"
|
||||
|
||||
class G4OpenInventorXtExaminerViewer;
|
||||
|
||||
class HookEventProcState : public G4VStateDependent
|
||||
{
|
||||
private:
|
||||
G4OpenInventorXtExaminerViewer *viewer;
|
||||
public:
|
||||
HookEventProcState(G4OpenInventorXtExaminerViewer*);
|
||||
~HookEventProcState();
|
||||
|
||||
virtual G4bool Notify(G4ApplicationState requiredState);
|
||||
};
|
||||
#endif /* HookEventProcState_H */
|
||||
|
||||
|
||||
#ifndef G4OPENINVENTORXTEXAMINERVIEWER_HH
|
||||
#define G4OPENINVENTORXTEXAMINERVIEWER_HH
|
||||
|
||||
#include <map>
|
||||
#include <vector>
|
||||
#include <fstream>
|
||||
#include <Inventor/SbLinear.h>
|
||||
#include <Inventor/nodes/SoLineSet.h>
|
||||
#include <Inventor/nodes/SoEventCallback.h>
|
||||
#include <Inventor/Xt/viewers/SoXtExaminerViewer.h>
|
||||
#include <Inventor/events/SoKeyboardEvent.h>
|
||||
|
||||
class SoCoordinate3;
|
||||
class SoFont;
|
||||
class SoText2;
|
||||
class SoPointSet;
|
||||
|
||||
class G4OpenInventorXtExaminerViewer : public SoXtExaminerViewer {
|
||||
|
||||
friend class G4OpenInventorXtExaminerViewerMessenger;
|
||||
// FWJ
|
||||
friend class G4OpenInventorXtExtendedViewer;
|
||||
|
||||
private:
|
||||
Widget prevViewPtButton, nextViewPtButton;
|
||||
Widget menuBar, fileMenu, openFileDialog, newFileDialog,
|
||||
loadRefCoordsDialog, saveRefCoordsDialog,
|
||||
loadSceneGraphDialog, saveSceneGraphDialog,
|
||||
viewPtSelection, listsDialog, myShellDialog, myViewPtList, myElementList;
|
||||
|
||||
static G4OpenInventorXtExaminerViewer *viewer;
|
||||
void (*escapeCallback)(void *);
|
||||
void * examinerObject;
|
||||
SbBool lshiftdown, rshiftdown, lctrldown, rctrldown;
|
||||
|
||||
public:
|
||||
|
||||
// Same constructor as the ExaminerViewer
|
||||
G4OpenInventorXtExaminerViewer(Widget parent = NULL,
|
||||
const char *name = NULL,
|
||||
SbBool embed = TRUE,
|
||||
SoXtFullViewer::BuildFlag flag = BUILD_ALL,
|
||||
SoXtViewer::Type type = BROWSER);
|
||||
|
||||
~G4OpenInventorXtExaminerViewer();
|
||||
|
||||
template <class T> void parseString(T &t, const std::string &s, bool &error);
|
||||
|
||||
Widget addMenu(std::string name);
|
||||
void addButton(Widget menu, std::string name, XtCallbackProc);
|
||||
Widget getMenuBar() { return menuBar; }
|
||||
Widget getMenu() { return fileMenu; }
|
||||
void warningMsgDialog(std::string, String, XtCallbackProc);
|
||||
bool warningFlag;
|
||||
|
||||
std::string saveScenegraphFileName;
|
||||
Widget saveScenegraphWidget;
|
||||
std::string saveRefCoordsFileName;
|
||||
Widget saveRefCoordsWidget;
|
||||
|
||||
Widget createScale(Widget, char *, int, float);
|
||||
void addEscapeCallback(void (*cb)(void *), void *);
|
||||
bool abbrOutputFlag;
|
||||
bool pickRefPathFlag;
|
||||
bool viewingBeforePickRef;
|
||||
// FWJ
|
||||
// SoNode * superimposition;
|
||||
|
||||
protected:
|
||||
// Same constructor as the ExaminerViewer
|
||||
G4OpenInventorXtExaminerViewer(Widget parent,
|
||||
const char *name,
|
||||
SbBool embed,
|
||||
SoXtFullViewer::BuildFlag flag,
|
||||
SoXtViewer::Type type,
|
||||
SbBool build);
|
||||
|
||||
// Overloaded for adding the MenuBar
|
||||
Widget buildWidget(Widget parent);
|
||||
// Overloaded so additional buttons can be added
|
||||
virtual void createViewerButtons (Widget parent, SbPList * buttonlist);
|
||||
// Overloaded for catching various keyboard events
|
||||
virtual SbBool processSoEvent(const SoEvent * const event);
|
||||
void moveCamera(float dist = 0, bool lookdown = false);
|
||||
std::string curEltName;
|
||||
SbVec3f camUpVec;
|
||||
SbVec3f camDir;
|
||||
void rotateCamera();
|
||||
void updateViewParams(SoKeyboardEvent::Key);
|
||||
bool loadViewPts();
|
||||
virtual void afterRealizeHook();
|
||||
|
||||
private:
|
||||
// Each constructor calls this generic constructor
|
||||
void constructor(const SbBool build);
|
||||
|
||||
// FWJ DISABLED
|
||||
// static G4OpenInventorXtExaminerViewer *getObject();
|
||||
|
||||
HookEventProcState *hookBeamOn;
|
||||
friend class HookEventProcState;
|
||||
bool newEvents;
|
||||
static void sceneChangeCB(void *, SoSensor *);
|
||||
|
||||
void setViewPt();
|
||||
void writeViewPtIdx();
|
||||
void cleanUpAfterPrevFile();
|
||||
|
||||
void popUpFileSelDialog(Widget&, std::string, std::string, XtCallbackProc);
|
||||
static void cancelFileSelDialogCB(Widget, XtPointer, XtPointer);
|
||||
static void openViewPtFileCB(Widget, XtPointer, XtPointer);
|
||||
static void viewPtFileSelectedCB(Widget, XtPointer, XtPointer);
|
||||
static void newViewPtFileCB(Widget, XtPointer, XtPointer);
|
||||
static void createNewVPFileCB(Widget, XtPointer, XtPointer);
|
||||
static void overwriteFileCB(Widget, XtPointer, XtPointer);
|
||||
static void loadRefCoordsDialogCB(Widget, XtPointer, XtPointer); //pop file dialog
|
||||
static void loadRefCoordsCB(Widget, XtPointer, XtPointer); //execute loading
|
||||
static void saveRefCoordsDialogCB(Widget, XtPointer, XtPointer); //pop file dialog
|
||||
static void saveRefCoordsCB(Widget, XtPointer, XtPointer); //execute saving
|
||||
static void saveRefCoordsOverWriteCB(Widget, XtPointer, XtPointer);
|
||||
static void loadSceneGraphDialogCB(Widget, XtPointer, XtPointer);
|
||||
static void loadSceneGraphCB(Widget, XtPointer, XtPointer);
|
||||
static void saveSceneGraphDialogCB(Widget, XtPointer, XtPointer);
|
||||
static void saveSceneGraphCB(Widget, XtPointer, XtPointer);
|
||||
static void saveSceneGraphOverWriteCB(Widget, XtPointer, XtPointer);
|
||||
static void mouseoverCB(void *aThis, SoEventCallback *eventCB);
|
||||
static void pickingCB(void *aThis, SoEventCallback *eventCB);
|
||||
|
||||
|
||||
// Viewpoint operations
|
||||
void addViewPoints();
|
||||
static void closeListsDialogCB(Widget, XtPointer, XtPointer);
|
||||
static void loadBookmarkCB(Widget, XtPointer, XtPointer);
|
||||
static void renameBookmarkCB(Widget, XtPointer, XtPointer);
|
||||
void renameViewPt(char *vpName);
|
||||
static void sortBookmarksCB(Widget, XtPointer, XtPointer);
|
||||
void sortViewPts(std::vector<std::string>);
|
||||
static void deleteBookmarkCB(Widget, XtPointer, XtPointer);
|
||||
static void deleteViewPtCB(Widget, XtPointer, XtPointer);
|
||||
void deleteViewPt(char *vpName = NULL);
|
||||
|
||||
// Animation
|
||||
static void animateRefParticleCB(Widget, XtPointer, XtPointer);
|
||||
static void animateSensorCB(void *, SoSensor *);
|
||||
static void animateSensorRotationCB(void *, SoSensor *);
|
||||
void animateRefParticle();
|
||||
void saveCurCamera();
|
||||
void restoreCamera();
|
||||
double animateBtwPtsPeriod, speedStep;
|
||||
void incSpeed();
|
||||
void decSpeed();
|
||||
|
||||
SoTimerSensor *animateSensor;
|
||||
SoTimerSensor *animateSensorRotation;
|
||||
SoNodeSensor *sceneChangeSensor;
|
||||
SbVec3f camStartPos, camEndPos;
|
||||
SbRotation camStartOrient, camEndOrient;
|
||||
|
||||
static void prevViewPtCB(Widget, XtPointer, XtPointer);
|
||||
static void nextViewPtCB(Widget, XtPointer, XtPointer);
|
||||
static void saveViewPtCB(Widget, XtPointer, XtPointer);
|
||||
static void abbrOutputCB(Widget, XtPointer, XtPointer);
|
||||
static void pickRefPathCB(Widget, XtPointer, XtPointer);
|
||||
static void switchWireFrameCB(Widget, XtPointer, XtPointer);
|
||||
static void constructListsDialog(Widget, XtPointer, XtPointer);
|
||||
void saveViewPt(char *name);
|
||||
|
||||
|
||||
static void lookAtSceneElementCB(Widget, XtPointer, XtPointer);
|
||||
static void cancelSceneElementSelectionCB(Widget, XtPointer, XtPointer);
|
||||
|
||||
void setReferencePath(SoLineSet*, SoCoordinate3*, bool append = false);
|
||||
void setReferencePathZPos();
|
||||
void findAndSetRefPath();
|
||||
SoCoordinate3* getCoordsNode(SoFullPath *path);
|
||||
void getSceneElements(); // reads elements from the scene graph
|
||||
float sqrlen(const SbVec3f&);
|
||||
void distanceToTrajectory(const SbVec3f&, float&, SbVec3f&, int&);
|
||||
void sortElements();
|
||||
void createElementsList(Widget);
|
||||
static void closeMainWindowCB(Widget, XtPointer, XtPointer);
|
||||
void evenOutRefParticlePts();
|
||||
|
||||
static void gotoRefPathStartCB(Widget, XtPointer, XtPointer);
|
||||
void gotoRefPathStart();
|
||||
static void invertRefPathCB(Widget, XtPointer, XtPointer);
|
||||
void invertRefPath();
|
||||
|
||||
enum CameraType {
|
||||
PERSPECTIVE,
|
||||
ORTHOGRAPHIC
|
||||
};
|
||||
|
||||
|
||||
enum State {
|
||||
GENERAL,
|
||||
BEAMLINE,
|
||||
VIEWPOINT,
|
||||
ANIMATION,
|
||||
REVERSED_ANIMATION,
|
||||
PAUSED_ANIMATION,
|
||||
ROTATING
|
||||
};
|
||||
|
||||
// For storing the view point
|
||||
struct viewPtData {
|
||||
char* viewPtName;
|
||||
int viewportMapping;
|
||||
SbVec3f position;
|
||||
SbRotation orientation;
|
||||
float aspectRatio;
|
||||
float nearDistance;
|
||||
float farDistance;
|
||||
float focalDistance;
|
||||
CameraType camType;
|
||||
float height;
|
||||
};
|
||||
|
||||
// FWJ removed unneeded assignment operator
|
||||
struct sceneElement {
|
||||
std::string name;
|
||||
SoFullPath* path;
|
||||
SbVec3f center;
|
||||
float closestPointZCoord;
|
||||
};
|
||||
|
||||
struct elementForSorting {
|
||||
float closestPointZCoord;
|
||||
SbVec3f closestPoint;
|
||||
float smallestDistance;
|
||||
float distanceToBeamlineStart;
|
||||
std::string name;
|
||||
|
||||
G4bool operator<(elementForSorting const &other) const
|
||||
{
|
||||
if (closestPointZCoord < other.closestPointZCoord)
|
||||
return true;
|
||||
if (closestPointZCoord > other.closestPointZCoord)
|
||||
return false;
|
||||
|
||||
// otherwise closestPointZCoord == other.closestPointZCoord.
|
||||
// Compare the distances from the center of the element to
|
||||
// the start of the beamline.
|
||||
if (distanceToBeamlineStart < other.distanceToBeamlineStart)
|
||||
return true;
|
||||
if (distanceToBeamlineStart > other.distanceToBeamlineStart)
|
||||
return false;
|
||||
|
||||
// In case both closestPointZCoord and smallestDistance are
|
||||
// equal, we have two exactly overlapping elements, if so
|
||||
// the order doesn't matter
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
bool zcoordSetFlag;
|
||||
|
||||
std::vector<sceneElement> sceneElements;
|
||||
std::vector<viewPtData> viewPtList;
|
||||
std::string fileName;
|
||||
std::ifstream fileIn;
|
||||
std::ofstream fileOut;
|
||||
int viewPtIdx;
|
||||
int MAX_VP_IDX;
|
||||
int MAX_VP_NAME;
|
||||
|
||||
// For storing coordinate points of the reference particle
|
||||
std::vector<SbVec3f> refParticleTrajectory;
|
||||
// For displaying distance during anim and beamline modes
|
||||
std::vector<float> refZPositions;
|
||||
|
||||
int refParticleIdx;
|
||||
int prevRefIdx;
|
||||
float distance;
|
||||
State currentState, prevState, beforePausing;
|
||||
char* curViewPtName;
|
||||
|
||||
int step;
|
||||
SbVec3f prevPt;
|
||||
SbVec3f prevParticleDir;
|
||||
void* prevColorField;
|
||||
|
||||
viewPtData camB4Animation;
|
||||
bool returnToSaveVP;
|
||||
bool returnToAnim;
|
||||
SoCamera* myCam;
|
||||
void setStartingPtForAnimation();
|
||||
float left_right, up_down;
|
||||
SbVec3f rotAxis; // For 90 degree rotations
|
||||
int rotCnt; // # of steps rotation is split into
|
||||
|
||||
static void getViewPtNameCB(Widget, XtPointer, XtPointer);
|
||||
static void getViewPtNameCancelCB(Widget, XtPointer, XtPointer);
|
||||
std::string viewPtAutoName();
|
||||
|
||||
////////////////////////ANIM_SPEED_INDICATOR///////////////////////
|
||||
SoSearchAction * searcher;
|
||||
|
||||
SoNode * superimposition;
|
||||
SoCoordinate3 * sgeometry;
|
||||
SoScale * sscale;
|
||||
|
||||
SoTranslation * stranslation;
|
||||
SoTranslation * curInfoTrans;
|
||||
SoTranslation * mouseOverTransSolid;
|
||||
SoTranslation * mouseOverTransMaterial;
|
||||
SoTranslation * mouseOverTransLogName;
|
||||
SoTranslation * mouseOverTransZPos;
|
||||
|
||||
// Used for 2 similar purposes: 1. Displays z position during animation
|
||||
// 2. Displays name of the current viewpoint
|
||||
SoText2 * curInfoText;
|
||||
/* Need to use many different fields for mouseover
|
||||
* because newlines are ignored when the scene is rendered */
|
||||
SoText2 * mouseOverTextSolid;
|
||||
SoText2 * mouseOverTextMaterial;
|
||||
SoText2 * mouseOverTextLogName;
|
||||
SoText2 * mouseOverTextZPos;
|
||||
|
||||
SoFont * curInfoFont;
|
||||
SoFont * mouseOverFontSolid;
|
||||
SoFont * mouseOverFontMaterial;
|
||||
SoFont * mouseOverFontLogName;
|
||||
SoFont * mouseOverFontZPos;
|
||||
SoSwitch * axisSwitch;
|
||||
SoSwitch * animSpeedOutlineSwitch;
|
||||
SoSwitch * animSpeedSwitch;
|
||||
SoSwitch * curInfoSwitch;
|
||||
|
||||
SoNode * getSuperimpositionNode(SoNode *, const char * name);
|
||||
|
||||
void superimpositionEvent(SoAction * action);
|
||||
static void superimpositionCB(void * closure, SoAction * action);
|
||||
|
||||
virtual void actualRedraw(void);
|
||||
void updateSpeedIndicator(void);
|
||||
|
||||
float maxSpeed;
|
||||
////////////////////////ANIM_SPEED_INDICATOR///////////////////////
|
||||
|
||||
// FWJ added for Ortho camera
|
||||
float defaultHeight;
|
||||
float defaultHeightAngle;
|
||||
// FWJ add look-ahead for animation tracking on curves
|
||||
G4int pathLookahead;
|
||||
|
||||
// Used by G4 app during element rotations, stores previous view
|
||||
SbVec3f upVector, offsetFromCenter, center;
|
||||
bool rotUpVec;
|
||||
|
||||
SoSeparator* newSceneGraph;
|
||||
|
||||
|
||||
};
|
||||
#endif /* G4OPENINVENTORXTEXAMINERVIEWER_HH */
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
|
||||
#ifndef G4OPENINVENTORXTEXAMINERVIEWERMESSENGER_HH
|
||||
#define G4OPENINVENTORXTEXAMINERVIEWERMESSENGER_HH
|
||||
|
||||
#include "G4UImessenger.hh"
|
||||
|
||||
#include "G4String.hh"
|
||||
|
||||
class G4OpenInventorXtExaminerViewer;
|
||||
class G4UIdirectory;
|
||||
class G4UIcmdWithAnInteger;
|
||||
|
||||
class G4OpenInventorXtExaminerViewerMessenger: public G4UImessenger {
|
||||
public:
|
||||
static G4OpenInventorXtExaminerViewerMessenger* GetInstance(); // Singleton constructor.
|
||||
~G4OpenInventorXtExaminerViewerMessenger();
|
||||
void SetNewValue (G4UIcommand*, G4String);
|
||||
|
||||
private:
|
||||
G4OpenInventorXtExaminerViewerMessenger(); // Private constructor.
|
||||
static G4OpenInventorXtExaminerViewerMessenger* fpInstance;
|
||||
G4UIdirectory* fpDirectory;
|
||||
G4UIcmdWithAnInteger* fpCommandPathLookahead;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,86 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
// Jeff Kallenbach 01 Aug 1996
|
||||
// OpenInventor viewer - opens window, hard copy, etc.
|
||||
|
||||
#ifndef G4OPENINVENTORXTEXTENDEDVIEWER_HH
|
||||
#define G4OPENINVENTORXTEXTENDEDVIEWER_HH
|
||||
|
||||
// Inheritance :
|
||||
#include "G4OpenInventorViewer.hh"
|
||||
|
||||
#include <X11/Intrinsic.h>
|
||||
#include <Inventor/nodes/SoEventCallback.h>
|
||||
|
||||
class G4OpenInventorXtExaminerViewer;
|
||||
|
||||
class G4OpenInventorXtExtendedViewer: public G4OpenInventorViewer {
|
||||
public: //G4VViewer
|
||||
virtual void FinishView();
|
||||
virtual void SetView();
|
||||
protected:
|
||||
virtual void ViewerRender();
|
||||
virtual SoCamera* GetCamera();
|
||||
public:
|
||||
G4OpenInventorXtExtendedViewer(G4OpenInventorSceneHandler& scene,
|
||||
const G4String& name = "");
|
||||
void Initialise();
|
||||
|
||||
virtual ~G4OpenInventorXtExtendedViewer();
|
||||
private:
|
||||
Widget AddMenu(Widget,const G4String&,const G4String&);
|
||||
void AddButton(Widget,const G4String&,XtCallbackProc);
|
||||
private:
|
||||
static void PostScriptCbk(Widget,XtPointer,XtPointer);
|
||||
static void PDFCbk(Widget,XtPointer,XtPointer);
|
||||
static void PixmapPostScriptCbk(Widget,XtPointer,XtPointer);
|
||||
static void WriteInventorCbk(Widget,XtPointer,XtPointer);
|
||||
static void LoadInventorCbk(Widget,XtPointer,XtPointer);
|
||||
static void EscapeCbk(Widget,XtPointer,XtPointer);
|
||||
static void EscapeFromKeyboardCbk(void * o);
|
||||
static void SceneGraphStatisticsCbk(Widget,XtPointer,XtPointer);
|
||||
static void EraseDetectorCbk(Widget,XtPointer,XtPointer);
|
||||
static void EraseEventCbk(Widget,XtPointer,XtPointer);
|
||||
static void SetSolidCbk(Widget,XtPointer,XtPointer);
|
||||
static void SetWireFrameCbk(Widget,XtPointer,XtPointer);
|
||||
static void SetReducedWireFrameCbk(Widget,XtPointer,XtPointer);
|
||||
static void SetFullWireFrameCbk(Widget,XtPointer,XtPointer);
|
||||
static void UpdateSceneCbk(Widget,XtPointer,XtPointer);
|
||||
static void HelpCbk(Widget,XtPointer,XtPointer);
|
||||
static void HelpCancelCbk(Widget,XtPointer,XtPointer);
|
||||
static void SetPreviewCbk(Widget,XtPointer,XtPointer);
|
||||
static void SetPreviewAndFullCbk(Widget,XtPointer,XtPointer);
|
||||
private:
|
||||
Widget fShell;
|
||||
G4OpenInventorXtExaminerViewer* fViewer;
|
||||
Widget fHelpForm;
|
||||
Widget fHelpText;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,79 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
// Jeff Kallenbach 01 Aug 1996
|
||||
// OpenInventor viewer - opens window, hard copy, etc.
|
||||
|
||||
#ifndef G4OPENINVENTORXTVIEWER_HH
|
||||
#define G4OPENINVENTORXTVIEWER_HH
|
||||
|
||||
// Inheritance :
|
||||
#include "G4OpenInventorViewer.hh"
|
||||
|
||||
#include <X11/Intrinsic.h>
|
||||
class SoXtExaminerViewer;
|
||||
|
||||
class G4OpenInventorXtViewer: public G4OpenInventorViewer {
|
||||
public: //G4VViewer
|
||||
virtual void FinishView();
|
||||
virtual void SetView();
|
||||
protected:
|
||||
virtual void ViewerRender();
|
||||
virtual SoCamera* GetCamera();
|
||||
public:
|
||||
G4OpenInventorXtViewer(G4OpenInventorSceneHandler& scene,
|
||||
const G4String& name = "");
|
||||
void Initialise();
|
||||
|
||||
virtual ~G4OpenInventorXtViewer();
|
||||
protected:
|
||||
Widget AddMenu(Widget,const G4String&,const G4String&);
|
||||
void AddButton(Widget,const G4String&,XtCallbackProc);
|
||||
static void PostScriptCbk(Widget,XtPointer,XtPointer);
|
||||
static void PixmapPostScriptCbk(Widget,XtPointer,XtPointer);
|
||||
static void WriteInventorCbk(Widget,XtPointer,XtPointer);
|
||||
static void EscapeCbk(Widget,XtPointer,XtPointer);
|
||||
static void SceneGraphStatisticsCbk(Widget,XtPointer,XtPointer);
|
||||
static void EraseDetectorCbk(Widget,XtPointer,XtPointer);
|
||||
static void EraseEventCbk(Widget,XtPointer,XtPointer);
|
||||
static void SetSolidCbk(Widget,XtPointer,XtPointer);
|
||||
static void SetWireFrameCbk(Widget,XtPointer,XtPointer);
|
||||
static void SetReducedWireFrameCbk(Widget,XtPointer,XtPointer);
|
||||
static void SetFullWireFrameCbk(Widget,XtPointer,XtPointer);
|
||||
static void UpdateSceneCbk(Widget,XtPointer,XtPointer);
|
||||
static void HelpCbk(Widget,XtPointer,XtPointer);
|
||||
static void HelpCancelCbk(Widget,XtPointer,XtPointer);
|
||||
static void SetPreviewCbk(Widget,XtPointer,XtPointer);
|
||||
static void SetPreviewAndFullCbk(Widget,XtPointer,XtPointer);
|
||||
Widget fShell;
|
||||
SoXtExaminerViewer* fViewer;
|
||||
Widget fHelpForm;
|
||||
Widget fHelpText;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,71 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// F.W. Jones 05012018
|
||||
|
||||
#ifndef G4SOQT_HH
|
||||
#define G4SOQT_HH
|
||||
|
||||
#include "G4VInteractorManager.hh"
|
||||
|
||||
class QWidget;
|
||||
class QString;
|
||||
|
||||
// Class description :
|
||||
//
|
||||
// G4SoQt : a singleton to handle Open Inventor visualization
|
||||
// drivers built over Qt. It permits to have one Qt main loop for
|
||||
// the whole application. The SoQt toolkit is inited in the
|
||||
// constructor. It is done once for the whole application.
|
||||
//
|
||||
// Class description - end :
|
||||
|
||||
class G4SoQt : public G4VInteractorManager {
|
||||
public:
|
||||
virtual ~G4SoQt();
|
||||
static G4SoQt* getInstance();
|
||||
// FWJ no command line args for time being
|
||||
// static G4SoQt* getInstance(int, char**, char*);
|
||||
G4bool Inited();
|
||||
void* GetEvent();
|
||||
void FlushAndWaitExecution();
|
||||
void SecondaryLoop();
|
||||
// Added direct exit method
|
||||
void ExitSecondaryLoop();
|
||||
bool IsExternalApp();
|
||||
|
||||
private:
|
||||
G4SoQt(const G4SoQt&);
|
||||
G4SoQt();
|
||||
// G4SoQt(int, char**, char*);
|
||||
G4SoQt& operator=(const G4SoQt&);
|
||||
static G4SoQt* instance; // Pointer to single instance.
|
||||
// int argn;
|
||||
// char** args;
|
||||
bool externalApp;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,37 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
|
||||
#ifndef G4VISFEATURESOFOPENINVENTOR_HH
|
||||
#define G4VISFEATURESOFOPENINVENTOR_HH
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
G4String G4VisFeaturesOfOpenInventor ();
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,81 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
#ifndef Geant4_SoPolyhedron_h
|
||||
#define Geant4_SoPolyhedron_h
|
||||
|
||||
// Inheritance :
|
||||
#include <Inventor/nodes/SoShape.h>
|
||||
|
||||
#include <Inventor/fields/SoSFBool.h>
|
||||
#include <Inventor/fields/SoSFNode.h>
|
||||
|
||||
class G4Polyhedron;
|
||||
|
||||
/**
|
||||
* SoPolyhedron is an Inventor encapsulation of the G4Polyedron
|
||||
* class written by E.Chernyaev. In particular SoPolyhedron permits
|
||||
* to represent boolean operations over solids.
|
||||
* To avoid clashes with other libraries (Geant4) where the G4Polyhedron
|
||||
* classes may be found, the G4Polyhedron (through usage of CPP macros)
|
||||
* had been renamed G4Polyhedron in the HEPVis lib.
|
||||
* The solids are modeled with G4Polyedron objects. The G4Polyhedron
|
||||
* permits to produce a new G4Polyhedron according to the boolean
|
||||
* operation done on them. The resulting G4Polyhedron is then given
|
||||
* to an SoPolyhedron for rendering.
|
||||
* Note that a boolean operation could be rendered in wire frame
|
||||
* by drawing the contour of the resulting solid (not by drawing
|
||||
* the wire frame of a triangulation).
|
||||
* See the applications/Polyhedron example.
|
||||
*/
|
||||
|
||||
class Geant4_SoPolyhedron : public SoShape {
|
||||
SO_NODE_HEADER(Geant4_SoPolyhedron);
|
||||
private:
|
||||
Geant4_SoPolyhedron(const Geant4_SoPolyhedron&);
|
||||
Geant4_SoPolyhedron& operator=(const Geant4_SoPolyhedron&);
|
||||
public:
|
||||
SoSFBool solid;
|
||||
SoSFBool reducedWireFrame;
|
||||
SoSFNode alternateRep;
|
||||
public:
|
||||
Geant4_SoPolyhedron();
|
||||
Geant4_SoPolyhedron(const G4Polyhedron&);
|
||||
Geant4_SoPolyhedron(G4Polyhedron*);
|
||||
virtual void generateAlternateRep();
|
||||
virtual void clearAlternateRep();
|
||||
public:
|
||||
static void initClass();
|
||||
protected:
|
||||
virtual void computeBBox(SoAction*,SbBox3f&,SbVec3f&);
|
||||
virtual void generatePrimitives(SoAction*);
|
||||
virtual void doAction(SoAction*);
|
||||
protected:
|
||||
virtual ~Geant4_SoPolyhedron();
|
||||
private:
|
||||
G4Polyhedron* fPolyhedron;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,46 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
#ifndef HEPVis_SbGL_h
|
||||
#define HEPVis_SbGL_h
|
||||
|
||||
#ifdef WIN32
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
// Needs setting based on choice of driver
|
||||
// Apple system for SoQt on Apple
|
||||
// Native otherwise (Apple Framework)
|
||||
// NOTE: This header is private to the OI category, and the OI lib can only be built in one mode
|
||||
// so rhis can be simplified....
|
||||
#if defined(__APPLE__) && (!defined(G4VIS_BUILD_OIX_DRIVER) || !defined(G4VIS_USE_OIX_DRIVER))
|
||||
#include <OpenGL/gl.h>
|
||||
#include <OpenGL/glu.h>
|
||||
#else
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glu.h>
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,54 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
//
|
||||
#ifndef HEPVis_SbMath_h
|
||||
#define HEPVis_SbMath_h
|
||||
|
||||
#include <cmath>
|
||||
#ifndef M_PI
|
||||
#define M_PI 3.1415926535897931160E0
|
||||
#define M_PI_2 1.5707963267948965580E0
|
||||
#endif
|
||||
|
||||
#define SbMinimum(a,b) ((a)<(b)?a:b)
|
||||
#define SbMaximum(a,b) ((a)>(b)?a:b)
|
||||
|
||||
#define FCOS(x) ((float)cos((double)(x)))
|
||||
#define FSIN(x) ((float)sin((double)(x)))
|
||||
#define FACOS(x) ((float)acos((double)(x)))
|
||||
#define FASIN(x) ((float)asin((double)(x)))
|
||||
#define FTAN(x) ((float)tan((double)(x)))
|
||||
#define FATAN(x) ((float)atan((double)(x)))
|
||||
#define FSQRT(x) ((float)sqrt((double)(x)))
|
||||
#define FPOW(x,y) ((float)pow((double)(x),(double)(y)))
|
||||
#define FLOG(x) ((float)log((double)(x)))
|
||||
#define FLOG10(x) ((float)log10((double)(x)))
|
||||
#define FFLOOR(x) ((float)floor((double)(x)))
|
||||
#define FFABS(x) ((float)fabs((double)(x)))
|
||||
#define FCEIL(x) ((float)ceil((double)(x)))
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,77 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// History :
|
||||
// - 09/12/98, G.Barrand : creation.
|
||||
|
||||
#ifndef HEPVis_SbPainter_h
|
||||
#define HEPVis_SbPainter_h
|
||||
|
||||
#include <Inventor/SbBasic.h>
|
||||
|
||||
/*
|
||||
#include <HEPVis/SbStyle.h>
|
||||
|
||||
typedef enum {
|
||||
SbPrimitivePoints,
|
||||
SbPrimitiveLineStrip,
|
||||
SbPrimitiveLineLoop,
|
||||
SbPrimitiveLines,
|
||||
SbPrimitivePolygon
|
||||
} SbPrimitiveType;
|
||||
|
||||
class SbPainterContext {
|
||||
public:
|
||||
float fRed,fGreen,fBlue;
|
||||
int fLineWidth;
|
||||
SbLineStyle fLineStyle;
|
||||
int fMarkerSize;
|
||||
SbMarkerStyle fMarkerStyle;
|
||||
SbAreaStyle fAreaStyle;
|
||||
int fPolygonMode;
|
||||
};
|
||||
*/
|
||||
|
||||
#define SbPainter Geant4_SbPainter
|
||||
|
||||
class SbPainter {
|
||||
public:
|
||||
SbPainter();
|
||||
virtual ~SbPainter();
|
||||
void setWindowSize(int,int);
|
||||
void enableEdges(SbBool);
|
||||
virtual void beginTraversal() = 0;
|
||||
virtual void clearColorBuffer(float,float,float) = 0;
|
||||
//virtual void drawPrimitive(SbPrimitiveType,
|
||||
// int,float*,float*,float*,
|
||||
// const SbPainterContext&) = 0;
|
||||
virtual void endTraversal() = 0;
|
||||
protected:
|
||||
int fWindowWidth,fWindowHeight;
|
||||
float fRed,fGreen,fBlue;
|
||||
SbBool fEdges;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,129 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// History :
|
||||
// - 25/09/98, G.Barrand : creation.
|
||||
|
||||
#ifndef HEPVis_SbPainterPS_h
|
||||
#define HEPVis_SbPainterPS_h
|
||||
|
||||
// Inheritance :
|
||||
#include <HEPVis/SbPainter.h>
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#include <Inventor/SbViewportRegion.h>
|
||||
|
||||
#define SbPainterPS Geant4_SbPainterPS
|
||||
|
||||
class SbPainterPS : public SbPainter {
|
||||
public:
|
||||
SbPainterPS();
|
||||
~SbPainterPS();
|
||||
void beginTraversal();
|
||||
void clearColorBuffer(float,float,float);
|
||||
//void drawPrimitive(SbPrimitiveType,
|
||||
// int,float*,float*,float*,
|
||||
// const SbPainterContext&);
|
||||
void endTraversal();
|
||||
public:
|
||||
void setColorScheme(int);
|
||||
void setOrientation(int);
|
||||
void setBackgroundDrawn(int);
|
||||
void setBitsPerPixel(int);
|
||||
void setLineWidth(int);
|
||||
void* getStream();
|
||||
void setFileName(const char*);
|
||||
const char* getFileName() const;
|
||||
void openFileForWriting(const char*);
|
||||
void closeStream();
|
||||
void putPageScaleInStream(float,float);
|
||||
void putSaveStateInStream();
|
||||
void putRestoreStateInStream();
|
||||
void putTranslationInStream(float,float);
|
||||
void putScaleInStream(float,float);
|
||||
void putBeginPageInStream();
|
||||
void putEndPageInStream();
|
||||
void putRGB_InStream(float,float,float);
|
||||
void putMarkerSizeInStream(float);
|
||||
//void putMarkerStyleInStream(SbMarkerStyle);
|
||||
void putBackgroundInStream(float,float,float,float,float);
|
||||
void putFrameInStream(float,float,float,float,float);
|
||||
void putRotateInStream(float);
|
||||
void putNewPathInStream();
|
||||
void putStrokeInStream();
|
||||
void putFillInStream();
|
||||
void putClosePathInStream();
|
||||
void putCapInStream(int);
|
||||
void putLineToInStream(float,float);
|
||||
void putMoveInStream(float,float);
|
||||
void putCircleInStream(float,float,float);
|
||||
void putLineWidthInStream(int);
|
||||
//void putLineStyleInStream(SbLineStyle);
|
||||
typedef int(*GetRGB_Function)(unsigned int,unsigned int,
|
||||
double&,double&,double&);
|
||||
void putImageInStream(unsigned int,unsigned int,GetRGB_Function);
|
||||
private:
|
||||
//void drawPolygon(int,float*,float*,float,float,float,const SbAreaStyle&);
|
||||
//void drawLines(int,float*,float*,float,float,float,const SbLineStyle&,int);
|
||||
//void drawMarkers(int,float*,float*,
|
||||
// float,float,float,const SbMarkerStyle&,int);
|
||||
enum ColorScheme {
|
||||
Color = 0,
|
||||
Grey = 1,
|
||||
BlackWhite = 2
|
||||
};
|
||||
struct {
|
||||
int shade;
|
||||
int portrait;
|
||||
int nbit;
|
||||
int doBack;
|
||||
float lineWidth;
|
||||
} fParams;
|
||||
float fDeviceWidth;
|
||||
float fDeviceHeight;
|
||||
int fPageNumber;
|
||||
float fMarkerSize;
|
||||
FILE* fFile;
|
||||
char* fFileName;
|
||||
int fGSave;
|
||||
int fBufferCount;
|
||||
char* fBufferString;
|
||||
#define METAFILE_RECORD_LENGTH 80
|
||||
unsigned char fBufferPointer[METAFILE_RECORD_LENGTH+1];
|
||||
private:
|
||||
void putInStreamF(const char*,...);
|
||||
void printFLN(const char*,...);
|
||||
void printV(const char*,va_list);
|
||||
float convertRGB_ToGrey(float,float,float);
|
||||
void writeByte(unsigned char);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+69
@@ -0,0 +1,69 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
#ifndef HEPVis_SoAlternateRepAction_h
|
||||
#define HEPVis_SoAlternateRepAction_h
|
||||
|
||||
// Inheritance :
|
||||
#include <Inventor/actions/SoAction.h>
|
||||
|
||||
#include <Inventor/actions/SoSubAction.h>
|
||||
|
||||
#define SoAlternateRepAction Geant4_SoAlternateRepAction
|
||||
|
||||
class SoAlternateRepAction : public SoAction {
|
||||
SO_ACTION_HEADER(SoAlternateRepAction);
|
||||
public:
|
||||
SoAlternateRepAction();
|
||||
virtual ~SoAlternateRepAction();
|
||||
static void initClass(void);
|
||||
void setGenerate(SbBool);
|
||||
SbBool getGenerate() const;
|
||||
private:
|
||||
static void nodeAction(SoAction*,SoNode*);
|
||||
private:
|
||||
SbBool fGenerate;
|
||||
};
|
||||
|
||||
#define SO_ALTERNATEREP_DO_ACTION(aAction) \
|
||||
if(aAction->isOfType(SoAlternateRepAction::getClassTypeId())) {\
|
||||
if(((SoAlternateRepAction*)aAction)->getGenerate()==TRUE) {\
|
||||
if(alternateRep.getValue()==NULL) {\
|
||||
generateAlternateRep();\
|
||||
SoNode* altRep = alternateRep.getValue();\
|
||||
if((altRep!=NULL) && altRep->isOfType(SoGroup::getClassTypeId()))\
|
||||
altRep->doAction(aAction);\
|
||||
}\
|
||||
} else {\
|
||||
SoNode* altRep = alternateRep.getValue();\
|
||||
if((altRep!=NULL) && altRep->isOfType(SoGroup::getClassTypeId()))\
|
||||
altRep->doAction(aAction);\
|
||||
clearAlternateRep();\
|
||||
}\
|
||||
return;\
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,60 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
#ifndef HEPVis_SoCounterAction_h
|
||||
#define HEPVis_SoCounterAction_h
|
||||
|
||||
// Inheritance :
|
||||
#include <Inventor/actions/SoAction.h>
|
||||
|
||||
#include <Inventor/actions/SoSubAction.h>
|
||||
|
||||
#define SoCounterAction Geant4_SoCounterAction
|
||||
|
||||
class SoCounterAction : public SoAction {
|
||||
SO_ACTION_HEADER(SoCounterAction);
|
||||
public:
|
||||
SoCounterAction();
|
||||
virtual ~SoCounterAction();
|
||||
static void initClass(void);
|
||||
enum LookFor { NODE = 1,TYPE = 2, NAME = 3 };
|
||||
void setLookFor(LookFor);
|
||||
void setType(const SoType,SbBool = TRUE);
|
||||
// void setName(const SbName);
|
||||
public:
|
||||
int getCount() const;
|
||||
protected:
|
||||
virtual void beginTraversal(SoNode*);
|
||||
private:
|
||||
static void actionMethod(SoAction*,SoNode*);
|
||||
private:
|
||||
int fCount;
|
||||
int fLookFor;
|
||||
SbName fName;
|
||||
SoType fType;
|
||||
SbBool fCheckDerived;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,77 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
#ifndef HEPVis_SoGL2PSAction_h
|
||||
#define HEPVis_SoGL2PSAction_h
|
||||
|
||||
#include <Inventor/actions/SoGLRenderAction.h>
|
||||
|
||||
#include <tools/gl2ps_def.h>
|
||||
|
||||
#include <string>
|
||||
|
||||
/**
|
||||
* SoGL2PSAction inherits Inventor/SoGLRenderAction.
|
||||
* It uses the gl2ps software to produce vector PostScript of a scene graph.
|
||||
*/
|
||||
|
||||
#define SoGL2PSAction Geant4_SoGL2PSAction
|
||||
|
||||
class SoGL2PSAction : public SoGLRenderAction {
|
||||
SO_ACTION_HEADER(SoGL2PSAction);
|
||||
public:
|
||||
SoGL2PSAction(const SbViewportRegion&);
|
||||
virtual ~SoGL2PSAction();
|
||||
public: /*SoINTERNAL*/
|
||||
static void initClass();
|
||||
public:
|
||||
void setFileName(const std::string&);
|
||||
void setTitleAndProducer(const std::string&,const std::string&);
|
||||
void setExportImageFormat_PS();
|
||||
void setExportImageFormat_EPS();
|
||||
void setExportImageFormat_TEX();
|
||||
void setExportImageFormat_PDF();
|
||||
void setExportImageFormat_SVG();
|
||||
void setExportImageFormat_PGF();
|
||||
bool enableFileWriting();
|
||||
void disableFileWriting();
|
||||
bool addBitmap(int,int,float=0,float=0,float=0,float=0);
|
||||
protected:
|
||||
virtual void beginTraversal(SoNode*);
|
||||
private:
|
||||
bool openFile();
|
||||
void closeFile();
|
||||
bool beginPage(int,int,int,int);
|
||||
bool endPage();
|
||||
tools_GL2PScontextPointer fContext;
|
||||
FILE* fFile;
|
||||
std::string fFileName;
|
||||
std::string fTitle;
|
||||
std::string fProducer;
|
||||
unsigned int fFormat;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// 27/03/2004 : G.Barrand : creation.
|
||||
|
||||
#ifndef HEPVis_SoStyleCache_h
|
||||
#define HEPVis_SoStyleCache_h
|
||||
|
||||
#include <Inventor/nodes/SoGroup.h>
|
||||
|
||||
//#include <HEPVis/SbStyle.h>
|
||||
|
||||
class SoMaterial;
|
||||
class SoDrawStyle;
|
||||
class SoLightModel;
|
||||
class SoResetTransform;
|
||||
class SbColor;
|
||||
|
||||
#define SoStyleCache Geant4_SoStyleCache
|
||||
|
||||
class SoStyleCache : public SoGroup {
|
||||
public:
|
||||
SoStyleCache();
|
||||
protected:
|
||||
~SoStyleCache();
|
||||
public:
|
||||
SoMaterial* getMaterial(const SbColor&,float = 0);
|
||||
SoMaterial* getMaterial(float,float,float,float = 0);
|
||||
//SoDrawStyle* getLineStyle(SbLineStyle,float = 0);
|
||||
SoDrawStyle* getLineStyle(unsigned short = 0xFFFF,float = 0);
|
||||
SoLightModel* getLightModelPhong();
|
||||
SoLightModel* getLightModelBaseColor();
|
||||
SoResetTransform* getResetTransform();
|
||||
private:
|
||||
SoGroup* fMaterials;
|
||||
SoGroup* fLineStyles;
|
||||
SoGroup* fLightModels;
|
||||
SoResetTransform* fResetTransform;
|
||||
};
|
||||
|
||||
#endif
|
||||
+121
@@ -0,0 +1,121 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
//
|
||||
/*-----------------------------HEPVis----------------------------------------*/
|
||||
/* */
|
||||
/* Node: SoDetectorTreeKit */
|
||||
/* Description: Easy way of browsing through a tree of detectors */
|
||||
/* Author: Joe Boudreau Nov 11 1996 */
|
||||
/* */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
#ifndef HEPVis_SoDetectorTreeKit_h
|
||||
#define HEPVis_SoDetectorTreeKit_h
|
||||
|
||||
// Inheritance :
|
||||
#include <Inventor/nodekits/SoBaseKit.h>
|
||||
|
||||
class SoEventCallback;
|
||||
class SoSeparator;
|
||||
|
||||
#define SoDetectorTreeKit Geant4_SoDetectorTreeKit
|
||||
|
||||
|
||||
class SoDetectorTreeKit:public SoBaseKit {
|
||||
|
||||
// The following is required:
|
||||
SO_KIT_HEADER(SoDetectorTreeKit);
|
||||
////////////////////////////////////////////
|
||||
public:
|
||||
SoSFNode alternateRep; //public in order to query if alternateRep done.
|
||||
private:
|
||||
////////////////////////////////////////////
|
||||
SO_KIT_CATALOG_ENTRY_HEADER(callbackList);
|
||||
SO_KIT_CATALOG_ENTRY_HEADER(topSeparator);
|
||||
SO_KIT_CATALOG_ENTRY_HEADER(pickStyle);
|
||||
SO_KIT_CATALOG_ENTRY_HEADER(appearance);
|
||||
SO_KIT_CATALOG_ENTRY_HEADER(units);
|
||||
SO_KIT_CATALOG_ENTRY_HEADER(transform);
|
||||
SO_KIT_CATALOG_ENTRY_HEADER(texture2Transform);
|
||||
SO_KIT_CATALOG_ENTRY_HEADER(childList);
|
||||
SO_KIT_CATALOG_ENTRY_HEADER(previewSeparator);
|
||||
SO_KIT_CATALOG_ENTRY_HEADER(fullSeparator);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
// Constructor, required
|
||||
SoDetectorTreeKit();
|
||||
|
||||
// This is required
|
||||
virtual SbBool affectsState() const;
|
||||
|
||||
// Class Initializer, required
|
||||
static void initClass();
|
||||
|
||||
// Turn the preview on or off
|
||||
virtual void setPreview(SbBool Flag);
|
||||
|
||||
// Return the preview state
|
||||
virtual SbBool getPreview() const;
|
||||
|
||||
// Set SoSwitch::whichChild = SO_SWITCH_ALL
|
||||
void setPreviewAndFull();
|
||||
|
||||
// Return the preview Separator
|
||||
virtual SoSeparator *getPreviewSeparator() const;
|
||||
|
||||
// Return the full Separator
|
||||
virtual SoSeparator *getFullSeparator() const;
|
||||
|
||||
// Generate AlternateRep, required. Generating an alternate representation
|
||||
// must be done upon users request. It allows an Inventor program to read
|
||||
// back the file without requiring *this* code to be dynamically linked.
|
||||
// If the users expects that *this* code will be dynamically linked, he
|
||||
// need not invoke this method.
|
||||
virtual void generateAlternateRep();
|
||||
|
||||
// We better be able to clear it, too!
|
||||
virtual void clearAlternateRep();
|
||||
|
||||
protected:
|
||||
|
||||
// Destructor.
|
||||
virtual ~SoDetectorTreeKit();
|
||||
|
||||
virtual void doAction(SoAction*);
|
||||
private:
|
||||
|
||||
// This is needed as well
|
||||
void createInitialTree();
|
||||
|
||||
// This is the callback function that will be
|
||||
// added to the callback list
|
||||
static void expand (void *userData, SoEventCallback *eventCB);
|
||||
static void contract (void *userData, SoEventCallback *eventCB);
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,156 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
//
|
||||
/*-----------------------------Hepvis----------------------------------------*/
|
||||
/* */
|
||||
/* Node: SoBox */
|
||||
/* Description: Represents the G4Box Geant Geometry entity */
|
||||
/* Author: Joe Boudreau Nov 11 1996 */
|
||||
/* */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
#ifndef HEPVis_SoBox_h
|
||||
#define HEPVis_SoBox_h
|
||||
|
||||
#include <Inventor/fields/SoSFFloat.h>
|
||||
#include <Inventor/fields/SoSFNode.h>
|
||||
#include <Inventor/nodes/SoShape.h>
|
||||
|
||||
class SoSFNode;
|
||||
|
||||
//! SoBox - Inventor version of the G4Box Geant Geometry entity
|
||||
/*!
|
||||
* Node: SoBox
|
||||
*
|
||||
* Description: The Inventor version of the G4Box Geant Geometry entity
|
||||
*
|
||||
* Author: Joe Boudreau Nov 11 1996
|
||||
*
|
||||
* class G4Box
|
||||
*
|
||||
* A Box is a cuboid of given half lengths dx,dy,dz. The Box is
|
||||
* centred on the origin with sides parallel to the x/y/z axes.
|
||||
*
|
||||
* Always use Inventor Fields. This allows Inventor to detect a change to
|
||||
* the data field and take the appropriate action; e.g., redraw the scene.
|
||||
*/
|
||||
|
||||
#define SoBox Geant4_SoBox
|
||||
|
||||
class SoBox:public SoShape {
|
||||
|
||||
// The following is required:
|
||||
SO_NODE_HEADER(SoBox);
|
||||
|
||||
public:
|
||||
|
||||
//
|
||||
//! Half-length along X
|
||||
//
|
||||
SoSFFloat fDx;
|
||||
//
|
||||
//! Half-length along Y
|
||||
//
|
||||
SoSFFloat fDy;
|
||||
//
|
||||
//! Half-length along Z
|
||||
//
|
||||
SoSFFloat fDz;
|
||||
//
|
||||
//! Alternate rep - for use by users without HEPVis shared objects
|
||||
//
|
||||
SoSFNode alternateRep;
|
||||
|
||||
//
|
||||
//! Constructor, required
|
||||
//
|
||||
SoBox();
|
||||
|
||||
//
|
||||
//! Class Initializer, required
|
||||
//
|
||||
static void initClass();
|
||||
|
||||
//
|
||||
//! Generate AlternateRep, required. Generating an alternate representation
|
||||
//! must be done upon users request. It allows an Inventor program to read
|
||||
//! back the file without requiring *this* code to be dynamically linked.
|
||||
//! If the users expects that *this* code will be dynamically linked, he
|
||||
//! need not invoke this method.
|
||||
//
|
||||
virtual void generateAlternateRep();
|
||||
|
||||
//
|
||||
//! We better be able to clear it, too!
|
||||
//
|
||||
virtual void clearAlternateRep();
|
||||
|
||||
protected:
|
||||
|
||||
//
|
||||
//! compute bounding Box, required
|
||||
//
|
||||
virtual void computeBBox(SoAction *action, SbBox3f &box, SbVec3f ¢er );
|
||||
|
||||
//
|
||||
//! Generate Primitives, required
|
||||
//
|
||||
virtual void generatePrimitives(SoAction *action);
|
||||
|
||||
//
|
||||
//! GetChildList, required whenever the class has hidden children
|
||||
//
|
||||
virtual SoChildList *getChildren() const;
|
||||
|
||||
|
||||
protected:
|
||||
//
|
||||
//! Destructor, required
|
||||
//
|
||||
virtual ~SoBox();
|
||||
|
||||
private:
|
||||
|
||||
//
|
||||
//! Generate Children. Used to create the hidden children. Required whenever
|
||||
//! the node has hidden children.
|
||||
//
|
||||
void generateChildren();
|
||||
|
||||
//
|
||||
//! Used to modify hidden children when a data field is changed. Required
|
||||
//! whenever the class has hidden children.
|
||||
//
|
||||
void updateChildren();
|
||||
|
||||
//
|
||||
//! ChildList. Required whenever the class has hidden children.
|
||||
//
|
||||
SoChildList *children;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,192 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
//
|
||||
/*-----------------------------Hepvis----------------------------------------*/
|
||||
/* */
|
||||
/* Node: SoCons */
|
||||
/* Description: Represents the G4Cons Geant Geometry entity */
|
||||
/* Author: Joe Boudreau Nov 11 1996 */
|
||||
/* */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
#ifndef HEPVis_SoCons_h
|
||||
#define HEPVis_SoCons_h
|
||||
|
||||
#include <Inventor/fields/SoSFFloat.h>
|
||||
#include <Inventor/fields/SoSFNode.h>
|
||||
#include <Inventor/fields/SoSFBool.h>
|
||||
#include <Inventor/nodes/SoShape.h>
|
||||
|
||||
class SoSFNode;
|
||||
//! SoCons - Inventor version of the G4Cons Geant Geometry entity
|
||||
/*!
|
||||
* Node: SoCons
|
||||
*
|
||||
* Description: The Inventor version of the G4Cons Geant Geometry entity
|
||||
*
|
||||
* Author: Joe Boudreau Nov 11 1996
|
||||
*
|
||||
* A G4Cons is, in the general case, a Phi segment of a cone, with half-length
|
||||
* fDz, inner and outer radii specified at -fDz and +fDz. The Phi segment is
|
||||
* described by a starting fSPhi angle, and the +fDPhi delta angle for the shape.
|
||||
* If the delta angle is >=2*M_PI, the shape is treated as continuous in Phi
|
||||
*
|
||||
* Member Data:
|
||||
*
|
||||
* fRmin1 inside radius at -fDz
|
||||
* fRmin2 inside radius at +fDz
|
||||
* fRmax1 outside radius at -fDz
|
||||
* fRmax2 outside radius at +fDz
|
||||
* fDz half length in z
|
||||
*
|
||||
* fSPhi starting angle of the segment in radians
|
||||
* fDPhi delta angle of the segment in radians
|
||||
*/
|
||||
|
||||
#define SoCons Geant4_SoCons
|
||||
|
||||
class SoCons:public SoShape {
|
||||
|
||||
// The following is required:
|
||||
SO_NODE_HEADER(SoCons);
|
||||
|
||||
public:
|
||||
|
||||
//
|
||||
//! Inside radius at -fDz
|
||||
//
|
||||
SoSFFloat fRmin1;
|
||||
//
|
||||
//! Inside radius at +fDz
|
||||
//
|
||||
SoSFFloat fRmin2;
|
||||
//
|
||||
//! Outside radius at -fDz
|
||||
//
|
||||
SoSFFloat fRmax1;
|
||||
//
|
||||
//! Outside radius at +fDz
|
||||
//
|
||||
SoSFFloat fRmax2;
|
||||
//
|
||||
//! Half-length along Z
|
||||
//
|
||||
SoSFFloat fDz;
|
||||
//
|
||||
//! Starting angle, in radians
|
||||
//
|
||||
SoSFFloat fSPhi;
|
||||
//
|
||||
//! Delta-angle, in radians
|
||||
//
|
||||
SoSFFloat fDPhi;
|
||||
//
|
||||
//! An Inventor option - slightly better render, worse performance
|
||||
//
|
||||
SoSFBool smoothDraw;
|
||||
//
|
||||
//! Alternate rep required - for use by users without HEPVis shared objects
|
||||
//
|
||||
SoSFNode alternateRep;
|
||||
|
||||
//
|
||||
//! Constructor, required
|
||||
//
|
||||
SoCons();
|
||||
|
||||
//
|
||||
//! Class Initializer, required
|
||||
//
|
||||
static void initClass();
|
||||
|
||||
//
|
||||
//! Generate AlternateRep, required. Generating an alternate representation
|
||||
//! must be done upon users request. It allows an Inventor program to read
|
||||
//! back the file without requiring *this* code to be dynamically linked.
|
||||
//! If the users expects that *this* code will be dynamically linked, he
|
||||
//! need not invoke this method.
|
||||
//
|
||||
virtual void generateAlternateRep();
|
||||
|
||||
//
|
||||
//! We better be able to clear it, too!
|
||||
//
|
||||
virtual void clearAlternateRep();
|
||||
|
||||
protected:
|
||||
|
||||
//
|
||||
//! compute bounding Box, required
|
||||
//
|
||||
virtual void computeBBox(SoAction *action, SbBox3f &box, SbVec3f ¢er );
|
||||
|
||||
//
|
||||
//! Generate Primitives, required
|
||||
//
|
||||
virtual void generatePrimitives(SoAction *action);
|
||||
|
||||
//
|
||||
//! GetChildList, required whenever the class has hidden children
|
||||
//
|
||||
virtual SoChildList *getChildren() const;
|
||||
|
||||
|
||||
protected:
|
||||
//
|
||||
//! Destructor, required
|
||||
//
|
||||
virtual ~SoCons();
|
||||
|
||||
private:
|
||||
|
||||
//
|
||||
//! Generate Children. Used to create the hidden children. Required whenever
|
||||
//! the node has hidden children.
|
||||
//
|
||||
void generateChildren();
|
||||
|
||||
//
|
||||
//! Used to modify hidden children when a data field is changed. Required
|
||||
//! whenever the class has hidden children.
|
||||
//
|
||||
void updateChildren();
|
||||
|
||||
//
|
||||
//! ChildList. Required whenever the class has hidden children.
|
||||
//
|
||||
SoChildList *children;
|
||||
|
||||
//
|
||||
//! help with trigonometry. increments sines an cosines by an angle.
|
||||
//
|
||||
void inc(double & sinPhi, double & cosPhi, double sinDeltaPhi, double cosDeltaPhi) const {
|
||||
double oldSin=sinPhi,oldCos=cosPhi;
|
||||
sinPhi = oldSin*cosDeltaPhi+oldCos*sinDeltaPhi;
|
||||
cosPhi = oldCos*cosDeltaPhi-oldSin*sinDeltaPhi;
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,67 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
////////////////////////////////////////////////////////////
|
||||
//
|
||||
// This node is able to produce PostScript, GIF files.
|
||||
//
|
||||
////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef HEPVis_SoImageWriter_h
|
||||
#define HEPVis_SoImageWriter_h
|
||||
|
||||
#include <Inventor/nodes/SoSubNode.h>
|
||||
#include <Inventor/fields/SoSFEnum.h>
|
||||
#include <Inventor/fields/SoSFString.h>
|
||||
|
||||
#define SoImageWriter Geant4_SoImageWriter
|
||||
|
||||
class SoImageWriter : public SoNode {
|
||||
SO_NODE_HEADER(SoImageWriter);
|
||||
public:
|
||||
/* enum Format {
|
||||
POST_SCRIPT,
|
||||
GIF
|
||||
};
|
||||
SoSFEnum format;*/
|
||||
SoSFString fileName;
|
||||
SoImageWriter();
|
||||
void enable();
|
||||
void disable();
|
||||
SbBool getStatus() const;
|
||||
protected:
|
||||
virtual ~SoImageWriter();
|
||||
public: /*SoEXTENDER*/
|
||||
virtual void GLRender(SoGLRenderAction*);
|
||||
public: /*SoINTERNAL*/
|
||||
static void initClass();
|
||||
private:
|
||||
SbBool fEnabled;
|
||||
SbBool fStatus;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,111 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
#ifndef HEPVis_SoMarkerSet_h
|
||||
#define HEPVis_SoMarkerSet_h
|
||||
|
||||
#include <Inventor/nodes/SoPointSet.h>
|
||||
|
||||
#include <Inventor/fields/SoMFInt32.h>
|
||||
|
||||
#define HEPVis_SoMarkerSet Geant4_HEPVis_SoMarkerSet
|
||||
|
||||
class HEPVis_SoMarkerSet : public SoPointSet {
|
||||
SO_NODE_HEADER(HEPVis_SoMarkerSet);
|
||||
public:
|
||||
SoMFInt32 markerIndex ;
|
||||
HEPVis_SoMarkerSet();
|
||||
|
||||
enum MarkerType {
|
||||
//************ 5x5 markers
|
||||
PLUS_5_5 = 0,
|
||||
ASTERISK_5_5,
|
||||
CROSS_5_5,
|
||||
STAR_5_5,
|
||||
CIRCLE_LINE_5_5,
|
||||
CIRCLE_FILLED_5_5,
|
||||
TRIANGLE_UP_LINE_5_5,
|
||||
TRIANGLE_UP_FILLED_5_5,
|
||||
TRIANGLE_DOWN_LINE_5_5,
|
||||
TRIANGLE_DOWN_FILLED_5_5,
|
||||
DAVID_STAR_LINE_5_5 = 10,
|
||||
DAVID_STAR_FILLED_5_5,
|
||||
SWISS_CROSS_LINE_5_5,
|
||||
SWISS_CROSS_FILLED_5_5,
|
||||
DIAMOND_LINE_5_5,
|
||||
DIAMOND_FILLED_5_5,
|
||||
SQUARE_LINE_5_5,
|
||||
SQUARE_FILLED_5_5 = 17,
|
||||
|
||||
//************ 7x7 markers
|
||||
PLUS_7_7 = 18,
|
||||
ASTERISK_7_7,
|
||||
CROSS_7_7,
|
||||
STAR_7_7,
|
||||
CIRCLE_LINE_7_7,
|
||||
CIRCLE_FILLED_7_7,
|
||||
TRIANGLE_UP_LINE_7_7,
|
||||
TRIANGLE_UP_FILLED_7_7,
|
||||
TRIANGLE_DOWN_LINE_7_7,
|
||||
TRIANGLE_DOWN_FILLED_7_7,
|
||||
DAVID_STAR_LINE_7_7,
|
||||
DAVID_STAR_FILLED_7_7,
|
||||
SWISS_CROSS_LINE_7_7 = 30,
|
||||
SWISS_CROSS_FILLED_7_7,
|
||||
DIAMOND_LINE_7_7,
|
||||
DIAMOND_FILLED_7_7,
|
||||
SQUARE_LINE_7_7,
|
||||
SQUARE_FILLED_7_7 = 35,
|
||||
|
||||
//************ 9x9 markers
|
||||
PLUS_9_9 = 36,
|
||||
ASTERISK_9_9,
|
||||
CROSS_9_9,
|
||||
STAR_9_9,
|
||||
CIRCLE_LINE_9_9,
|
||||
CIRCLE_FILLED_9_9,
|
||||
TRIANGLE_UP_LINE_9_9,
|
||||
TRIANGLE_UP_FILLED_9_9,
|
||||
TRIANGLE_DOWN_LINE_9_9,
|
||||
TRIANGLE_DOWN_FILLED_9_9,
|
||||
DAVID_STAR_LINE_9_9,
|
||||
DAVID_STAR_FILLED_9_9,
|
||||
SWISS_CROSS_LINE_9_9 = 30,
|
||||
SWISS_CROSS_FILLED_9_9,
|
||||
DIAMOND_LINE_9_9,
|
||||
DIAMOND_FILLED_9_9,
|
||||
SQUARE_LINE_9_9,
|
||||
SQUARE_FILLED_9_9 = 53
|
||||
} ;
|
||||
|
||||
public: /*SoEXTENDER*/
|
||||
virtual void GLRender(SoGLRenderAction*);
|
||||
public: /*SoINTERNAL*/
|
||||
static void initClass();
|
||||
protected:
|
||||
virtual ~HEPVis_SoMarkerSet();
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,218 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
//
|
||||
/*-----------------------------Hepvis----------------------------------------*/
|
||||
/* */
|
||||
/* Node: SoTrap */
|
||||
/* Description: Represents the G4Trap Geant Geometry entity */
|
||||
/* Author: Joe Boudreau Nov 11 1996 */
|
||||
/* */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
#ifndef HEPVis_SoTrap_h
|
||||
#define HEPVis_SoTrap_h
|
||||
|
||||
// Inheritance :
|
||||
#include <Inventor/nodes/SoShape.h>
|
||||
|
||||
#include <Inventor/fields/SoSFNode.h>
|
||||
#include <Inventor/fields/SoSFBool.h>
|
||||
#include <Inventor/fields/SoSFFloat.h>
|
||||
|
||||
//adding fields
|
||||
#ifdef WIN32
|
||||
#include <SoWinEnterScope.h>
|
||||
#endif
|
||||
|
||||
|
||||
// Defining Class
|
||||
#ifdef WIN32
|
||||
#include <SoWinLeaveScope.h>
|
||||
#endif
|
||||
|
||||
class SoSFNode;
|
||||
|
||||
//! SoTrap - Inventor version of the G4Trap Geant Geometry entity
|
||||
/*! Node: SoTrap
|
||||
*
|
||||
* Description: Inventor version of the G4Trap Geant Geometry entity
|
||||
*
|
||||
* Author: Joe Boudreau Nov 11 1996
|
||||
*
|
||||
* A G4Trap is a general trapezoid: The faces perpendicular to the z planes
|
||||
* are tapezia, and their centres are not necessarily on a line parallel to
|
||||
* the z axis.
|
||||
*
|
||||
* Note that of the 11 parameters desribed below, only 9 are really
|
||||
* independent - a check for planarity is made in the calculation of the
|
||||
* equation for each plane. If the planes are not parallel, a call to
|
||||
* G4Exception is made.
|
||||
*
|
||||
* Always use Inventor Fields. This allows Inventor to detect a change to
|
||||
* the data field and take the appropriate action; e.g., redraw the scene.
|
||||
*
|
||||
*/
|
||||
|
||||
#define SoTrap Geant4_SoTrap
|
||||
|
||||
class SoTrap:public SoShape {
|
||||
|
||||
// The following is required:
|
||||
SO_NODE_HEADER(SoTrap);
|
||||
|
||||
public:
|
||||
#if defined(WIN32) && defined(BUILDING_DLL)
|
||||
// When building the node as a DLL under Win32 we must explicitly
|
||||
// declare this entry point as visible outside the DLL. The macro
|
||||
// BUILDING_DLL is defined in the node's source file.
|
||||
_declspec(dllexport)
|
||||
#endif
|
||||
|
||||
//
|
||||
//! half-length along Z
|
||||
//
|
||||
SoSFFloat pDz;
|
||||
//
|
||||
//! Polar angle of the line joining the centres of the faces at -/+pDz
|
||||
//
|
||||
SoSFFloat pTheta;
|
||||
//
|
||||
//! Azimuthal angle of the line joing the centre of the face at -pDz
|
||||
//! to the centre of the face at +pDz
|
||||
//
|
||||
SoSFFloat pPhi;
|
||||
//
|
||||
//! Half-length along y of the face at -pDz
|
||||
//
|
||||
SoSFFloat pDy1;
|
||||
//
|
||||
//! Half-length along x of the side at y=-pDy1 of the face at -pDz
|
||||
//
|
||||
SoSFFloat pDx1;
|
||||
//
|
||||
//! Half-length along x of the side at y=+pDy1 of the face at -pDz
|
||||
//
|
||||
SoSFFloat pDx2;
|
||||
//
|
||||
//! Half-length along y of the face at +pDz
|
||||
//
|
||||
SoSFFloat pDy2;
|
||||
//
|
||||
//! Half-length along x of the side at y=-pDy2 of the face at +pDz
|
||||
//
|
||||
SoSFFloat pDx3;
|
||||
//
|
||||
//! Half-length along x of the side at y=+pDy2 of the face at +pDz
|
||||
//
|
||||
SoSFFloat pDx4;
|
||||
//
|
||||
//! Angle with respect to the y axis from the centre of the side at
|
||||
//! y=-pDy1 to the centre at y=+pDy1 of the face at -pDz
|
||||
//
|
||||
SoSFFloat pAlp1;
|
||||
//
|
||||
//! Angle with respect to the y axis from the centre of the side at
|
||||
//! y=-pDy2 to the centre at y=+pDy2 of the face at +pDz
|
||||
//
|
||||
SoSFFloat pAlp2;
|
||||
|
||||
//
|
||||
//! Alternate rep - required
|
||||
//
|
||||
SoSFNode alternateRep;
|
||||
|
||||
//
|
||||
//! Constructor, required
|
||||
//
|
||||
SoTrap();
|
||||
|
||||
//
|
||||
//! Class Initializer, required
|
||||
//
|
||||
static void initClass();
|
||||
|
||||
//
|
||||
//! Generate AlternateRep, required. Generating an alternate representation
|
||||
//! must be done upon users request. It allows an Inventor program to read
|
||||
//! back the file without requiring *this* code to be dynamically linked.
|
||||
//! If the users expects that *this* code will be dynamically linked, he
|
||||
//! need not invoke this method.
|
||||
//
|
||||
virtual void generateAlternateRep();
|
||||
|
||||
//
|
||||
//! We better be able to clear it, too!
|
||||
//
|
||||
virtual void clearAlternateRep();
|
||||
|
||||
protected:
|
||||
|
||||
//
|
||||
//! compute bounding Box, required
|
||||
//
|
||||
virtual void computeBBox(SoAction *action, SbBox3f &box, SbVec3f ¢er );
|
||||
|
||||
//
|
||||
//! Generate Primitives, required
|
||||
//
|
||||
virtual void generatePrimitives(SoAction *action);
|
||||
|
||||
//
|
||||
//! GetChildList, required whenever the class has hidden children
|
||||
//
|
||||
virtual SoChildList *getChildren() const;
|
||||
|
||||
//
|
||||
//! Destructor, required
|
||||
//
|
||||
virtual ~SoTrap();
|
||||
|
||||
private:
|
||||
|
||||
//
|
||||
//! Generate Children. Used to create the hidden children. Required whenever
|
||||
//! the node has hidden children.
|
||||
//
|
||||
void generateChildren();
|
||||
|
||||
//
|
||||
//! Used to modify hidden children when a data field is changed. Required
|
||||
//! whenever the class has hidden children.
|
||||
//
|
||||
void updateChildren();
|
||||
|
||||
//
|
||||
//! ChildList. Required whenever the class has hidden children.
|
||||
//
|
||||
SoChildList *children;
|
||||
|
||||
};
|
||||
|
||||
#ifdef WIN32
|
||||
#include <SoWinEnterScope.h>
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,170 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
//
|
||||
/*-----------------------------Hepvis----------------------------------------*/
|
||||
/* */
|
||||
/* Node: SoTrd */
|
||||
/* Description: Represents the G4Trd Geant Geometry entity */
|
||||
/* Author: Joe Boudreau Nov 11 1996 */
|
||||
/* */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
#ifndef HEPVis_SoTrd_h
|
||||
#define HEPVis_SoTrd_h
|
||||
|
||||
#include <Inventor/fields/SoSFFloat.h>
|
||||
#include <Inventor/fields/SoSFNode.h>
|
||||
#include <Inventor/fields/SoSFBool.h>
|
||||
#include <Inventor/nodes/SoShape.h>
|
||||
|
||||
class SoSFNode;
|
||||
|
||||
//! SoTrd - Inventor version of the G4Trd Geant Geometry entity
|
||||
/*!
|
||||
* Node: SoTrd
|
||||
*
|
||||
* Description: Inventor version of the G4Trd Geant Geometry entity
|
||||
*
|
||||
* Author: Joe Boudreau Nov 11 1996
|
||||
*
|
||||
* A Trd is a trapezoid with the x and y dimensions varying along z
|
||||
*
|
||||
* Always use Inventor Fields. This allows Inventor to detect a change to
|
||||
* the data field and take the appropriate action; e.g., redraw the scene.
|
||||
*
|
||||
*/
|
||||
|
||||
#define SoTrd Geant4_SoTrd
|
||||
|
||||
class SoTrd:public SoShape {
|
||||
|
||||
//
|
||||
//! This is required
|
||||
//
|
||||
SO_NODE_HEADER(SoTrd);
|
||||
|
||||
public:
|
||||
|
||||
//
|
||||
//! half-length of x, at -fDz
|
||||
//
|
||||
SoSFFloat fDx1;
|
||||
|
||||
//
|
||||
//! half-length of x, at +fDz
|
||||
//
|
||||
SoSFFloat fDx2;
|
||||
|
||||
//
|
||||
//! half-length of y, at -fDz
|
||||
//
|
||||
SoSFFloat fDy1;
|
||||
|
||||
//
|
||||
//! half-length of y, at +fDz
|
||||
//
|
||||
SoSFFloat fDy2;
|
||||
|
||||
//
|
||||
//! half-length along Z
|
||||
//
|
||||
SoSFFloat fDz;
|
||||
|
||||
//
|
||||
//! Alternate rep - required
|
||||
//
|
||||
SoSFNode alternateRep;
|
||||
|
||||
//
|
||||
//! Constructor, required
|
||||
//
|
||||
SoTrd();
|
||||
|
||||
//
|
||||
//! Class Initializer, required
|
||||
//
|
||||
static void initClass();
|
||||
|
||||
//
|
||||
//! Generate AlternateRep, required. Generating an alternate representation
|
||||
//! must be done upon users request. It allows an Inventor program to read
|
||||
//! back the file without requiring *this* code to be dynamically linked.
|
||||
//! If the users expects that *this* code will be dynamically linked, he
|
||||
//! need not invoke this method.
|
||||
//
|
||||
virtual void generateAlternateRep();
|
||||
|
||||
//
|
||||
//! We better be able to clear it, too!
|
||||
//
|
||||
virtual void clearAlternateRep();
|
||||
|
||||
protected:
|
||||
|
||||
//
|
||||
//! compute bounding Box, required
|
||||
//
|
||||
virtual void computeBBox(SoAction *action, SbBox3f &box, SbVec3f ¢er );
|
||||
|
||||
//
|
||||
//! Generate Primitives, required
|
||||
//
|
||||
virtual void generatePrimitives(SoAction *action);
|
||||
|
||||
//
|
||||
//! GetChildList, required whenever the class has hidden children
|
||||
//
|
||||
virtual SoChildList *getChildren() const;
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
//
|
||||
//! Destructor, required
|
||||
//
|
||||
virtual ~SoTrd();
|
||||
|
||||
private:
|
||||
|
||||
//
|
||||
//! Generate Children. Used to create the hidden children. Required whenever
|
||||
//! the node has hidden children.
|
||||
//
|
||||
void generateChildren();
|
||||
|
||||
//
|
||||
//! Used to modify hidden children when a data field is changed. Required
|
||||
//! whenever the class has hidden children.
|
||||
//
|
||||
void updateChildren();
|
||||
|
||||
//
|
||||
//! ChildList. Required whenever the class has hidden children.
|
||||
//
|
||||
SoChildList *children;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,181 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
//
|
||||
/*-----------------------------Hepvis----------------------------------------*/
|
||||
/* */
|
||||
/* Node: SoTubs */
|
||||
/* Description: Represents the G4Tubs Geant Geometry entity */
|
||||
/* Author: Joe Boudreau Nov 11 1996 */
|
||||
/* */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
#ifndef HEPVis_SoTubs_h
|
||||
#define HEPVis_SoTubs_h
|
||||
|
||||
#include <Inventor/fields/SoSFFloat.h>
|
||||
#include <Inventor/fields/SoSFNode.h>
|
||||
#include <Inventor/fields/SoSFBool.h>
|
||||
#include <Inventor/nodes/SoShape.h>
|
||||
|
||||
class SoSFNode;
|
||||
|
||||
//! SoTubs - Inventor version of the G4Tubs Geant Geometry entity
|
||||
/*!
|
||||
* Node: SoTubs
|
||||
*
|
||||
* Description: The Inventor version of the G4Tubs Geant Geometry entity
|
||||
*
|
||||
* Author: Joe Boudreau Nov 11 1996
|
||||
*
|
||||
* class G4Tubs
|
||||
*
|
||||
* A tube or tube segment with curved sides parallel to
|
||||
* the z-axis. The tube has a specified half-length along
|
||||
* the z axis, about which it is centred, and a given
|
||||
* minimum and maximum radius. A minimum radius of 0
|
||||
* signifies a filled tube /cylinder. The tube segment is
|
||||
* specified by starting and delta
|
||||
* angles for phi, with 0 being the +x axis, PI/2
|
||||
* the +y axis. A delta angle of 2PI signifies a
|
||||
* complete, unsegmented tube/cylinder
|
||||
*
|
||||
* Always use Inventor Fields. This allows Inventor to detect a change to
|
||||
* the data field and take the appropriate action; e.g., redraw the scene.
|
||||
*/
|
||||
|
||||
#define SoTubs Geant4_SoTubs
|
||||
|
||||
class SoTubs:public SoShape {
|
||||
|
||||
// The following is required:
|
||||
SO_NODE_HEADER(SoTubs);
|
||||
|
||||
public:
|
||||
|
||||
//
|
||||
//! Inside radius of the tube
|
||||
//
|
||||
SoSFFloat pRMin;
|
||||
//
|
||||
//! Outside radius of the tube
|
||||
//
|
||||
SoSFFloat pRMax;
|
||||
//
|
||||
//! Half-length in Z
|
||||
//
|
||||
SoSFFloat pDz;
|
||||
//
|
||||
//! Starting angle, in radians
|
||||
//
|
||||
SoSFFloat pSPhi;
|
||||
//
|
||||
//! Delta-angle, in radians
|
||||
//
|
||||
SoSFFloat pDPhi;
|
||||
//
|
||||
//! Alternate rep - required
|
||||
//
|
||||
SoSFNode alternateRep;
|
||||
|
||||
//
|
||||
//! Constructor, required
|
||||
//
|
||||
SoTubs();
|
||||
|
||||
//
|
||||
//! Class Initializer, required
|
||||
//
|
||||
static void initClass();
|
||||
|
||||
//
|
||||
//! Generate AlternateRep, required. Generating an alternate representation
|
||||
//! must be done upon users request. It allows an Inventor program to read
|
||||
//! back the file without requiring *this* code to be dynamically linked.
|
||||
//! If the users expects that *this* code will be dynamically linked, he
|
||||
//! need not invoke this method.
|
||||
//
|
||||
virtual void generateAlternateRep();
|
||||
|
||||
//
|
||||
//! We better be able to clear it, too!
|
||||
//
|
||||
virtual void clearAlternateRep();
|
||||
|
||||
protected:
|
||||
|
||||
//
|
||||
//! compute bounding Box, required
|
||||
//
|
||||
virtual void computeBBox(SoAction *action, SbBox3f &box, SbVec3f ¢er );
|
||||
|
||||
//
|
||||
//! Generate Primitives, required
|
||||
//
|
||||
virtual void generatePrimitives(SoAction *action);
|
||||
|
||||
//
|
||||
//! GetChildList, required whenever the class has hidden children
|
||||
//
|
||||
virtual SoChildList *getChildren() const;
|
||||
|
||||
|
||||
protected:
|
||||
//
|
||||
//! Destructor, required
|
||||
//
|
||||
virtual ~SoTubs();
|
||||
|
||||
private:
|
||||
|
||||
//
|
||||
//! Generate Children. Used to create the hidden children. Required whenever
|
||||
//! the node has hidden children.
|
||||
//
|
||||
void generateChildren();
|
||||
|
||||
//
|
||||
//! Used to modify hidden children when a data field is changed. Required
|
||||
//! whenever the class has hidden children.
|
||||
//
|
||||
void updateChildren();
|
||||
|
||||
//
|
||||
//! ChildList. Required whenever the class has hidden children.
|
||||
//
|
||||
SoChildList *children;
|
||||
|
||||
//
|
||||
//! help with trigonometry. increments sines an cosines by an angle.
|
||||
//
|
||||
void inc(double & sinPhi, double & cosPhi, double sinDeltaPhi, double cosDeltaPhi) const {
|
||||
double oldSin=sinPhi,oldCos=cosPhi;
|
||||
sinPhi = oldSin*cosDeltaPhi+oldCos*sinDeltaPhi;
|
||||
cosPhi = oldCos*cosDeltaPhi-oldSin*sinDeltaPhi;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,39 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// John Allison 26th October 2006
|
||||
// Extended SoLineSet to include G4Atts.
|
||||
|
||||
#ifndef SoG4LineSet_h
|
||||
#define SoG4LineSet_h
|
||||
|
||||
// Inheritance :
|
||||
#include <Inventor/nodes/SoLineSet.h>
|
||||
#include "G4AttHolder.hh"
|
||||
|
||||
class SoG4LineSet: public SoLineSet, public G4AttHolder {};
|
||||
|
||||
#endif //SoG4LineSet_h
|
||||
@@ -0,0 +1,39 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// John Allison 26th October 2006
|
||||
// Extended SoMarkerSet to include G4Atts.
|
||||
|
||||
#ifndef SoG4MarkerSet_h
|
||||
#define SoG4MarkerSet_h
|
||||
|
||||
// Inheritance :
|
||||
#include <HEPVis/nodes/SoMarkerSet.h>
|
||||
#include "G4AttHolder.hh"
|
||||
|
||||
class SoG4MarkerSet: public SoMarkerSet, public G4AttHolder {};
|
||||
|
||||
#endif //SoG4MarkerSet_h
|
||||
@@ -0,0 +1,46 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
//
|
||||
// John Allison 26th October 2006
|
||||
// Extended Geant4_SoPolyhedron to include G4Atts.
|
||||
|
||||
#ifndef SoG4Polyhedron_h
|
||||
#define SoG4Polyhedron_h
|
||||
|
||||
// Inheritance :
|
||||
#include "Geant4_SoPolyhedron.h"
|
||||
#include "G4AttHolder.hh"
|
||||
|
||||
class G4Polyhedron;
|
||||
|
||||
class SoG4Polyhedron: public Geant4_SoPolyhedron, public G4AttHolder {
|
||||
public:
|
||||
SoG4Polyhedron(const G4Polyhedron& polyhedron):
|
||||
Geant4_SoPolyhedron(polyhedron){}
|
||||
};
|
||||
|
||||
#endif //SoG4Polyhedron_h
|
||||
@@ -0,0 +1,58 @@
|
||||
/**************************************************************************\
|
||||
*
|
||||
* This file is part of the Coin 3D visualization library.
|
||||
* Copyright (C) 1998-2004 by Systems in Motion. All rights reserved.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* ("GPL") version 2 as published by the Free Software Foundation.
|
||||
* See the file LICENSE.GPL at the root directory of this source
|
||||
* distribution for additional information about the GNU GPL.
|
||||
*
|
||||
* For using Coin with software that can not be combined with the GNU
|
||||
* GPL, and for taking advantage of the additional benefits of our
|
||||
* support services, please contact Systems in Motion about acquiring
|
||||
* a Coin Professional Edition License.
|
||||
*
|
||||
* See <URL:http://www.coin3d.org/> for more information.
|
||||
*
|
||||
* Systems in Motion, Teknobyen, Abels Gate 5, 7030 Trondheim, NORWAY.
|
||||
* <URL:http://www.sim.no/>.
|
||||
*
|
||||
\**************************************************************************/
|
||||
|
||||
#ifndef SOXTINTERNALUTILS_H
|
||||
#define SOXTINTERNALUTILS_H
|
||||
|
||||
#include <X11/Intrinsic.h>
|
||||
#include <Inventor/SbBasic.h> // SbBool
|
||||
|
||||
// ************************************************************************
|
||||
|
||||
// This class contains common data and methods that we want to share
|
||||
// among classes within SoXt, but which should not be publicly visible
|
||||
// in the library API.
|
||||
|
||||
class SoXtInternal {
|
||||
public:
|
||||
static void selectBestVisual(Display * dpy, Visual * & visual,
|
||||
Colormap & cmap, int & depth);
|
||||
|
||||
static Pixmap createPixmapFromXpm(Widget button, const char ** xpm,
|
||||
SbBool ghost = FALSE);
|
||||
|
||||
static void setAppName(const char * appname);
|
||||
static void setAppClass(const char * appclass);
|
||||
static const char * getAppName(void);
|
||||
static const char * getAppClass(void);
|
||||
|
||||
private:
|
||||
static const char * xpmErrorString(int error);
|
||||
|
||||
static char * appname;
|
||||
static char * appclass;
|
||||
};
|
||||
|
||||
// ************************************************************************
|
||||
|
||||
#endif // ! SOXTINTERNALUTILS_H
|
||||
@@ -0,0 +1,242 @@
|
||||
#ifndef COIN_PIXMAP_CONSOLE_XPM
|
||||
#define COIN_PIXMAP_CONSOLE_XPM
|
||||
|
||||
/* XPM */
|
||||
static const char * console_xpm[] = {
|
||||
"24 24 210 2",
|
||||
" c None",
|
||||
". c #808082",
|
||||
"+ c #79797B",
|
||||
"@ c #7A7A7C",
|
||||
"# c #7A7A7D",
|
||||
"$ c #7B7B7D",
|
||||
"% c #7C7C7E",
|
||||
"& c #7D7D7F",
|
||||
"* c #828284",
|
||||
"= c #E6E6E7",
|
||||
"- c #E7E7E8",
|
||||
"; c #E6E7E7",
|
||||
"> c #E6E6E6",
|
||||
", c #E5E5E6",
|
||||
"' c #E4E4E5",
|
||||
") c #E3E3E4",
|
||||
"! c #E2E2E3",
|
||||
"~ c #DFDFE0",
|
||||
"{ c #9B9B9D",
|
||||
"] c #87888A",
|
||||
"^ c #868788",
|
||||
"/ c #858687",
|
||||
"( c #848586",
|
||||
"_ c #838485",
|
||||
": c #818183",
|
||||
"< c #7F7F81",
|
||||
"[ c #7D7E80",
|
||||
"} c #7C7D7F",
|
||||
"| c #7B7C7E",
|
||||
"1 c #7A7B7D",
|
||||
"2 c #797A7C",
|
||||
"3 c #78797B",
|
||||
"4 c #777779",
|
||||
"5 c #757678",
|
||||
"6 c #747577",
|
||||
"7 c #858587",
|
||||
"8 c #D9D9DA",
|
||||
"9 c #D5D5D7",
|
||||
"0 c #747476",
|
||||
"a c #767778",
|
||||
"b c #767678",
|
||||
"c c #717274",
|
||||
"d c #737375",
|
||||
"e c #6F6F71",
|
||||
"f c #717173",
|
||||
"g c #707173",
|
||||
"h c #6C6D6F",
|
||||
"i c #6E6F71",
|
||||
"j c #6E6E70",
|
||||
"k c #6A6A6C",
|
||||
"l c #6C6C6E",
|
||||
"m c #6B6C6E",
|
||||
"n c #67686A",
|
||||
"o c #656567",
|
||||
"p c #606063",
|
||||
"q c #CECED0",
|
||||
"r c #C9CACC",
|
||||
"s c #636466",
|
||||
"t c #626365",
|
||||
"u c #6B6C6D",
|
||||
"v c #98999A",
|
||||
"w c #99999A",
|
||||
"x c #646566",
|
||||
"y c #898A8B",
|
||||
"z c #646466",
|
||||
"A c #626264",
|
||||
"B c #616264",
|
||||
"C c #5D5E5F",
|
||||
"D c #5F6062",
|
||||
"E c #5F5F61",
|
||||
"F c #5B5B5D",
|
||||
"G c #5D5D5F",
|
||||
"H c #59595B",
|
||||
"I c #545557",
|
||||
"J c #49494C",
|
||||
"K c #BCBCBF",
|
||||
"L c #BCBDBF",
|
||||
"M c #4D4D50",
|
||||
"N c #525255",
|
||||
"O c #909092",
|
||||
"P c #595A5C",
|
||||
"Q c #59595C",
|
||||
"R c #57575A",
|
||||
"S c #757577",
|
||||
"T c #545457",
|
||||
"U c #505052",
|
||||
"V c #525254",
|
||||
"W c #4F5052",
|
||||
"X c #4F4F52",
|
||||
"Y c #494A4C",
|
||||
"Z c #3D3D40",
|
||||
"` c #1F2023",
|
||||
" . c #ACACAF",
|
||||
".. c #A7A8AA",
|
||||
"+. c #2B2C2E",
|
||||
"@. c #393A3C",
|
||||
"#. c #464749",
|
||||
"$. c #434446",
|
||||
"%. c #5A5A5C",
|
||||
"&. c #5D5E60",
|
||||
"*. c #808182",
|
||||
"=. c #424345",
|
||||
"-. c #3E3F41",
|
||||
";. c #404143",
|
||||
">. c #3F4042",
|
||||
",. c #3C3D3F",
|
||||
"'. c #3D3E40",
|
||||
"). c #3B3C3E",
|
||||
"!. c #37383A",
|
||||
"~. c #2F3032",
|
||||
"{. c #1A1B1E",
|
||||
"]. c #A6A6A9",
|
||||
"^. c #9FA0A3",
|
||||
"/. c #212124",
|
||||
"(. c #2C2C2F",
|
||||
"_. c #67676A",
|
||||
":. c #424245",
|
||||
"<. c #434345",
|
||||
"[. c #676769",
|
||||
"}. c #3C3C3F",
|
||||
"|. c #39393B",
|
||||
"1. c #6D6D70",
|
||||
"2. c #3F3F41",
|
||||
"3. c #3E3E41",
|
||||
"4. c #363639",
|
||||
"5. c #38383B",
|
||||
"6. c #2E2E31",
|
||||
"7. c #1A1A1D",
|
||||
"8. c #A0A0A3",
|
||||
"9. c #999A9D",
|
||||
"0. c #202122",
|
||||
"a. c #2D2E30",
|
||||
"b. c #39393C",
|
||||
"c. c #757578",
|
||||
"d. c #4C4D4F",
|
||||
"e. c #505053",
|
||||
"f. c #616164",
|
||||
"g. c #5F5F62",
|
||||
"h. c #666668",
|
||||
"i. c #37383B",
|
||||
"j. c #393A3D",
|
||||
"k. c #191A1C",
|
||||
"l. c #939497",
|
||||
"m. c #1F1F22",
|
||||
"n. c #2D2D30",
|
||||
"o. c #37373A",
|
||||
"p. c #2E2E32",
|
||||
"q. c #19191B",
|
||||
"r. c #8C8D91",
|
||||
"s. c #1E1E21",
|
||||
"t. c #353538",
|
||||
"u. c #18181B",
|
||||
"v. c #8D8E91",
|
||||
"w. c #86878B",
|
||||
"x. c #1D1D1F",
|
||||
"y. c #2D2D2F",
|
||||
"z. c #373739",
|
||||
"A. c #17171A",
|
||||
"B. c #86888B",
|
||||
"C. c #808185",
|
||||
"D. c #1C1C1E",
|
||||
"E. c #2C2C2E",
|
||||
"F. c #363738",
|
||||
"G. c #38393A",
|
||||
"H. c #38393B",
|
||||
"I. c #161719",
|
||||
"J. c #808285",
|
||||
"K. c #797B7E",
|
||||
"L. c #1B1B1E",
|
||||
"M. c #2A2A2D",
|
||||
"N. c #343436",
|
||||
"O. c #363638",
|
||||
"P. c #161618",
|
||||
"Q. c #7A7C7F",
|
||||
"R. c #737578",
|
||||
"S. c #212123",
|
||||
"T. c #27272A",
|
||||
"U. c #28292B",
|
||||
"V. c #29292B",
|
||||
"W. c #222224",
|
||||
"X. c #151518",
|
||||
"Y. c #747579",
|
||||
"Z. c #6C6E71",
|
||||
"`. c #252528",
|
||||
" + c #262629",
|
||||
".+ c #28282B",
|
||||
"++ c #29292C",
|
||||
"@+ c #2B2B2D",
|
||||
"#+ c #2B2B2E",
|
||||
"$+ c #252628",
|
||||
"%+ c #343437",
|
||||
"&+ c #6C6E72",
|
||||
"*+ c #313233",
|
||||
"=+ c #65676B",
|
||||
"-+ c #66676B",
|
||||
";+ c #66686B",
|
||||
">+ c #5A7281",
|
||||
",+ c #5B6E7A",
|
||||
"'+ c #3B3C3D",
|
||||
")+ c #444548",
|
||||
"!+ c #494A4D",
|
||||
"~+ c #4D4E50",
|
||||
"{+ c #505153",
|
||||
"]+ c #535456",
|
||||
"^+ c #565759",
|
||||
"/+ c #56575A",
|
||||
"(+ c #575F64",
|
||||
"_+ c #53595E",
|
||||
":+ c #4B4C4E",
|
||||
"<+ c #454649",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" . + @ # $ % & & & & & & & & & & & % $ @ + * ",
|
||||
" = - - - - - - - ; = = = > , , , ' ' ) ) ! ! ",
|
||||
" ~ { ] ^ / ( _ * : . < [ } | 1 2 3 4 5 6 7 8 ",
|
||||
" 9 2 6 0 a b c 0 d e f g h i j k l m n o p q ",
|
||||
" r s t u v w u x y z A B C D E F C G H I J K ",
|
||||
" L M N O P Q 5 R S e I T U N V M W X Y Z ` . ",
|
||||
" ..+.@.* #.#.$.%.&.*.=.=.-.;.>.,.'.).!.~.{.]. ",
|
||||
" ^./.(._.:.<.[.).}.|.1.2.3.:.}.4.5.5.4.6.7.8. ",
|
||||
" 9.0.a.b.0 c.).d.e.b.f.g.h.0 e.i.j.j.i.~.k.9. ",
|
||||
" l.m.n.o.b.b.o.b.b.o.b.b.o.b.b.o.b.b.o.p.q.l. ",
|
||||
" r.s.+.t.o.o.t.o.o.t.o.o.t.o.o.t.o.o.t.n.u.v. ",
|
||||
" w.x.y.z.|.b.z.|.b.z.|.|.z.|.b.z.|.b.z.6.A.B. ",
|
||||
" C.D.E.F.G.H.F.G.H.F.G.H.F.G.H.F.G.H.F.a.I.J. ",
|
||||
" K.L.M.N.O.O.N.O.O.N.O.O.N.O.O.N.O.O.N.E.P.Q. ",
|
||||
" R.7.S.T.U.V.T.U.V.T.U.V.T.U.V.T.U.V.T.W.X.Y. ",
|
||||
" Z.i.`. +.+++@+#+#+#+#+#+#+#+#+#+@+++T.$+%+&+ ",
|
||||
"*+=+=+=+=+-+-+;+;+;+;+;+;+;+;+;+;+-+-+>+,+=+=+'+",
|
||||
" )+!+~+{+]+^+P P P P P P P P P P P /+(+_+:+<+ ",
|
||||
" ",
|
||||
" ",
|
||||
" "};
|
||||
|
||||
#endif /* !COIN_PIXMAP_CONSOLE_XPM */
|
||||
@@ -0,0 +1,269 @@
|
||||
#ifndef COIN_PIXMAP_FAVORITES_XPM
|
||||
#define COIN_PIXMAP_FAVORITES_XPM
|
||||
|
||||
/* XPM */
|
||||
static const char *favorites_xpm[] = {
|
||||
/* columns rows colors chars-per-pixel */
|
||||
"24 24 234 2 ",
|
||||
" c #AF6D03",
|
||||
". c #BA6F07",
|
||||
"X c #AE7306",
|
||||
"o c #AB7406",
|
||||
"O c #AD7608",
|
||||
"+ c #AE7708",
|
||||
"@ c #AF7709",
|
||||
"# c #B27307",
|
||||
"$ c #BA7207",
|
||||
"% c #B17008",
|
||||
"& c #B57009",
|
||||
"* c #B7720A",
|
||||
"= c #B9730A",
|
||||
"- c #BC7009",
|
||||
"; c #B17809",
|
||||
": c #B27B09",
|
||||
"> c #B2780A",
|
||||
", c #B57D0A",
|
||||
"< c #B17C0F",
|
||||
"1 c #B67F0D",
|
||||
"2 c #BE7B0B",
|
||||
"3 c #CE7E0E",
|
||||
"4 c #ED7F1E",
|
||||
"5 c #BA800D",
|
||||
"6 c #B8810F",
|
||||
"7 c #BA8311",
|
||||
"8 c #B68B1E",
|
||||
"9 c #BA8919",
|
||||
"0 c #BB8E21",
|
||||
"q c #B89123",
|
||||
"w c #BE9324",
|
||||
"e c #B99426",
|
||||
"r c #C6830F",
|
||||
"t c #DE8111",
|
||||
"y c #DE8215",
|
||||
"u c #DA8914",
|
||||
"i c #E18117",
|
||||
"p c #EF8213",
|
||||
"a c #EA8E17",
|
||||
"s c #E1831D",
|
||||
"d c #E3801E",
|
||||
"f c #FB8214",
|
||||
"g c #FF8C17",
|
||||
"h c #FF831C",
|
||||
"j c #F68F19",
|
||||
"k c #FE8F19",
|
||||
"l c #FF9119",
|
||||
"z c #FF9219",
|
||||
"x c #FF911B",
|
||||
"c c #FF961B",
|
||||
"v c #FF901D",
|
||||
"b c #FF951C",
|
||||
"n c #FF951D",
|
||||
"m c #FF961C",
|
||||
"M c #FF961D",
|
||||
"N c #FF971D",
|
||||
"B c #FF971E",
|
||||
"V c #FF991C",
|
||||
"C c #FF991D",
|
||||
"Z c #FF9A1D",
|
||||
"A c #FF991E",
|
||||
"S c #FF9A1E",
|
||||
"D c #FF9B1E",
|
||||
"F c #FF9B1F",
|
||||
"G c #FF9C1F",
|
||||
"H c #FF9D1F",
|
||||
"J c #FF9E1F",
|
||||
"K c #C0982C",
|
||||
"L c #C29F35",
|
||||
"P c #CA9C33",
|
||||
"I c #E98722",
|
||||
"U c #FF8F25",
|
||||
"Y c #FF9124",
|
||||
"T c #FC9325",
|
||||
"R c #FC9027",
|
||||
"E c #F49B23",
|
||||
"W c #FF9820",
|
||||
"Q c #FD9E20",
|
||||
"! c #FF9E20",
|
||||
"~ c #FF9F20",
|
||||
"^ c #FF9629",
|
||||
"/ c #FF902F",
|
||||
"( c #F39C2B",
|
||||
") c #FF9A29",
|
||||
"_ c #FF9C29",
|
||||
"` c #FF9731",
|
||||
"' c #C4A336",
|
||||
"] c #CCA337",
|
||||
"[ c #D9A23F",
|
||||
"{ c #FFA020",
|
||||
"} c #FFA121",
|
||||
"| c #FFA221",
|
||||
" . c #FFA321",
|
||||
".. c #FFA322",
|
||||
"X. c #FFA721",
|
||||
"o. c #FFA422",
|
||||
"O. c #FFA522",
|
||||
"+. c #FFA523",
|
||||
"@. c #FFA623",
|
||||
"#. c #FFA723",
|
||||
"$. c #FFA724",
|
||||
"%. c #FFA823",
|
||||
"&. c #FFA824",
|
||||
"*. c #FFA924",
|
||||
"=. c #FFAA24",
|
||||
"-. c #FFAA25",
|
||||
";. c #FFAB25",
|
||||
":. c #FFAC25",
|
||||
">. c #FFAD25",
|
||||
",. c #FFAD26",
|
||||
"<. c #FFAD27",
|
||||
"1. c #FFAE26",
|
||||
"2. c #FFAF26",
|
||||
"3. c #F8AB2B",
|
||||
"4. c #FFA829",
|
||||
"5. c #FFAF28",
|
||||
"6. c #FFAE2B",
|
||||
"7. c #FFB027",
|
||||
"8. c #FFB127",
|
||||
"9. c #FFB326",
|
||||
"0. c #FFB427",
|
||||
"q. c #FFB627",
|
||||
"w. c #FFB228",
|
||||
"e. c #FFB32B",
|
||||
"r. c #FFB428",
|
||||
"t. c #FFB529",
|
||||
"y. c #FFB728",
|
||||
"u. c #FFB629",
|
||||
"i. c #FFB929",
|
||||
"p. c #FFBA2A",
|
||||
"a. c #FFBB2B",
|
||||
"s. c #FFBC2E",
|
||||
"d. c #F7AE32",
|
||||
"f. c #FFB033",
|
||||
"g. c #FFBE32",
|
||||
"h. c #FFBC38",
|
||||
"j. c #FFC13D",
|
||||
"k. c #FFC03E",
|
||||
"l. c #FFC23E",
|
||||
"z. c #DBAF42",
|
||||
"x. c #F2A441",
|
||||
"c. c #F3A643",
|
||||
"v. c #F6B546",
|
||||
"b. c #FFBF41",
|
||||
"n. c #FFBE43",
|
||||
"m. c #FFB847",
|
||||
"M. c #FFBA47",
|
||||
"N. c #FFBD46",
|
||||
"B. c #FFB64D",
|
||||
"V. c #F7BA4A",
|
||||
"C. c #FFBC48",
|
||||
"Z. c #E7BB51",
|
||||
"A. c #E6B358",
|
||||
"S. c #FFBC58",
|
||||
"D. c #FDB85C",
|
||||
"F. c #FFC440",
|
||||
"G. c #FFC644",
|
||||
"H. c #FFC748",
|
||||
"J. c #FFC94B",
|
||||
"K. c #FFC94C",
|
||||
"L. c #FFC94D",
|
||||
"P. c #FFC755",
|
||||
"I. c #FFCE52",
|
||||
"U. c #FFCF53",
|
||||
"Y. c #FFCF55",
|
||||
"T. c #FFCF56",
|
||||
"R. c #FFCC59",
|
||||
"E. c #FFD057",
|
||||
"W. c #FFD05B",
|
||||
"Q. c #FFD25A",
|
||||
"!. c #FFD05E",
|
||||
"~. c #F3CA63",
|
||||
"^. c #FFCE61",
|
||||
"/. c #F0C96F",
|
||||
"(. c #FFCE69",
|
||||
"). c #FFCF69",
|
||||
"_. c #FFCC6A",
|
||||
"`. c #FFCC6B",
|
||||
"'. c #FFC86D",
|
||||
"]. c #FFC96D",
|
||||
"[. c #FFCB6C",
|
||||
"{. c #FFD061",
|
||||
"}. c #FFD064",
|
||||
"|. c #FFD067",
|
||||
" X c #FFD666",
|
||||
".X c #FFD767",
|
||||
"XX c #F5D26E",
|
||||
"oX c #FBD46E",
|
||||
"OX c #FFD76C",
|
||||
"+X c #FFD76F",
|
||||
"@X c #FFDA6D",
|
||||
"#X c #E9C972",
|
||||
"$X c #F2C270",
|
||||
"%X c #FFCB77",
|
||||
"&X c #EAD17E",
|
||||
"*X c #FFD773",
|
||||
"=X c #FFD776",
|
||||
"-X c #FFDC76",
|
||||
";X c #F0D57C",
|
||||
":X c #FFD679",
|
||||
">X c #FFDD78",
|
||||
",X c #FFDD7B",
|
||||
"<X c #FFDC7F",
|
||||
"1X c #FFE079",
|
||||
"2X c #FFE27D",
|
||||
"3X c #F9CF81",
|
||||
"4X c #FFDC82",
|
||||
"5X c #F0DC89",
|
||||
"6X c #F2DD8F",
|
||||
"7X c #FFDC89",
|
||||
"8X c #FFD88E",
|
||||
"9X c #FFDE95",
|
||||
"0X c #FFE282",
|
||||
"qX c #FFE287",
|
||||
"wX c #FFE28A",
|
||||
"eX c #FFE18C",
|
||||
"rX c #FFE28E",
|
||||
"tX c #FFE792",
|
||||
"yX c #FFE297",
|
||||
"uX c #FFE794",
|
||||
"iX c #FFEB92",
|
||||
"pX c #FFE799",
|
||||
"aX c #FFEB9B",
|
||||
"sX c #FFEC99",
|
||||
"dX c #FAEA9F",
|
||||
"fX c #FFECA0",
|
||||
"gX c #FFEEA4",
|
||||
"hX c #FFF4AE",
|
||||
"jX c #FFF5AF",
|
||||
"kX c #FFF1B1",
|
||||
"lX c #FFF5B5",
|
||||
"zX c #FFF9C8",
|
||||
"xX c #FFFDCD",
|
||||
"cX c None",
|
||||
/* pixels */
|
||||
"cXcXcXcXcXcXcXcXcXcXcXcXcXcXcXcXcXcXcXcXcXcXcXcX",
|
||||
"cXcXcXcXcXcXcXcXcXcXcXdX5XcXcXcXcXcXcXcXcXcXcXcX",
|
||||
"cXcXcXcXcXcXcXcXcXcX' xXzXe cXcXcXcXcXcXcXcXcXcX",
|
||||
"cXcXcXcXcXcXcXcXcXcX6XhXlX&XcXcXcXcXcXcXcXcXcXcX",
|
||||
"cXcXcXcXcXcXcXcXcXL hXaXfXkXq cXcXcXcXcXcXcXcXcX",
|
||||
"cXcXcXcXcXcXcXcXcX;XaXiXuXgX#XcXcXcXcXcXcXcXcXcX",
|
||||
"cXcXcXcXcXcXcXcXK iX0XwXwXeXpX8 cXcXcXcXcXcXcXcX",
|
||||
"cXcXcXcXcXcXw ] XX1X-X,X4X4XeX/.P 0 cXcXcXcXcXcX",
|
||||
"cXz.Z.~.oX-X1X2X@X XOXOX*X*X:X7XyX9X8X3X$XA.z.cX",
|
||||
"9 ^..XW.E.T.I.I.T.W.!.{.}.|.|.`.`.`.`.].].%XD.< ",
|
||||
"cX7 V.R.L.J.L.J.H.G.l.l.l.l.F.N.N.m.m.m.S.c.> cX",
|
||||
"cXcX5 v.P.l.g.g.a.a.a.q.q.w.9.5.5.e.f.B.x.+ cXcX",
|
||||
"cXcXcX6 d.h.r.r.a.r.r.q.w.9.,.,.;.+.4.( + cXcXcX",
|
||||
"cXcXcXcX, 3.r.w.9.,.9.,.,.;.;.;.$...E o cXcXcXcX",
|
||||
"cXcXcXcXcX5 ,.,.;.;.=.;.=.+.+.....~ : cXcXcXcXcX",
|
||||
"cXcXcXcXcX: ;.+.;.$.=.+.+.{ ....~ Z o cXcXcXcXcX",
|
||||
"cXcXcXcXcXr $.....{ ..{ { { ~ W Z Z 2 cXcXcXcXcX",
|
||||
"cXcXcXcXcXu ..~ ..G G G G Z Z b b b 3 cXcXcXcXcX",
|
||||
"cXcXcXcXcXa G Z Z Z ~ b b Z b l l v t cXcXcXcXcX",
|
||||
"cXcXcXcXcXj b Z ) T y X # i R ^ v k p cXcXcXcXcX",
|
||||
"cXcXcXcXcXk ) ` d # cXcXcXcX* d / U f cXcXcXcXcX",
|
||||
"cXcXcXcX= Y I * cXcXcXcXcXcXcXcX- 4 h cXcXcXcX",
|
||||
"cXcXcXcXcX= cXcXcXcXcXcXcXcXcXcXcXcX$ cXcXcXcXcX",
|
||||
"cXcXcXcXcXcXcXcXcXcXcXcXcXcXcXcXcXcXcXcXcXcXcXcX"
|
||||
};
|
||||
|
||||
#endif /* !COIN_PIXMAP_FAVORITES_XPM */
|
||||
@@ -0,0 +1,45 @@
|
||||
#ifndef COIN_PIXMAP_PICKEXT_XPM
|
||||
#define COIN_PIXMAP_PICKEXT_XPM
|
||||
|
||||
/* XPM */
|
||||
static const char* pickext_xpm[]={
|
||||
"24 24 13 1",
|
||||
". c None",
|
||||
"# c #000000",
|
||||
"a c #646464",
|
||||
"d c #800000",
|
||||
"e c #bb0000",
|
||||
"k c #d00000",
|
||||
"b c #ec0000",
|
||||
"f c #ff4d4d",
|
||||
"c c #ff7171",
|
||||
"g c #ff8c8c",
|
||||
"h c #ffa2a2",
|
||||
"i c #ffbfbf",
|
||||
"j c #ffd0d0",
|
||||
".................##.....",
|
||||
".................##.....",
|
||||
".................##.....",
|
||||
".................##.....",
|
||||
"..#a.........##########.",
|
||||
"..ab#a.......##########.",
|
||||
"...#bc#a.........##.....",
|
||||
"...adbcc#a.......##.....",
|
||||
"....#ebfcc#a.....##.....",
|
||||
"....adbffgcc#a...##.....",
|
||||
".....#ebffghcc#a........",
|
||||
".....adbffffhicc#a......",
|
||||
"......#ebfffffijcfa.....",
|
||||
"......adbffffffhc#......",
|
||||
".......#ebffffgc#.......",
|
||||
".......adbffffc#........",
|
||||
"........#ebbbebc#.......",
|
||||
"........adebe#dbc#......",
|
||||
".........#ee#.#dbc#.....",
|
||||
".........ae#...#dkc#....",
|
||||
"..........a.....#d#.....",
|
||||
".................#......",
|
||||
"........................",
|
||||
"........................"};
|
||||
|
||||
#endif /* !COIN_PIXMAP_PICKEXT_XPM */
|
||||
@@ -0,0 +1,36 @@
|
||||
#ifndef COIN_PIXMAP_PICKREF_XPM
|
||||
#define COIN_PIXMAP_PICKREF_XPM
|
||||
|
||||
/* XPM */
|
||||
static const char* pickref_xpm[]={
|
||||
"24 24 4 1",
|
||||
". c None",
|
||||
"# c #0000ff",
|
||||
"b c #ff0000",
|
||||
"a c #ffffff",
|
||||
"........................",
|
||||
"...........##...........",
|
||||
"...........##...........",
|
||||
".........aa##aa.........",
|
||||
".......aabb##bbaaa......",
|
||||
"......abb..##..bbaa.....",
|
||||
".....ab....##..a.baa....",
|
||||
"..a.ab.....##.....ba.a..",
|
||||
"..a.ab.....##.....ba.a..",
|
||||
"...ab......##......ba.a.",
|
||||
"...ab......##......ba.a.",
|
||||
".######################.",
|
||||
".######################.",
|
||||
"...ab......##......ba.a.",
|
||||
"...ab......##......ba.a.",
|
||||
"..a.ab.....##.....ba.aa.",
|
||||
"..a.ab.....##.....ba.a..",
|
||||
".....ab....##....ba.....",
|
||||
"......abb..##..bba......",
|
||||
".......aabb##bbaa.......",
|
||||
"........aaa##aa.........",
|
||||
".......aa..##..aa.......",
|
||||
".........aa##aa.........",
|
||||
"........................"};
|
||||
|
||||
#endif /* !COIN_PIXMAP_PICKREF_XPM */
|
||||
@@ -0,0 +1,90 @@
|
||||
#ifndef COIN_PIXMAP_SAVEVIEWPT_XPM
|
||||
#define COIN_PIXMAP_SAVEVIEWPT_XPM
|
||||
|
||||
/* XPM */
|
||||
static const char * saveViewPt_xpm[] = {
|
||||
"24 24 58 1",
|
||||
" c None",
|
||||
". c #040404",
|
||||
"+ c #050504",
|
||||
"@ c #0B0B04",
|
||||
"# c #0C0C04",
|
||||
"$ c #060604",
|
||||
"% c #0A0B0A",
|
||||
"& c #141414",
|
||||
"* c #070707",
|
||||
"= c #101010",
|
||||
"- c #0E0F0E",
|
||||
"; c #050505",
|
||||
"> c #3B3C04",
|
||||
", c #424404",
|
||||
"' c #121204",
|
||||
") c #383938",
|
||||
"! c #818381",
|
||||
"~ c #191919",
|
||||
"{ c #626362",
|
||||
"] c #575857",
|
||||
"^ c #0E0F04",
|
||||
"/ c #575904",
|
||||
"( c #616304",
|
||||
"_ c #191904",
|
||||
": c #525352",
|
||||
"< c #BFC2BF",
|
||||
"[ c #1B1C1B",
|
||||
"} c #6D6F6D",
|
||||
"| c #616361",
|
||||
"1 c #090909",
|
||||
"2 c #0D0D04",
|
||||
"3 c #2B2C04",
|
||||
"4 c #262704",
|
||||
"5 c #080804",
|
||||
"6 c #717304",
|
||||
"7 c #4C4E04",
|
||||
"8 c #4F512B",
|
||||
"9 c #808304",
|
||||
"0 c #515204",
|
||||
"a c #6F7104",
|
||||
"b c #737604",
|
||||
"c c #666904",
|
||||
"d c #787B04",
|
||||
"e c #555704",
|
||||
"f c #2A2B04",
|
||||
"g c #171817",
|
||||
"h c #454645",
|
||||
"i c #242524",
|
||||
"j c #333433",
|
||||
"k c #A0A2A0",
|
||||
"l c #0E0E04",
|
||||
"m c #424304",
|
||||
"n c #343504",
|
||||
"o c #232423",
|
||||
"p c #6C6E6C",
|
||||
"q c #0A0A04",
|
||||
"r c #080808",
|
||||
"s c #111111",
|
||||
"........................",
|
||||
".+@#$%&&&&&&&&&&&&&%*=-;",
|
||||
".@>,')!!!!!!!!!!!!!)~{]-",
|
||||
".^/(_:<<<<<<<<<<<<<:[}|=",
|
||||
".^/(_:<<<<<<<<<<<<<:1[~*",
|
||||
".^/(_:<<<<<<<<<<<<<:2345",
|
||||
".^/(_:<<<<<<<<<<<<<:_(/^",
|
||||
".^/(_:<<<<<<<<<<<<<:_(/^",
|
||||
".^/(_:<<<<<<<<<<<<<:_(/^",
|
||||
".^/(_:<<<<<<<<<<<<<:_(/^",
|
||||
".^/(_:<<<<<<<<<<<<<:_(/^",
|
||||
".^/(_:<<<<<<<<<<<<<:_(/^",
|
||||
".^/678|||||||||||||876/^",
|
||||
".^/990^^^^^^^^^^^^^099/^",
|
||||
".^/99a/////////////a99/^",
|
||||
".^/99b((((((((((((((cd/^",
|
||||
".^/99e______________fc/^",
|
||||
".^/997.........gh::i_(/^",
|
||||
".^/997.........jk<<:_(/^",
|
||||
".^/997.........jk<<:_(/^",
|
||||
".^/997.........jk<<:_(/^",
|
||||
".^/997.........jk<<:_(/^",
|
||||
".lm//n.........op!!)'m>@",
|
||||
" l^^q.........rs&&%$#@+"};
|
||||
|
||||
#endif /* !COIN_PIXMAP_SAVEVIEWPT_XPM */
|
||||
@@ -0,0 +1,171 @@
|
||||
/********************************************************************************
|
||||
** Form generated from reading UI file 'OIQtListsDialogwS1786.ui'
|
||||
**
|
||||
** Created by: Qt User Interface Compiler version 5.6.1
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||
********************************************************************************/
|
||||
|
||||
#ifndef OIQTLISTSDIALOGWS1786_H
|
||||
#define OIQTLISTSDIALOGWS1786_H
|
||||
|
||||
#include <QVariant>
|
||||
#include <QAction>
|
||||
#include <QApplication>
|
||||
#include <QButtonGroup>
|
||||
#include <QDialog>
|
||||
#include <QFormLayout>
|
||||
#include <QHBoxLayout>
|
||||
#include <QHeaderView>
|
||||
#include <QLabel>
|
||||
#include <QLineEdit>
|
||||
#include <QListWidget>
|
||||
#include <QPushButton>
|
||||
#include <QWidget>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class Ui_Dialog
|
||||
{
|
||||
public:
|
||||
QWidget *horizontalLayoutWidget;
|
||||
QHBoxLayout *horizontalLayout;
|
||||
QPushButton *pushButton_2;
|
||||
QPushButton *pushButton_3;
|
||||
QPushButton *pushButton;
|
||||
QWidget *layoutWidget;
|
||||
QFormLayout *formLayout;
|
||||
QLabel *label;
|
||||
QLineEdit *lineEdit;
|
||||
QListWidget *listWidget;
|
||||
QWidget *layoutWidget1;
|
||||
QFormLayout *formLayout_2;
|
||||
QLabel *label_2;
|
||||
QListWidget *listWidget1;
|
||||
|
||||
void setupUi(QDialog *Dialog)
|
||||
{
|
||||
if (Dialog->objectName().isEmpty())
|
||||
Dialog->setObjectName(QStringLiteral("Dialog"));
|
||||
Dialog->resize(224, 554);
|
||||
QFont font;
|
||||
font.setPointSize(12);
|
||||
Dialog->setFont(font);
|
||||
horizontalLayoutWidget = new QWidget(Dialog);
|
||||
horizontalLayoutWidget->setObjectName(QStringLiteral("horizontalLayoutWidget"));
|
||||
horizontalLayoutWidget->setGeometry(QRect(10, 260, 201, 26));
|
||||
horizontalLayout = new QHBoxLayout(horizontalLayoutWidget);
|
||||
horizontalLayout->setSpacing(8);
|
||||
horizontalLayout->setObjectName(QStringLiteral("horizontalLayout"));
|
||||
horizontalLayout->setSizeConstraint(QLayout::SetMaximumSize);
|
||||
horizontalLayout->setContentsMargins(0, 0, 0, 0);
|
||||
pushButton_2 = new QPushButton(horizontalLayoutWidget);
|
||||
pushButton_2->setObjectName(QStringLiteral("pushButton_2"));
|
||||
QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
|
||||
sizePolicy.setHorizontalStretch(0);
|
||||
sizePolicy.setVerticalStretch(0);
|
||||
sizePolicy.setHeightForWidth(pushButton_2->sizePolicy().hasHeightForWidth());
|
||||
pushButton_2->setSizePolicy(sizePolicy);
|
||||
pushButton_2->setStyleSheet(QStringLiteral("font: 12pt \"Sans Serif\";"));
|
||||
|
||||
horizontalLayout->addWidget(pushButton_2);
|
||||
|
||||
pushButton_3 = new QPushButton(horizontalLayoutWidget);
|
||||
pushButton_3->setObjectName(QStringLiteral("pushButton_3"));
|
||||
sizePolicy.setHeightForWidth(pushButton_3->sizePolicy().hasHeightForWidth());
|
||||
pushButton_3->setSizePolicy(sizePolicy);
|
||||
pushButton_3->setStyleSheet(QStringLiteral("font: 12pt \"Sans Serif\";"));
|
||||
|
||||
horizontalLayout->addWidget(pushButton_3);
|
||||
|
||||
pushButton = new QPushButton(horizontalLayoutWidget);
|
||||
pushButton->setObjectName(QStringLiteral("pushButton"));
|
||||
sizePolicy.setHeightForWidth(pushButton->sizePolicy().hasHeightForWidth());
|
||||
pushButton->setSizePolicy(sizePolicy);
|
||||
pushButton->setStyleSheet(QStringLiteral("font: 12pt \"Sans Serif\";"));
|
||||
|
||||
horizontalLayout->addWidget(pushButton);
|
||||
|
||||
layoutWidget = new QWidget(Dialog);
|
||||
layoutWidget->setObjectName(QStringLiteral("layoutWidget"));
|
||||
layoutWidget->setGeometry(QRect(10, 10, 201, 241));
|
||||
formLayout = new QFormLayout(layoutWidget);
|
||||
formLayout->setObjectName(QStringLiteral("formLayout"));
|
||||
formLayout->setFieldGrowthPolicy(QFormLayout::ExpandingFieldsGrow);
|
||||
formLayout->setContentsMargins(0, 0, 0, 0);
|
||||
label = new QLabel(layoutWidget);
|
||||
label->setObjectName(QStringLiteral("label"));
|
||||
label->setStyleSheet(QStringLiteral("font: 12pt \"Sans Serif\";"));
|
||||
|
||||
formLayout->setWidget(0, QFormLayout::LabelRole, label);
|
||||
|
||||
lineEdit = new QLineEdit(layoutWidget);
|
||||
lineEdit->setObjectName(QStringLiteral("lineEdit"));
|
||||
lineEdit->setStyleSheet(QStringLiteral("font: 12pt \"Sans Serif\";"));
|
||||
lineEdit->setReadOnly(true);
|
||||
|
||||
formLayout->setWidget(1, QFormLayout::SpanningRole, lineEdit);
|
||||
|
||||
listWidget = new QListWidget(layoutWidget);
|
||||
listWidget->setObjectName(QStringLiteral("listWidget"));
|
||||
listWidget->setFont(font);
|
||||
|
||||
formLayout->setWidget(3, QFormLayout::SpanningRole, listWidget);
|
||||
|
||||
layoutWidget1 = new QWidget(Dialog);
|
||||
layoutWidget1->setObjectName(QStringLiteral("layoutWidget1"));
|
||||
layoutWidget1->setGeometry(QRect(10, 300, 201, 241));
|
||||
formLayout_2 = new QFormLayout(layoutWidget1);
|
||||
formLayout_2->setObjectName(QStringLiteral("formLayout_2"));
|
||||
formLayout_2->setContentsMargins(0, 0, 0, 0);
|
||||
label_2 = new QLabel(layoutWidget1);
|
||||
label_2->setObjectName(QStringLiteral("label_2"));
|
||||
label_2->setStyleSheet(QStringLiteral("font: 12pt \"Sans Serif\";"));
|
||||
|
||||
formLayout_2->setWidget(0, QFormLayout::LabelRole, label_2);
|
||||
|
||||
listWidget1 = new QListWidget(layoutWidget1);
|
||||
listWidget1->setObjectName(QStringLiteral("listWidget1"));
|
||||
QSizePolicy sizePolicy1(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||
sizePolicy1.setHorizontalStretch(1);
|
||||
sizePolicy1.setVerticalStretch(1);
|
||||
sizePolicy1.setHeightForWidth(listWidget1->sizePolicy().hasHeightForWidth());
|
||||
listWidget1->setSizePolicy(sizePolicy1);
|
||||
listWidget1->setFont(font);
|
||||
|
||||
formLayout_2->setWidget(1, QFormLayout::SpanningRole, listWidget1);
|
||||
|
||||
|
||||
retranslateUi(Dialog);
|
||||
|
||||
QMetaObject::connectSlotsByName(Dialog);
|
||||
} // setupUi
|
||||
|
||||
void retranslateUi(QDialog *Dialog)
|
||||
{
|
||||
Dialog->setWindowTitle(QApplication::translate("Dialog", "OIQt", 0));
|
||||
#ifndef QT_NO_TOOLTIP
|
||||
pushButton_2->setToolTip(QApplication::translate("Dialog", "Delete bookmark", 0));
|
||||
#endif // QT_NO_TOOLTIP
|
||||
pushButton_2->setText(QApplication::translate("Dialog", "Del", 0));
|
||||
#ifndef QT_NO_TOOLTIP
|
||||
pushButton_3->setToolTip(QApplication::translate("Dialog", "Rename bookmark", 0));
|
||||
#endif // QT_NO_TOOLTIP
|
||||
pushButton_3->setText(QApplication::translate("Dialog", "Ren", 0));
|
||||
#ifndef QT_NO_TOOLTIP
|
||||
pushButton->setToolTip(QApplication::translate("Dialog", "Sort bookmarks", 0));
|
||||
#endif // QT_NO_TOOLTIP
|
||||
pushButton->setText(QApplication::translate("Dialog", "Sort", 0));
|
||||
label->setText(QApplication::translate("Dialog", "Bookmarks", 0));
|
||||
label_2->setText(QApplication::translate("Dialog", "Elements [S mm]", 0));
|
||||
} // retranslateUi
|
||||
|
||||
};
|
||||
|
||||
namespace Ui {
|
||||
class Dialog: public Ui_Dialog {};
|
||||
} // namespace Ui
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // OIQTLISTSDIALOGWS1786_H
|
||||
@@ -0,0 +1,35 @@
|
||||
/* file whellmouse.h
|
||||
*
|
||||
* Event handler for wheelmouse
|
||||
*/
|
||||
/*
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
#ifndef WHEELMOUSE_H
|
||||
|
||||
#define WHEELMOUSE_H
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern void xmAddMouseEventHandler(Widget w);
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,34 @@
|
||||
#ifndef COIN_PIXMAP_WIREFRAME_XPM
|
||||
#define COIN_PIXMAP_WIREFRAME_XPM
|
||||
|
||||
/* XPM */
|
||||
static const char* wireframe_xpm[]={
|
||||
"24 24 2 1",
|
||||
". c None",
|
||||
"# c #000000",
|
||||
"........................",
|
||||
"........................",
|
||||
"......################..",
|
||||
".....##.............##..",
|
||||
"....#.#............#.#..",
|
||||
"...#..#...........#..#..",
|
||||
"..################...#..",
|
||||
"..#...#..........#...#..",
|
||||
"..#...#..........#...#..",
|
||||
"..#...#..........#...#..",
|
||||
"..#...#..........#...#..",
|
||||
"..#...#..........#...#..",
|
||||
"..#...#..........#...#..",
|
||||
"..#...#..........#...#..",
|
||||
"..#...#..........#...#..",
|
||||
"..#...#..........#...#..",
|
||||
"..#...#..........#...#..",
|
||||
"..#...################..",
|
||||
"..#..#...........#..#...",
|
||||
"..#.#............#.#....",
|
||||
"..##.............##.....",
|
||||
"..################......",
|
||||
"........................",
|
||||
"........................"};
|
||||
|
||||
#endif /* !COIN_PIXMAP_WIREFRAME_XPM */
|
||||
Reference in New Issue
Block a user