Import Geant4 8.3.0 source tree
This commit is contained in:
@@ -23,8 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4OpenGL.hh,v 1.4 2006/06/29 21:17:36 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// $Id: G4OpenGL.hh,v 1.5 2007/02/08 14:01:55 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-08-03 $
|
||||
//
|
||||
// G.Barrand.
|
||||
|
||||
@@ -38,4 +38,6 @@
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glu.h>
|
||||
|
||||
#define G4OPENGL_DBL_MAX 1.e308
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLBitMapStore.hh,v 1.1 2007/01/09 10:11:16 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-08-03 $
|
||||
//
|
||||
//
|
||||
// John Allison 6th January 2007
|
||||
//
|
||||
// Class description
|
||||
//
|
||||
// Keeps bit maps on byte boundaries suitable for drawing. For
|
||||
// example, in OpenGL:
|
||||
//
|
||||
// const char* circle = G4OpenGLBitMapStore::GetCircle(size, true);
|
||||
// glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
|
||||
// glBitmap(size, size, size/2., size/2., 0., 0., circle);
|
||||
|
||||
|
||||
#ifndef G4OPENGLBITMAPSTORE_HH
|
||||
#define G4OPENGLBITMAPSTORE_HH
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4OpenGL.hh"
|
||||
#include <map>
|
||||
|
||||
namespace G4OpenGLBitMapStore {
|
||||
|
||||
enum Shape {circle, square};
|
||||
|
||||
const GLubyte* GetBitMap(Shape, G4double& size, G4bool filled);
|
||||
// Size in pixels (gets changed to a rationalised value).
|
||||
|
||||
struct Key{
|
||||
Key(Shape shape, G4int size, G4bool filled):
|
||||
fShape(shape), fSize(size), fFilled(filled) {}
|
||||
bool operator<(const Key& rhs) const {
|
||||
if (fShape < rhs.fShape) return true;
|
||||
else if (fSize < rhs.fSize) return true;
|
||||
else if (fFilled != rhs.fFilled) return true;
|
||||
else return false;
|
||||
}
|
||||
Shape fShape;
|
||||
G4int fSize;
|
||||
G4bool fFilled;
|
||||
};
|
||||
|
||||
extern std::map<Key, GLubyte*> fStore;
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLSceneHandler.hh,v 1.20 2006/08/30 11:37:34 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// $Id: G4OpenGLSceneHandler.hh,v 1.21 2007/01/09 10:11:16 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-08-03 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 27th March 1996
|
||||
@@ -44,6 +44,7 @@
|
||||
|
||||
#include "G4VSceneHandler.hh"
|
||||
#include "G4OpenGLViewer.hh"
|
||||
#include "G4OpenGLBitMapStore.hh"
|
||||
|
||||
// Base class for various OpenGLScene classes.
|
||||
class G4OpenGLSceneHandler: public G4VSceneHandler {
|
||||
@@ -90,18 +91,13 @@ protected:
|
||||
|
||||
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 AddCircleSquare (const G4VMarker&, G4OpenGLBitMapStore::Shape);
|
||||
|
||||
void DrawXYPolygon (G4double size,
|
||||
const G4Point3D& centre,
|
||||
G4int nSides);
|
||||
void DrawXYPolygon
|
||||
(G4OpenGLBitMapStore::Shape,
|
||||
G4double size,
|
||||
const G4Point3D& centre,
|
||||
const G4VisAttributes* pApplicableVisAtts);
|
||||
// Draws in world coordinates a polygon in the screen plane knowing
|
||||
// viewpoint direction and up vector.
|
||||
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLStoredSceneHandler.hh,v 1.21 2006/08/30 11:43:57 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// $Id: G4OpenGLStoredSceneHandler.hh,v 1.22 2007/02/08 14:01:55 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-08-03 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
@@ -107,7 +107,7 @@ protected:
|
||||
struct TO {
|
||||
TO(G4int id, const G4Transform3D& tr = G4Transform3D()):
|
||||
fDisplayListId(id), fTransform(tr),
|
||||
fStartTime(-DBL_MAX), fEndTime(DBL_MAX) {}
|
||||
fStartTime(-G4OPENGL_DBL_MAX), fEndTime(G4OPENGL_DBL_MAX) {}
|
||||
G4int fDisplayListId;
|
||||
G4Transform3D fTransform;
|
||||
G4double fStartTime, fEndTime; // Time range (e.g., for trajectory steps).
|
||||
|
||||
Reference in New Issue
Block a user