Import Geant4 3.2.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 16:10:37 +02:00
parent 137e303ecc
commit 36c080dca6
3464 changed files with 119310 additions and 52696 deletions
@@ -1,12 +1,28 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4OpenGLImmediateSceneHandler.cc,v 1.3 1999/12/15 14:54:07 gunter Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: G4OpenGLImmediateSceneHandler.cc,v 1.3.4.1 2001/06/28 19:15:42 gunter Exp $
// GEANT4 tag $Name: $
//
//
// Andrew Walkden 10th February 1997
@@ -1,12 +1,28 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4OpenGLImmediateViewer.cc,v 1.3 1999/12/15 14:54:07 gunter Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: G4OpenGLImmediateViewer.cc,v 1.3.4.1 2001/06/28 19:15:42 gunter Exp $
// GEANT4 tag $Name: $
//
//
// Andrew Walkden 7th February 1997
@@ -1,12 +1,28 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4OpenGLImmediateWin32.cc,v 1.5 2000/08/19 18:34:26 johna Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: G4OpenGLImmediateWin32.cc,v 1.5.4.1 2001/06/28 19:15:42 gunter Exp $
// GEANT4 tag $Name: $
//
//
// OpenGLImmediateWin32 graphics system factory.
@@ -1,12 +1,28 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4OpenGLImmediateWin32Viewer.cc,v 1.2 1999/12/15 14:54:07 gunter Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: G4OpenGLImmediateWin32Viewer.cc,v 1.2.4.1 2001/06/28 19:15:42 gunter Exp $
// GEANT4 tag $Name: $
//
//
// Class G4OpenGLImmediateWin32Viewer : a class derived from G4OpenGLWin32Viewer and
@@ -1,12 +1,28 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4OpenGLImmediateX.cc,v 1.6 2000/08/19 18:34:28 johna Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: G4OpenGLImmediateX.cc,v 1.6.4.1 2001/06/28 19:15:42 gunter Exp $
// GEANT4 tag $Name: $
//
//
// Andrew Walkden 27th March 1996
@@ -1,12 +1,28 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4OpenGLImmediateXViewer.cc,v 1.4 2000/05/22 08:16:25 johna Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: G4OpenGLImmediateXViewer.cc,v 1.4.4.1 2001/06/28 19:15:42 gunter Exp $
// GEANT4 tag $Name: $
//
//
// Andrew Walkden 7th February 1997
@@ -1,12 +1,28 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4OpenGLImmediateXm.cc,v 1.6 2001/02/03 18:39:29 johna Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: G4OpenGLImmediateXm.cc,v 1.6.2.1 2001/06/28 19:15:42 gunter Exp $
// GEANT4 tag $Name: $
//
//
// Andrew Walkden 10th February 1997
@@ -1,12 +1,28 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4OpenGLImmediateXmViewer.cc,v 1.4 2001/02/03 18:39:30 johna Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: G4OpenGLImmediateXmViewer.cc,v 1.4.2.1 2001/06/28 19:15:43 gunter Exp $
// GEANT4 tag $Name: $
//
//
// Andrew Walkden 10th February 1997
@@ -1,12 +1,28 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4OpenGLSceneHandler.cc,v 1.8 2001/01/25 15:28:09 johna Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: G4OpenGLSceneHandler.cc,v 1.10.2.1 2001/06/28 19:15:43 gunter Exp $
// GEANT4 tag $Name: $
//
//
// Andrew Walkden 27th March 1996
@@ -88,12 +104,12 @@ void G4OpenGLSceneHandler::AddPrimitive (const G4Polyline& line)
glDisable (GL_LIGHTING);
glBegin (GL_LINE_STRIP);
G4int nPoints = line.entries ();
G4int nPoints = line.size ();
for (G4int iPoint = 0; iPoint < nPoints; iPoint++) {
G4double x, y, z;
x = line(iPoint).x();
y = line(iPoint).y();
z = line(iPoint).z();
x = line[iPoint].x();
y = line[iPoint].y();
z = line[iPoint].z();
glVertex3d (x, y, z);
}
glEnd ();
@@ -108,7 +124,7 @@ void G4OpenGLSceneHandler::AddPrimitive (const G4Text& text) {
<< "\" at " << text.GetPosition ()
<< ", size " << size
<< ", offsets " << text.GetXOffset () << ", " << text.GetYOffset ()
<< ", type " << sizeType
<< ", type " << G4int(sizeType)
<< G4endl;
}
@@ -1,12 +1,28 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4OpenGLStoredSceneHandler.cc,v 1.9 2001/02/23 15:43:11 johna Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: G4OpenGLStoredSceneHandler.cc,v 1.10.2.1 2001/06/28 19:15:43 gunter Exp $
// GEANT4 tag $Name: $
//
//
// Andrew Walkden 10th February 1997
@@ -111,7 +127,7 @@ void G4OpenGLStoredSceneHandler::ClearStore () {
G4VSceneHandler::ClearStore (); // Sets need kernel visit, etc.
int i;
size_t i;
// Delete OpenGL display lists.
for (i = 0; i < fPODLList.size (); i++) {
@@ -158,7 +174,7 @@ void G4OpenGLStoredSceneHandler::EndModeling () {
// }
glNewList (fTopPODL, GL_COMPILE); {
for (int i = 0; i < fPODLList.size (); i++) {
for (size_t i = 0; i < fPODLList.size (); i++) {
glPushMatrix();
G4OpenGLTransform3D oglt (fPODLTransformList [i]);
glMultMatrixd (oglt.GetGLMatrix ());
@@ -1,12 +1,28 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4OpenGLStoredViewer.cc,v 1.5 2001/02/23 15:43:12 johna Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: G4OpenGLStoredViewer.cc,v 1.5.2.1 2001/06/28 19:15:43 gunter Exp $
// GEANT4 tag $Name: $
//
//
// Andrew Walkden 7th February 1997
@@ -1,12 +1,28 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4OpenGLStoredWin32.cc,v 1.5 2000/08/19 18:34:33 johna Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: G4OpenGLStoredWin32.cc,v 1.5.4.1 2001/06/28 19:15:43 gunter Exp $
// GEANT4 tag $Name: $
//
//
// OpenGLStoredWin32 graphics system factory.
@@ -1,12 +1,28 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4OpenGLStoredWin32Viewer.cc,v 1.2 1999/12/15 14:54:08 gunter Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: G4OpenGLStoredWin32Viewer.cc,v 1.2.4.1 2001/06/28 19:15:43 gunter Exp $
// GEANT4 tag $Name: $
//
//
// Class G4OpenGLStoredWin32Viewer : a class derived from G4OpenGLWin32Viewer and
@@ -1,12 +1,28 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4OpenGLStoredX.cc,v 1.6 2000/08/19 18:34:36 johna Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: G4OpenGLStoredX.cc,v 1.6.4.1 2001/06/28 19:15:43 gunter Exp $
// GEANT4 tag $Name: $
//
//
// Andrew Walkden 10th February 1997
@@ -1,12 +1,28 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4OpenGLStoredXViewer.cc,v 1.4 2000/05/22 08:16:36 johna Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: G4OpenGLStoredXViewer.cc,v 1.4.4.1 2001/06/28 19:15:43 gunter Exp $
// GEANT4 tag $Name: $
//
//
// Andrew Walkden 7th February 1997
@@ -1,12 +1,28 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4OpenGLStoredXm.cc,v 1.5 2000/08/19 18:34:38 johna Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: G4OpenGLStoredXm.cc,v 1.5.4.1 2001/06/28 19:15:43 gunter Exp $
// GEANT4 tag $Name: $
//
//
// Andrew Walkden 10th February 1997
@@ -1,12 +1,28 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4OpenGLStoredXmViewer.cc,v 1.4 2001/02/03 18:39:33 johna Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: G4OpenGLStoredXmViewer.cc,v 1.4.2.1 2001/06/28 19:15:44 gunter Exp $
// GEANT4 tag $Name: $
//
//
// Andrew Walkden 10th February 1997
@@ -1,12 +1,28 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4OpenGLTransform3D.cc,v 1.3 1999/12/15 14:54:08 gunter Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: G4OpenGLTransform3D.cc,v 1.3.4.1 2001/06/28 19:15:44 gunter Exp $
// GEANT4 tag $Name: $
//
//
// Andrew Walkden 24th October 1996
@@ -1,12 +1,28 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4OpenGLViewer.cc,v 1.10 2001/02/04 20:24:38 johna Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: G4OpenGLViewer.cc,v 1.11.2.1 2001/06/28 19:15:44 gunter Exp $
// GEANT4 tag $Name: $
//
//
// Andrew Walkden 27th March 1996
@@ -43,11 +59,11 @@ int G4OpenGLViewer::dblBuf_RGBA[11] =
G4OpenGLViewer::G4OpenGLViewer (G4OpenGLSceneHandler& scene):
G4VViewer (scene, -1),
fSceneHandler (scene),
white_background (False),
transparency_enabled (False),
antialiasing_enabled (False),
haloing_enabled (False)
haloing_enabled (False),
fSceneHandler (scene)
{
// Make changes to view parameters for OpenGL...
fVP.SetAutoRefresh(true);
@@ -1,12 +1,28 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4OpenGLWin32Viewer.cc,v 1.2 1999/12/15 14:54:09 gunter Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: G4OpenGLWin32Viewer.cc,v 1.2.4.1 2001/06/28 19:15:44 gunter Exp $
// GEANT4 tag $Name: $
//
//
// G4OpenGLWin32Viewer : Class to provide WindowsNT specific
@@ -1,12 +1,28 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4OpenGLXViewer.cc,v 1.9 2001/02/03 18:39:37 johna Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: G4OpenGLXViewer.cc,v 1.10.2.1 2001/06/28 19:15:44 gunter Exp $
// GEANT4 tag $Name: $
//
//
// Andrew Walkden 7th February 1997
@@ -44,6 +60,36 @@
#define USE_DEFAULT_COLORMAP 1
#define USE_STANDARD_COLORMAP 0
static const char* gouraudtriangleEPS[] =
{
"/bd{bind def}bind def /triangle { aload pop setrgbcolor aload pop 5 3",
"roll 4 2 roll 3 2 roll exch moveto lineto lineto closepath fill } bd",
"/computediff1 { 2 copy sub abs threshold ge {pop pop pop true} { exch 2",
"index sub abs threshold ge { pop pop true} { sub abs threshold ge } ifelse",
"} ifelse } bd /computediff3 { 3 copy 0 get 3 1 roll 0 get 3 1 roll 0 get",
"computediff1 {true} { 3 copy 1 get 3 1 roll 1 get 3 1 roll 1 get",
"computediff1 {true} { 3 copy 2 get 3 1 roll 2 get 3 1 roll 2 get",
"computediff1 } ifelse } ifelse } bd /middlecolor { aload pop 4 -1 roll",
"aload pop 4 -1 roll add 2 div 5 1 roll 3 -1 roll add 2 div 3 1 roll add 2",
"div 3 1 roll exch 3 array astore } bd /gouraudtriangle { computediff3 { 4",
"-1 roll aload 7 1 roll 6 -1 roll pop 3 -1 roll pop add 2 div 3 1 roll add",
"2 div exch 3 -1 roll aload 7 1 roll exch pop 4 -1 roll pop add 2 div 3 1",
"roll add 2 div exch 3 -1 roll aload 7 1 roll pop 3 -1 roll pop add 2 div 3",
"1 roll add 2 div exch 7 3 roll 10 -3 roll dup 3 index middlecolor 4 1 roll",
"2 copy middlecolor 4 1 roll 3 copy pop middlecolor 4 1 roll 13 -1 roll",
"aload pop 17 index 6 index 15 index 19 index 6 index 17 index 6 array",
"astore 10 index 10 index 14 index gouraudtriangle 17 index 5 index 17",
"index 19 index 5 index 19 index 6 array astore 10 index 9 index 13 index",
"gouraudtriangle 13 index 16 index 5 index 15 index 18 index 5 index 6",
"array astore 12 index 12 index 9 index gouraudtriangle 17 index 16 index",
"15 index 19 index 18 index 17 index 6 array astore 10 index 12 index 14",
"index gouraudtriangle 18 {pop} repeat } { aload pop 5 3 roll aload pop 7 3",
"roll aload pop 9 3 roll 4 index 6 index 4 index add add 3 div 10 1 roll 7",
"index 5 index 3 index add add 3 div 10 1 roll 6 index 4 index 2 index add",
"add 3 div 10 1 roll 9 {pop} repeat 3 array astore triangle } ifelse } bd",
NULL
};
XVisualInfo* G4OpenGLXViewer::vi_single_buffer = 0;
XVisualInfo* G4OpenGLXViewer::vi_double_buffer = 0;
@@ -184,7 +230,7 @@ void G4OpenGLXViewer::CreateMainWindow () {
strncpy (charViewName, fName, 100);
char *window_name = charViewName;
char *icon_name = charViewName;
char tmpatom[] = "XA_WM_NORMAL_HINTS";
//char tmpatom[] = "XA_WM_NORMAL_HINTS";
size_hints = XAllocSizeHints();
wm_hints = XAllocWMHints();
class_hints = XAllocClassHint();
@@ -226,11 +272,11 @@ void G4OpenGLXViewer::CreateMainWindow () {
G4OpenGLXViewer::G4OpenGLXViewer (G4OpenGLSceneHandler& scene):
G4VViewer (scene, -1),
G4OpenGLViewer (scene), //ajw
vi_immediate (0),
vi_stored (0),
G4OpenGLViewer (scene),
print_colour (true),
vectored_ps (true)
vectored_ps (true),
vi_immediate (0),
vi_stored (0)
{
strcpy (print_string, "G4OpenGL.eps");
@@ -1,12 +1,28 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4OpenGLXmBox.cc,v 1.4 2001/03/07 14:56:18 johna Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: G4OpenGLXmBox.cc,v 1.4.2.1 2001/06/28 19:15:44 gunter Exp $
// GEANT4 tag $Name: $
//
//Box container class
@@ -1,12 +1,28 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4OpenGLXmConvenienceRoutines.cc,v 1.3 1999/12/15 14:54:09 gunter Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: G4OpenGLXmConvenienceRoutines.cc,v 1.5.2.1 2001/06/28 19:15:44 gunter Exp $
// GEANT4 tag $Name: $
//
//
// Andrew Walkden 16th April 1997
@@ -19,7 +35,6 @@
#ifdef G4VIS_BUILD_OPENGLXM_DRIVER
//#include "G4OpenGLXmConvenienceRoutines.hh"
#include "G4OpenGLXmViewer.hh"
void G4OpenGLXmViewer::Add_four_arrow_buttons (G4OpenGLXmViewer* pView,
@@ -216,17 +231,20 @@ void G4OpenGLXmViewer::Add_radio_box (char* label_string,
NULL);
XmString lab = XmStringCreateLocalized (label_string);
Widget label = XtVaCreateManagedWidget ("radio_label",
xmLabelWidgetClass,
radio_box,
XmNalignment, XmALIGNMENT_CENTER,
XmNlabelString, lab,
XtNvisual, pView->vi->visual,
XtNdepth, pView->vi->depth,
XtNcolormap, pView->cmap,
XtNborderColor, pView->borcol,
XtNbackground, pView->bgnd,
NULL);
// Unused!
//Widget label = XtVaCreateManagedWidget ("radio_label",
// xmLabelWidgetClass,
// radio_box,
// XmNalignment, XmALIGNMENT_CENTER,
// XmNlabelString, lab,
// XtNvisual, pView->vi->visual,
// XtNdepth, pView->vi->depth,
// XtNcolormap, pView->cmap,
// XtNborderColor, pView->borcol,
// XtNbackground, pView->bgnd,
// NULL);
XmStringFree (lab);
for (i = 0; i < num_buttons; i++) {
@@ -277,20 +295,23 @@ void G4OpenGLXmViewer::Add_set_field (char* w_name,
strcat (text_field_name, "_text_field");
XmString local_text = XmStringCreateLocalized (local_w_text);
Widget label = XtVaCreateManagedWidget (label_name,
xmLabelWidgetClass,
*row_col_box,
XmNlabelString, local_text,
XtNvisual, pView->vi->visual,
XtNdepth, pView->vi->depth,
XtNcolormap, pView->cmap,
XtNborderColor, pView->borcol,
XtNbackground, pView->bgnd,
NULL);
// Unused!
// Widget label = XtVaCreateManagedWidget (label_name,
// xmLabelWidgetClass,
// *row_col_box,
// XmNlabelString, local_text,
// XtNvisual, pView->vi->visual,
// XtNdepth, pView->vi->depth,
// XtNcolormap, pView->cmap,
// XtNborderColor, pView->borcol,
// XtNbackground, pView->bgnd,
// NULL);
XmStringFree (local_text);
char initial[50];
sprintf (initial, "%6.2f\0", *val);
sprintf (initial, "%6.2f", *val);
*wid = XtVaCreateManagedWidget (text_field_name,
xmTextFieldWidgetClass,
@@ -305,7 +326,7 @@ void G4OpenGLXmViewer::Add_set_field (char* w_name,
XtAddCallback (*wid,
XmNvalueChangedCallback,
G4OpenGLXmViewer::get_double_value_callback,
get_double_value_callback,
val);
Widget sep = XtVaCreateManagedWidget ("sep",
@@ -405,17 +426,19 @@ void G4OpenGLXmViewer::Add_slider_box (char* label_string,
XmString lab = XmStringCreateLocalized (label_string);
Widget label = XtVaCreateManagedWidget ("slider_label",
xmLabelWidgetClass,
slider_box,
XmNlabelString, lab,
XmNalignment, XmALIGNMENT_CENTER,
XtNvisual, pView->vi->visual,
XtNdepth, pView->vi->depth,
XtNcolormap, pView->cmap,
XtNborderColor, pView->borcol,
XtNbackground, pView->bgnd,
NULL);
// Unused!
//Widget label = XtVaCreateManagedWidget ("slider_label",
// xmLabelWidgetClass,
// slider_box,
// XmNlabelString, lab,
// XmNalignment, XmALIGNMENT_CENTER,
// XtNvisual, pView->vi->visual,
// XtNdepth, pView->vi->depth,
// XtNcolormap, pView->cmap,
// XtNborderColor, pView->borcol,
// XtNbackground, pView->bgnd,
// NULL);
XmStringFree (lab);
for (i = 0; i < num_sliders; i++) {
@@ -1,12 +1,28 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4OpenGLXmFourArrowButtons.cc,v 1.3 1999/12/15 14:54:09 gunter Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: G4OpenGLXmFourArrowButtons.cc,v 1.3.4.1 2001/06/28 19:15:44 gunter Exp $
// GEANT4 tag $Name: $
//
//Four arrow buttons class. Inherits from G4OpenGLXmVWidgetComponent
@@ -1,12 +1,28 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4OpenGLXmFramedBox.cc,v 1.4 2001/03/07 14:56:19 johna Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: G4OpenGLXmFramedBox.cc,v 1.4.2.1 2001/06/28 19:15:45 gunter Exp $
// GEANT4 tag $Name: $
//
//Framed box container class
@@ -1,12 +1,28 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4OpenGLXmMainMenubarCallbacks.cc,v 1.7 2001/01/25 12:09:57 johna Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: G4OpenGLXmMainMenubarCallbacks.cc,v 1.8.2.1 2001/06/28 19:15:45 gunter Exp $
// GEANT4 tag $Name: $
//
//
// Andrew Walkden 16th April 1997
@@ -71,7 +87,7 @@ void G4OpenGLXmViewer::actions_callback (Widget w,
pView->fprotation_top->AddChild (pView->fprotation_button_box);
XtCallbackRec* rot_cb_list = new XtCallbackRec[2];
rot_cb_list[0].callback = G4OpenGLXmViewer::set_rot_subject_callback;
rot_cb_list[0].callback = set_rot_subject_callback;
rot_cb_list[0].closure = pView;
rot_cb_list[1].callback = NULL;
@@ -94,7 +110,7 @@ void G4OpenGLXmViewer::actions_callback (Widget w,
pView->fprotation_top->AddChild (pView->fprotation_slider_box);
XtCallbackRec* rot_slider_list = new XtCallbackRec[2];
rot_slider_list[0].callback = G4OpenGLXmViewer::set_rot_sens_callback;
rot_slider_list[0].callback = set_rot_sens_callback;
rot_slider_list[0].closure = pView;
rot_slider_list[1].callback = NULL;
@@ -114,19 +130,19 @@ void G4OpenGLXmViewer::actions_callback (Widget w,
for (G4int i = 0; i < 4; i++) {
rotation_callbacks[i] = new XtCallbackRec[2];
}
rotation_callbacks[0][0].callback = G4OpenGLXmViewer::phi_rotation_callback;
rotation_callbacks[0][0].callback = phi_rotation_callback;
rotation_callbacks[0][0].closure = pView;
rotation_callbacks[0][1].callback = NULL;
rotation_callbacks[1][0].callback = G4OpenGLXmViewer::phi_rotation_callback;
rotation_callbacks[1][0].callback = phi_rotation_callback;
rotation_callbacks[1][0].closure = pView;
rotation_callbacks[1][1].callback = NULL;
rotation_callbacks[2][0].callback = G4OpenGLXmViewer::theta_rotation_callback;
rotation_callbacks[2][0].callback = theta_rotation_callback;
rotation_callbacks[2][0].closure = pView;
rotation_callbacks[2][1].callback = NULL;
rotation_callbacks[3][0].callback = G4OpenGLXmViewer::theta_rotation_callback;
rotation_callbacks[3][0].callback = theta_rotation_callback;
rotation_callbacks[3][0].closure = pView;
rotation_callbacks[3][1].callback = NULL;
@@ -163,19 +179,19 @@ void G4OpenGLXmViewer::actions_callback (Widget w,
for (G4int i = 0; i < 4; i++) {
pan_callbacks[i] = new XtCallbackRec[2];
}
pan_callbacks[0][0].callback = G4OpenGLXmViewer::pan_up_down_callback;
pan_callbacks[0][0].callback = pan_up_down_callback;
pan_callbacks[0][0].closure = pView;
pan_callbacks[0][1].callback = NULL;
pan_callbacks[1][0].callback = G4OpenGLXmViewer::pan_up_down_callback;
pan_callbacks[1][0].callback = pan_up_down_callback;
pan_callbacks[1][0].closure = pView;
pan_callbacks[1][1].callback = NULL;
pan_callbacks[2][0].callback = G4OpenGLXmViewer::pan_left_right_callback;
pan_callbacks[2][0].callback = pan_left_right_callback;
pan_callbacks[2][0].closure = pView;
pan_callbacks[2][1].callback = NULL;
pan_callbacks[3][0].callback = G4OpenGLXmViewer::pan_left_right_callback;
pan_callbacks[3][0].callback = pan_left_right_callback;
pan_callbacks[3][0].closure = pView;
pan_callbacks[3][1].callback = NULL;
@@ -184,7 +200,7 @@ void G4OpenGLXmViewer::actions_callback (Widget w,
pView->fppanning_box->AddChild (pView->fppanning_arrows);
XtCallbackRec* pan_slider_list = new XtCallbackRec[2];
pan_slider_list[0].callback = G4OpenGLXmViewer::set_pan_sens_callback;
pan_slider_list[0].callback = set_pan_sens_callback;
pan_slider_list[0].closure = pView;
pan_slider_list[1].callback = NULL;
@@ -202,7 +218,7 @@ void G4OpenGLXmViewer::actions_callback (Widget w,
pView->fppanning_top->AddChild (pView->fpzoom_box);
XtCallbackRec* zoom_slider_list = new XtCallbackRec[2];
zoom_slider_list[0].callback = G4OpenGLXmViewer::zoom_callback;
zoom_slider_list[0].callback = zoom_callback;
zoom_slider_list[0].closure = pView;
zoom_slider_list[1].callback = NULL;
@@ -220,7 +236,7 @@ void G4OpenGLXmViewer::actions_callback (Widget w,
pView->fppanning_top->AddChild (pView->fpdolly_box);
XtCallbackRec* dolly_slider_list = new XtCallbackRec[2];
dolly_slider_list[0].callback = G4OpenGLXmViewer::dolly_callback;
dolly_slider_list[0].callback = dolly_callback;
dolly_slider_list[0].closure = pView;
dolly_slider_list[1].callback = NULL;
@@ -277,7 +293,7 @@ void G4OpenGLXmViewer::actions_callback (Widget w,
&(pView->dolly_low));
XtCallbackRec* ok_list = new XtCallbackRec[2];
ok_list[0].callback = G4OpenGLXmViewer::update_panels_callback;
ok_list[0].callback = update_panels_callback;
ok_list[0].closure = pView;
ok_list[1].callback = NULL;
@@ -339,7 +355,7 @@ void G4OpenGLXmViewer::misc_callback (Widget w,
pView->fpmiscellany_top->AddChild (pView->fpwobble_box);
XtCallbackRec* wob_cb_list = new XtCallbackRec[2];
wob_cb_list[0].callback = G4OpenGLXmViewer::wobble_callback;
wob_cb_list[0].callback = wobble_callback;
wob_cb_list[0].closure = pView;
wob_cb_list[1].callback = NULL;
@@ -348,7 +364,7 @@ void G4OpenGLXmViewer::misc_callback (Widget w,
wob_cb_list);
XtCallbackRec* wobble_slider_list = new XtCallbackRec[2];
wobble_slider_list[0].callback = G4OpenGLXmViewer::set_wob_sens_callback;
wobble_slider_list[0].callback = set_wob_sens_callback;
wobble_slider_list[0].closure = pView;
wobble_slider_list[1].callback = NULL;
@@ -367,9 +383,9 @@ void G4OpenGLXmViewer::misc_callback (Widget w,
pView->fpmiscellany_top->AddChild (pView->fpreset_box);
XtCallbackRec* rst_cb_list = new XtCallbackRec[3];
rst_cb_list[0].callback = G4OpenGLXmViewer::reset_callback;
rst_cb_list[0].callback = reset_callback;
rst_cb_list[0].closure = pView;
rst_cb_list[1].callback = G4OpenGLXmViewer::update_panels_callback;
rst_cb_list[1].callback = update_panels_callback;
rst_cb_list[1].closure = pView;
rst_cb_list[2].callback = NULL;
@@ -383,7 +399,7 @@ void G4OpenGLXmViewer::misc_callback (Widget w,
pView->fpmiscellany_top->AddChild (pView->fpproj_style_box);
XtCallbackRec* proj_cb_list = new XtCallbackRec[2];
proj_cb_list[0].callback = G4OpenGLXmViewer::projection_callback;
proj_cb_list[0].callback = projection_callback;
proj_cb_list[0].closure = pView;
proj_cb_list[1].callback = NULL;
@@ -440,7 +456,7 @@ void G4OpenGLXmViewer::misc_callback (Widget w,
pView->fpprint_top->AddChild (pView->fpprint_col_box);
XtCallbackRec* prcol_cb_list = new XtCallbackRec[2];
prcol_cb_list[0].callback = G4OpenGLXmViewer::set_print_colour_callback;
prcol_cb_list[0].callback = set_print_colour_callback;
prcol_cb_list[0].closure = pView;
prcol_cb_list[1].callback = NULL;
@@ -462,7 +478,7 @@ void G4OpenGLXmViewer::misc_callback (Widget w,
pView->fpprint_top->AddChild (pView->fpprint_style_box);
XtCallbackRec* prsty_cb_list = new XtCallbackRec[2];
prsty_cb_list[0].callback = G4OpenGLXmViewer::set_print_style_callback;
prsty_cb_list[0].callback = set_print_style_callback;
prsty_cb_list[0].closure = pView;
prsty_cb_list[1].callback = NULL;
@@ -487,7 +503,7 @@ void G4OpenGLXmViewer::misc_callback (Widget w,
pView->fpprint_box->AddChild (pView->fpprint_line);
XtCallbackRec* pri_cb_list = new XtCallbackRec[2];
pri_cb_list[0].callback = G4OpenGLXmViewer::print_callback;
pri_cb_list[0].callback = print_callback;
pri_cb_list[0].closure = pView;
pri_cb_list[1].callback = NULL;
@@ -1,12 +1,28 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4OpenGLXmPanningCallbacks.cc,v 1.4 2000/05/13 10:47:52 johna Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: G4OpenGLXmPanningCallbacks.cc,v 1.5.2.1 2001/06/28 19:15:46 gunter Exp $
// GEANT4 tag $Name: $
//
//
// Andrew Walkden 16th April 1997
@@ -98,7 +114,7 @@ void G4OpenGLXmViewer::pan_left_right_callback (Widget w,
XmArrowButtonCallbackStruct *cbs = (XmArrowButtonCallbackStruct*) callData;
G4OpenGLXmViewer* pView = (G4OpenGLXmViewer*) clientData;
pView->pan_right = G4OpenGLXmViewer::get_boolean_userData (w);
pView->pan_right = get_boolean_userData (w);
if (cbs->reason == XmCR_ARM) {
left_right_pan_callback (pView,NULL);
@@ -152,7 +168,7 @@ void G4OpenGLXmViewer::pan_up_down_callback (Widget w,
XmArrowButtonCallbackStruct *cbs = (XmArrowButtonCallbackStruct*) callData;
G4OpenGLXmViewer* pView = (G4OpenGLXmViewer*) clientData;
pView->pan_up = G4OpenGLXmViewer::get_boolean_userData (w);
pView->pan_up = get_boolean_userData (w);
if (cbs->reason == XmCR_ARM) {
up_down_pan_callback (pView,NULL);
@@ -1,12 +1,28 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4OpenGLXmPushButton.cc,v 1.4 2001/03/07 15:16:28 johna Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: G4OpenGLXmPushButton.cc,v 1.4.2.1 2001/06/28 19:15:46 gunter Exp $
// GEANT4 tag $Name: $
//
//Push button class. Inherits from G4OpenGLXmVWidgetComponent
@@ -1,12 +1,28 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4OpenGLXmRadioButton.cc,v 1.4 2001/03/07 14:56:19 johna Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: G4OpenGLXmRadioButton.cc,v 1.4.2.1 2001/06/28 19:15:46 gunter Exp $
// GEANT4 tag $Name: $
//
//Radio button class. Inherits from G4OpenGLXmVWidgetComponent
@@ -1,12 +1,28 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4OpenGLXmRotationCallbacks.cc,v 1.8 2001/01/25 12:09:57 johna Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: G4OpenGLXmRotationCallbacks.cc,v 1.10.2.1 2001/06/28 19:15:46 gunter Exp $
// GEANT4 tag $Name: $
//
//
// Andrew Walkden 16th April 1997
@@ -30,10 +46,10 @@ void G4OpenGLXmViewer::theta_rotation_callback (Widget w,
XmArrowButtonCallbackStruct *cbs = (XmArrowButtonCallbackStruct*) callData;
G4OpenGLXmViewer* pView = (G4OpenGLXmViewer*) clientData;
pView->rotate_right = G4OpenGLXmViewer::get_boolean_userData (w);
pView->rotate_right = get_boolean_userData (w);
if (cbs->reason == XmCR_ARM) {
G4OpenGLXmViewer::rotate_in_theta (pView, NULL);
rotate_in_theta (pView, NULL);
} else if (cbs->reason == XmCR_DISARM) {
XtRemoveTimeOut (pView->rotation_timer);
}
@@ -88,7 +104,7 @@ void G4OpenGLXmViewer::rotate_in_theta (XtPointer clientData,
pView->rotation_timer = XtAppAddTimeOut
(pView->app,
timer_id == NULL ? 500 : 1,
G4OpenGLXmViewer::rotate_in_theta,
rotate_in_theta,
pView);
}
@@ -99,10 +115,10 @@ void G4OpenGLXmViewer::phi_rotation_callback (Widget w,
XmArrowButtonCallbackStruct *cbs = (XmArrowButtonCallbackStruct*) callData;
G4OpenGLXmViewer* pView = (G4OpenGLXmViewer*) clientData;
pView->rotate_up = G4OpenGLXmViewer::get_boolean_userData (w);
pView->rotate_up = get_boolean_userData (w);
if (cbs->reason == XmCR_ARM) {
G4OpenGLXmViewer::rotate_in_phi (pView, NULL);
rotate_in_phi (pView, NULL);
} else if (cbs->reason == XmCR_DISARM) {
XtRemoveTimeOut (pView->rotation_timer);
}
@@ -154,7 +170,7 @@ void G4OpenGLXmViewer::rotate_in_phi (XtPointer clientData,
pView->rotation_timer = XtAppAddTimeOut
(pView->app,
timer_id == NULL ? 500 : 1,
G4OpenGLXmViewer::rotate_in_phi,
rotate_in_phi,
pView);
}
@@ -190,7 +206,7 @@ void G4OpenGLXmViewer::set_rot_subject_callback (Widget w,
{
G4OpenGLXmViewer* pView = (G4OpenGLXmViewer*)clientData;
G4int choice = G4OpenGLXmViewer::get_int_userData (w);
G4int choice = get_int_userData (w);
switch (choice) {
case 0:
@@ -224,7 +240,7 @@ void G4OpenGLXmViewer::wobble_callback (Widget w,
pView->wobble_timer = XtAppAddTimeOut
(pView->app,
(long unsigned int) (1000. * (1. / pView->wob_sens)),
G4OpenGLXmViewer::wobble_timer_callback,
wobble_timer_callback,
pView);
}
@@ -233,7 +249,6 @@ void G4OpenGLXmViewer::wobble_timer_callback (XtPointer clientData,
{
G4OpenGLXmViewer* pView = (G4OpenGLXmViewer*)clientData;
const G4Vector3D& up = pView->fVP.GetUpVector();
const G4Vector3D& vp = pView->fVP.GetViewpointDirection();
G4Vector3D third_axis = up.cross(pView->original_vp);
G4double pi_div_by_ten = M_PI / 10.0;
G4Vector3D d_up = 0.1 * (sin ((G4double)pView->frameNo * pi_div_by_ten * 2.)) * up;
@@ -258,7 +273,7 @@ void G4OpenGLXmViewer::wobble_timer_callback (XtPointer clientData,
pView->wobble_timer = XtAppAddTimeOut
(pView->app,
(long unsigned int) (1000. * (1. / pView->wob_sens)),
G4OpenGLXmViewer::wobble_timer_callback,
wobble_timer_callback,
pView);
}
}
@@ -1,12 +1,28 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4OpenGLXmSeparator.cc,v 1.3 1999/12/15 14:54:10 gunter Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: G4OpenGLXmSeparator.cc,v 1.3.4.1 2001/06/28 19:15:46 gunter Exp $
// GEANT4 tag $Name: $
//
//Separator class. Inherits from G4OpenGLXmVWidgetComponent
@@ -1,12 +1,28 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4OpenGLXmSliderBar.cc,v 1.4 2001/03/07 14:56:20 johna Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: G4OpenGLXmSliderBar.cc,v 1.4.2.1 2001/06/28 19:15:46 gunter Exp $
// GEANT4 tag $Name: $
//
//Slider bar class. Inherits from G4OpenGLXmVWidgetComponent
@@ -1,12 +1,28 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4OpenGLXmStyleCallbacks.cc,v 1.3 1999/12/15 14:54:10 gunter Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: G4OpenGLXmStyleCallbacks.cc,v 1.4.2.1 2001/06/28 19:15:46 gunter Exp $
// GEANT4 tag $Name: $
//
//
// Andrew Walkden 16th April 1997
@@ -237,7 +253,7 @@ void G4OpenGLXmViewer::projection_callback (Widget w,
{
G4OpenGLXmViewer* pView = (G4OpenGLXmViewer*)clientData;
G4int choice = G4OpenGLXmViewer::get_int_userData (w);
G4int choice = get_int_userData (w);
switch (choice) {
case 0:
@@ -1,12 +1,28 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4OpenGLXmTextField.cc,v 1.4 2001/03/07 14:56:20 johna Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: G4OpenGLXmTextField.cc,v 1.5.2.1 2001/06/28 19:15:46 gunter Exp $
// GEANT4 tag $Name: $
//
//Text field class. Inherits from G4OpenGLXmVWidgetComponent
@@ -23,7 +39,7 @@ G4OpenGLXmTextField::G4OpenGLXmTextField (const char* n,
{
name = n;
initial = new char[50];
sprintf (initial, "%6.2f\0", *val);
sprintf (initial, "%6.2f", *val);
value = (void*)val;
text=false;
}
@@ -61,7 +77,7 @@ const char* G4OpenGLXmTextField::GetName ()
void G4OpenGLXmTextField::SetValue (G4double val)
{
sprintf (initial, "%6.2f\0", val);
sprintf (initial, "%6.2f", val);
XtVaSetValues (text_field,
XmNvalue, (String)initial,
@@ -1,12 +1,28 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4OpenGLXmTopLevelShell.cc,v 1.3 1999/12/15 14:54:10 gunter Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: G4OpenGLXmTopLevelShell.cc,v 1.3.4.1 2001/06/28 19:15:47 gunter Exp $
// GEANT4 tag $Name: $
//
//Top level shell class
@@ -1,12 +1,28 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4OpenGLXmVWidgetComponent.cc,v 1.3 1999/12/15 14:54:10 gunter Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: G4OpenGLXmVWidgetComponent.cc,v 1.3.4.1 2001/06/28 19:15:47 gunter Exp $
// GEANT4 tag $Name: $
//
//Base class for all Motif component widgets
@@ -1,12 +1,28 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4OpenGLXmVWidgetContainer.cc,v 1.3 1999/12/15 14:54:10 gunter Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: G4OpenGLXmVWidgetContainer.cc,v 1.3.4.1 2001/06/28 19:15:47 gunter Exp $
// GEANT4 tag $Name: $
//
//Base class for all Motif container widgets
@@ -1,12 +1,28 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4OpenGLXmVWidgetObject.cc,v 1.3 1999/12/15 14:54:10 gunter Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: G4OpenGLXmVWidgetObject.cc,v 1.3.4.1 2001/06/28 19:15:47 gunter Exp $
// GEANT4 tag $Name: $
//
//Virtual base class for all Motif widgets.
@@ -1,12 +1,28 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4OpenGLXmVWidgetShell.cc,v 1.3 1999/12/15 14:54:10 gunter Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: G4OpenGLXmVWidgetShell.cc,v 1.3.4.1 2001/06/28 19:15:47 gunter Exp $
// GEANT4 tag $Name: $
//
//Base class for all Motif shell widgets
@@ -1,12 +1,28 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4OpenGLXmViewer.cc,v 1.6 2001/03/07 15:29:50 johna Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: G4OpenGLXmViewer.cc,v 1.8.2.1 2001/06/28 19:15:47 gunter Exp $
// GEANT4 tag $Name: $
//
//
// Andrew Walkden 10th February 1997
@@ -200,7 +216,7 @@ void G4OpenGLXmViewer::CreateMainWindow () {
(style_cascade,
(char*)"rep_style",
0,
G4OpenGLXmViewer::rep_style_callback,
rep_style_callback,
XmVaRADIOBUTTON, polyhedron_str, 'P', NULL, NULL,
XmVaRADIOBUTTON, nurbs_str, 'N', NULL, NULL,
XmNradioBehavior, True,
@@ -219,11 +235,13 @@ void G4OpenGLXmViewer::CreateMainWindow () {
style = fVP.GetRepStyle();
if (style == G4ViewParameters::polyhedron) {
if(special_widget = XtNameToWidget(rep_style_pullright, "button_0")) {
special_widget = XtNameToWidget(rep_style_pullright, "button_0");
if(special_widget) {
XtVaSetValues (special_widget, XmNset, True, NULL);
}
} else if (style == G4ViewParameters::nurbs) {
if(special_widget = XtNameToWidget(rep_style_pullright, "button_1")) {
special_widget = XtNameToWidget(rep_style_pullright, "button_1");
if(special_widget) {
XtVaSetValues (special_widget, XmNset, True, NULL);
}
} else {
@@ -244,7 +262,7 @@ void G4OpenGLXmViewer::CreateMainWindow () {
(style_cascade,
(char*)"drawing_style",
1,
G4OpenGLXmViewer::drawing_style_callback,
drawing_style_callback,
XmVaRADIOBUTTON, wireframe_str, 'W', NULL, NULL,
XmVaRADIOBUTTON, hlr_str, 'L', NULL, NULL,
XmVaRADIOBUTTON, hsr_str, 'S', NULL, NULL,
@@ -263,19 +281,23 @@ void G4OpenGLXmViewer::CreateMainWindow () {
d_style = fVP.GetDrawingStyle();
if (d_style == G4ViewParameters::wireframe) {
if(special_widget = XtNameToWidget(drawing_style_pullright, "button_0")) {
special_widget = XtNameToWidget(drawing_style_pullright, "button_0");
if(special_widget) {
XtVaSetValues (special_widget, XmNset, True, NULL);
}
} else if (d_style == G4ViewParameters::hlr) {
if(special_widget = XtNameToWidget(drawing_style_pullright, "button_1")) {
special_widget = XtNameToWidget(drawing_style_pullright, "button_1");
if(special_widget) {
XtVaSetValues (special_widget, XmNset, True, NULL);
}
} else if (d_style == G4ViewParameters::hsr) {
if(special_widget = XtNameToWidget(drawing_style_pullright, "button_2")) {
special_widget = XtNameToWidget(drawing_style_pullright, "button_2");
if(special_widget) {
XtVaSetValues (special_widget, XmNset, True, NULL);
}
} else if (d_style == G4ViewParameters::hlhsr) {
if(special_widget = XtNameToWidget(drawing_style_pullright, "button_3")) {
special_widget = XtNameToWidget(drawing_style_pullright, "button_3");
if(special_widget) {
XtVaSetValues (special_widget, XmNset, True, NULL);
}
} else {
@@ -297,7 +319,7 @@ void G4OpenGLXmViewer::CreateMainWindow () {
(style_cascade,
(char*)"background_color",
2,
G4OpenGLXmViewer::background_color_callback,
background_color_callback,
XmVaRADIOBUTTON, white_str, 'W', NULL, NULL,
XmVaRADIOBUTTON, black_str, 'B', NULL, NULL,
XmNradioBehavior, True,
@@ -311,13 +333,13 @@ void G4OpenGLXmViewer::CreateMainWindow () {
NULL);
if (white_background == true) {
if(special_widget = XtNameToWidget(background_color_pullright,
"button_0")) {
special_widget = XtNameToWidget(background_color_pullright, "button_0");
if(special_widget) {
XtVaSetValues (special_widget, XmNset, True, NULL);
}
} else if (white_background == false) {
if(special_widget = XtNameToWidget(background_color_pullright,
"button_1")) {
special_widget = XtNameToWidget(background_color_pullright, "button_1");
if(special_widget) {
XtVaSetValues (special_widget, XmNset, True, NULL);
}
} else {
@@ -338,7 +360,7 @@ void G4OpenGLXmViewer::CreateMainWindow () {
(menubar,
(char*)"actions",
1,
G4OpenGLXmViewer::actions_callback,
actions_callback,
XmVaPUSHBUTTON, rot_str, 'R', NULL, NULL,
XmVaPUSHBUTTON, pan_str, 'P', NULL, NULL,
XmVaPUSHBUTTON, set_str, 'S', NULL, NULL,
@@ -364,7 +386,7 @@ void G4OpenGLXmViewer::CreateMainWindow () {
(menubar,
(char*)"miscellany",
2,
G4OpenGLXmViewer::misc_callback,
misc_callback,
XmVaPUSHBUTTON, misc_str, 'M', NULL, NULL,
XmVaPUSHBUTTON, exit_str, 'E', NULL, NULL,
XmVaPUSHBUTTON, print_str, 'P', NULL, NULL,
@@ -415,7 +437,7 @@ void G4OpenGLXmViewer::CreateMainWindow () {
(spec_cascade,
(char*)"transparency",
0,
G4OpenGLXmViewer::transparency_callback,
transparency_callback,
XmVaRADIOBUTTON, off_str, 'f', NULL, NULL,
XmVaRADIOBUTTON, on_str, 'n', NULL, NULL,
XmNradioBehavior, True,
@@ -429,13 +451,13 @@ void G4OpenGLXmViewer::CreateMainWindow () {
NULL);
if (transparency_enabled == false) {
if(special_widget = XtNameToWidget(transparency_pullright,
"button_0")) {
special_widget = XtNameToWidget(transparency_pullright, "button_0");
if(special_widget) {
XtVaSetValues (special_widget, XmNset, True, NULL);
}
} else if (transparency_enabled == true) {
if(special_widget = XtNameToWidget(transparency_pullright,
"button_1")) {
special_widget = XtNameToWidget(transparency_pullright, "button_1");
if(special_widget) {
XtVaSetValues (special_widget, XmNset, True, NULL);
}
} else {
@@ -447,7 +469,7 @@ void G4OpenGLXmViewer::CreateMainWindow () {
(spec_cascade,
(char*)"antialias",
1,
G4OpenGLXmViewer::antialias_callback,
antialias_callback,
XmVaRADIOBUTTON, off_str, 'f', NULL, NULL,
XmVaRADIOBUTTON, on_str, 'n', NULL, NULL,
XmNradioBehavior, True,
@@ -461,13 +483,13 @@ void G4OpenGLXmViewer::CreateMainWindow () {
NULL);
if (antialiasing_enabled == false) {
if(special_widget = XtNameToWidget(antialias_pullright,
"button_0")) {
special_widget = XtNameToWidget(antialias_pullright, "button_0");
if(special_widget) {
XtVaSetValues (special_widget, XmNset, True, NULL);
}
} else if (antialiasing_enabled == true) {
if(special_widget = XtNameToWidget(antialias_pullright,
"button_1")) {
special_widget = XtNameToWidget(antialias_pullright, "button_1");
if(special_widget) {
XtVaSetValues (special_widget, XmNset, True, NULL);
}
} else {
@@ -479,7 +501,7 @@ void G4OpenGLXmViewer::CreateMainWindow () {
(spec_cascade,
(char*)"haloing",
2,
G4OpenGLXmViewer::haloing_callback,
haloing_callback,
XmVaRADIOBUTTON, off_str, 'f', NULL, NULL,
XmVaRADIOBUTTON, on_str, 'n', NULL, NULL,
XmNradioBehavior, True,
@@ -493,13 +515,13 @@ void G4OpenGLXmViewer::CreateMainWindow () {
NULL);
if (haloing_enabled == false) {
if(special_widget = XtNameToWidget(haloing_pullright,
"button_0")) {
special_widget = XtNameToWidget(haloing_pullright, "button_0");
if(special_widget) {
XtVaSetValues (special_widget, XmNset, True, NULL);
}
} else if (haloing_enabled == true) {
if(special_widget = XtNameToWidget(haloing_pullright,
"button_1")) {
special_widget = XtNameToWidget(haloing_pullright, "button_1");
if(special_widget) {
XtVaSetValues (special_widget, XmNset, True, NULL);
}
} else {
@@ -528,12 +550,12 @@ void G4OpenGLXmViewer::CreateMainWindow () {
XtAddCallback (glxarea,
XmNexposeCallback,
G4OpenGLXmViewer::expose_callback,
expose_callback,
this);
XtAddCallback (glxarea,
XmNresizeCallback,
G4OpenGLXmViewer::resize_callback,
resize_callback,
this);
XmMainWindowSetAreas (main_win, // main widget, children are specified
@@ -564,26 +586,26 @@ G4OpenGLXmViewer::G4OpenGLXmViewer (G4OpenGLSceneHandler& scene):
G4VViewer (scene, -1),
G4OpenGLViewer (scene),
G4OpenGLXViewer (scene),
zoom_low (fVP.GetZoomFactor() / 10.0),
zoom_high (fVP.GetZoomFactor() * 10.0),
zoom_low (fVP.GetZoomFactor() / 10.0),
dolly_low (fVP.GetDolly() - 1000.0),
dolly_high (fVP.GetDolly() + 1000.0),
rot_sens (4.),
frameNo (0),
wob_sens (20.),
fov (0.0),
rot_sens_limit (90.),
pan_sens_limit (100.),
fov (0.0),
rot_sens (4.),
wob_sens (20.),
original_vp(fVP.GetViewpointDirection()),
fppanning_top (NULL),
frameNo (0),
fprotation_top (NULL),
fpmiscellany_top (NULL),
fpsetting_top (NULL),
fpprint_top (NULL),
fppanning_slider (NULL),
fprotation_slider (NULL),
fppanning_top (NULL),
fppanning_slider (NULL),
fpzoom_slider (NULL),
fpdolly_slider (NULL)
fpdolly_slider (NULL),
fpsetting_top (NULL),
fpmiscellany_top (NULL),
fpprint_top (NULL)
{
WinSize_x = 100;
@@ -1,12 +1,28 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4OpenGLXmWindowHandlingCallbacks.cc,v 1.3 1999/12/15 14:54:11 gunter Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: G4OpenGLXmWindowHandlingCallbacks.cc,v 1.4.2.1 2001/06/28 19:15:47 gunter Exp $
// GEANT4 tag $Name: $
//
//
// Andrew Walkden 16th June 1997
@@ -72,7 +88,7 @@ void G4OpenGLXmViewer::set_print_colour_callback (Widget w,
{
G4OpenGLXmViewer* pView = (G4OpenGLXmViewer*)clientData;
G4int choice = G4OpenGLXmViewer::get_int_userData (w);
G4int choice = get_int_userData (w);
pView->print_colour=(G4bool)choice;
G4cout << "Print colour set to " << pView->print_colour;
@@ -85,7 +101,7 @@ void G4OpenGLXmViewer::set_print_style_callback (Widget w,
{
G4OpenGLXmViewer* pView = (G4OpenGLXmViewer*)clientData;
G4int choice = G4OpenGLXmViewer::get_int_userData (w);
G4int choice = get_int_userData (w);
pView->vectored_ps=(G4bool)choice;
G4cout << "`Produce vectored PostScript ?' set to : " << pView->print_colour;