Import Geant4 10.1.0 source tree
This commit is contained in:
+20
-2
@@ -1,4 +1,4 @@
|
||||
$Id: History 75567 2013-11-04 11:35:11Z gcosmo $
|
||||
$Id: History 85582 2014-10-31 09:07:30Z gcosmo $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -16,7 +16,25 @@ committal in the CVS repository !
|
||||
----------------------------------------------------------
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
20 Sept 2013 Laurent Garnier
|
||||
|
||||
30th October 2014 Laurent Garnier (visexternal-V10-00-03)
|
||||
- Tagged
|
||||
|
||||
1st October 2014 Laurent Garnier
|
||||
- Geant4_gl2ps : Minor change for OpenGL2
|
||||
|
||||
2nd July 2014 Laurent Garnier (visexternal-V10-00-02)
|
||||
- Retagged
|
||||
|
||||
2nd July 2014 Laurent Garnier (visexternal-V10-00-01)
|
||||
- add setExportImageFormat(format) method
|
||||
- change default options for generation gl2ps files
|
||||
o allow transparency on volumes (for pdf)
|
||||
|
||||
8th April 2014 Laurent Garnier (visexternal-V10-00-00)
|
||||
- Fix a bad text in G4OpenGL2PSAction
|
||||
|
||||
20th Sept 2013 Laurent Garnier
|
||||
- add #ifdef statement in in gl2ps.h to prevent having gl2ps AND Wt driver
|
||||
|
||||
3rd June 2013 John Allison (visexternal-V09-06-04)
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4OpenGL2PSAction.hh 70646 2013-06-03 15:07:58Z gcosmo $
|
||||
// $Id: G4OpenGL2PSAction.hh 82763 2014-07-08 14:22:48Z gcosmo $
|
||||
//
|
||||
|
||||
#ifndef G4OpenGL2PSAction_h
|
||||
@@ -39,6 +39,7 @@ public:
|
||||
G4OpenGL2PSAction();
|
||||
|
||||
void setFileName(const char*);
|
||||
void setExportImageFormat(unsigned int);
|
||||
bool enableFileWriting();
|
||||
// return true if ok, false is an error occured
|
||||
|
||||
@@ -59,6 +60,8 @@ protected:
|
||||
GLint fViewport[4];
|
||||
GLint fBufferSize;
|
||||
GLint fBufferSizeLimit;
|
||||
private:
|
||||
unsigned int fExportImageFormat;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -229,7 +229,7 @@
|
||||
|
||||
#define gl2ps Geant4_gl2ps
|
||||
|
||||
#ifndef G4VIS_BUILD_OPENGLWT_DRIVER
|
||||
#ifndef G4OPENGL_VERSION_2
|
||||
#include "gl2ps.h"
|
||||
#endif
|
||||
|
||||
|
||||
+17
-10
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGL2PSAction.cc 70646 2013-06-03 15:07:58Z gcosmo $
|
||||
// $Id: G4OpenGL2PSAction.cc 82763 2014-07-08 14:22:48Z gcosmo $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -56,6 +56,7 @@ G4OpenGL2PSAction::G4OpenGL2PSAction(
|
||||
fViewport[3] = 0;
|
||||
fBufferSize = 2048;
|
||||
fBufferSizeLimit = (std::numeric_limits<GLint>::max)();
|
||||
fExportImageFormat = GL2PS_PDF;
|
||||
resetBufferSizeParameters();
|
||||
}
|
||||
|
||||
@@ -170,18 +171,14 @@ bool G4OpenGL2PSAction::G4gl2psBegin(
|
||||
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
|
||||
{
|
||||
if(!fFile) return false;
|
||||
int options = GL2PS_OCCLUSION_CULL |
|
||||
GL2PS_BEST_ROOT | GL2PS_DRAW_BACKGROUND | GL2PS_USE_CURRENT_VIEWPORT;
|
||||
// int options = GL2PS_OCCLUSION_CULL |
|
||||
// GL2PS_BEST_ROOT | GL2PS_SILENT | GL2PS_DRAW_BACKGROUND;
|
||||
int options =
|
||||
GL2PS_BEST_ROOT | GL2PS_DRAW_BACKGROUND |GL2PS_USE_CURRENT_VIEWPORT;
|
||||
int sort = GL2PS_BSP_SORT;
|
||||
// int sort = GL2PS_SIMPLE_SORT;
|
||||
|
||||
glGetIntegerv(GL_VIEWPORT,fViewport);
|
||||
|
||||
GLint res = gl2psBeginPage("title","HEPVis::G4OpenGL2PSAction",
|
||||
glGetIntegerv(GL_VIEWPORT,fViewport);
|
||||
GLint res = gl2psBeginPage("Geant4 output","Geant4",
|
||||
fViewport,
|
||||
GL2PS_EPS,
|
||||
fExportImageFormat,
|
||||
sort,
|
||||
options,
|
||||
GL_RGBA,0, NULL,0,0,0,
|
||||
@@ -190,8 +187,18 @@ bool G4OpenGL2PSAction::G4gl2psBegin(
|
||||
if (res == GL2PS_ERROR) {
|
||||
return false;
|
||||
}
|
||||
// enable blending for all
|
||||
gl2psEnable(GL2PS_BLEND);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void G4OpenGL2PSAction::setExportImageFormat(unsigned int type){
|
||||
if(!fFile) {
|
||||
fExportImageFormat = type;
|
||||
} else {
|
||||
// Could not change the file type at this step. Please change it before enableFileWriting()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user