Import Geant4 10.0.0 source tree
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id$
|
||||
// $Id: FRClient.cc 66870 2013-01-14 23:38:59Z adotti $
|
||||
//
|
||||
// FRClient.cc
|
||||
// FukuiRenderer Client
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id$
|
||||
// $Id: G4FRClient.cc 66373 2012-12-18 09:41:34Z gcosmo $
|
||||
//
|
||||
// G4FRClient.cc
|
||||
// Yasuhide Sawada & Satoshi Tanaka
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id$
|
||||
// $Id: G4VRML1.cc 66373 2012-12-18 09:41:34Z gcosmo $
|
||||
//
|
||||
// G4VRML1.cc
|
||||
// Yasuhide Sawada & Satoshi Tanaka
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id$
|
||||
// $Id: G4VRML1File.cc 66373 2012-12-18 09:41:34Z gcosmo $
|
||||
//
|
||||
// G4VRML1File.cc
|
||||
// Satoshi Tanaka & Yasuhide Sawada
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id$
|
||||
// $Id: G4VRML1FileSceneHandler.cc 66870 2013-01-14 23:38:59Z adotti $
|
||||
//
|
||||
// G4VRML1FileSceneHandler.cc
|
||||
// Satoshi Tanaka & Yasuhide Sawada
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id$
|
||||
// $Id: G4VRML1FileViewer.cc 66870 2013-01-14 23:38:59Z adotti $
|
||||
//
|
||||
// G4VRMLView.cc
|
||||
// Satoshi Tanaka & Yasuhide Sawada
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id$
|
||||
// $Id: G4VRML1SceneHandler.cc 66870 2013-01-14 23:38:59Z adotti $
|
||||
//
|
||||
// G4VRML1SceneHandler.cc
|
||||
// Yasuhide Sawada and Satoshi Tanaka
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id$
|
||||
// $Id: G4VRML1SceneHandlerFunc.icc 76287 2013-11-08 13:03:49Z gcosmo $
|
||||
//
|
||||
// G4VRML1SceneHandlerFunc.icc
|
||||
// Satoshi Tanaka & Yasuhide Sawada
|
||||
@@ -106,10 +106,10 @@ void G4VRML1SCENEHANDLER::AddSolid(const G4Tubs& tubs)
|
||||
fCurrentDEF = "tubs_" + tubs.GetName();
|
||||
|
||||
// Get data
|
||||
const G4double R = tubs.GetRMax(); // outside radius
|
||||
const G4double r = tubs.GetRMin(); // inside radius
|
||||
const G4double dz = tubs.GetDz(); // half length in z
|
||||
const G4double dp = tubs.GetDPhi(); // angle interval
|
||||
const G4double R = tubs.GetOuterRadius(); // outside radius
|
||||
const G4double r = tubs.GetInnerRadius(); // inside radius
|
||||
const G4double dz = tubs.GetZHalfLength(); // half length in z
|
||||
const G4double dp = tubs.GetDeltaPhiAngle(); // angle interval
|
||||
|
||||
// Send data
|
||||
if ( r == 0.0 && dp >= 360. * CLHEP::deg ) {
|
||||
@@ -144,13 +144,13 @@ void G4VRML1SCENEHANDLER::AddSolid(const G4Cons& cons)
|
||||
fCurrentDEF = "cons_" + cons.GetName();
|
||||
|
||||
// Get data
|
||||
const G4double r1 = cons.GetRmin1(); // inside radius at -dz
|
||||
const G4double R1 = cons.GetRmax1(); // outside radius at -dz
|
||||
const G4double r2 = cons.GetRmin2(); // inside radius at +dz
|
||||
const G4double R2 = cons.GetRmax2(); // outside radius at +dz
|
||||
const G4double dz = cons.GetDz(); // half length in z
|
||||
//const G4double sp = cons.GetSPhi(); // starting angle
|
||||
const G4double dp = cons.GetDPhi(); // angle width
|
||||
const G4double r1 = cons.GetInnerRadiusMinusZ(); // inside radius at -dz
|
||||
const G4double R1 = cons.GetOuterRadiusMinusZ(); // outside radius at -dz
|
||||
const G4double r2 = cons.GetInnerRadiusPlusZ(); // inside radius at +dz
|
||||
const G4double R2 = cons.GetOuterRadiusPlusZ(); // outside radius at +dz
|
||||
const G4double dz = cons.GetZHalfLength(); // half length in z
|
||||
//const G4double sp = cons.GetStartPhiAngle(); // starting angle
|
||||
const G4double dp = cons.GetDeltaPhiAngle(); // angle width
|
||||
|
||||
// Send data
|
||||
if ( r1 == 0.0 && r2 == 0.0 && R1 == R2 && dp >= 360. * CLHEP::deg) {
|
||||
@@ -213,10 +213,10 @@ void G4VRML1SCENEHANDLER::AddSolid(const G4Sphere& sphere)
|
||||
fCurrentDEF = "sphere_" + sphere.GetName();
|
||||
|
||||
// Get data
|
||||
G4double dphi = sphere.GetDPhi () ;
|
||||
G4double dtheta = sphere.GetDTheta() ;
|
||||
G4double rmax = sphere.GetRmax () ;
|
||||
G4double rmin = sphere.GetRmin () ;
|
||||
G4double dphi = sphere.GetDeltaPhiAngle () ;
|
||||
G4double dtheta = sphere.GetDeltaThetaAngle() ;
|
||||
G4double rmax = sphere.GetOuterRadius () ;
|
||||
G4double rmin = sphere.GetInnerRadius () ;
|
||||
|
||||
// Send data
|
||||
if ( (dphi >= 360. * CLHEP::deg) && (dtheta >= 180. * CLHEP::deg) && (rmin == 0.0) ) {
|
||||
@@ -371,19 +371,6 @@ void G4VRML1SCENEHANDLER::AddPrimitive(const G4Polyhedron& polyhedron)
|
||||
|
||||
}
|
||||
|
||||
|
||||
void G4VRML1SCENEHANDLER::AddPrimitive(const G4NURBS&)
|
||||
{
|
||||
#if defined DEBUG_SCENE_FUNC
|
||||
if (G4VisManager::GetVerbosity() >= G4VisManager::errors)
|
||||
G4cout << "***** AddPrimitive nurbs" << "\n" ;
|
||||
#endif
|
||||
if (G4VisManager::GetVerbosity() >= G4VisManager::errors)
|
||||
G4cout << "G4VRML1File::AddPrimitive(G4NURBS&): not implemented. " << "\n" ;
|
||||
VRMLBeginModeling () ;
|
||||
|
||||
}
|
||||
|
||||
void G4VRML1SCENEHANDLER::AddPrimitive( const G4Text& )
|
||||
{
|
||||
#if defined DEBUG_SCENE_FUNC
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id$
|
||||
// $Id: G4VRML1Viewer.cc 66373 2012-12-18 09:41:34Z gcosmo $
|
||||
//
|
||||
// G4VRMLView.cc
|
||||
// Yasuhide Sawada & Satoshi Tanaka
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id$
|
||||
// $Id: G4VRML2.cc 66373 2012-12-18 09:41:34Z gcosmo $
|
||||
//
|
||||
// G4VRML2.cc
|
||||
// Satoshi Tanaka & Yasuhide Sawada
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id$
|
||||
// $Id: G4VRML2File.cc 66373 2012-12-18 09:41:34Z gcosmo $
|
||||
//
|
||||
// G4VRML2File.cc
|
||||
// Satoshi Tanaka & Yasuhide Sawada
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id$
|
||||
// $Id: G4VRML2FileSceneHandler.cc 66870 2013-01-14 23:38:59Z adotti $
|
||||
//
|
||||
// G4VRML2FileSceneHandler.cc
|
||||
// Satoshi Tanaka & Yasuhide Sawada
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id$
|
||||
// $Id: G4VRML2FileViewer.cc 77479 2013-11-25 10:01:22Z gcosmo $
|
||||
//
|
||||
// G4VRML2FileViewer.cc
|
||||
// Satoshi Tanaka & Yasuhide Sawada
|
||||
@@ -39,6 +39,7 @@
|
||||
#include "G4VRML2FileViewer.hh"
|
||||
#include "G4VRML2FileSceneHandler.hh"
|
||||
#include "G4VRML2File.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4ios.hh"
|
||||
|
||||
G4VRML2FileViewer::G4VRML2FileViewer(G4VRML2FileSceneHandler& sceneHandler,
|
||||
@@ -49,8 +50,8 @@ G4VRML2FileViewer::G4VRML2FileViewer(G4VRML2FileSceneHandler& sceneHandler,
|
||||
fSceneHandler(sceneHandler),
|
||||
fDest(sceneHandler.fDest)
|
||||
{
|
||||
fViewHalfAngle = 0.5 * 0.785398 ; // 0.5 * 45*deg
|
||||
fsin_VHA = std::sin ( fViewHalfAngle ) ;
|
||||
fViewHalfAngle = 30. * deg;
|
||||
fsin_VHA = std::sin ( fViewHalfAngle ) ;
|
||||
}
|
||||
|
||||
G4VRML2FileViewer::~G4VRML2FileViewer()
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id$
|
||||
// $Id: G4VRML2SceneHandler.cc 66373 2012-12-18 09:41:34Z gcosmo $
|
||||
//
|
||||
// G4VRML2SceneHandler.cc
|
||||
// Satoshi Tanaka & Yasuhide Sawada
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id$
|
||||
// $Id: G4VRML2SceneHandlerFunc.icc 68043 2013-03-13 14:27:49Z gcosmo $
|
||||
//
|
||||
// G4VRML2SceneHandlerFunc.icc
|
||||
// Satoshi Tanaka & Yasuhide Sawada
|
||||
@@ -33,6 +33,8 @@
|
||||
|
||||
#include "G4VisManager.hh"
|
||||
|
||||
#include <sstream>
|
||||
|
||||
void G4VRML2SCENEHANDLER::AddSolid(const G4Trd& trd)
|
||||
{
|
||||
#if defined DEBUG_SCENE_FUNC
|
||||
@@ -284,19 +286,6 @@ void G4VRML2SCENEHANDLER::AddPrimitive(const G4Polyhedron& polyhedron)
|
||||
|
||||
}
|
||||
|
||||
|
||||
void G4VRML2SCENEHANDLER::AddPrimitive(const G4NURBS&)
|
||||
{
|
||||
#if defined DEBUG_SCENE_FUNC
|
||||
if (G4VisManager::GetVerbosity() >= G4VisManager::errors)
|
||||
G4cout << "***** AddPrimitive nurbs" << "\n" ;
|
||||
#endif
|
||||
if (G4VisManager::GetVerbosity() >= G4VisManager::errors)
|
||||
G4cout << "G4VRML2File::AddPrimitive(G4NURBS&): not implemented. " << "\n" ;
|
||||
|
||||
VRMLBeginModeling () ;
|
||||
}
|
||||
|
||||
void G4VRML2SCENEHANDLER::AddPrimitive( const G4Text& )
|
||||
{
|
||||
#if defined DEBUG_SCENE_FUNC
|
||||
@@ -519,17 +508,19 @@ void G4VRML2SCENEHANDLER::SendMaterialNode( const G4VisAttributes* pVA )
|
||||
|
||||
// Wireframe or not
|
||||
const G4ViewParameters& cur_view_param = fpViewer -> GetViewParameters ();
|
||||
if (pVA->IsForceDrawingStyle() &&
|
||||
(pVA->GetForcedDrawingStyle() == G4VisAttributes::wireframe))
|
||||
{
|
||||
// wireframe style is assigned to this object
|
||||
flagWF = true ;
|
||||
if (pVA) {
|
||||
if (pVA->IsForceDrawingStyle() &&
|
||||
(pVA->GetForcedDrawingStyle() == G4VisAttributes::wireframe))
|
||||
{
|
||||
// wireframe style is assigned to this object
|
||||
flagWF = true ;
|
||||
|
||||
} else if ( cur_view_param.GetDrawingStyle() == G4ViewParameters::wireframe )
|
||||
{
|
||||
// current viewing style is wireframe
|
||||
flagWF = true ;
|
||||
}
|
||||
} else if ( cur_view_param.GetDrawingStyle() == G4ViewParameters::wireframe )
|
||||
{
|
||||
// current viewing style is wireframe
|
||||
flagWF = true ;
|
||||
}
|
||||
}
|
||||
|
||||
// VRML codes are generated below
|
||||
if (!pVA) {
|
||||
@@ -724,9 +715,11 @@ G4double G4VRML2SCENEHANDLER::SetPVTransparency ()
|
||||
if( getenv( "G4VRML_TRANSPARENCY" ) != NULL ) {
|
||||
|
||||
// get a value from the env value
|
||||
sscanf( getenv("G4VRML_TRANSPARENCY"), "%lg", &TRANSPARENCY ) ;
|
||||
// sscanf( getenv("G4VRML_TRANSPARENCY"), "%lg", &TRANSPARENCY ) ;
|
||||
std::istringstream iss( getenv("G4VRML_TRANSPARENCY") );
|
||||
iss >> TRANSPARENCY;
|
||||
|
||||
// truncation
|
||||
// truncation
|
||||
TRANSPARENCY = std::fabs ( TRANSPARENCY ) ;
|
||||
if ( TRANSPARENCY > 1.0 ) { TRANSPARENCY = 1.0 ; }
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id$
|
||||
// $Id: G4VRML2Viewer.cc 66373 2012-12-18 09:41:34Z gcosmo $
|
||||
//
|
||||
// G4VRML2Viewer.cc
|
||||
// Satoshi Tanaka & Yasuhide Sawada
|
||||
|
||||
Reference in New Issue
Block a user