Import Geant4 8.3.0 source tree
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
cvs log $Id: History,v 1.117 2006/11/07 11:53:53 allison Exp $
|
||||
cvs log $Id: History,v 1.118 2007/01/05 14:14:18 allison Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -17,6 +17,14 @@ committal in the CVS repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
5th January 2007 John Allison (greps-V08-02-00)
|
||||
- G4VisAttributes:
|
||||
o SetForceLineSegmentsPerCircle: Bug fix: Now correctly implements reset.
|
||||
o Minor refinement: Introduced IsForceLineSegmentsPerCircle().
|
||||
- G4Colour: Replaced static data members by static functions that
|
||||
create and copy out the relevant colours. (Static data members make
|
||||
a lot of noise in the gdb debugger. Anyway, are best avoided.)
|
||||
|
||||
7th November 2006 John Allison (greps-V08-01-11)
|
||||
- HepPolyhedronEllipticalCone: Bug fix.
|
||||
- G4Visible: Fixed possible minor (subsidiary) memory leak in SetVisAttributes.
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Colour.hh,v 1.13 2006/06/29 19:05:26 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// $Id: G4Colour.hh,v 1.14 2007/01/05 14:06:28 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-08-03 $
|
||||
//
|
||||
//
|
||||
// John Allison 20th October 1996
|
||||
@@ -100,16 +100,16 @@ public: // With description
|
||||
G4double GetBlue () const;
|
||||
G4double GetAlpha () const; // alpha = opacity = 1. - transparency.
|
||||
|
||||
static const G4Colour& White();
|
||||
static const G4Colour& Gray();
|
||||
static const G4Colour& Grey();
|
||||
static const G4Colour& Black();
|
||||
static const G4Colour& Red();
|
||||
static const G4Colour& Green();
|
||||
static const G4Colour& Blue();
|
||||
static const G4Colour& Cyan();
|
||||
static const G4Colour& Magenta();
|
||||
static const G4Colour& Yellow();
|
||||
static G4Colour White();
|
||||
static G4Colour Gray();
|
||||
static G4Colour Grey();
|
||||
static G4Colour Black();
|
||||
static G4Colour Red();
|
||||
static G4Colour Green();
|
||||
static G4Colour Blue();
|
||||
static G4Colour Cyan();
|
||||
static G4Colour Magenta();
|
||||
static G4Colour Yellow();
|
||||
|
||||
static void AddToMap(const G4String& key, const G4Colour& colour);
|
||||
// Add user defined colour to colour map with given key. Standard
|
||||
@@ -123,17 +123,6 @@ public: // With description
|
||||
private:
|
||||
G4double red, green, blue, alpha;
|
||||
|
||||
static const G4Colour fWhite;
|
||||
static const G4Colour fGray;
|
||||
static const G4Colour fGrey;
|
||||
static const G4Colour fBlack;
|
||||
static const G4Colour fRed;
|
||||
static const G4Colour fGreen;
|
||||
static const G4Colour fBlue;
|
||||
static const G4Colour fCyan;
|
||||
static const G4Colour fMagenta;
|
||||
static const G4Colour fYellow;
|
||||
|
||||
static map<G4String, G4Colour> fColourMap;
|
||||
static bool fInitColourMap;
|
||||
|
||||
@@ -145,5 +134,15 @@ inline G4double G4Colour::GetRed () const {return red;}
|
||||
inline G4double G4Colour::GetGreen () const {return green;}
|
||||
inline G4double G4Colour::GetBlue () const {return blue;}
|
||||
inline G4double G4Colour::GetAlpha () const {return alpha;}
|
||||
inline G4Colour G4Colour::White() {return G4Colour(1.0, 1.0, 1.0);}
|
||||
inline G4Colour G4Colour::Gray() {return G4Colour(0.5, 0.5, 0.5);}
|
||||
inline G4Colour G4Colour::Grey() {return G4Colour(0.5, 0.5, 0.5);}
|
||||
inline G4Colour G4Colour::Black() {return G4Colour(0.0, 0.0, 0.0);}
|
||||
inline G4Colour G4Colour::Red() {return G4Colour(1.0, 0.0, 0.0);}
|
||||
inline G4Colour G4Colour::Green() {return G4Colour(0.0, 1.0, 0.0);}
|
||||
inline G4Colour G4Colour::Blue() {return G4Colour(0.0, 0.0, 1.0);}
|
||||
inline G4Colour G4Colour::Cyan() {return G4Colour(0.0, 1.0, 1.0);}
|
||||
inline G4Colour G4Colour::Magenta() {return G4Colour(1.0, 0.0, 1.0);}
|
||||
inline G4Colour G4Colour::Yellow() {return G4Colour(1.0, 1.0, 0.0);}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VisAttributes.hh,v 1.18 2006/10/24 05:54:20 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// $Id: G4VisAttributes.hh,v 1.19 2007/01/05 14:12:13 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-08-03 $
|
||||
//
|
||||
//
|
||||
// John Allison 23rd October 1996
|
||||
@@ -118,6 +118,7 @@ public: // With description
|
||||
G4bool IsForceDrawingStyle () const;
|
||||
ForcedDrawingStyle GetForcedDrawingStyle () const;
|
||||
G4bool IsForceAuxEdgeVisible () const;
|
||||
G4bool IsForceLineSegmentsPerCircle () const;
|
||||
G4int GetForcedLineSegmentsPerCircle () const;
|
||||
G4double GetStartTime () const;
|
||||
G4double GetEndTime () const;
|
||||
|
||||
@@ -24,12 +24,16 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VisAttributes.icc,v 1.13 2006/12/13 15:44:17 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// $Id: G4VisAttributes.icc,v 1.14 2007/01/05 14:12:13 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-08-03 $
|
||||
//
|
||||
//
|
||||
// John Allison 18th November 1996
|
||||
|
||||
inline const G4VisAttributes& G4VisAttributes::GetInvisible() {
|
||||
return Invisible;
|
||||
}
|
||||
|
||||
inline void G4VisAttributes::SetVisibility (G4bool v) {fVisible = v;}
|
||||
|
||||
inline void G4VisAttributes::SetDaughtersInvisible (G4bool v) {
|
||||
@@ -93,6 +97,7 @@ inline void G4VisAttributes::SetAttDefs
|
||||
(const std::map<G4String,G4AttDef>* attDefs) {
|
||||
fAttDefs = attDefs;
|
||||
}
|
||||
|
||||
inline G4bool G4VisAttributes::IsVisible () const {return fVisible;}
|
||||
|
||||
inline G4bool G4VisAttributes::IsDaughtersInvisible () const {
|
||||
@@ -124,6 +129,10 @@ inline G4bool G4VisAttributes::IsForceAuxEdgeVisible () const {
|
||||
return fForceAuxEdgeVisible;
|
||||
}
|
||||
|
||||
inline G4bool G4VisAttributes::IsForceLineSegmentsPerCircle () const {
|
||||
return fForcedLineSegmentsPerCircle > 0;
|
||||
}
|
||||
|
||||
inline G4int G4VisAttributes::GetForcedLineSegmentsPerCircle () const {
|
||||
return fForcedLineSegmentsPerCircle;
|
||||
}
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Colour.cc,v 1.10 2006/06/29 19:06:40 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// $Id: G4Colour.cc,v 1.11 2007/01/05 14:06:28 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-08-03 $
|
||||
//
|
||||
//
|
||||
// John Allison 20th October 1996
|
||||
@@ -71,31 +71,9 @@ G4bool G4Colour::operator != (const G4Colour& c) const {
|
||||
return false;
|
||||
}
|
||||
|
||||
const G4Colour G4Colour::fWhite = G4Colour(1.0, 1.0, 1.0);
|
||||
const G4Colour G4Colour::fGray = G4Colour(0.5, 0.5, 0.5);
|
||||
const G4Colour G4Colour::fGrey = G4Colour::fGray;
|
||||
const G4Colour G4Colour::fBlack = G4Colour(0.0, 0.0, 0.0);
|
||||
const G4Colour G4Colour::fRed = G4Colour(1.0, 0.0, 0.0);
|
||||
const G4Colour G4Colour::fGreen = G4Colour(0.0, 1.0, 0.0);
|
||||
const G4Colour G4Colour::fBlue = G4Colour(0.0, 0.0, 1.0);
|
||||
const G4Colour G4Colour::fCyan = G4Colour(0.0, 1.0, 1.0);
|
||||
const G4Colour G4Colour::fMagenta = G4Colour(1.0, 0.0, 1.0);
|
||||
const G4Colour G4Colour::fYellow = G4Colour(1.0, 1.0, 0.0);
|
||||
|
||||
map<G4String, G4Colour> G4Colour::fColourMap;
|
||||
bool G4Colour::fInitColourMap = false;
|
||||
|
||||
const G4Colour& G4Colour::White() {return fWhite;}
|
||||
const G4Colour& G4Colour::Gray() {return fGray;}
|
||||
const G4Colour& G4Colour::Grey() {return fGrey;}
|
||||
const G4Colour& G4Colour::Black() {return fBlack;}
|
||||
const G4Colour& G4Colour::Red() {return fRed;}
|
||||
const G4Colour& G4Colour::Green() {return fGreen;}
|
||||
const G4Colour& G4Colour::Blue() {return fBlue;}
|
||||
const G4Colour& G4Colour::Cyan() {return fCyan;}
|
||||
const G4Colour& G4Colour::Magenta() {return fMagenta;}
|
||||
const G4Colour& G4Colour::Yellow() {return fYellow;}
|
||||
|
||||
void
|
||||
G4Colour::AddToMap(const G4String& key, const G4Colour& colour)
|
||||
{
|
||||
@@ -119,16 +97,16 @@ void
|
||||
G4Colour::InitialiseColourMap()
|
||||
{
|
||||
// Standard colours
|
||||
AddToMap("white", G4Colour::fWhite);
|
||||
AddToMap("gray", G4Colour::fGray);
|
||||
AddToMap("grey", G4Colour::fGrey);
|
||||
AddToMap("black", G4Colour::fBlack);
|
||||
AddToMap("red", G4Colour::fRed);
|
||||
AddToMap("green", G4Colour::fGreen);
|
||||
AddToMap("blue", G4Colour::fBlue);
|
||||
AddToMap("cyan", G4Colour::fCyan);
|
||||
AddToMap("magenta", G4Colour::fMagenta);
|
||||
AddToMap("yellow", G4Colour::fYellow);
|
||||
AddToMap("white", G4Colour::White());
|
||||
AddToMap("gray", G4Colour::Gray());
|
||||
AddToMap("grey", G4Colour::Grey());
|
||||
AddToMap("black", G4Colour::Black());
|
||||
AddToMap("red", G4Colour::Red());
|
||||
AddToMap("green", G4Colour::Green());
|
||||
AddToMap("blue", G4Colour::Blue());
|
||||
AddToMap("cyan", G4Colour::Cyan());
|
||||
AddToMap("magenta", G4Colour::Magenta());
|
||||
AddToMap("yellow", G4Colour::Yellow());
|
||||
}
|
||||
|
||||
bool
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VisAttributes.cc,v 1.15 2006/10/24 05:54:20 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// $Id: G4VisAttributes.cc,v 1.16 2007/01/05 14:12:13 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-08-03 $
|
||||
//
|
||||
//
|
||||
// John Allison 23rd October 1996
|
||||
@@ -96,10 +96,6 @@ fAttDefs (0)
|
||||
|
||||
const G4VisAttributes G4VisAttributes::Invisible = G4VisAttributes (false);
|
||||
|
||||
const G4VisAttributes& G4VisAttributes::GetInvisible() {
|
||||
return Invisible;
|
||||
}
|
||||
|
||||
const std::vector<G4AttValue>* G4VisAttributes::CreateAttValues () const {
|
||||
// Create an expendable copy on the heap...
|
||||
return new std::vector<G4AttValue>(*fAttValues);
|
||||
@@ -107,7 +103,7 @@ const std::vector<G4AttValue>* G4VisAttributes::CreateAttValues () const {
|
||||
|
||||
void G4VisAttributes::SetForceLineSegmentsPerCircle (G4int nSegments) {
|
||||
const G4int nSegmentsMin = 12;
|
||||
if (nSegments < nSegmentsMin) {
|
||||
if (nSegments > 0 && nSegments < nSegmentsMin) {
|
||||
nSegments = nSegmentsMin;
|
||||
G4cout <<
|
||||
"G4VisAttributes::SetForcedLineSegmentsPerCircle: attempt to set the"
|
||||
|
||||
Reference in New Issue
Block a user