Import Geant4 3.1.0 source tree
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4DAWNFILE.hh,v 1.5 1999/12/15 14:54:00 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
// Satoshi TANAKA
|
||||
// DAWNFILE driver factory.
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4DAWNFILESceneHandler.hh,v 1.5 1999/12/16 17:24:48 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
// Satoshi TANAKA
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4DAWNFILEViewer.hh,v 1.5 1999/12/15 14:54:00 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
// Satoshi TANAKA
|
||||
// DAWNFILE viewer - opens window, hard copy, etc.
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4FRClientServer.hh,v 1.4 2000/02/29 09:54:38 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
// Satoshi TANAKA, Wed Jul 3 14:13:52 JST 1996
|
||||
////////////////////////////////
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4FRConst.hh,v 1.4 1999/12/15 14:54:00 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
// Satoshi TANAKA, Tue Jul 2 15:30:49 JST 1996
|
||||
///////////////////////////////////
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4FRFeatures.hh,v 1.3 1999/12/15 14:54:00 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
#if !defined G4_FR_FEATURES_HH
|
||||
#define G4_FR_FEATURES_HH
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4FRSocketConfig.hh,v 1.3 1999/12/15 14:54:00 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
////////////////////////////////
|
||||
///// G4FRSocketConfig.h /////
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4FRSocketMacro.hh,v 1.3 1999/12/15 14:54:00 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
///////////////////////////////
|
||||
///// G4FRSocketMacro.hh /////
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4FRofstream.hh,v 1.3 1999/12/15 14:54:01 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
#include"g4std/fstream"
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4FukuiRenderer.hh,v 1.5 1999/12/15 14:54:01 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// Satoshi TANAKA
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4FukuiRendererSceneHandler.hh,v 1.5 1999/12/16 17:24:49 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// Satoshi TANAKA, Fri Jun 28 11:19:19 JST 1996
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4FukuiRendererViewer.hh,v 1.5 1999/12/15 14:54:01 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// Satoshi TANAKA, Fri Jun 28 12:10:14 JST 1996
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4DAWNFILE.cc,v 1.6 2000/08/19 18:34:11 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
// Satoshi TANAKA
|
||||
// DAWNFILE factory.
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4DAWNFILESceneHandler.cc,v 1.5 2000/05/16 15:56:43 stanaka Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
// Satoshi TANAKA
|
||||
// DAWNFILE scene.
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4DAWNFILEViewer.cc,v 1.9 2000/05/15 07:48:27 stanaka Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
// Satoshi TANAKA
|
||||
// DAWNFILE view - opens window, hard copy, etc.
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4FRClientServer.cc,v 1.3 1999/12/15 14:54:01 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
// Satoshi TANAKA, Wed Jul 3 14:14:29 JST 1996
|
||||
////////////////////////////////
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4FRSceneFunc.icc,v 1.10 1999/12/15 14:54:01 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4FRSceneFunc.icc,v 1.11 2001/01/25 15:28:07 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
|
||||
|
||||
@@ -242,6 +242,8 @@ void G4FRSCENE::AddPrimitive ( const G4Polyhedron& polyhedron )
|
||||
G4cerr << "***** AddPrimitive( G4Polyhedron )\n";
|
||||
#endif
|
||||
|
||||
if (polyhedron.GetNoFacets() == 0) return;
|
||||
|
||||
//----- Initialize Fukui Renderer IF NECESSARY
|
||||
FRBeginModeling();
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4FukuiRenderer.cc,v 1.5 2000/08/19 18:34:14 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// Satoshi TANAKA
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4FukuiRendererSceneHandler.cc,v 1.4 2000/04/12 13:08:22 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// Satoshi TANAKA, Fri Jun 28 11:34:24 JST 1996
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4FukuiRendererViewer.cc,v 1.5 2000/05/13 10:57:51 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// Satoshi TANAKA, Fri Jun 28 12:09:11 JST 1996
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
$Id: History,v 1.93 2000/11/03 22:06:33 allison Exp $
|
||||
$Id: History,v 1.110 2001/04/02 10:08:43 johna Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -24,6 +24,126 @@ committal in the CVS repository !
|
||||
History file for visualization category
|
||||
---------------------------------------
|
||||
|
||||
2nd April 2001 John Allison (vis-V03-00-09)
|
||||
- Fixed some warnings from DEC cxx.
|
||||
|
||||
15th March 2001 John Allison (vis-V03-00-08)
|
||||
- Changed rotation of phi-replicas in G4PhysicalVolumeModel.cc to
|
||||
ensure correspondence with rule that phi=0 bisects the replica.
|
||||
WARNING: Prior to this fix the graphics did NOT correspond to the
|
||||
replica navigation. If you have been relying on the graphics to
|
||||
position daughter volumes in a phi-replica, navigation will have
|
||||
been incorrect, possibly without causing a crash. The above fix
|
||||
will change the apparent position as shown by the graphics and you
|
||||
will have to correct the positioning of daughters. Make sure the
|
||||
diaghters are all properly enclosed within the replica. Graphics
|
||||
and navigation now correspond,
|
||||
|
||||
7th March 2001 John Allison (vis-V03-00-07)
|
||||
- Cosmetic corrections for ISO compliance.
|
||||
|
||||
23rd February 2001 John Allison (vis-V03-00-06)
|
||||
- Removed all references to RogueWave.
|
||||
|
||||
4th February 2001 John Allison (vis-V03-00-05)
|
||||
- Reverted to /vis/viewer commands updating vis manager's view parameters.
|
||||
Otherwise this can have a big effect on users if old commands are still
|
||||
being used. Let's schedule this change for the next version of Geant4.
|
||||
- Added the following new commands:
|
||||
/vis/enable [true|false]
|
||||
/vis/disable
|
||||
/vis/verbose [<verbosity-integer>]
|
||||
/vis/viewer/set/lineSegmentsPerCircle [<number-of-sides-per-circle>]
|
||||
/vis/viewer/set/sectionPlane ...
|
||||
Only /vis/scene/add/text and /vis/scene/add/axes to go!!!
|
||||
|
||||
4th February 2001 John Allison (vis-V03-00-04)
|
||||
- /vis/viewer commands no longer update vis manager's view parameters.
|
||||
- Most /vis~/ copmmands give DEPRECATED warning, except:
|
||||
/vis~/draw/axes
|
||||
/vis~/draw/text
|
||||
/vis~/set/section_plane
|
||||
/vis~/set/sides
|
||||
/vis~/set/verbose
|
||||
which have still to be re-implemented. All /vis~/ commands are still
|
||||
available through /vis/ for the time being. (Window size hint no longer
|
||||
works.)
|
||||
- Added "auto refresh" to view parameters.
|
||||
- Added "default" view parameters to viewers.
|
||||
- Made OpenGL viewers "auto refresh" by default.
|
||||
- Added:
|
||||
/vis/viewer/set/autoRefresh
|
||||
/vis/viewer/set/projection
|
||||
- Added compound command:
|
||||
/vis/drawView [<theta-deg>] [<phi-deg>]
|
||||
[<pan-right>] [<pan-up>] [<pan-unit>]
|
||||
[<zoom-factor>]
|
||||
[<dolly>] [<dolly-unit>]
|
||||
|
||||
4th February 2001 John Allison (vis-V03-00-03)
|
||||
- Added several new vis commands:
|
||||
/vis/viewer/dolly
|
||||
/vis/viewer/dollyTo
|
||||
/vis/viewer/lightsThetaPhi
|
||||
/vis/viewer/lightsVector
|
||||
/vis/viewer/pan
|
||||
/vis/viewer/panTo
|
||||
/vis/viewer/viewpointThetaPhi
|
||||
/vis/viewer/viewpointVector
|
||||
/vis/viewer/zoom
|
||||
/vis/viewer/zoomTo
|
||||
/vis/viewer/set/hiddenMarker
|
||||
/vis/viewer/set/lightsMove
|
||||
|
||||
3rd February 2001 John Allison (vis-V03-00-02)
|
||||
- Tidied for CodeWizard. Small changes to many files in management, modeling
|
||||
and OpenGL.
|
||||
|
||||
1st February 2001 John Allison (vis-V03-00-01)
|
||||
- Fixed cause of crash when setting viewpoint before creating scene (Bug #157).
|
||||
Solution: SetView no longer called when view parameters are changed. In
|
||||
any case it's called just before drawing, whixh is the right place.
|
||||
- Fixed /vis/set/sides problem (Satoshi Tanaka) (Bug #204).
|
||||
Solution: Update view's view parameters in /vis/set/sides - had somehow
|
||||
been overlooked.
|
||||
|
||||
25th January 2001 John Allison
|
||||
- Added protection against empty G4Polyhedron objects.
|
||||
FukuiRenderer/src/G4FRSceneFunc.icc
|
||||
OPACS/src/G4GoSceneHandler.cc
|
||||
OpenGL/src/G4OpenGLSceneHandler.cc
|
||||
OpenInventor/src/G4OpenInventorSceneHandler.cc
|
||||
VRML/src/G4VRML1SceneHandlerFunc.icc
|
||||
VRML/src/G4VRML2SceneHandlerFunc.icc
|
||||
|
||||
25th January 2001 John Allison (opengl-V03-00-00)
|
||||
- Fixed Bug #120. Implemented running re-calculation of up-vector in
|
||||
the case of "object rotation" (lights move with camera) to prevent
|
||||
"flipping" of view when camera passes through up-vector. Note that
|
||||
the default is "camera rotation" (lights do not move with camera,
|
||||
i.e., remain fixed relative to object) so the default is that this
|
||||
"flipping" can happen. To set "object rotation" (lights move with
|
||||
camera) use /vis/lights/move_with_camera true (soon to be
|
||||
/vis/viewer/set/lights move-with-camera) or click "Object" radio
|
||||
button on Rotation Panel in OpenGLXm mode.
|
||||
- Changed some objects to references for efficiency. E.g.:
|
||||
const G4Vector3D& vp = pView->fVP.GetViewpointDirection ().unit ();
|
||||
|
||||
18th January 2001 John Allison
|
||||
- Corrected G4PhysicalVolumeModel. This corrects a bug whereby the
|
||||
requested drawing of a physical volume and its decendants starting
|
||||
at a depth greater than 2 was incorrectly positioned on the screen.
|
||||
- /vis/scene/include commands withdrawn - use equivalent commands
|
||||
/vis/scene/add.
|
||||
- OpenGL: cosmetic and minor performance improvements.
|
||||
|
||||
16th January 2001 John Allison (vis-03-00-00)
|
||||
- All vis commands "available" in all G4 states.
|
||||
- Other small cosmetic changes to commands.
|
||||
- OpenGL: square and circle markers correctly rendered.
|
||||
Note: subsequent rotations in stored mode also rotate these markers.
|
||||
- Some small changes to test - see test/History.
|
||||
|
||||
2nd November 2000 Gunter Folger (vis-V02-00-02)
|
||||
- Added targets includes and clean_libs to visualization/GNUmakefile.
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4GoSceneHandler.hh,v 1.6 2000/08/19 18:34:16 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// Guy Barrand 04 November 1996
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4Wo.hh,v 1.5 1999/12/15 14:54:02 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// Guy Barrand 04 November 1996
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4WoViewer.hh,v 1.4 1999/12/15 14:54:02 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// Guy Barrand 04 November 1996
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4Xo.hh,v 1.5 1999/12/15 14:54:02 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// Guy Barrand 04 November 1996
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4XoViewer.hh,v 1.4 1999/12/15 14:54:02 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// Guy Barrand 04 November 1996
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4GoSceneHandler.cc,v 1.9 2000/06/07 22:36:02 barrand Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4GoSceneHandler.cc,v 1.10 2001/01/25 15:28:09 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// Guy Barrand 04 November 1996
|
||||
@@ -161,6 +161,9 @@ void G4GoSceneHandler::AddPrimitive (
|
||||
#ifdef DEBUG
|
||||
G4cout << "G4GoSceneHandler::AddPrimitive(G4Polyhedron&) " << G4endl;
|
||||
#endif
|
||||
|
||||
if (polyhedron.GetNoFacets() == 0) return;
|
||||
|
||||
SetColour (GetColour(polyhedron));
|
||||
|
||||
OModeling modeling = OModelingWireFrame;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4Wo.cc,v 1.4 1999/12/15 14:54:02 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// Guy Barrand 04 November 1996
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4WoViewer.cc,v 1.6 2000/05/28 13:35:14 barrand Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// Guy Barrand 04 November 1996
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4Xo.cc,v 1.5 1999/12/15 14:54:03 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// Guy Barrand 04 November 1996
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4XoViewer.cc,v 1.7 2000/05/13 10:57:31 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// Guy Barrand 04 November 1996
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
$Id: History,v 1.2 2000/05/22 08:34:58 johna Exp $
|
||||
$Id: History,v 1.4 2001/03/07 15:29:49 johna Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -20,6 +20,24 @@ committal in the CVS repository !
|
||||
History file for visualization/OpenGL
|
||||
-------------------------------------
|
||||
|
||||
7th March 2001 John Allison
|
||||
- Changed char* to const char* in many places and that gave problems in
|
||||
calls to Xt and Xm. Hope all's OK. Differences:
|
||||
cvs diff -r vis-V03-00-06 vis-V03-00-07
|
||||
|
||||
25th January 2001 John Allison (opengl-V03-00-00)
|
||||
- Implemented running re-calculation of up-vector in the case of "object
|
||||
rotation" (lights move with camera) to prevent "flipping" of view when
|
||||
camera passes through up-vector. Note that the default is "camera
|
||||
rotation" (lights do not move with camera, i.e., remain fixed relative
|
||||
to object) so the default is that this "flipping" can happen. To set
|
||||
"object rotation" (lights move with camera) use
|
||||
/vis/lights/move_with_camera true (soon to be
|
||||
/vis/viewer/set/lights move-with-camera) or click "Object" radio button
|
||||
on Rotation Panel in OpenGLXm mode.
|
||||
- Changed some objects to references for efficiency. E.g.:
|
||||
const G4Vector3D& vp = pView->fVP.GetViewpointDirection ().unit ();
|
||||
|
||||
22nd May 2000 John Allison (opengl-V01-01-00)
|
||||
- Fixed slow response of 2nd window of OpenGLXm. Worked around Mesa bug
|
||||
by sharing static visuals in G4OpenGLXViewer (Guy Barrand):
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLImmediateSceneHandler.hh,v 1.4 2000/08/19 18:34:20 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLImmediateViewer.hh,v 1.4 1999/12/15 14:54:03 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4OpenGLImmediateViewer.hh,v 1.5 2001/02/23 15:43:07 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 7th February 1997
|
||||
@@ -25,7 +25,6 @@
|
||||
#include "G4OpenGLImmediateSceneHandler.hh"
|
||||
#include "G4OpenGLTransform3D.hh"
|
||||
#include "globals.hh"
|
||||
#include "g4rw/tvordvec.h"
|
||||
|
||||
class G4OpenGLSceneHandler;
|
||||
class G4OpenGLImmediateSceneHandler;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLImmediateWin32.hh,v 1.4 1999/12/15 14:54:03 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// OpenGLImmediateWin32 graphics system factory.
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLImmediateWin32Viewer.hh,v 1.3 1999/12/15 14:54:03 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4OpenGLImmediateWin32Viewer.hh,v 1.4 2001/02/23 15:43:07 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// Class G4OpenGLImmediateWin32Viewer : a class derived from
|
||||
@@ -22,7 +22,6 @@
|
||||
#include "G4OpenGLWin32Viewer.hh"
|
||||
|
||||
#include "globals.hh"
|
||||
#include "g4rw/tvordvec.h"
|
||||
|
||||
class G4OpenGLImmediateSceneHandler;
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLImmediateX.hh,v 1.5 1999/12/15 14:54:03 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLImmediateXViewer.hh,v 1.4 1999/12/15 14:54:03 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4OpenGLImmediateXViewer.hh,v 1.5 2001/02/23 15:43:08 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 7th February 1997
|
||||
@@ -23,7 +23,6 @@
|
||||
#include "G4OpenGLXViewer.hh"
|
||||
|
||||
#include "globals.hh"
|
||||
#include "g4rw/tvordvec.h"
|
||||
|
||||
class G4OpenGLImmediateSceneHandler;
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLImmediateXm.hh,v 1.4 1999/12/15 14:54:04 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4OpenGLImmediateXm.hh,v 1.5 2001/02/03 18:39:00 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
@@ -22,6 +22,7 @@
|
||||
class G4OpenGLImmediateXm: public G4VGraphicsSystem {
|
||||
public:
|
||||
G4OpenGLImmediateXm ();
|
||||
virtual ~G4OpenGLImmediateXm ();
|
||||
G4VSceneHandler* CreateSceneHandler (const G4String& name = "");
|
||||
G4VViewer* CreateViewer (G4VSceneHandler&, const G4String& name = "");
|
||||
};
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLImmediateXmViewer.hh,v 1.3 1999/12/15 14:54:04 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4OpenGLImmediateXmViewer.hh,v 1.5 2001/02/23 15:43:08 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
@@ -23,7 +23,6 @@
|
||||
#include "G4OpenGLXmViewer.hh"
|
||||
|
||||
#include "globals.hh"
|
||||
#include "g4rw/tvordvec.h"
|
||||
|
||||
class G4OpenGLImmediateSceneHandler;
|
||||
|
||||
@@ -33,6 +32,7 @@ public G4OpenGLXmViewer, public G4OpenGLImmediateViewer{
|
||||
public:
|
||||
G4OpenGLImmediateXmViewer (G4OpenGLImmediateSceneHandler& scene,
|
||||
const G4String& name = "");
|
||||
virtual ~G4OpenGLImmediateXmViewer ();
|
||||
void DrawView ();
|
||||
|
||||
};
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLSceneHandler.hh,v 1.5 1999/12/16 17:25:05 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4OpenGLSceneHandler.hh,v 1.7 2001/01/18 11:59:00 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 27th March 1996
|
||||
@@ -53,13 +53,29 @@ public:
|
||||
|
||||
protected:
|
||||
G4OpenGLSceneHandler (G4VGraphicsSystem& system,
|
||||
G4int id,
|
||||
const G4String& name = "");
|
||||
G4int id,
|
||||
const G4String& name = "");
|
||||
virtual ~G4OpenGLSceneHandler ();
|
||||
G4bool initialize_hlr;
|
||||
|
||||
private:
|
||||
void AddCircleSquare (const G4VMarker&, G4int nSides);
|
||||
/**************************************************
|
||||
Not needed - but see note on future development in .cc.
|
||||
void DrawScreenPolygon (G4double size,
|
||||
const G4Point3D& centre,
|
||||
G4int nSides);
|
||||
// Draws in screen coordinates.
|
||||
*********************************/
|
||||
|
||||
void DrawXYPolygon (G4double size,
|
||||
const G4Point3D& centre,
|
||||
G4int nSides);
|
||||
// Draws in world coordinates a polygon in the screen plane knowing
|
||||
// viewpoint direction and up vector.
|
||||
|
||||
GLdouble clear_colour[4];
|
||||
static const GLubyte fStippleMaskHashed [128];
|
||||
};
|
||||
|
||||
#include "G4OpenGLSceneHandler.icc"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLSceneHandler.icc,v 1.3 1999/12/16 17:25:06 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 20th January 1998
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLStoredSceneHandler.hh,v 1.8 2000/08/19 18:34:23 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4OpenGLStoredSceneHandler.hh,v 1.10 2001/02/23 15:43:08 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
@@ -24,6 +24,7 @@
|
||||
#include "G4RotationMatrix.hh"
|
||||
#include "G4OpenGLSceneHandler.hh"
|
||||
#include "g4std/map"
|
||||
#include "g4std/vector"
|
||||
|
||||
class G4OpenGLStored;
|
||||
|
||||
@@ -37,7 +38,6 @@ public:
|
||||
void BeginModeling ();
|
||||
void EndModeling ();
|
||||
static G4int GetSceneCount ();
|
||||
G4bool fMemoryForDisplayLists; // avoid memory overflow
|
||||
|
||||
private:
|
||||
friend class G4OpenGLStoredViewer;
|
||||
@@ -47,15 +47,16 @@ friend class G4OpenGLStoredViewer;
|
||||
static G4int fSceneIdCount; // static counter for OpenGLStored scenes.
|
||||
static G4int fSceneCount; // No. of extanct scene handlers.
|
||||
G4int fDisplayListId; // Workspace.
|
||||
G4bool fMemoryForDisplayLists; // avoid memory overflow
|
||||
|
||||
// PODL = Persistent Object Display List.
|
||||
GLint fTopPODL; // List which calls the other PODLs.
|
||||
G4RWTValOrderedVector<G4int> fPODLList;
|
||||
G4RWTValOrderedVector<G4Transform3D> fPODLTransformList;
|
||||
G4std::vector<G4int> fPODLList;
|
||||
G4std::vector<G4Transform3D> fPODLTransformList;
|
||||
|
||||
// TODL = Transient Object Display List.
|
||||
G4RWTValOrderedVector<G4int> fTODLList;
|
||||
G4RWTValOrderedVector<G4Transform3D> fTODLTransformList;
|
||||
G4std::vector<G4int> fTODLList;
|
||||
G4std::vector<G4Transform3D> fTODLTransformList;
|
||||
|
||||
// Stop-gap solution of structure re-use.
|
||||
// A proper implementation would use geometry hierarchy.
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLStoredViewer.hh,v 1.5 1999/12/15 14:54:04 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4OpenGLStoredViewer.hh,v 1.6 2001/02/23 15:43:09 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 7th February 1997
|
||||
@@ -25,7 +25,6 @@
|
||||
#include "G4OpenGLStoredSceneHandler.hh"
|
||||
#include "G4OpenGLTransform3D.hh"
|
||||
#include "globals.hh"
|
||||
#include "g4rw/tvordvec.h"
|
||||
|
||||
class G4OpenGLStoredSceneHandler;
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLStoredWin32.hh,v 1.4 1999/12/15 14:54:04 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// OpenGLStoredWin32 graphics system factory.
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLStoredWin32Viewer.hh,v 1.2 1999/12/15 14:54:04 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// Class G4OpenGLStoredWin32Viewer : a class derived from
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLStoredX.hh,v 1.5 1999/12/15 14:54:04 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLStoredXViewer.hh,v 1.3 1999/12/15 14:54:04 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 7th February 1997
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLStoredXm.hh,v 1.4 1999/12/15 14:54:05 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLStoredXmViewer.hh,v 1.2 1999/12/15 14:54:05 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4OpenGLStoredXmViewer.hh,v 1.3 2001/02/03 18:39:04 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
@@ -29,6 +29,7 @@ public G4OpenGLXmViewer, public G4OpenGLStoredViewer{
|
||||
|
||||
public:
|
||||
G4OpenGLStoredXmViewer (G4OpenGLStoredSceneHandler& scene, const G4String& name = "");
|
||||
virtual ~G4OpenGLStoredXmViewer ();
|
||||
void DrawView ();
|
||||
|
||||
};
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLTransform3D.hh,v 1.3 1999/12/15 14:54:05 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 24th October 1996
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLViewer.hh,v 1.5 1999/12/15 14:54:05 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4OpenGLViewer.hh,v 1.6 2001/02/23 15:43:09 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 27th March 1996
|
||||
@@ -19,7 +19,6 @@
|
||||
|
||||
#include "G4VViewer.hh"
|
||||
#include "globals.hh"
|
||||
#include "g4rw/tvordvec.h"
|
||||
|
||||
class G4OpenGLSceneHandler;
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLWin32Viewer.hh,v 1.3 1999/12/15 14:54:05 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4OpenGLWin32Viewer.hh,v 1.4 2001/02/23 15:43:09 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// G4OpenGLWin32Viewer : Class to provide WindowsNT specific
|
||||
@@ -20,7 +20,6 @@
|
||||
#include "G4VViewer.hh"
|
||||
#include "G4OpenGLSceneHandler.hh"
|
||||
#include "globals.hh"
|
||||
#include "g4rw/tvordvec.h"
|
||||
|
||||
//Win32 includes?
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLXViewer.hh,v 1.8 2000/05/22 08:06:50 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4OpenGLXViewer.hh,v 1.10 2001/02/23 15:43:10 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 7th February 1997
|
||||
@@ -21,7 +21,6 @@
|
||||
#include "G4VViewer.hh"
|
||||
#include "G4OpenGLSceneHandler.hh"
|
||||
#include "globals.hh"
|
||||
#include "g4rw/tvordvec.h"
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Intrinsic.h>
|
||||
@@ -102,6 +101,9 @@ protected:
|
||||
iconName;
|
||||
char charViewName [100];
|
||||
|
||||
private:
|
||||
G4OpenGLXViewer (const G4OpenGLXViewer&);
|
||||
G4OpenGLXViewer& operator = (const G4OpenGLXViewer&);
|
||||
};
|
||||
|
||||
static const char* gouraudtriangleEPS[] =
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLXmBox.hh,v 1.3 1999/12/15 14:54:05 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4OpenGLXmBox.hh,v 1.5 2001/03/07 14:56:15 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
//Box container class
|
||||
@@ -28,9 +28,9 @@ class G4OpenGLXmBox : public G4OpenGLXmVWidgetContainer
|
||||
{
|
||||
|
||||
public:
|
||||
G4OpenGLXmBox (char* = NULL,
|
||||
G4OpenGLXmBox (const char* = NULL,
|
||||
G4bool = False); //constructor
|
||||
~G4OpenGLXmBox (); //destructor
|
||||
virtual ~G4OpenGLXmBox (); //destructor
|
||||
|
||||
void AddChild (G4OpenGLXmVWidgetComponent*);
|
||||
void AddYourselfTo (G4OpenGLXmVWidgetShell*);
|
||||
@@ -38,14 +38,18 @@ public:
|
||||
Widget* GetPointerToParent ();
|
||||
Widget* GetPointerToWidget ();
|
||||
|
||||
char* GetName ();
|
||||
void SetName (char*);
|
||||
const char* GetName ();
|
||||
void SetName (const char*);
|
||||
|
||||
protected:
|
||||
char* name;
|
||||
const char* name;
|
||||
Widget* parent;
|
||||
Widget box_row_col;
|
||||
G4bool radio;
|
||||
|
||||
private:
|
||||
G4OpenGLXmBox (const G4OpenGLXmBox&);
|
||||
G4OpenGLXmBox& operator = (const G4OpenGLXmBox&);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLXmConvenienceRoutines.hh,v 1.3 1999/12/15 14:54:05 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLXmFourArrowButtons.hh,v 1.3 1999/12/15 14:54:05 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4OpenGLXmFourArrowButtons.hh,v 1.4 2001/02/03 18:39:09 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
//Four arrow buttons class. Inherits from G4OpenGLXmVWidgetComponent
|
||||
@@ -24,7 +24,7 @@ class G4OpenGLXmFourArrowButtons : public G4OpenGLXmVWidgetComponent
|
||||
public:
|
||||
G4OpenGLXmFourArrowButtons (XtCallbackRec** = NULL); // array of 4 callbacks
|
||||
//constructor
|
||||
~G4OpenGLXmFourArrowButtons (); //destructor
|
||||
virtual ~G4OpenGLXmFourArrowButtons (); //destructor
|
||||
|
||||
void SetName (char*);
|
||||
|
||||
@@ -40,6 +40,10 @@ private:
|
||||
Widget arrow_form;
|
||||
Widget arrow;
|
||||
Widget* parent;
|
||||
|
||||
private:
|
||||
G4OpenGLXmFourArrowButtons (const G4OpenGLXmFourArrowButtons&);
|
||||
G4OpenGLXmFourArrowButtons& operator = (const G4OpenGLXmFourArrowButtons&);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLXmFramedBox.hh,v 1.3 1999/12/15 14:54:05 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4OpenGLXmFramedBox.hh,v 1.5 2001/03/07 14:56:16 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
//Framed box container class
|
||||
@@ -30,14 +30,16 @@ class G4OpenGLXmFramedBox : public G4OpenGLXmBox
|
||||
{
|
||||
|
||||
public:
|
||||
G4OpenGLXmFramedBox (char* = NULL,
|
||||
G4OpenGLXmFramedBox (const char* = NULL,
|
||||
G4bool = False); //constructor
|
||||
~G4OpenGLXmFramedBox (); //destructor
|
||||
virtual ~G4OpenGLXmFramedBox (); //destructor
|
||||
|
||||
void AddChild (G4OpenGLXmVWidgetComponent*);
|
||||
void AddYourselfTo (G4OpenGLXmVWidgetShell*);
|
||||
|
||||
private:
|
||||
G4OpenGLXmFramedBox (const G4OpenGLXmFramedBox&);
|
||||
G4OpenGLXmFramedBox& operator = (const G4OpenGLXmFramedBox&);
|
||||
Widget frame;
|
||||
};
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLXmMainMenubarCallbacks.hh,v 1.3 1999/12/15 14:54:05 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLXmPanningCallbacks.hh,v 1.3 1999/12/15 14:54:05 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLXmPushButton.hh,v 1.3 1999/12/15 14:54:05 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4OpenGLXmPushButton.hh,v 1.5 2001/03/07 15:16:27 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
//Push button class. Inherits from G4OpenGLXmVWidgetComponent
|
||||
@@ -22,12 +22,12 @@ class G4OpenGLXmPushButton : public G4OpenGLXmVWidgetComponent
|
||||
{
|
||||
|
||||
public:
|
||||
G4OpenGLXmPushButton (char* = NULL,
|
||||
G4OpenGLXmPushButton (const char* = NULL,
|
||||
XtCallbackRec* = NULL); //constructor
|
||||
~G4OpenGLXmPushButton (); //destructor
|
||||
virtual ~G4OpenGLXmPushButton (); //destructor
|
||||
|
||||
void SetName (char*);
|
||||
char* GetName ();
|
||||
void SetName (const char*);
|
||||
const char* GetName ();
|
||||
|
||||
void AddYourselfTo (G4OpenGLXmVWidgetContainer*);
|
||||
|
||||
@@ -35,7 +35,9 @@ public:
|
||||
Widget* GetPointerToWidget ();
|
||||
|
||||
private:
|
||||
char* name;
|
||||
G4OpenGLXmPushButton (const G4OpenGLXmPushButton&);
|
||||
G4OpenGLXmPushButton& operator = (const G4OpenGLXmPushButton&);
|
||||
const char* name;
|
||||
XtCallbackRec* callback;
|
||||
Widget button;
|
||||
Widget* parent;
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLXmRadioButton.hh,v 1.3 1999/12/15 14:54:05 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4OpenGLXmRadioButton.hh,v 1.5 2001/03/07 14:56:16 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
//Radio button class. Inherits from G4OpenGLXmVWidgetComponent
|
||||
@@ -22,14 +22,14 @@ class G4OpenGLXmRadioButton : public G4OpenGLXmVWidgetComponent
|
||||
{
|
||||
|
||||
public:
|
||||
G4OpenGLXmRadioButton (char*,
|
||||
G4OpenGLXmRadioButton (const char*,
|
||||
XtCallbackRec*,
|
||||
G4bool,
|
||||
G4int); //constructor
|
||||
~G4OpenGLXmRadioButton (); //destructor
|
||||
virtual ~G4OpenGLXmRadioButton (); //destructor
|
||||
|
||||
void SetName (char*);
|
||||
char* GetName ();
|
||||
void SetName (const char*);
|
||||
const char* GetName ();
|
||||
|
||||
void AddYourselfTo (G4OpenGLXmVWidgetContainer*);
|
||||
|
||||
@@ -37,7 +37,9 @@ public:
|
||||
Widget* GetPointerToWidget ();
|
||||
|
||||
private:
|
||||
char* name;
|
||||
G4OpenGLXmRadioButton (const G4OpenGLXmRadioButton&);
|
||||
G4OpenGLXmRadioButton& operator = (const G4OpenGLXmRadioButton&);
|
||||
const char* name;
|
||||
XtCallbackRec* callback;
|
||||
Widget button;
|
||||
Widget* parent;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLXmResources.hh,v 1.3 1999/12/15 14:54:06 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// Default resources file for GEANT4 OpenGL Motif windows.
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLXmRotationCallbacks.hh,v 1.3 1999/12/15 14:54:06 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLXmSeparator.hh,v 1.3 1999/12/15 14:54:06 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4OpenGLXmSeparator.hh,v 1.4 2001/02/03 18:39:14 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
//Separator class. Inherits from G4OpenGLXmVWidgetComponent
|
||||
@@ -23,7 +23,7 @@ class G4OpenGLXmSeparator : public G4OpenGLXmVWidgetComponent
|
||||
|
||||
public:
|
||||
G4OpenGLXmSeparator (unsigned char = XmSINGLE_LINE); //constructor
|
||||
~G4OpenGLXmSeparator (); //destructor
|
||||
virtual ~G4OpenGLXmSeparator (); //destructor
|
||||
|
||||
void AddYourselfTo (G4OpenGLXmVWidgetContainer*);
|
||||
|
||||
@@ -31,6 +31,8 @@ public:
|
||||
Widget* GetPointerToWidget ();
|
||||
|
||||
private:
|
||||
G4OpenGLXmSeparator (const G4OpenGLXmSeparator&);
|
||||
G4OpenGLXmSeparator& operator = (const G4OpenGLXmSeparator&);
|
||||
unsigned char line_type;
|
||||
Widget line;
|
||||
Widget* parent;
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLXmSliderBar.hh,v 1.3 1999/12/15 14:54:06 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4OpenGLXmSliderBar.hh,v 1.5 2001/03/07 14:56:17 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
//Slider bar class. Inherits from G4OpenGLXmVWidgetComponent
|
||||
@@ -22,7 +22,7 @@ class G4OpenGLXmSliderBar : public G4OpenGLXmVWidgetComponent
|
||||
{
|
||||
|
||||
public:
|
||||
G4OpenGLXmSliderBar (char* = NULL, // name of slider bar
|
||||
G4OpenGLXmSliderBar (const char* = NULL, // name of slider bar
|
||||
XtCallbackRec* = NULL, // callbacks for slider bar
|
||||
G4bool = False, // show current value if True
|
||||
short = 0, // decimal places for show value
|
||||
@@ -32,9 +32,9 @@ public:
|
||||
unsigned char = XmHORIZONTAL,
|
||||
unsigned char = XmMAX_ON_RIGHT);
|
||||
//constructor
|
||||
~G4OpenGLXmSliderBar (); //destructor
|
||||
virtual ~G4OpenGLXmSliderBar (); //destructor
|
||||
|
||||
void SetName (char*);
|
||||
void SetName (const char*);
|
||||
void SetShow (G4bool);
|
||||
void SetDecimalPlaces (short);
|
||||
void SetInitialValue (G4double);
|
||||
@@ -44,7 +44,7 @@ public:
|
||||
void SetDirection (unsigned char);
|
||||
|
||||
|
||||
char* GetName ();
|
||||
const char* GetName ();
|
||||
G4bool GetShow ();
|
||||
short GetDecimalPlaces ();
|
||||
G4double GetInitialValue ();
|
||||
@@ -59,7 +59,9 @@ public:
|
||||
Widget* GetPointerToWidget ();
|
||||
|
||||
private:
|
||||
char* name;
|
||||
G4OpenGLXmSliderBar (const G4OpenGLXmSliderBar&);
|
||||
G4OpenGLXmSliderBar& operator = (const G4OpenGLXmSliderBar&);
|
||||
const char* name;
|
||||
XtCallbackRec* callback;
|
||||
Widget sliderbar;
|
||||
Widget* parent;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLXmStyleCallbacks.hh,v 1.3 1999/12/15 14:54:06 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLXmTextField.hh,v 1.3 1999/12/15 14:54:06 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4OpenGLXmTextField.hh,v 1.5 2001/03/07 14:56:17 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
//Text field class. Inherits from G4OpenGLXmVWidgetComponent
|
||||
@@ -23,16 +23,16 @@ class G4OpenGLXmTextField : public G4OpenGLXmVWidgetComponent
|
||||
{
|
||||
|
||||
public:
|
||||
G4OpenGLXmTextField (char*,G4double*); //constructor
|
||||
G4OpenGLXmTextField (char*,char*); //constructor
|
||||
~G4OpenGLXmTextField (); //destructor
|
||||
G4OpenGLXmTextField (const char*,G4double*); //constructor
|
||||
G4OpenGLXmTextField (const char*,const char*); //constructor
|
||||
virtual ~G4OpenGLXmTextField (); //destructor
|
||||
|
||||
void SetName (char*);
|
||||
char* GetName ();
|
||||
void SetName (const char*);
|
||||
const char* GetName ();
|
||||
|
||||
void SetValue (G4double);
|
||||
void SetValue (char*);
|
||||
char* GetValue ();
|
||||
void SetValue (const char*);
|
||||
const char* GetValue ();
|
||||
|
||||
void AddYourselfTo (G4OpenGLXmVWidgetContainer*);
|
||||
|
||||
@@ -40,7 +40,9 @@ public:
|
||||
Widget* GetPointerToWidget ();
|
||||
|
||||
private:
|
||||
char* name;
|
||||
G4OpenGLXmTextField (const G4OpenGLXmTextField&);
|
||||
G4OpenGLXmTextField& operator = (const G4OpenGLXmTextField&);
|
||||
const char* name;
|
||||
void* value;
|
||||
G4bool text;
|
||||
char* initial;
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLXmTopLevelShell.hh,v 1.3 1999/12/15 14:54:06 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4OpenGLXmTopLevelShell.hh,v 1.4 2001/02/03 18:39:19 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
//Top level shell class
|
||||
@@ -25,7 +25,7 @@ class G4OpenGLXmTopLevelShell : public G4OpenGLXmVWidgetShell
|
||||
|
||||
public:
|
||||
G4OpenGLXmTopLevelShell(G4OpenGLXmViewer*, char*); //constructor
|
||||
~G4OpenGLXmTopLevelShell(); //destructor
|
||||
virtual ~G4OpenGLXmTopLevelShell(); //destructor
|
||||
|
||||
void AddChild (G4OpenGLXmVWidgetContainer*);
|
||||
void Realize ();
|
||||
@@ -34,6 +34,8 @@ public:
|
||||
char* GetName ();
|
||||
|
||||
private:
|
||||
G4OpenGLXmTopLevelShell (const G4OpenGLXmTopLevelShell&);
|
||||
G4OpenGLXmTopLevelShell& operator = (const G4OpenGLXmTopLevelShell&);
|
||||
char* name;
|
||||
Widget toplevel;
|
||||
Widget top_box;
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLXmVWidgetComponent.hh,v 1.3 1999/12/15 14:54:06 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4OpenGLXmVWidgetComponent.hh,v 1.4 2001/02/03 18:39:20 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
//Base class for all Motif component widgets
|
||||
@@ -24,8 +24,8 @@ class G4OpenGLXmVWidgetComponent : public G4OpenGLXmVWidgetObject
|
||||
{
|
||||
|
||||
public:
|
||||
G4OpenGLXmVWidgetComponent(); //constructor
|
||||
~G4OpenGLXmVWidgetComponent(); //destructor
|
||||
G4OpenGLXmVWidgetComponent(); //constructor
|
||||
virtual ~G4OpenGLXmVWidgetComponent(); //destructor
|
||||
|
||||
virtual void AddYourselfTo (G4OpenGLXmVWidgetContainer*) = 0;
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLXmVWidgetContainer.hh,v 1.3 1999/12/15 14:54:06 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4OpenGLXmVWidgetContainer.hh,v 1.4 2001/02/03 18:39:22 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
//Base class for all Motif container widgets
|
||||
@@ -25,8 +25,8 @@ class G4OpenGLXmVWidgetContainer : public G4OpenGLXmVWidgetObject
|
||||
{
|
||||
|
||||
public:
|
||||
G4OpenGLXmVWidgetContainer(); //constructor
|
||||
~G4OpenGLXmVWidgetContainer(); //destructor
|
||||
G4OpenGLXmVWidgetContainer(); //constructor
|
||||
virtual ~G4OpenGLXmVWidgetContainer(); //destructor
|
||||
|
||||
virtual void AddChild (G4OpenGLXmVWidgetComponent*) = 0;
|
||||
virtual void AddYourselfTo (G4OpenGLXmVWidgetShell*) = 0;
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLXmVWidgetObject.hh,v 1.3 1999/12/15 14:54:06 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4OpenGLXmVWidgetObject.hh,v 1.4 2001/02/03 18:39:23 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
//Virtual base class for all Motif widgets.
|
||||
@@ -26,13 +26,15 @@ class G4OpenGLXmVWidgetObject {
|
||||
|
||||
public:
|
||||
|
||||
G4OpenGLXmVWidgetObject (); //constructor
|
||||
~G4OpenGLXmVWidgetObject (); //destructor
|
||||
G4OpenGLXmVWidgetObject (); //constructor
|
||||
virtual ~G4OpenGLXmVWidgetObject (); //destructor
|
||||
|
||||
G4OpenGLXmViewer* GetView (); //access to the pView
|
||||
void ProcesspView ();
|
||||
|
||||
protected:
|
||||
G4OpenGLXmVWidgetObject (const G4OpenGLXmVWidgetObject&);
|
||||
G4OpenGLXmVWidgetObject& operator = (const G4OpenGLXmVWidgetObject&);
|
||||
G4OpenGLXmViewer* pView;
|
||||
Colormap cmap;
|
||||
Pixel borcol;
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLXmVWidgetShell.hh,v 1.3 1999/12/15 14:54:06 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4OpenGLXmVWidgetShell.hh,v 1.4 2001/02/03 18:39:25 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
//Base class for all Motif window widgets (shells)
|
||||
@@ -25,7 +25,7 @@ class G4OpenGLXmVWidgetShell : public G4OpenGLXmVWidgetObject
|
||||
|
||||
public:
|
||||
G4OpenGLXmVWidgetShell(); //constructor
|
||||
~G4OpenGLXmVWidgetShell(); //destructor
|
||||
virtual ~G4OpenGLXmVWidgetShell(); //destructor
|
||||
|
||||
virtual Widget* GetPointerToWidget() = 0;
|
||||
virtual void AddChild (G4OpenGLXmVWidgetContainer*) = 0;
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLXmViewer.hh,v 1.3 1999/12/15 14:54:06 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4OpenGLXmViewer.hh,v 1.5 2001/02/23 15:43:10 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
@@ -21,7 +21,6 @@
|
||||
#include "G4OpenGLXViewer.hh"
|
||||
#include "G4OpenGLSceneHandler.hh"
|
||||
#include "globals.hh"
|
||||
#include "g4rw/tvordvec.h"
|
||||
|
||||
#include <Xm/Xm.h>
|
||||
#include <Xm/MainW.h>
|
||||
@@ -57,7 +56,7 @@ class G4OpenGLXmViewer: public G4OpenGLXViewer {
|
||||
|
||||
public:
|
||||
G4OpenGLXmViewer (G4OpenGLSceneHandler& scene);
|
||||
~G4OpenGLXmViewer ();
|
||||
virtual ~G4OpenGLXmViewer ();
|
||||
|
||||
protected:
|
||||
virtual void ShowView ();
|
||||
@@ -362,6 +361,10 @@ public:
|
||||
static G4int get_int_userData (Widget w);
|
||||
|
||||
friend class G4OpenGLXmVWidgetObject;
|
||||
|
||||
private:
|
||||
G4OpenGLXmViewer (const G4OpenGLXmViewer&);
|
||||
G4OpenGLXmViewer& operator = (const G4OpenGLXmViewer&);
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLXmWindowHandlingCallbacks.hh,v 1.3 1999/12/15 14:54:06 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLImmediateSceneHandler.cc,v 1.3 1999/12/15 14:54:07 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLImmediateViewer.cc,v 1.3 1999/12/15 14:54:07 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 7th February 1997
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLImmediateWin32.cc,v 1.5 2000/08/19 18:34:26 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// OpenGLImmediateWin32 graphics system factory.
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLImmediateWin32Viewer.cc,v 1.2 1999/12/15 14:54:07 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// Class G4OpenGLImmediateWin32Viewer : a class derived from G4OpenGLWin32Viewer and
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLImmediateX.cc,v 1.6 2000/08/19 18:34:28 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 27th March 1996
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLImmediateXViewer.cc,v 1.4 2000/05/22 08:16:25 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 7th February 1997
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLImmediateXm.cc,v 1.5 2000/08/19 18:34:31 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4OpenGLImmediateXm.cc,v 1.6 2001/02/03 18:39:29 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
@@ -31,6 +31,8 @@ G4OpenGLImmediateXm::G4OpenGLImmediateXm ():
|
||||
G4VisFeaturesOfOpenGLIXm (),
|
||||
G4VGraphicsSystem::threeD) {}
|
||||
|
||||
G4OpenGLImmediateXm::~G4OpenGLImmediateXm () {}
|
||||
|
||||
G4VSceneHandler* G4OpenGLImmediateXm::CreateSceneHandler (const G4String& name) {
|
||||
G4VSceneHandler* pScene = new G4OpenGLImmediateSceneHandler (*this, name);
|
||||
G4cout << G4OpenGLImmediateSceneHandler::GetSceneCount ()
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLImmediateXmViewer.cc,v 1.3 2000/05/22 08:16:29 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4OpenGLImmediateXmViewer.cc,v 1.4 2001/02/03 18:39:30 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
@@ -79,6 +79,8 @@ G4VViewer (scene, scene.IncrementViewCount (), name) {
|
||||
// }
|
||||
}
|
||||
|
||||
G4OpenGLImmediateXmViewer::~G4OpenGLImmediateXmViewer () {}
|
||||
|
||||
void G4OpenGLImmediateXmViewer::DrawView () {
|
||||
|
||||
// If a double buffer context has been forced upon us, ignore the
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLSceneHandler.cc,v 1.5 2000/02/21 16:03:18 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4OpenGLSceneHandler.cc,v 1.8 2001/01/25 15:28:09 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 27th March 1996
|
||||
@@ -56,6 +56,25 @@ G4OpenGLSceneHandler::~G4OpenGLSceneHandler ()
|
||||
ClearStore ();
|
||||
}
|
||||
|
||||
const GLubyte G4OpenGLSceneHandler::fStippleMaskHashed [128] = {
|
||||
0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
|
||||
0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
|
||||
0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
|
||||
0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
|
||||
0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
|
||||
0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
|
||||
0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
|
||||
0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
|
||||
0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
|
||||
0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
|
||||
0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
|
||||
0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
|
||||
0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
|
||||
0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
|
||||
0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
|
||||
0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55
|
||||
};
|
||||
|
||||
//Method for handling G4Polyline objects (from tracking or wireframe).
|
||||
void G4OpenGLSceneHandler::AddPrimitive (const G4Polyline& line)
|
||||
{
|
||||
@@ -83,7 +102,7 @@ void G4OpenGLSceneHandler::AddPrimitive (const G4Polyline& line)
|
||||
void G4OpenGLSceneHandler::AddPrimitive (const G4Text& text) {
|
||||
MarkerSizeType sizeType;
|
||||
G4double size = GetMarkerSize (text, sizeType);
|
||||
G4cerr
|
||||
G4cout
|
||||
<< "G4OpenGLSceneHandler::AddPrimitive (const G4Text& text) not implemented yet."
|
||||
<< "\n Called with text \"" << text.GetText ()
|
||||
<< "\" at " << text.GetPosition ()
|
||||
@@ -94,137 +113,29 @@ void G4OpenGLSceneHandler::AddPrimitive (const G4Text& text) {
|
||||
}
|
||||
|
||||
void G4OpenGLSceneHandler::AddPrimitive (const G4Circle& circle) {
|
||||
|
||||
const G4Colour& c = GetColour (circle);
|
||||
glColor3d (c.GetRed (), c.GetGreen (), c.GetBlue ());
|
||||
|
||||
if (fpViewer -> GetViewParameters ().IsMarkerNotHidden ())
|
||||
glDisable (GL_DEPTH_TEST);
|
||||
else glEnable (GL_DEPTH_TEST);
|
||||
|
||||
glDisable (GL_LIGHTING);
|
||||
|
||||
G4VMarker::FillStyle style = circle.GetFillStyle();
|
||||
|
||||
switch (style) {
|
||||
case G4VMarker::noFill:
|
||||
glPolygonMode (GL_FRONT_AND_BACK, GL_LINE);
|
||||
break;
|
||||
|
||||
case G4VMarker::hashed:
|
||||
glPolygonMode (GL_FRONT_AND_BACK, GL_LINE);
|
||||
glLineStipple (1, 0x0101);
|
||||
break;
|
||||
|
||||
case G4VMarker::filled:
|
||||
glPolygonMode (GL_FRONT_AND_BACK, GL_FILL);
|
||||
break;
|
||||
|
||||
default:
|
||||
G4cerr << "Unrecognised fill style for G4Circle in G4OpenGLSceneHandler."
|
||||
<< "\nUsing G4VMarker::filled." << G4endl;
|
||||
glPolygonMode (GL_FRONT_AND_BACK, GL_FILL);
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
G4Point3D centre = circle.GetPosition();
|
||||
|
||||
G4bool userSpecified = (circle.GetWorldSize() || circle.GetScreenSize());
|
||||
|
||||
const G4VMarker& def = fpViewer -> GetViewParameters().GetDefaultMarker();
|
||||
|
||||
//Make sure we Draw circles...
|
||||
glEnable (GL_POINT_SMOOTH);
|
||||
|
||||
G4double size;
|
||||
G4double scale = fpViewer -> GetViewParameters().GetGlobalMarkerScale();
|
||||
if (size = scale * // Assignment intentional.
|
||||
userSpecified ? circle.GetWorldSize() : def.GetWorldSize()) {
|
||||
|
||||
// Draw in world coordinates...
|
||||
GLdouble winx, winy, winz;
|
||||
GLdouble* model_matrix = new GLdouble[16];
|
||||
GLdouble* proj_matrix = new GLdouble[16];
|
||||
GLint* v_port = new GLint[4];
|
||||
// glPointSize (5.0); //Still have to work out correspondance between
|
||||
// //world and screen units.
|
||||
glGetDoublev (GL_MODELVIEW_MATRIX, model_matrix);
|
||||
glGetDoublev (GL_PROJECTION_MATRIX, proj_matrix);
|
||||
glGetIntegerv (GL_VIEWPORT, v_port);
|
||||
gluProject (size, size, size,
|
||||
model_matrix,
|
||||
proj_matrix,
|
||||
v_port,
|
||||
&winx, &winy, &winz);
|
||||
glPointSize (winx);
|
||||
glBegin (GL_POINTS);
|
||||
glVertex3d (centre.x(), centre.y(), centre.z());
|
||||
glEnd ();
|
||||
delete[] model_matrix;
|
||||
delete[] proj_matrix;
|
||||
delete[] v_port;
|
||||
|
||||
}
|
||||
else {
|
||||
size = scale *
|
||||
userSpecified ? circle.GetScreenSize() : def.GetScreenSize();
|
||||
|
||||
// Draw in screen coordinates...
|
||||
// G4double* projection_matrix = new G4double[16];
|
||||
// glGetDoublev (GL_MODELVIEW_MATRIX, projection_matrix);
|
||||
|
||||
// HepMatrix proj(4, 4, 1);
|
||||
// for (col = 1; col < 5; col++) {
|
||||
// for (row = 1; row < 5; row++) {
|
||||
// proj (row, col) = projection_matrix[(col-1)*4 + (row-1)];
|
||||
// }
|
||||
// }
|
||||
|
||||
// G4cout << "proj is : \n" << proj << G4endl;
|
||||
|
||||
// proj.invert(ierr);
|
||||
|
||||
// G4cout << "ierr is " << ierr << G4endl;
|
||||
// G4cout << "proj^-1 is : \n" << proj << G4endl;
|
||||
|
||||
// for (col = 1; col < 5; col++) {
|
||||
// for (row = 1; row < 5; row++) {
|
||||
// projection_matrix[(col-1)*4 + (row-1)] = proj (row, col);
|
||||
// }
|
||||
// }
|
||||
|
||||
// glMultMatrixd (projection_matrix);
|
||||
|
||||
// glTranslated (centre.x(), centre.y(), centre.z());
|
||||
// glBegin (GL_LINE_LOOP);
|
||||
glPointSize (size);
|
||||
glBegin (GL_POINTS);
|
||||
// for (G4int segment = 0; segment < num_sides; segment++) {
|
||||
// theta = d_theta * segment;
|
||||
// glVertex3d (sin(theta) * size,
|
||||
// cos(theta) * size,
|
||||
// 0.);
|
||||
// }
|
||||
glVertex3d (centre.x(), centre.y(), centre.z());
|
||||
glEnd ();
|
||||
|
||||
}
|
||||
AddCircleSquare (circle, 24);
|
||||
}
|
||||
|
||||
void G4OpenGLSceneHandler::AddPrimitive (const G4Square& square) {
|
||||
glDisable (GL_POINT_SMOOTH);
|
||||
AddCircleSquare (square, 4);
|
||||
}
|
||||
|
||||
void G4OpenGLSceneHandler::AddPrimitive (const G4Square& Square) {
|
||||
void G4OpenGLSceneHandler::AddCircleSquare
|
||||
(const G4VMarker& marker,
|
||||
G4int nSides) {
|
||||
|
||||
const G4Colour& c = GetColour (Square);
|
||||
const G4Colour& c = GetColour (marker);
|
||||
glColor3d (c.GetRed (), c.GetGreen (), c.GetBlue ());
|
||||
|
||||
|
||||
if (fpViewer -> GetViewParameters ().IsMarkerNotHidden ())
|
||||
glDisable (GL_DEPTH_TEST);
|
||||
else glEnable (GL_DEPTH_TEST);
|
||||
|
||||
|
||||
glDisable (GL_LIGHTING);
|
||||
|
||||
G4VMarker::FillStyle style = Square.GetFillStyle();
|
||||
G4VMarker::FillStyle style = marker.GetFillStyle();
|
||||
|
||||
switch (style) {
|
||||
case G4VMarker::noFill:
|
||||
@@ -232,8 +143,16 @@ void G4OpenGLSceneHandler::AddPrimitive (const G4Square& Square) {
|
||||
break;
|
||||
|
||||
case G4VMarker::hashed:
|
||||
glPolygonMode (GL_FRONT_AND_BACK, GL_LINE);
|
||||
glLineStipple (1, 0x0101);
|
||||
/*
|
||||
G4cout << "Hashed fill style in G4OpenGLSceneHandler."
|
||||
<< "\n Not implemented. Using G4VMarker::filled."
|
||||
<< G4endl;
|
||||
*/
|
||||
glPolygonMode (GL_FRONT_AND_BACK, GL_FILL);
|
||||
glPolygonStipple (fStippleMaskHashed);
|
||||
// See also:
|
||||
// if (style == G4VMarker::filled || style == G4VMarker::hashed)...
|
||||
// (twice) below.
|
||||
break;
|
||||
|
||||
case G4VMarker::filled:
|
||||
@@ -241,77 +160,165 @@ void G4OpenGLSceneHandler::AddPrimitive (const G4Square& Square) {
|
||||
break;
|
||||
|
||||
default:
|
||||
G4cerr << "Unrecognised fill style for G4Square in G4OpenGLSceneHandler."
|
||||
<< "\nUsing G4VMarker::filled." << G4endl;
|
||||
G4cout << "Unrecognised fill style in G4OpenGLSceneHandler."
|
||||
<< "\n Using G4VMarker::filled."
|
||||
<< G4endl;
|
||||
glPolygonMode (GL_FRONT_AND_BACK, GL_FILL);
|
||||
break;
|
||||
|
||||
|
||||
}
|
||||
|
||||
G4Point3D centre = Square.GetPosition();
|
||||
// glTranslated (centre.x(), centre.y(), centre.z());
|
||||
|
||||
// G4double a = Square.GetWorldSize ();
|
||||
// if (a <= 0.0) {
|
||||
// a = 1000.0;
|
||||
// }
|
||||
|
||||
// glBegin (GL_LINE_LOOP);
|
||||
|
||||
// glVertex3d ( a, a, 0.);
|
||||
// glVertex3d (-a, a, 0.);
|
||||
// glVertex3d (-a, -a, 0.);
|
||||
// glVertex3d ( a, -a, 0.);
|
||||
|
||||
//Make sure we Draw squares...
|
||||
glDisable (GL_POINT_SMOOTH);
|
||||
|
||||
G4bool userSpecified = (Square.GetWorldSize() || Square.GetScreenSize());
|
||||
|
||||
// A few useful quantities...
|
||||
G4Point3D centre = marker.GetPosition();
|
||||
G4bool userSpecified = (marker.GetWorldSize() || marker.GetScreenSize());
|
||||
const G4VMarker& def = fpViewer -> GetViewParameters().GetDefaultMarker();
|
||||
|
||||
G4double size;
|
||||
const G4Vector3D& viewpointDirection =
|
||||
fpViewer -> GetViewParameters().GetViewpointDirection();
|
||||
const G4Vector3D& up = fpViewer->GetViewParameters().GetUpVector();
|
||||
G4double scale = fpViewer -> GetViewParameters().GetGlobalMarkerScale();
|
||||
if (size = scale * // Assignment intentional.
|
||||
userSpecified ? Square.GetWorldSize() : def.GetWorldSize()) {
|
||||
G4double size = scale *
|
||||
userSpecified ? marker.GetWorldSize() : def.GetWorldSize();
|
||||
|
||||
//Draw in world coordinates...
|
||||
// Find "size" of marker in world space (but see note below)...
|
||||
G4double worldSize;
|
||||
if (size) { // Size specified in world coordinates.
|
||||
worldSize = size;
|
||||
}
|
||||
else { // Size specified in screen (window) coordinates.
|
||||
|
||||
// Find window coordinates of centre...
|
||||
GLdouble modelMatrix[16];
|
||||
glGetDoublev (GL_MODELVIEW_MATRIX, modelMatrix);
|
||||
G4double projectionMatrix[16];
|
||||
glGetDoublev (GL_PROJECTION_MATRIX, projectionMatrix);
|
||||
GLint viewport[4];
|
||||
glGetIntegerv(GL_VIEWPORT,viewport);
|
||||
GLdouble winx, winy, winz;
|
||||
GLdouble* model_matrix = new GLdouble[16];
|
||||
GLdouble* proj_matrix = new GLdouble[16];
|
||||
GLint* v_port = new GLint[4];
|
||||
// glPointSize (5.0); //Still have to work out correspondance between
|
||||
// //world and screen units.
|
||||
glGetDoublev (GL_MODELVIEW_MATRIX, model_matrix);
|
||||
glGetDoublev (GL_PROJECTION_MATRIX, proj_matrix);
|
||||
glGetIntegerv (GL_VIEWPORT, v_port);
|
||||
gluProject (size, size, size,
|
||||
model_matrix,
|
||||
proj_matrix,
|
||||
v_port,
|
||||
&winx, &winy, &winz);
|
||||
glPointSize (winx);
|
||||
// glPointSize (5.0); //Still have to work out correspondance between
|
||||
// //world units and screen units...
|
||||
glBegin (GL_POINTS);
|
||||
glVertex3d (centre.x(), centre.y(), centre.z());
|
||||
glEnd ();
|
||||
delete[] model_matrix;
|
||||
delete[] proj_matrix;
|
||||
delete[] v_port;
|
||||
gluProject(centre.x(), centre.y(), centre.z(),
|
||||
modelMatrix, projectionMatrix, viewport,
|
||||
&winx, &winy, &winz);
|
||||
|
||||
// Determine ratio window:world...
|
||||
const G4Vector3D inScreen = (up.cross(viewpointDirection)).unit();
|
||||
const G4Vector3D p = centre + inScreen;
|
||||
GLdouble winDx, winDy, winDz;
|
||||
gluProject(p.x(), p.y(), p.z(),
|
||||
modelMatrix, projectionMatrix, viewport,
|
||||
&winDx, &winDy, &winDz);
|
||||
G4double winWorldRatio = sqrt(pow(winx - winDx, 2) +
|
||||
pow(winy - winDy, 2));
|
||||
G4double winSize = scale *
|
||||
userSpecified ? marker.GetScreenSize() : def.GetScreenSize();
|
||||
worldSize = winSize / winWorldRatio;
|
||||
}
|
||||
|
||||
// Draw...
|
||||
DrawXYPolygon (worldSize, centre, nSides);
|
||||
}
|
||||
|
||||
/***************************************************
|
||||
Note: We have to do it this way round so that when a global
|
||||
transformation is applied, such as with /vis/viewer/set/viewpoint,
|
||||
the markers follow the world coordinates without having to
|
||||
recreate the display lists. The down side is that the markers
|
||||
rotate. The only way to avoid this is to play with the modelview
|
||||
and projection matrices of OpenGL - which I need to think about.
|
||||
For future reference, here is the code to draw in window
|
||||
coordinates; it's down side is tha markers do not follow global
|
||||
transformations. Some clever stuff is needed.
|
||||
|
||||
...
|
||||
// Find window coordinates of centre...
|
||||
GLdouble modelMatrix[16];
|
||||
glGetDoublev (GL_MODELVIEW_MATRIX, modelMatrix);
|
||||
G4double projectionMatrix[16];
|
||||
glGetDoublev (GL_PROJECTION_MATRIX, projectionMatrix);
|
||||
GLint viewport[4];
|
||||
glGetIntegerv(GL_VIEWPORT,viewport);
|
||||
GLdouble winx, winy, winz;
|
||||
gluProject(centre.x(), centre.y(), centre.z(),
|
||||
modelMatrix, projectionMatrix, viewport,
|
||||
&winx, &winy, &winz);
|
||||
|
||||
// Find window size...
|
||||
G4double winSize;
|
||||
if (size) { // Size specified in world coordinates.
|
||||
// Determine size in window coordinates...
|
||||
(Note: improve this by using an inScreen vector as above.)
|
||||
GLdouble winx1, winy1, winz1;
|
||||
gluProject(centre.x() + size, centre.y() + size, centre.z() + size,
|
||||
modelMatrix, projectionMatrix, viewport,
|
||||
&winx1, &winy1, &winz1);
|
||||
winSize = sqrt((pow(winx - winx1, 2) +
|
||||
pow(winy - winy1, 2) +
|
||||
pow(winz - winz1, 2)) / 3.);
|
||||
}
|
||||
else {
|
||||
size = scale *
|
||||
userSpecified ? Square.GetScreenSize() : def.GetScreenSize();
|
||||
|
||||
// Draw in screen coordinates...
|
||||
glPointSize (size);
|
||||
glBegin (GL_POINTS);
|
||||
glVertex3d (centre.x(), centre.y(), centre.z());
|
||||
glEnd ();
|
||||
|
||||
winSize = scale *
|
||||
userSpecified ? marker.GetScreenSize() : def.GetScreenSize();
|
||||
}
|
||||
|
||||
// Prepare to draw in window coordinates...
|
||||
glMatrixMode (GL_PROJECTION);
|
||||
glPushMatrix();
|
||||
glLoadIdentity();
|
||||
gluOrtho2D(GLdouble(viewport[0]),
|
||||
GLdouble(viewport[0] + viewport[2]),
|
||||
GLdouble(viewport[1]),
|
||||
GLdouble(viewport[1] + viewport[3]));
|
||||
glMatrixMode (GL_MODELVIEW);
|
||||
glPushMatrix();
|
||||
glLoadIdentity();
|
||||
|
||||
// Draw in window coordinates...
|
||||
DrawScreenPolygon (winSize, G4Point3D(winx, winy, winz), nSides);
|
||||
|
||||
// Re-instate matrices...
|
||||
glMatrixMode (GL_PROJECTION);
|
||||
glPopMatrix();
|
||||
glMatrixMode (GL_MODELVIEW);
|
||||
glPopMatrix();
|
||||
...
|
||||
|
||||
void G4OpenGLSceneHandler::DrawScreenPolygon
|
||||
(G4double size,
|
||||
const G4Point3D& centre,
|
||||
G4int nSides) {
|
||||
glBegin (GL_POLYGON);
|
||||
const G4double dPhi = 2. * M_PI / nSides;
|
||||
const G4double r = size / 2.;
|
||||
G4double phi;
|
||||
G4int i;
|
||||
for (i = 0, phi = -dPhi / 2.; i < nSides; i++, phi += dPhi) {
|
||||
G4double x, y, z;
|
||||
x = centre.x() + r * cos(phi);
|
||||
y = centre.y() + r * sin(phi);
|
||||
z = centre.z();
|
||||
glVertex3d (x, y, z);
|
||||
}
|
||||
glEnd ();
|
||||
}
|
||||
**********************************************/
|
||||
|
||||
void G4OpenGLSceneHandler::DrawXYPolygon
|
||||
(G4double size,
|
||||
const G4Point3D& centre,
|
||||
G4int nSides) {
|
||||
const G4Vector3D& viewpointDirection =
|
||||
fpViewer -> GetViewParameters().GetViewpointDirection();
|
||||
const G4Vector3D& up = fpViewer->GetViewParameters().GetUpVector();
|
||||
const G4double dPhi = 2. * M_PI / nSides;
|
||||
const G4double radius = size / 2.;
|
||||
G4Vector3D start = radius * (up.cross(viewpointDirection)).unit();
|
||||
G4double phi;
|
||||
G4int i;
|
||||
glBegin (GL_POLYGON);
|
||||
for (i = 0, phi = -dPhi / 2.; i < nSides; i++, phi += dPhi) {
|
||||
G4Vector3D r = start; r.rotate(phi, viewpointDirection);
|
||||
G4Vector3D p = centre + r;
|
||||
glVertex3d (p.x(), p.y(), p.z());
|
||||
}
|
||||
glEnd ();
|
||||
}
|
||||
|
||||
//Method for handling G4Polyhedron objects for drawing solids.
|
||||
@@ -320,6 +327,8 @@ void G4OpenGLSceneHandler::AddPrimitive (const G4Polyhedron& polyhedron) {
|
||||
//Assume all facets are convex quadrilaterals.
|
||||
//Draw each G4Facet individually
|
||||
|
||||
if (polyhedron.GetNoFacets() == 0) return;
|
||||
|
||||
G4ViewParameters::DrawingStyle drawing_style = GetDrawingStyle (polyhedron);
|
||||
|
||||
//Get colour, etc..
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLStoredSceneHandler.cc,v 1.7 2000/04/12 13:09:07 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4OpenGLStoredSceneHandler.cc,v 1.9 2001/02/23 15:43:11 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
@@ -63,7 +63,8 @@ void G4OpenGLStoredSceneHandler::BeginPrimitives
|
||||
G4VSceneHandler::BeginPrimitives (objectTransformation);
|
||||
|
||||
if (fMemoryForDisplayLists) {
|
||||
if (!(fDisplayListId = glGenLists (1))) { // Could pre-allocate?
|
||||
fDisplayListId = glGenLists (1);
|
||||
if (!fDisplayListId) { // Could pre-allocate?
|
||||
G4cout << "********************* WARNING! ********************\n"
|
||||
<<"Unable to allocate any more display lists in OpenGL.\n "
|
||||
<< " Continuing drawing in IMMEDIATE MODE.\n"
|
||||
@@ -73,8 +74,8 @@ void G4OpenGLStoredSceneHandler::BeginPrimitives
|
||||
}
|
||||
if (fMemoryForDisplayLists) {
|
||||
if (fReadyForTransients) {
|
||||
fTODLList.append (fDisplayListId);
|
||||
fTODLTransformList.append (objectTransformation);
|
||||
fTODLList.push_back (fDisplayListId);
|
||||
fTODLTransformList.push_back (objectTransformation);
|
||||
glDrawBuffer (GL_FRONT);
|
||||
glPushMatrix();
|
||||
G4OpenGLTransform3D oglt (objectTransformation);
|
||||
@@ -82,8 +83,8 @@ void G4OpenGLStoredSceneHandler::BeginPrimitives
|
||||
glNewList (fDisplayListId, GL_COMPILE_AND_EXECUTE);
|
||||
}
|
||||
else {
|
||||
fPODLList.append (fDisplayListId);
|
||||
fPODLTransformList.append (objectTransformation);
|
||||
fPODLList.push_back (fDisplayListId);
|
||||
fPODLTransformList.push_back (objectTransformation);
|
||||
glNewList (fDisplayListId, GL_COMPILE);
|
||||
}
|
||||
} else {
|
||||
@@ -113,16 +114,16 @@ void G4OpenGLStoredSceneHandler::ClearStore () {
|
||||
int i;
|
||||
|
||||
// Delete OpenGL display lists.
|
||||
for (i = 0; i < fPODLList.entries (); i++) {
|
||||
if (fPODLList (i)) {
|
||||
glDeleteLists (fPODLList (i), 1);
|
||||
for (i = 0; i < fPODLList.size (); i++) {
|
||||
if (fPODLList [i]) {
|
||||
glDeleteLists (fPODLList [i], 1);
|
||||
} else {
|
||||
G4cerr << "Warning : NULL display List in fPODLList." << G4endl;
|
||||
}
|
||||
}
|
||||
for (i = 0; i < fTODLList.entries (); i++) {
|
||||
if (fTODLList (i)) {
|
||||
glDeleteLists (fTODLList (i), 1);
|
||||
for (i = 0; i < fTODLList.size (); i++) {
|
||||
if (fTODLList [i]) {
|
||||
glDeleteLists (fTODLList [i], 1);
|
||||
} else {
|
||||
G4cerr << "Warning : NULL display List in fTODLList." << G4endl;
|
||||
}
|
||||
@@ -157,11 +158,11 @@ void G4OpenGLStoredSceneHandler::EndModeling () {
|
||||
// }
|
||||
|
||||
glNewList (fTopPODL, GL_COMPILE); {
|
||||
for (int i = 0; i < fPODLList.entries (); i++) {
|
||||
for (int i = 0; i < fPODLList.size (); i++) {
|
||||
glPushMatrix();
|
||||
G4OpenGLTransform3D oglt (fPODLTransformList (i));
|
||||
G4OpenGLTransform3D oglt (fPODLTransformList [i]);
|
||||
glMultMatrixd (oglt.GetGLMatrix ());
|
||||
glCallList (fPODLList(i));
|
||||
glCallList (fPODLList[i]);
|
||||
glPopMatrix();
|
||||
}
|
||||
}
|
||||
@@ -187,8 +188,8 @@ void G4OpenGLStoredSceneHandler::RequestPrimitives (const G4VSolid& solid) {
|
||||
if (!(fpCurrentPV -> IsReplicated ()) &&
|
||||
(fSolidMap.find (pSolid) != fSolidMap.end ())) {
|
||||
fDisplayListId = fSolidMap [pSolid];
|
||||
fPODLList.append (fDisplayListId);
|
||||
fPODLTransformList.append (*fpObjectTransformation);
|
||||
fPODLList.push_back (fDisplayListId);
|
||||
fPODLTransformList.push_back (*fpObjectTransformation);
|
||||
}
|
||||
else {
|
||||
G4VSceneHandler::RequestPrimitives (solid);
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLStoredViewer.cc,v 1.4 1999/12/15 14:54:08 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4OpenGLStoredViewer.cc,v 1.5 2001/02/23 15:43:12 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 7th February 1997
|
||||
@@ -54,8 +54,8 @@ void G4OpenGLStoredViewer::KernelVisitDecision () {
|
||||
(lastVP.IsSection () != fVP.IsSection ()) ||
|
||||
// No need if section plane changes.
|
||||
(lastVP.IsCutaway () != fVP.IsCutaway ()) ||
|
||||
(lastVP.GetCutawayPlanes ().entries () !=
|
||||
fVP.GetCutawayPlanes ().entries ()) ||
|
||||
(lastVP.GetCutawayPlanes ().size () !=
|
||||
fVP.GetCutawayPlanes ().size ()) ||
|
||||
// No need if cutaway planes change.
|
||||
(lastVP.IsExplode () != fVP.IsExplode ()) ||
|
||||
(lastVP.GetNoOfSides () != fVP.GetNoOfSides ())
|
||||
@@ -81,12 +81,12 @@ void G4OpenGLStoredViewer::DrawDisplayLists () {
|
||||
|
||||
if (fSceneHandler.fTopPODL) glCallList (fSceneHandler.fTopPODL);
|
||||
|
||||
G4int nTODLs = fSceneHandler.fTODLList.entries ();
|
||||
G4int nTODLs = fSceneHandler.fTODLList.size ();
|
||||
for (int i = 0; i < nTODLs; i++) {
|
||||
glPushMatrix();
|
||||
G4OpenGLTransform3D oglt (fSceneHandler.fTODLTransformList (i));
|
||||
G4OpenGLTransform3D oglt (fSceneHandler.fTODLTransformList [i]);
|
||||
glMultMatrixd (oglt.GetGLMatrix ());
|
||||
glCallList (fSceneHandler.fTODLList(i));
|
||||
glCallList (fSceneHandler.fTODLList[i]);
|
||||
glPopMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLStoredWin32.cc,v 1.5 2000/08/19 18:34:33 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// OpenGLStoredWin32 graphics system factory.
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLStoredWin32Viewer.cc,v 1.2 1999/12/15 14:54:08 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// Class G4OpenGLStoredWin32Viewer : a class derived from G4OpenGLWin32Viewer and
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLStoredX.cc,v 1.6 2000/08/19 18:34:36 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLStoredXViewer.cc,v 1.4 2000/05/22 08:16:36 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 7th February 1997
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLStoredXm.cc,v 1.5 2000/08/19 18:34:38 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLStoredXmViewer.cc,v 1.3 2000/05/22 08:16:42 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4OpenGLStoredXmViewer.cc,v 1.4 2001/02/03 18:39:33 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
@@ -59,6 +59,8 @@ G4VViewer (scene, scene.IncrementViewCount (), name) {
|
||||
glShadeModel (GL_FLAT);
|
||||
}
|
||||
|
||||
G4OpenGLStoredXmViewer::~G4OpenGLStoredXmViewer () {}
|
||||
|
||||
void G4OpenGLStoredXmViewer::DrawView () {
|
||||
|
||||
if (white_background == true) {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLTransform3D.cc,v 1.3 1999/12/15 14:54:08 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 24th October 1996
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLViewer.cc,v 1.8 2000/05/22 08:09:15 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4OpenGLViewer.cc,v 1.10 2001/02/04 20:24:38 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 27th March 1996
|
||||
@@ -49,6 +49,10 @@ transparency_enabled (False),
|
||||
antialiasing_enabled (False),
|
||||
haloing_enabled (False)
|
||||
{
|
||||
// Make changes to view parameters for OpenGL...
|
||||
fVP.SetAutoRefresh(true);
|
||||
fDefaultVP.SetAutoRefresh(true);
|
||||
|
||||
// glClearColor (0.0, 0.0, 0.0, 0.0);
|
||||
// glClearDepth (1.0);
|
||||
// glDisable (GL_BLEND);
|
||||
@@ -98,7 +102,7 @@ void G4OpenGLViewer::SetView () {
|
||||
|
||||
// Get radius of scene, etc.
|
||||
// Note that this procedure properly takes into account zoom, dolly and pan.
|
||||
const G4Point3D& targetPoint
|
||||
const G4Point3D targetPoint
|
||||
= fSceneHandler.GetScene()->GetStandardTargetPoint()
|
||||
+ fVP.GetCurrentTargetPoint ();
|
||||
G4double radius = fSceneHandler.GetScene()->GetExtent().GetExtentRadius();
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLWin32Viewer.cc,v 1.2 1999/12/15 14:54:09 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// G4OpenGLWin32Viewer : Class to provide WindowsNT specific
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLXViewer.cc,v 1.8 2000/05/22 08:07:20 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4OpenGLXViewer.cc,v 1.9 2001/02/03 18:39:37 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 7th February 1997
|
||||
@@ -260,14 +260,16 @@ vectored_ps (true)
|
||||
<< G4endl;
|
||||
}
|
||||
|
||||
if (vi_immediate = vi_single_buffer) {
|
||||
if (vi_single_buffer) {
|
||||
vi_immediate = vi_single_buffer;
|
||||
attributeList = snglBuf_RGBA;
|
||||
doublebuffer = false;
|
||||
}
|
||||
|
||||
if (!vi_immediate){
|
||||
// next try for a double buffered RGB, but Draw to top buffer
|
||||
if (vi_immediate = vi_double_buffer) {
|
||||
if (vi_double_buffer) {
|
||||
vi_immediate = vi_double_buffer;
|
||||
attributeList = dblBuf_RGBA;
|
||||
doublebuffer = true;
|
||||
}
|
||||
@@ -275,11 +277,19 @@ vectored_ps (true)
|
||||
|
||||
// Now try for a visual suitable for OpenGLStored...
|
||||
// Try for a double buffered RGB window
|
||||
if (vi_stored = vi_double_buffer) {
|
||||
if (vi_double_buffer) {
|
||||
vi_stored = vi_double_buffer;
|
||||
attributeList = dblBuf_RGBA;
|
||||
doublebuffer = true;
|
||||
}
|
||||
|
||||
if (!vi_immediate || !vi_stored) {
|
||||
G4cout <<
|
||||
"G4OpenGLXViewer::G4OpenGLXViewer: unable to get required visuals."
|
||||
<< G4endl;
|
||||
fViewId = -1; // This flags an error.
|
||||
}
|
||||
|
||||
// glClearColor (0., 0., 0., 0.);
|
||||
// glClearDepth (1.);
|
||||
|
||||
@@ -681,8 +691,8 @@ extern "C"
|
||||
static int
|
||||
compare(const void *a, const void *b)
|
||||
{
|
||||
DepthIndex *p1 = (DepthIndex *) a;
|
||||
DepthIndex *p2 = (DepthIndex *) b;
|
||||
const DepthIndex *p1 = (DepthIndex *) a;
|
||||
const DepthIndex *p2 = (DepthIndex *) b;
|
||||
GLfloat diff = p2->depth - p1->depth;
|
||||
|
||||
if (diff > 0.0) {
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLXmBox.cc,v 1.3 1999/12/15 14:54:09 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4OpenGLXmBox.cc,v 1.4 2001/03/07 14:56:18 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//Box container class
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#include "G4OpenGLXmVWidgetComponent.hh"
|
||||
#include "G4OpenGLXmVWidgetShell.hh"
|
||||
|
||||
G4OpenGLXmBox::G4OpenGLXmBox (char* n,
|
||||
G4OpenGLXmBox::G4OpenGLXmBox (const char* n,
|
||||
G4bool r)
|
||||
{
|
||||
name = n;
|
||||
@@ -76,12 +76,12 @@ Widget* G4OpenGLXmBox::GetPointerToWidget ()
|
||||
return &box_row_col;
|
||||
}
|
||||
|
||||
char* G4OpenGLXmBox::GetName ()
|
||||
const char* G4OpenGLXmBox::GetName ()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
void G4OpenGLXmBox::SetName (char* n)
|
||||
void G4OpenGLXmBox::SetName (const char* n)
|
||||
{
|
||||
name = n;
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLXmConvenienceRoutines.cc,v 1.3 1999/12/15 14:54:09 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 16th April 1997
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLXmFourArrowButtons.cc,v 1.3 1999/12/15 14:54:09 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//Four arrow buttons class. Inherits from G4OpenGLXmVWidgetComponent
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLXmFramedBox.cc,v 1.3 1999/12/15 14:54:09 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4OpenGLXmFramedBox.cc,v 1.4 2001/03/07 14:56:19 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//Framed box container class
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#include "G4OpenGLXmVWidgetComponent.hh"
|
||||
#include "G4OpenGLXmVWidgetShell.hh"
|
||||
|
||||
G4OpenGLXmFramedBox::G4OpenGLXmFramedBox (char* n,
|
||||
G4OpenGLXmFramedBox::G4OpenGLXmFramedBox (const char* n,
|
||||
G4bool r) :
|
||||
G4OpenGLXmBox (n, r)
|
||||
{
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user