Import Geant4 10.6.0 source tree
This commit is contained in:
@@ -19,6 +19,10 @@ committal in the CVS repository !
|
||||
History file for visualization/VRML sub-category
|
||||
------------------------------------------------
|
||||
|
||||
29 August 2019 John Allison (VRML-V10-05-00)
|
||||
- Part of vis-V10-05-24.
|
||||
- Add G4TessellatedSolid to list of solids that may be specially treated
|
||||
|
||||
26 May 2018 John Allison (VRML-V10-04-00)
|
||||
- G4VRML2FileSceneHandler.cc: Fix gcc-8 warnings.
|
||||
|
||||
|
||||
@@ -69,6 +69,9 @@ public:
|
||||
void AddSolid ( const G4Ellipsoid& ellipsoid) {
|
||||
G4VSceneHandler::AddSolid (ellipsoid);
|
||||
}
|
||||
void AddSolid ( const G4TessellatedSolid& tess) {
|
||||
G4VSceneHandler::AddSolid (tess);
|
||||
}
|
||||
void AddSolid(const G4VSolid&);
|
||||
void AddCompound ( const G4VTrajectory& traj) {
|
||||
G4VSceneHandler::AddCompound(traj);
|
||||
|
||||
@@ -74,6 +74,9 @@ public:
|
||||
void AddSolid ( const G4Ellipsoid& ellipsoid) {
|
||||
G4VSceneHandler::AddSolid (ellipsoid);
|
||||
}
|
||||
void AddSolid ( const G4TessellatedSolid& tess) {
|
||||
G4VSceneHandler::AddSolid (tess);
|
||||
}
|
||||
void AddSolid(const G4VSolid&);
|
||||
void AddCompound ( const G4VTrajectory& traj) {
|
||||
G4VSceneHandler::AddCompound(traj);
|
||||
|
||||
@@ -69,6 +69,9 @@ public:
|
||||
void AddSolid ( const G4Ellipsoid& ellipsoid) {
|
||||
G4VSceneHandler::AddSolid (ellipsoid);
|
||||
}
|
||||
void AddSolid ( const G4TessellatedSolid& tess) {
|
||||
G4VSceneHandler::AddSolid (tess);
|
||||
}
|
||||
void AddSolid(const G4VSolid&);
|
||||
void AddCompound ( const G4VTrajectory& traj) {
|
||||
G4VSceneHandler::AddCompound(traj);
|
||||
|
||||
@@ -72,6 +72,9 @@ public:
|
||||
void AddSolid ( const G4Ellipsoid& ellipsoid) {
|
||||
G4VSceneHandler::AddSolid (ellipsoid);
|
||||
}
|
||||
void AddSolid ( const G4TessellatedSolid& tess) {
|
||||
G4VSceneHandler::AddSolid (tess);
|
||||
}
|
||||
void AddSolid(const G4VSolid&);
|
||||
void AddCompound ( const G4VTrajectory& traj) {
|
||||
G4VSceneHandler::AddCompound(traj);
|
||||
|
||||
@@ -52,14 +52,14 @@ G4VRML1::G4VRML1() :
|
||||
{
|
||||
// port number
|
||||
fPort = FR_VRML_DEFAULT_PORT;
|
||||
char *pport = getenv(FR_VRML_PORT_ENV);
|
||||
char *pport = std::getenv(FR_VRML_PORT_ENV);
|
||||
if (pport) {
|
||||
sscanf(pport, "%d", &fPort);
|
||||
}
|
||||
|
||||
// host name
|
||||
fHostName = "localhost" ; // G4String::operator = ( const char* cs )
|
||||
char *phostname = getenv(FR_VRML_HOST_NAME_ENV);
|
||||
char *phostname = std::getenv(FR_VRML_HOST_NAME_ENV);
|
||||
if (phostname) {
|
||||
fHostName = phostname;
|
||||
}
|
||||
|
||||
@@ -81,17 +81,17 @@ G4VRML1FileSceneHandler::G4VRML1FileSceneHandler(G4VRML1File& system, const G4St
|
||||
fCurrentDEF = "";
|
||||
strcpy(fVRMLFileName, "");
|
||||
|
||||
if ( getenv( VRMLFILE_DEST_DIR ) == NULL ) {
|
||||
if ( std::getenv( VRMLFILE_DEST_DIR ) == NULL ) {
|
||||
strcpy( fVRMLFileDestDir, "" );
|
||||
} else {
|
||||
strcpy( fVRMLFileDestDir, getenv( VRMLFILE_DEST_DIR ) );
|
||||
strcpy( fVRMLFileDestDir, std::getenv( VRMLFILE_DEST_DIR ) );
|
||||
}
|
||||
|
||||
// maximum number of g4.wrl files in the dest directory
|
||||
fMaxFileNum = DEFAULT_MAX_WRL_FILE_NUM ; // initialization
|
||||
if ( getenv( "G4VRMLFILE_MAX_FILE_NUM" ) != NULL ) {
|
||||
if ( std::getenv( "G4VRMLFILE_MAX_FILE_NUM" ) != NULL ) {
|
||||
|
||||
sscanf( getenv("G4VRMLFILE_MAX_FILE_NUM"), "%d", &fMaxFileNum ) ;
|
||||
sscanf( std::getenv("G4VRMLFILE_MAX_FILE_NUM"), "%d", &fMaxFileNum ) ;
|
||||
|
||||
} else {
|
||||
fMaxFileNum = DEFAULT_MAX_WRL_FILE_NUM ;
|
||||
@@ -186,8 +186,8 @@ void G4VRML1FileSceneHandler::closePort()
|
||||
char command[256] ;
|
||||
char viewer [256] ;
|
||||
strcpy( viewer, NO_VRML_VIEWER ); // initialization
|
||||
if( getenv( ENV_VRML_VIEWER ) ) {
|
||||
strcpy( viewer, getenv( ENV_VRML_VIEWER ) ) ;
|
||||
if( std::getenv( ENV_VRML_VIEWER ) ) {
|
||||
strcpy( viewer, std::getenv( ENV_VRML_VIEWER ) ) ;
|
||||
}
|
||||
|
||||
// close VRML file
|
||||
|
||||
@@ -52,14 +52,14 @@ G4VRML2::G4VRML2() :
|
||||
{
|
||||
// port number
|
||||
fPort = FR_VRML_DEFAULT_PORT;
|
||||
char *pport = getenv(FR_VRML_PORT_ENV);
|
||||
char *pport = std::getenv(FR_VRML_PORT_ENV);
|
||||
if (pport) {
|
||||
sscanf(pport, "%d", &fPort);
|
||||
}
|
||||
|
||||
// host name
|
||||
fHostName = "localhost" ; // G4String::operator = ( const char* cs )
|
||||
char *phostname = getenv(FR_VRML_HOST_NAME_ENV);
|
||||
char *phostname = std::getenv(FR_VRML_HOST_NAME_ENV);
|
||||
if (phostname) {
|
||||
fHostName = phostname;
|
||||
}
|
||||
|
||||
@@ -82,18 +82,18 @@ G4VRML2FileSceneHandler::G4VRML2FileSceneHandler(G4VRML2File& system, const G4St
|
||||
strcpy(fVRMLFileName, "");
|
||||
|
||||
// destination directory
|
||||
if ( getenv( VRMLFILE_DEST_DIR ) == NULL ) {
|
||||
if ( std::getenv( VRMLFILE_DEST_DIR ) == NULL ) {
|
||||
strcpy( fVRMLFileDestDir, "" );
|
||||
} else {
|
||||
strcpy( fVRMLFileDestDir, getenv( VRMLFILE_DEST_DIR ) );
|
||||
strcpy( fVRMLFileDestDir, std::getenv( VRMLFILE_DEST_DIR ) );
|
||||
}
|
||||
|
||||
|
||||
// maximum number of g4.prim files in the dest directory
|
||||
fMaxFileNum = DEFAULT_MAX_WRL_FILE_NUM ; // initialization
|
||||
if ( getenv( "G4VRMLFILE_MAX_FILE_NUM" ) != NULL ) {
|
||||
if ( std::getenv( "G4VRMLFILE_MAX_FILE_NUM" ) != NULL ) {
|
||||
|
||||
sscanf( getenv("G4VRMLFILE_MAX_FILE_NUM"), "%d", &fMaxFileNum ) ;
|
||||
sscanf( std::getenv("G4VRMLFILE_MAX_FILE_NUM"), "%d", &fMaxFileNum ) ;
|
||||
|
||||
} else {
|
||||
fMaxFileNum = DEFAULT_MAX_WRL_FILE_NUM ;
|
||||
@@ -102,10 +102,10 @@ G4VRML2FileSceneHandler::G4VRML2FileSceneHandler(G4VRML2File& system, const G4St
|
||||
|
||||
|
||||
// PV name pickability
|
||||
if( getenv( "G4VRML_PV_PICKABLE" ) != NULL ) {
|
||||
if( std::getenv( "G4VRML_PV_PICKABLE" ) != NULL ) {
|
||||
|
||||
int is_pickable ;
|
||||
sscanf( getenv("G4VRML_PV_PICKABLE"), "%d", &is_pickable ) ;
|
||||
sscanf( std::getenv("G4VRML_PV_PICKABLE"), "%d", &is_pickable ) ;
|
||||
|
||||
if ( is_pickable ) { SetPVPickability ( true ) ; }
|
||||
}
|
||||
@@ -200,8 +200,8 @@ void G4VRML2FileSceneHandler::closePort()
|
||||
char command[256] ;
|
||||
char viewer [256] ;
|
||||
strcpy( viewer, NO_VRML_VIEWER ); // initialization
|
||||
if( getenv( ENV_VRML_VIEWER ) ) {
|
||||
strcpy( viewer, getenv( ENV_VRML_VIEWER ) ) ;
|
||||
if( std::getenv( ENV_VRML_VIEWER ) ) {
|
||||
strcpy( viewer, std::getenv( ENV_VRML_VIEWER ) ) ;
|
||||
}
|
||||
|
||||
// close VRML file
|
||||
|
||||
@@ -75,10 +75,10 @@ G4VRML2SceneHandler::G4VRML2SceneHandler(G4VRML2& system, const G4String& name)
|
||||
{
|
||||
|
||||
// PV name pickability
|
||||
if( getenv( "G4VRML_PV_PICKABLE" ) != NULL ) {
|
||||
if( std::getenv( "G4VRML_PV_PICKABLE" ) != NULL ) {
|
||||
|
||||
int is_pickable ;
|
||||
sscanf( getenv("G4VRML_PV_PICKABLE"), "%d", &is_pickable ) ;
|
||||
sscanf( std::getenv("G4VRML_PV_PICKABLE"), "%d", &is_pickable ) ;
|
||||
|
||||
if ( is_pickable ) { SetPVPickability ( true ) ; }
|
||||
}
|
||||
|
||||
@@ -712,11 +712,11 @@ G4double G4VRML2SCENEHANDLER::SetPVTransparency ()
|
||||
|
||||
G4double TRANSPARENCY = 0.7 ; // initialization
|
||||
|
||||
if( getenv( "G4VRML_TRANSPARENCY" ) != NULL ) {
|
||||
if( std::getenv( "G4VRML_TRANSPARENCY" ) != NULL ) {
|
||||
|
||||
// get a value from the env value
|
||||
// sscanf( getenv("G4VRML_TRANSPARENCY"), "%lg", &TRANSPARENCY ) ;
|
||||
std::istringstream iss( getenv("G4VRML_TRANSPARENCY") );
|
||||
std::istringstream iss( std::getenv("G4VRML_TRANSPARENCY") );
|
||||
iss >> TRANSPARENCY;
|
||||
|
||||
// truncation
|
||||
|
||||
Reference in New Issue
Block a user