Import Geant4 5.2.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 10:28:22 +02:00
parent fbd4999cf7
commit 4aea781e80
5454 changed files with 223141 additions and 67347 deletions
+15 -1
View File
@@ -1,4 +1,4 @@
$Id: History,v 1.23 2002/11/27 12:46:55 johna Exp $
$Id: History,v 1.27 2003/06/25 09:01:32 gcosmo Exp $
-------------------------------------------------------------------
=========================================================
@@ -20,6 +20,20 @@ committal in the CVS repository !
History file for visualization/OpenGL
-------------------------------------
23rd June 2003 Guy Barrand (opengl-V05-01-02)
- Commit a first implementation of G4OpenGLWin32Viewer.
10th June 2003 Gabriele Cosmo (opengl-V05-01-01)
- More fixes for warnings in viewers classes.
- Added inclusion of <windows.h> for WIN32 platforms when GL headers
are included.
05th June 2003 Gabriele Cosmo (opengl-V05-01-00)
- Fixes for porting compilation on WIN32:
o G4OpenGLWin32Viewer[.hh.cc]: removed inclusion of <GL/glx.h>.
o G4OpenGLViewer.cc: replaced local variables near/far with pnear/pfar
since declared 'obsolete' in WIN32 platforms.
27th November 2002 John Allison (vis-V04-01-08)
- Improved algorithm of CompareForKernelVisit.
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLImmediateSceneHandler.hh,v 1.6 2001/08/09 20:16:56 johna Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// Andrew Walkden 10th February 1997
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLImmediateViewer.hh,v 1.7 2002/10/16 10:44:13 johna Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// Andrew Walkden 7th February 1997
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLImmediateWin32.hh,v 1.6 2002/10/16 10:44:14 johna Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// OpenGLImmediateWin32 graphics system factory.
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLImmediateWin32Viewer.hh,v 1.7 2002/10/16 10:44:14 johna Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// Class G4OpenGLImmediateWin32Viewer : a class derived from
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLImmediateX.hh,v 1.6 2001/07/11 10:08:48 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// Andrew Walkden 10th February 1997
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLImmediateXViewer.hh,v 1.7 2001/07/14 21:47:42 johna Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// Andrew Walkden 7th February 1997
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLImmediateXm.hh,v 1.6 2001/07/11 10:08:49 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// Andrew Walkden 10th February 1997
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLImmediateXmViewer.hh,v 1.7 2001/07/14 21:47:43 johna Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// Andrew Walkden 10th February 1997
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4OpenGLSceneHandler.hh,v 1.12 2002/11/11 18:08:21 johna Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4OpenGLSceneHandler.hh,v 1.14 2003/06/10 17:58:55 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// Andrew Walkden 27th March 1996
@@ -34,12 +34,17 @@
#ifndef G4OPENGLSCENEHANDLER_HH
#define G4OPENGLSCENEHANDLER_HH
#include "G4VSceneHandler.hh"
#include "G4OpenGLViewer.hh"
#include "globals.hh"
#include "G4RotationMatrix.hh"
#ifdef WIN32
#include <windows.h>
#endif
#include <GL/gl.h>
#include <GL/glu.h>
#include "G4VSceneHandler.hh"
#include "G4OpenGLViewer.hh"
// Base class for various OpenGLScene classes.
class G4OpenGLSceneHandler: public G4VSceneHandler {
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLSceneHandler.icc,v 1.5 2001/08/09 20:16:06 johna Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// Andrew Walkden 20th January 1998
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4OpenGLStoredSceneHandler.hh,v 1.13 2001/08/14 18:03:14 johna Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4OpenGLStoredSceneHandler.hh,v 1.14 2003/06/16 17:13:38 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// Andrew Walkden 10th February 1997
@@ -39,8 +39,8 @@
#include "globals.hh"
#include "G4RotationMatrix.hh"
#include "G4OpenGLSceneHandler.hh"
#include "g4std/map"
#include "g4std/vector"
#include <map>
#include <vector>
class G4OpenGLStored;
@@ -72,16 +72,16 @@ private:
// PODL = Persistent Object Display List.
GLint fTopPODL; // List which calls the other PODLs.
G4std::vector<G4int> fPODLList;
G4std::vector<G4Transform3D> fPODLTransformList;
std::vector<G4int> fPODLList;
std::vector<G4Transform3D> fPODLTransformList;
// TODL = Transient Object Display List.
G4std::vector<G4int> fTODLList;
G4std::vector<G4Transform3D> fTODLTransformList;
std::vector<G4int> fTODLList;
std::vector<G4Transform3D> fTODLTransformList;
// Stop-gap solution of structure re-use.
// A proper implementation would use geometry hierarchy.
G4std::map <const G4VSolid*, G4int, G4std::less <const G4VSolid*> > fSolidMap;
std::map <const G4VSolid*, G4int, std::less <const G4VSolid*> > fSolidMap;
};
inline G4int G4OpenGLStoredSceneHandler::GetSceneCount () {
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLStoredViewer.hh,v 1.8 2001/08/14 18:03:15 johna Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// Andrew Walkden 7th February 1997
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLStoredWin32.hh,v 1.6 2002/10/16 10:44:14 johna Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// OpenGLStoredWin32 graphics system factory.
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLStoredWin32Viewer.hh,v 1.5 2002/10/16 10:44:14 johna Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// Class G4OpenGLStoredWin32Viewer : a class derived from
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLStoredX.hh,v 1.6 2001/07/11 10:08:50 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// Andrew Walkden 10th February 1997
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLStoredXViewer.hh,v 1.5 2001/07/14 21:47:46 johna Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// Andrew Walkden 7th February 1997
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLStoredXm.hh,v 1.5 2001/07/11 10:08:50 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// Andrew Walkden 10th February 1997
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLStoredXmViewer.hh,v 1.5 2001/07/14 21:47:47 johna Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// Andrew Walkden 10th February 1997
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4OpenGLTransform3D.hh,v 1.4 2001/07/11 10:08:50 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4OpenGLTransform3D.hh,v 1.5 2003/06/10 17:41:04 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// Andrew Walkden 24th October 1996
@@ -36,6 +36,11 @@
#include "G4Transform3D.hh"
#ifdef WIN32
#include <windows.h>
#endif
#include <GL/gl.h>
class G4OpenGLTransform3D : public G4Transform3D {
public:
G4OpenGLTransform3D (const G4Transform3D &t);
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLViewer.hh,v 1.9 2002/10/16 10:44:14 johna Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// Andrew Walkden 27th March 1996
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4OpenGLWin32Viewer.hh,v 1.6 2002/10/24 15:28:05 johna Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4OpenGLWin32Viewer.hh,v 1.11 2003/06/25 09:01:08 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// G4OpenGLWin32Viewer : Class to provide WindowsNT specific
@@ -33,15 +33,10 @@
#ifndef G4OPENGLWIN32VIEWER_HH
#define G4OPENGLWIN32VIEWER_HH
#include "G4VViewer.hh"
#include "G4OpenGLSceneHandler.hh"
#include "globals.hh"
//Win32 includes?
#include <GL/gl.h>
#include <GL/glx.h>
#include <GL/glu.h>
#include "G4VViewer.hh"
#include "G4OpenGLSceneHandler.hh"
class G4OpenGLSceneHandler;
@@ -50,14 +45,23 @@ class G4OpenGLWin32Viewer: virtual public G4OpenGLViewer {
public:
G4OpenGLWin32Viewer (G4OpenGLSceneHandler& scene);
virtual ~G4OpenGLWin32Viewer ();
void SetView ();
void ShowView ();
void FinishView ();
protected:
void GetWin32Connection ();
void CreateGLWin32Context ();
virtual void CreateMainWindow ();
G4int WinSize_x, WinSize_y;
protected:
G4int WinSize_x;
G4int WinSize_y;
private:
static LRESULT CALLBACK WindowProc(HWND,UINT,WPARAM,LPARAM);
static bool SetWindowPixelFormat(HDC);
private:
HWND fWindow;
HDC fHDC;
HGLRC fHGLRC;
};
#endif
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4OpenGLXViewer.hh,v 1.16 2002/11/11 18:12:02 johna Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4OpenGLXViewer.hh,v 1.17 2003/06/10 17:13:32 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// Andrew Walkden 7th February 1997
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLXmBox.hh,v 1.6 2001/07/11 10:08:51 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
//Box container class
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLXmFourArrowButtons.hh,v 1.5 2001/07/11 10:08:51 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
//Four arrow buttons class. Inherits from G4OpenGLXmVWidgetComponent
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLXmFramedBox.hh,v 1.6 2001/07/11 10:08:51 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
//Framed box container class
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLXmPushButton.hh,v 1.6 2001/07/11 10:08:51 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
//Push button class. Inherits from G4OpenGLXmVWidgetComponent
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLXmRadioButton.hh,v 1.6 2001/07/11 10:08:51 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
//Radio button class. Inherits from G4OpenGLXmVWidgetComponent
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLXmResources.hh,v 1.4 2001/07/11 10:08:51 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// Default resources file for GEANT4 OpenGL Motif windows.
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLXmSeparator.hh,v 1.5 2001/07/11 10:08:52 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
//Separator class. Inherits from G4OpenGLXmVWidgetComponent
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLXmSliderBar.hh,v 1.6 2001/07/11 10:08:52 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
//Slider bar class. Inherits from G4OpenGLXmVWidgetComponent
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLXmTextField.hh,v 1.6 2001/07/11 10:08:52 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
//Text field class. Inherits from G4OpenGLXmVWidgetComponent
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLXmTopLevelShell.hh,v 1.5 2001/07/11 10:08:52 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
//Top level shell class
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLXmVWidgetComponent.hh,v 1.5 2001/07/11 10:08:52 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
//Base class for all Motif component widgets
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLXmVWidgetContainer.hh,v 1.5 2001/07/11 10:08:52 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
//Base class for all Motif container widgets
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLXmVWidgetObject.hh,v 1.5 2001/07/11 10:08:52 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
//Virtual base class for all Motif widgets.
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLXmVWidgetShell.hh,v 1.5 2001/07/11 10:08:52 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
//Base class for all Motif window widgets (shells)
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLXmViewer.hh,v 1.6 2001/07/11 10:08:52 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// Andrew Walkden 10th February 1997
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4OpenGLImmediateSceneHandler.cc,v 1.7 2002/02/24 01:47:55 johna Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4OpenGLImmediateSceneHandler.cc,v 1.9 2003/06/16 17:13:39 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// Andrew Walkden 10th February 1997
@@ -39,8 +39,6 @@
#define CENTERLINE_CLPP /* CenterLine C++ workaround: */
// Also seems to be required for HP's CC and AIX xlC, at least.
#include <GL/gl.h>
#include "G4OpenGLSceneHandler.hh"
#include "G4OpenGLViewer.hh"
#include "G4OpenGLTransform3D.hh"
@@ -68,7 +66,7 @@ G4OpenGLImmediateSceneHandler::~G4OpenGLImmediateSceneHandler ()
fSceneCount--;
}
#include "g4std/iomanip"
#include <iomanip>
void G4OpenGLImmediateSceneHandler::BeginPrimitives
(const G4Transform3D& objectTransformation) {
@@ -81,7 +79,7 @@ void G4OpenGLImmediateSceneHandler::BeginPrimitives
G4cout << "G4OpenGLTransform3D matrix:";
for (int i = 0; i < 16; i++) {
if ((i % 4) == 0) G4cout << '\n';
G4cout << G4std::setw (15) << m[i];
G4cout << std::setw (15) << m[i];
}
G4cout << G4endl;
*****************************************/
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLImmediateViewer.cc,v 1.6 2002/10/16 10:44:15 johna Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// Andrew Walkden 7th February 1997
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLImmediateWin32.cc,v 1.8 2002/10/16 10:44:15 johna Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// OpenGLImmediateWin32 graphics system factory.
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4OpenGLImmediateWin32Viewer.cc,v 1.6 2002/10/16 10:44:15 johna Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4OpenGLImmediateWin32Viewer.cc,v 1.7 2003/06/10 17:13:32 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// Class G4OpenGLImmediateWin32Viewer : a class derived from G4OpenGLWin32Viewer and
@@ -32,8 +32,6 @@
#include "G4OpenGLImmediateWin32Viewer.hh"
#include <GL/gl.h>
#include "G4ios.hh"
G4OpenGLImmediateWin32Viewer::G4OpenGLImmediateWin32Viewer
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLImmediateX.cc,v 1.8 2002/02/24 01:48:02 johna Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// Andrew Walkden 27th March 1996
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4OpenGLImmediateXViewer.cc,v 1.7 2002/02/24 01:48:04 johna Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4OpenGLImmediateXViewer.cc,v 1.8 2003/06/10 17:13:32 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// Andrew Walkden 7th February 1997
@@ -37,13 +37,14 @@
#include "G4ios.hh"
G4OpenGLImmediateXViewer::G4OpenGLImmediateXViewer (G4OpenGLImmediateSceneHandler& scene,
const G4String& name):
G4OpenGLViewer (scene),
G4OpenGLXViewer (scene),
G4OpenGLImmediateViewer (scene),
G4VViewer (scene, scene.IncrementViewCount (), name) {
G4OpenGLImmediateXViewer::
G4OpenGLImmediateXViewer (G4OpenGLImmediateSceneHandler& scene,
const G4String& name)
: G4VViewer (scene, scene.IncrementViewCount (), name),
G4OpenGLViewer (scene),
G4OpenGLXViewer (scene),
G4OpenGLImmediateViewer (scene)
{
if (fViewId < 0) return; // In case error in base class instantiation.
// ensure a suitable window was found
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLImmediateXm.cc,v 1.8 2002/02/24 01:48:05 johna Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// Andrew Walkden 10th February 1997
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4OpenGLImmediateXmViewer.cc,v 1.7 2002/02/24 01:48:07 johna Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4OpenGLImmediateXmViewer.cc,v 1.8 2003/06/10 17:13:33 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// Andrew Walkden 10th February 1997
@@ -37,14 +37,14 @@
#include "G4ios.hh"
G4OpenGLImmediateXmViewer::G4OpenGLImmediateXmViewer
(G4OpenGLImmediateSceneHandler& scene,
const G4String& name):
G4OpenGLViewer (scene),
G4OpenGLXmViewer (scene),
G4OpenGLImmediateViewer (scene),
G4VViewer (scene, scene.IncrementViewCount (), name) {
G4OpenGLImmediateXmViewer::
G4OpenGLImmediateXmViewer(G4OpenGLImmediateSceneHandler& scene,
const G4String& name)
: G4VViewer (scene, scene.IncrementViewCount (), name),
G4OpenGLViewer (scene),
G4OpenGLXmViewer (scene),
G4OpenGLImmediateViewer (scene)
{
if (fViewId < 0) return; // In case error in base class instantiation.
// ensure a suitable window was found
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4OpenGLSceneHandler.cc,v 1.17 2002/12/11 15:57:58 johna Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4OpenGLSceneHandler.cc,v 1.18 2003/06/10 17:13:33 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// Andrew Walkden 27th March 1996
@@ -40,9 +40,6 @@
#define CENTERLINE_CLPP /* CenterLine C++ workaround: */
// Also seems to be required for HP's CC and AIX xlC, at least.
#include <GL/gl.h>
#include <GL/glu.h>
#include "G4OpenGLSceneHandler.hh"
#include "G4OpenGLViewer.hh"
#include "G4OpenGLTransform3D.hh"
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4OpenGLStoredSceneHandler.cc,v 1.15 2002/11/27 12:44:09 johna Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4OpenGLStoredSceneHandler.cc,v 1.16 2003/06/10 17:13:33 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// Andrew Walkden 10th February 1997
@@ -38,8 +38,6 @@
#define CENTERLINE_CLPP /* CenterLine C++ workaround: */
// Also seems to be required for HP's CC and AIX xlC, at least.
#include <GL/gl.h>
#include "G4OpenGLStoredSceneHandler.hh"
#include "G4VPhysicalVolume.hh"
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4OpenGLStoredViewer.cc,v 1.9 2002/11/27 12:44:10 johna Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4OpenGLStoredViewer.cc,v 1.10 2003/06/10 17:13:33 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// Andrew Walkden 7th February 1997
@@ -34,8 +34,6 @@
#include "G4OpenGLStoredViewer.hh"
#include <GL/gl.h>
#include "G4ios.hh"
#include "G4OpenGLStoredSceneHandler.hh"
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4OpenGLStoredWin32.cc,v 1.8 2002/10/16 10:44:15 johna Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4OpenGLStoredWin32.cc,v 1.10 2003/06/10 17:41:04 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// OpenGLStoredWin32 graphics system factory.
@@ -30,8 +30,6 @@
#ifdef G4VIS_BUILD_OPENGLWIN32_DRIVER
#include <GL/gl.h>
#include "G4VisFeaturesOfOpenGL.hh"
#include "G4VSceneHandler.hh"
#include "G4OpenGLSceneHandler.hh"
@@ -39,6 +37,11 @@
#include "G4OpenGLStoredWin32.hh"
#include "G4OpenGLStoredWin32Viewer.hh"
#ifdef WIN32
#include <windows.h>
#endif
#include <GL/gl.h>
G4OpenGLStoredWin32::G4OpenGLStoredWin32 ():
G4VGraphicsSystem ("OpenGLStoredWin32",
"OGLSWin32",
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4OpenGLStoredWin32Viewer.cc,v 1.6 2002/10/16 10:44:16 johna Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4OpenGLStoredWin32Viewer.cc,v 1.7 2003/06/10 17:13:34 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// Class G4OpenGLStoredWin32Viewer : a class derived from G4OpenGLWin32Viewer and
@@ -32,8 +32,6 @@
#include "G4OpenGLStoredWin32Viewer.hh"
#include <GL/gl.h>
#include "G4ios.hh"
G4OpenGLStoredWin32Viewer::G4OpenGLStoredWin32Viewer
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLStoredX.cc,v 1.8 2002/02/24 01:48:17 johna Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// Andrew Walkden 10th February 1997
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4OpenGLStoredXViewer.cc,v 1.8 2002/02/24 01:48:19 johna Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4OpenGLStoredXViewer.cc,v 1.9 2003/06/10 17:13:34 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// Andrew Walkden 7th February 1997
@@ -37,13 +37,14 @@
#include "G4ios.hh"
G4OpenGLStoredXViewer::G4OpenGLStoredXViewer (G4OpenGLStoredSceneHandler& scene,
const G4String& name):
G4OpenGLViewer (scene),
G4OpenGLXViewer (scene),
G4OpenGLStoredViewer (scene),
G4VViewer (scene, scene.IncrementViewCount (), name) {
G4OpenGLStoredXViewer::
G4OpenGLStoredXViewer (G4OpenGLStoredSceneHandler& scene,
const G4String& name)
: G4VViewer (scene, scene.IncrementViewCount (), name),
G4OpenGLViewer (scene),
G4OpenGLXViewer (scene),
G4OpenGLStoredViewer (scene)
{
if (fViewId < 0) return; // In case error in base class instantiation.
if (!vi_stored) {
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLStoredXm.cc,v 1.7 2002/02/24 01:48:20 johna Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// Andrew Walkden 10th February 1997
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4OpenGLStoredXmViewer.cc,v 1.7 2002/02/24 01:48:22 johna Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4OpenGLStoredXmViewer.cc,v 1.8 2003/06/10 17:13:34 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// Andrew Walkden 10th February 1997
@@ -37,12 +37,14 @@
#include "G4ios.hh"
G4OpenGLStoredXmViewer::G4OpenGLStoredXmViewer (G4OpenGLStoredSceneHandler& scene,
const G4String& name):
G4OpenGLViewer (scene),
G4OpenGLXmViewer (scene),
G4OpenGLStoredViewer (scene),
G4VViewer (scene, scene.IncrementViewCount (), name) {
G4OpenGLStoredXmViewer::
G4OpenGLStoredXmViewer (G4OpenGLStoredSceneHandler& scene,
const G4String& name)
: G4VViewer (scene, scene.IncrementViewCount (), name),
G4OpenGLViewer (scene),
G4OpenGLXmViewer (scene),
G4OpenGLStoredViewer (scene)
{
if (fViewId < 0) return; // In case error in base class instantiation.
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4OpenGLTransform3D.cc,v 1.4 2001/07/11 10:08:56 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4OpenGLTransform3D.cc,v 1.6 2003/06/10 17:41:05 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// Andrew Walkden 24th October 1996
@@ -31,8 +31,6 @@
#ifdef G4VIS_BUILD_OPENGL_DRIVER
#include <GL/gl.h>
#include "G4OpenGLTransform3D.hh"
G4OpenGLTransform3D::G4OpenGLTransform3D (const G4Transform3D &t):
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4OpenGLViewer.cc,v 1.14 2002/10/16 10:44:16 johna Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4OpenGLViewer.cc,v 1.18 2003/06/10 17:58:56 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// Andrew Walkden 27th March 1996
@@ -30,13 +30,10 @@
#ifdef G4VIS_BUILD_OPENGL_DRIVER
#include <GL/gl.h>
#include <GL/glu.h>
#include "G4ios.hh"
#include "G4OpenGLViewer.hh"
#include "G4OpenGLSceneHandler.hh"
#include "G4OpenGLTransform3D.hh"
#include "G4ios.hh"
#include "G4Scene.hh"
#include "G4VisExtent.hh"
@@ -114,9 +111,9 @@ void G4OpenGLViewer::SetView () {
const G4double cameraDistance = fVP.GetCameraDistance (radius);
const G4Point3D cameraPosition =
targetPoint + cameraDistance * fVP.GetViewpointDirection().unit();
const GLdouble near = fVP.GetNearDistance (cameraDistance, radius);
const GLdouble far = fVP.GetFarDistance (cameraDistance, near, radius);
const GLdouble right = fVP.GetFrontHalfHeight (near, radius);
const GLdouble pnear = fVP.GetNearDistance (cameraDistance, radius);
const GLdouble pfar = fVP.GetFarDistance (cameraDistance, pnear, radius);
const GLdouble right = fVP.GetFrontHalfHeight (pnear, radius);
const GLdouble left = -right;
const GLdouble bottom = left;
const GLdouble top = right;
@@ -125,10 +122,10 @@ void G4OpenGLViewer::SetView () {
glLoadIdentity();
if (fVP.GetFieldHalfAngle() == 0.) {
glOrtho (left, right, bottom, top, near, far);
glOrtho (left, right, bottom, top, pnear, pfar);
}
else {
glFrustum (left, right, bottom, top, near, far);
glFrustum (left, right, bottom, top, pnear, pfar);
}
glMatrixMode (GL_MODELVIEW); // apply further transformations to scene.
@@ -21,80 +21,254 @@
// ********************************************************************
//
//
// $Id: G4OpenGLWin32Viewer.cc,v 1.5 2002/10/16 10:44:16 johna Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4OpenGLWin32Viewer.cc,v 1.9 2003/06/25 09:01:12 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// G4OpenGLWin32Viewer : Class to provide WindowsNT specific
// functionality for OpenGL in GEANT4
//
// 27/06/2003 : G.Barrand : implementation (at last !).
#ifdef G4VIS_BUILD_OPENGLWIN32_DRIVER
#include "G4OpenGLWin32Viewer.hh"
#include <GL/gl.h>
//#include <GL/glx.h> Change this for Win32
#include "G4ios.hh"
#include "G4VisExtent.hh"
#include "G4LogicalVolume.hh"
#include "G4VSolid.hh"
#include "G4Point3D.hh"
#include "G4Normal3D.hh"
void G4OpenGLWin32Viewer::FinishView () {
//Wait for GL commands to exit before going on...
//Swap buffers if double buffered...
//Flush GL commands...
}
void G4OpenGLWin32Viewer::GetWin32Connection () {
// get a connection.
}
void G4OpenGLWin32Viewer::CreateGLWin32Context () {
// create a GL context
// set attributes of window now the GL context has been created
G4cout <<
"ERROR: G4OpenGLWin32Viewer::CreateGLWin32Context:"
"\n **** WIN32 VIEWER NOT YET IMPLEMENTED ****"
<< G4endl;
}
void G4OpenGLWin32Viewer::CreateMainWindow () {
// create a window
// connect the context to a window
}
G4OpenGLWin32Viewer::G4OpenGLWin32Viewer (G4OpenGLSceneHandler& scene):
G4VViewer (scene, -1),
G4OpenGLViewer (scene)
//////////////////////////////////////////////////////////////////////////////
void G4OpenGLWin32Viewer::SetView (
)
//////////////////////////////////////////////////////////////////////////////
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
{
GetWin32Connection ();
if (fViewId < 0) return;
// Try for a visual suitable for OpenGLImmediate..
// first try for a single buffered RGB window
// next try for a double buffered RGB, but Draw to top buffer
// Now try for a visual suitable for OpenGLStored...
// Try for a double buffered RGB window
if(!fHDC) return;
if(!fHGLRC) return;
::wglMakeCurrent(fHDC,fHGLRC);
G4OpenGLViewer::SetView ();
}
G4OpenGLWin32Viewer::~G4OpenGLWin32Viewer () {
//////////////////////////////////////////////////////////////////////////////
void G4OpenGLWin32Viewer::ShowView (
)
//////////////////////////////////////////////////////////////////////////////
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
{
glFlush ();
}
//////////////////////////////////////////////////////////////////////////////
void G4OpenGLWin32Viewer::FinishView (
)
//////////////////////////////////////////////////////////////////////////////
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
{
if(!fHDC) return;
::SwapBuffers(fHDC);
}
//////////////////////////////////////////////////////////////////////////////
void G4OpenGLWin32Viewer::GetWin32Connection (
)
//////////////////////////////////////////////////////////////////////////////
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
{
}
//////////////////////////////////////////////////////////////////////////////
void G4OpenGLWin32Viewer::CreateGLWin32Context (
)
//////////////////////////////////////////////////////////////////////////////
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
{
}
//////////////////////////////////////////////////////////////////////////////
void G4OpenGLWin32Viewer::CreateMainWindow (
)
//////////////////////////////////////////////////////////////////////////////
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
{
if(fWindow) return; //Done.
// Bill Gates stuff...
static const char className[] = "G4OpenGLWin32";
static bool done = false;
if(done==false) {
WNDCLASS wc;
wc.style = CS_HREDRAW | CS_VREDRAW;
wc.lpfnWndProc = (WNDPROC)WindowProc;
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
wc.hInstance = ::GetModuleHandle(NULL);
wc.hIcon = LoadIcon (NULL, IDI_APPLICATION);
wc.hCursor = LoadCursor(NULL,IDC_CROSS);
wc.hbrBackground = NULL;
wc.lpszMenuName = className;
wc.lpszClassName = className;
::RegisterClass(&wc);
done = true;
}
WinSize_x = 400;
WinSize_y = 400;
if (WinSize_x < fVP.GetWindowSizeHintX ())
WinSize_x = fVP.GetWindowSizeHintX ();
if (WinSize_y < fVP.GetWindowSizeHintY ())
WinSize_y = fVP.GetWindowSizeHintY ();
fWindow = ::CreateWindow(className,fName.c_str(),
WS_OVERLAPPEDWINDOW,
//WS_CHILD | WS_VISIBLE,
0,0,
WinSize_x,WinSize_y,
NULL, NULL,
::GetModuleHandle(NULL),
NULL);
if(!fWindow) return;
::SetWindowLong(fWindow,GWL_USERDATA,LONG(this));
// initialize OpenGL rendering :
fHDC = ::GetDC(fWindow);
if( fHDC && (SetWindowPixelFormat(fHDC)==TRUE) ) {
fHGLRC = ::wglCreateContext(fHDC);
}
if(fHDC && fHGLRC) {
::wglMakeCurrent(fHDC,fHGLRC);
}
::SetForegroundWindow(fWindow);
::ShowWindow(fWindow,SW_SHOWDEFAULT);
::UpdateWindow(fWindow);
::DrawMenuBar(fWindow);
}
//////////////////////////////////////////////////////////////////////////////
G4OpenGLWin32Viewer::G4OpenGLWin32Viewer (
G4OpenGLSceneHandler& scene
)
:G4VViewer (scene, -1)
,G4OpenGLViewer (scene)
,fWindow(0)
,fHDC(0)
,fHGLRC(0)
//////////////////////////////////////////////////////////////////////////////
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
{
}
//////////////////////////////////////////////////////////////////////////////
G4OpenGLWin32Viewer::~G4OpenGLWin32Viewer (
)
//////////////////////////////////////////////////////////////////////////////
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
{
// This is the end (Jim Morisson).
if (fViewId >= 0) {
//Close a window from here
//destroy GL context
//make NULL context current
//destroy the Win32 window
if(wglGetCurrentContext()!=NULL) wglMakeCurrent(NULL,NULL);
if(fHGLRC) {
wglDeleteContext(fHGLRC);
fHGLRC = NULL;
}
if(fWindow) {
::SetWindowLong(fWindow,GWL_USERDATA,LONG(NULL));
if(fHDC) ::ReleaseDC(fWindow,fHDC);
::DestroyWindow(fWindow);
}
}
}
//////////////////////////////////////////////////////////////////////////////
LRESULT CALLBACK G4OpenGLWin32Viewer::WindowProc (
HWND aWindow
,UINT aMessage
,WPARAM aWParam
,LPARAM aLParam
)
//////////////////////////////////////////////////////////////////////////////
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
{
switch (aMessage) {
case WM_PAINT:{
G4OpenGLWin32Viewer* This =
(G4OpenGLWin32Viewer*)::GetWindowLong(aWindow,GWL_USERDATA);
HDC hDC;
PAINTSTRUCT ps;
hDC = BeginPaint(aWindow,&ps);
if(This) {
// FIXME : To have an automatic refresh someone have to redraw here.
}
EndPaint(aWindow, &ps);
}
return 0;
default:
return DefWindowProc(aWindow,aMessage,aWParam,aLParam);
}
}
//////////////////////////////////////////////////////////////////////////////
bool G4OpenGLWin32Viewer::SetWindowPixelFormat(
HDC aHdc
)
//////////////////////////////////////////////////////////////////////////////
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
{
// The ungessable...
PIXELFORMATDESCRIPTOR pfd;
pfd.nSize = sizeof(PIXELFORMATDESCRIPTOR);
pfd.nVersion = 1;
pfd.dwFlags =
PFD_DRAW_TO_WINDOW |
PFD_SUPPORT_OPENGL |
PFD_DOUBLEBUFFER |
PFD_STEREO_DONTCARE;
pfd.iPixelType = PFD_TYPE_RGBA;
pfd.cColorBits = 32;
pfd.cRedBits = 8;
pfd.cRedShift = 16;
pfd.cGreenBits = 8;
pfd.cGreenShift = 8;
pfd.cBlueBits = 8;
pfd.cBlueShift = 0;
pfd.cAlphaBits = 0;
pfd.cAlphaShift = 0;
pfd.cAccumBits = 64;
pfd.cAccumRedBits = 16;
pfd.cAccumGreenBits = 16;
pfd.cAccumBlueBits = 16;
pfd.cAccumAlphaBits = 0;
pfd.cDepthBits = 32;
pfd.cStencilBits = 8;
pfd.cAuxBuffers = 0;
pfd.iLayerType = PFD_MAIN_PLANE;
pfd.bReserved = 0;
pfd.dwLayerMask = 0;
pfd.dwVisibleMask = 0;
pfd.dwDamageMask = 0;
int pixelIndex = ::ChoosePixelFormat(aHdc,&pfd);
if (pixelIndex==0) {
pixelIndex = 1;
if (::DescribePixelFormat(aHdc,
pixelIndex,
sizeof(PIXELFORMATDESCRIPTOR),
&pfd)==0) {
return false;
}
}
if (::SetPixelFormat(aHdc,pixelIndex,&pfd)==FALSE) return false;
return true;
}
#endif
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLXViewer.cc,v 1.18 2002/11/11 18:12:03 johna Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// Andrew Walkden 7th February 1997
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLXmBox.cc,v 1.5 2001/07/11 10:08:56 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//Box container class
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLXmConvenienceRoutines.cc,v 1.9 2002/12/11 15:57:59 johna Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// Andrew Walkden 16th April 1997
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLXmFourArrowButtons.cc,v 1.4 2001/07/11 10:08:57 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//Four arrow buttons class. Inherits from G4OpenGLXmVWidgetComponent
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLXmFramedBox.cc,v 1.5 2001/07/11 10:08:57 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//Framed box container class
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4OpenGLXmMainMenubarCallbacks.cc,v 1.9 2001/07/11 10:08:57 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4OpenGLXmMainMenubarCallbacks.cc,v 1.10 2003/06/16 17:13:40 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// Andrew Walkden 16th April 1997
@@ -52,7 +52,7 @@
#include "G4OpenGLXmTopLevelShell.hh"
#include "G4OpenGLXmSeparator.hh"
#include "g4std/strstream"
#include <strstream>
void G4OpenGLXmViewer::actions_callback (Widget w,
XtPointer clientData,
@@ -76,9 +76,9 @@ void G4OpenGLXmViewer::actions_callback (Widget w,
if (!pView->fprotation_top) {
const int rot_len = 50;
char* frot_Name = new char [rot_len];
G4std::ostrstream rot_ost (frot_Name, rot_len);
rot_ost.seekp (G4std::ios::beg);
rot_ost << pView->GetSceneHandler()->GetSceneHandlerId() << '-' << pView->fViewId << G4std::ends;
std::ostrstream rot_ost (frot_Name, rot_len);
rot_ost.seekp (std::ios::beg);
rot_ost << pView->GetSceneHandler()->GetSceneHandlerId() << '-' << pView->fViewId << std::ends;
pView->fprotation_top = new G4OpenGLXmTopLevelShell (pView,
frot_Name);
@@ -163,9 +163,9 @@ void G4OpenGLXmViewer::actions_callback (Widget w,
if (!pView->fppanning_top) {
const int pan_len = 50;
char* fpan_Name = new char [pan_len];
G4std::ostrstream pan_ost (fpan_Name, pan_len);
pan_ost.seekp (G4std::ios::beg);
pan_ost << pView->GetSceneHandler()->GetSceneHandlerId() << '-' << pView->fViewId << G4std::ends;
std::ostrstream pan_ost (fpan_Name, pan_len);
pan_ost.seekp (std::ios::beg);
pan_ost << pView->GetSceneHandler()->GetSceneHandlerId() << '-' << pView->fViewId << std::ends;
pView->fppanning_top = new G4OpenGLXmTopLevelShell (pView,
fpan_Name);
@@ -263,9 +263,9 @@ void G4OpenGLXmViewer::actions_callback (Widget w,
if (!pView->fpsetting_top) {
const int set_len = 50;
char* fset_Name = new char [set_len];
G4std::ostrstream set_ost (fset_Name, set_len);
set_ost.seekp (G4std::ios::beg);
set_ost << pView->GetSceneHandler()->GetSceneHandlerId() << '-' << pView->fViewId << G4std::ends;
std::ostrstream set_ost (fset_Name, set_len);
set_ost.seekp (std::ios::beg);
set_ost << pView->GetSceneHandler()->GetSceneHandlerId() << '-' << pView->fViewId << std::ends;
pView->fpsetting_top = new G4OpenGLXmTopLevelShell(pView,
fset_Name);
@@ -344,9 +344,9 @@ void G4OpenGLXmViewer::misc_callback (Widget w,
const int misc_len = 50;
char* fmisc_Name = new char [misc_len];
G4std::ostrstream misc_ost (fmisc_Name, misc_len);
misc_ost.seekp (G4std::ios::beg);
misc_ost << pView->GetSceneHandler()->GetSceneHandlerId() << '-' << pView->fViewId << G4std::ends;
std::ostrstream misc_ost (fmisc_Name, misc_len);
misc_ost.seekp (std::ios::beg);
misc_ost << pView->GetSceneHandler()->GetSceneHandlerId() << '-' << pView->fViewId << std::ends;
pView->fpmiscellany_top = new G4OpenGLXmTopLevelShell (pView,
fmisc_Name);
@@ -439,9 +439,9 @@ void G4OpenGLXmViewer::misc_callback (Widget w,
const int print_len = 50;
char* fprint_Name = new char [print_len];
G4std::ostrstream print_ost (fprint_Name, print_len);
print_ost.seekp (G4std::ios::beg);
print_ost << pView->GetSceneHandler()->GetSceneHandlerId() << '-' << pView->fViewId << G4std::ends;
std::ostrstream print_ost (fprint_Name, print_len);
print_ost.seekp (std::ios::beg);
print_ost << pView->GetSceneHandler()->GetSceneHandlerId() << '-' << pView->fViewId << std::ends;
pView->fpprint_top = new G4OpenGLXmTopLevelShell (pView,
fprint_Name);
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLXmPanningCallbacks.cc,v 1.6 2001/07/11 10:08:57 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// Andrew Walkden 16th April 1997
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLXmPushButton.cc,v 1.5 2001/07/11 10:08:57 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//Push button class. Inherits from G4OpenGLXmVWidgetComponent
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLXmRadioButton.cc,v 1.5 2001/07/11 10:08:57 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//Radio button class. Inherits from G4OpenGLXmVWidgetComponent
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLXmRotationCallbacks.cc,v 1.11 2001/07/11 10:08:57 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// Andrew Walkden 16th April 1997
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLXmSeparator.cc,v 1.4 2001/07/11 10:08:58 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//Separator class. Inherits from G4OpenGLXmVWidgetComponent
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLXmSliderBar.cc,v 1.5 2001/07/11 10:08:58 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//Slider bar class. Inherits from G4OpenGLXmVWidgetComponent
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLXmStyleCallbacks.cc,v 1.6 2001/11/12 18:22:09 johna Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// Andrew Walkden 16th April 1997
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLXmTextField.cc,v 1.6 2001/07/11 10:08:58 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//Text field class. Inherits from G4OpenGLXmVWidgetComponent
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLXmTopLevelShell.cc,v 1.4 2001/07/11 10:08:58 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//Top level shell class
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLXmVWidgetComponent.cc,v 1.4 2001/07/11 10:08:58 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//Base class for all Motif component widgets
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLXmVWidgetContainer.cc,v 1.4 2001/07/11 10:08:58 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//Base class for all Motif container widgets
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLXmVWidgetObject.cc,v 1.4 2001/07/11 10:08:58 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//Virtual base class for all Motif widgets.
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLXmVWidgetShell.cc,v 1.4 2001/07/11 10:08:58 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//Base class for all Motif shell widgets
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLXmViewer.cc,v 1.11 2002/02/24 01:48:29 johna Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// Andrew Walkden 10th February 1997
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLXmWindowHandlingCallbacks.cc,v 1.5 2001/07/11 10:08:59 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// Andrew Walkden 16th June 1997