Import Geant4 10.6.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2019-06-28 11:59:04 +02:00
parent 28a70706e0
commit d0f911957d
1056 changed files with 95168 additions and 78160 deletions
@@ -321,19 +321,22 @@ void G4OpenGLSceneHandler::EndPrimitives2D ()
G4VSceneHandler::EndPrimitives2D ();
}
G4VSolid* G4OpenGLSceneHandler::CreateSectionSolid ()
G4DisplacedSolid* G4OpenGLSceneHandler::CreateSectionSolid ()
{
return G4VSceneHandler::CreateSectionSolid();
// If clipping done in G4OpenGLViewer::SetView
// return 0;
// Note: if you change this, you must also change
// G4OpenGLStoredViewer::CompareForKernelVisit
}
G4VSolid* G4OpenGLSceneHandler::CreateCutawaySolid ()
G4DisplacedSolid* G4OpenGLSceneHandler::CreateCutawaySolid ()
{
// Cutaway done in G4OpenGLViewer::SetView.
return 0;
// Else
// return G4VSceneHandler::CreateCutawaySolid();
// If cutaway done in G4OpenGLViewer::SetView.
return 0;
// Note: if you change this, you must also change
// G4OpenGLStoredViewer::CompareForKernelVisit
}
void G4OpenGLSceneHandler::AddPrimitive (const G4Polyline& line)
@@ -588,7 +591,8 @@ void G4OpenGLSceneHandler::AddPrimitive (const G4Polyhedron& polyhedron) {
// even if the colour is changed, for example, by interaction with a Qt
// window, current_colour does not change.
GLfloat* painting_colour;
GLfloat current_colour [4];
GLfloat clear_colour[4];
GLfloat current_colour[4];
glGetFloatv (GL_CURRENT_COLOR, current_colour);
G4bool isTransparent = false;
@@ -596,10 +600,8 @@ void G4OpenGLSceneHandler::AddPrimitive (const G4Polyhedron& polyhedron) {
isTransparent = true;
}
if (drawing_style == G4ViewParameters::hlr) {
// This is the colour used to paint surfaces in hlr mode.
GLfloat clear_colour[4];
glGetFloatv (GL_COLOR_CLEAR_VALUE, clear_colour);
painting_colour = clear_colour;
} else { // drawing_style == G4ViewParameters::hlhsr
@@ -676,7 +678,7 @@ void G4OpenGLSceneHandler::AddPrimitive (const G4Polyhedron& polyhedron) {
#ifndef G4OPENGL_VERSION_2
glEnable(GL_COLOR_MATERIAL);
#endif
glEnable (GL_CULL_FACE);
glEnable (GL_CULL_FACE);
glCullFace (GL_BACK);
glPolygonMode (GL_FRONT, GL_FILL);
}
@@ -870,14 +872,14 @@ void G4OpenGLSceneHandler::AddPrimitive (const G4Polyhedron& polyhedron) {
fEdgeFlag = false;
}
}
glNormal3d (normals[edgeCount].x(),
normals[edgeCount].y(),
normals[edgeCount].z());
glNormal3d (normals[edgeCount].x(),
normals[edgeCount].y(),
normals[edgeCount].z());
glVertex3d (vertex[edgeCount].x(),
vertex[edgeCount].y(),
vertex[edgeCount].z());
#else
fOglVertex.push_back(vertex[edgeCount].x());
fOglVertex.push_back(vertex[edgeCount].x());
fOglVertex.push_back(vertex[edgeCount].y());
fOglVertex.push_back(vertex[edgeCount].z());