Import Geant4 9.5.0 source tree
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
#
|
||||
# Generated on : 24/9/2010
|
||||
#
|
||||
# $Id: CMakeLists.txt,v 1.1 2010/09/29 18:44:57 bmorgan Exp $
|
||||
# $Id: CMakeLists.txt,v 1.1 2010-09-29 18:44:57 bmorgan Exp $
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# $Id: GNUmakefile,v 1.4 2005/04/07 16:47:18 allison Exp $
|
||||
# $Id: GNUmakefile,v 1.4 2005-04-07 16:47:18 allison Exp $
|
||||
# --------------------------------------------------------------
|
||||
# GNUmakefile for graphics_reps library. John Allison, 19/7/96.
|
||||
# --------------------------------------------------------------
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
cvs log $Id: History,v 1.141 2010/05/30 11:15:52 allison Exp $
|
||||
cvs log $Id: History,v 1.144 2010-12-27 12:18:16 allison Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -17,6 +17,63 @@ committal in the CVS repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
11th November 2011 John Allison (greps-V09-04-10)
|
||||
- Fixed most Coverity warnings.
|
||||
|
||||
2nd November 2011 John Allison (greps-V09-04-09)
|
||||
- G4Colour.hh:
|
||||
o Removed "using std::map" statement.
|
||||
o Addwd GetMap so that current colour map options can be listed.
|
||||
- G4Colour.cc:
|
||||
o Made std scope explicit.
|
||||
o Implemented GetMap.
|
||||
|
||||
29th September 2011 John Allison (greps-V09-04-08)
|
||||
- G4DimensionedType.hh:
|
||||
o Reversed action of 27th Sep. Warnings are false. Function is needed.
|
||||
|
||||
27th September 2011 John Allison (greps-V09-04-07)
|
||||
- G4DimensionedType.hh:
|
||||
o Commented out unused function to suppress project warnings.
|
||||
- G4Polymarker: Added constructor G4Polymarker(const G4VMarker&).
|
||||
- G4VMarker: Added constructor G4VMarker(const G4VMarker&);
|
||||
- G4VMarker.hh, G4Circle.hh, G4Square.hh, G4Polymarker.hh, G4Text.hh:
|
||||
o Tidied.
|
||||
- greps-V09-04-06: Inadvertent tag.
|
||||
|
||||
16th September 2011 John Allison (greps-V09-04-05)
|
||||
- Migrated to new G4Exception.
|
||||
|
||||
2nd August 2011 John Allison (greps-V09-04-04)
|
||||
- G4PolyhedronArbitrary: Added SetReferences and InvertFacets.
|
||||
SetReferences is necessary at the end to complete the polyhedron.
|
||||
It particularly matters if the polyhedron suffers subsequent
|
||||
boolean operations.
|
||||
InvertFacets can be useful.
|
||||
|
||||
1st March 2011 John Allison (greps-V09-04-03)
|
||||
- BooleanProcessor.cc:
|
||||
o Changed cout to G4cout, etc.
|
||||
o Fixed Coverity warnings.
|
||||
|
||||
24th March 2011 Gabriele Cosmo (greps-V09-04-02)
|
||||
- Consistently make use of G4 types in HepPolyhedron and BooleanProcessor,
|
||||
to allow for centralized control of CLHEP classes.
|
||||
|
||||
1st March 2011 John Allison (greps-V09-04-01)
|
||||
- Fixed Coverity warnings.
|
||||
|
||||
27th December 2010 John Allison (greps-V09-04-00)
|
||||
- Tagged.
|
||||
|
||||
7th December 2010 John Allison
|
||||
- Fixed Coverity warnings.
|
||||
|
||||
6th December 2010 John Allison
|
||||
- G4Visible.cc::operator!=: protect zero vis attributes pointers.
|
||||
- G4Visible.cc::operator=: delete allocated vis attributes (fixes
|
||||
memory leak).
|
||||
|
||||
30th May 2010 John Allison (greps-V09-03-02)
|
||||
- G4VVisManager: Added Draw(const G4VDigi&) and FilterDigi(const G4VDigi&).
|
||||
- G4VGraphicsScene: Added AddCompound (const G4VDigi&).
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
$Id: README,v 1.1 1999/01/07 16:09:09 gunter Exp $
|
||||
$Id: README,v 1.1 1999-01-07 16:09:09 gunter Exp $
|
||||
|
||||
FROM 1998, DETAILS ARE NOW IN History
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4AttCheck.hh,v 1.8 2006/10/17 16:14:08 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4AttCheck.hh,v 1.8 2006-10-17 16:14:08 allison Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
|
||||
#ifndef G4ATTCHECK_HH
|
||||
#define G4ATTCHECK_HH
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4AttDef.hh,v 1.7 2006/10/17 16:14:08 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4AttDef.hh,v 1.7 2006-10-17 16:14:08 allison Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
|
||||
#ifndef G4ATTDEF_HH
|
||||
#define G4ATTDEF_HH
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4AttDefStore.hh,v 1.11 2007/04/03 13:58:07 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4AttDefStore.hh,v 1.11 2007-04-03 13:58:07 allison Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
|
||||
#ifndef G4ATTDEFSTORE_HH
|
||||
#define G4ATTDEFSTORE_HH
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4AttDefT.hh,v 1.2 2006/12/13 15:43:57 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4AttDefT.hh,v 1.2 2006-12-13 15:43:57 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
// Templated G4AttDef. Generates type key for given template parameter.
|
||||
//
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4AttHolder.hh,v 1.6 2007/06/08 14:24:29 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4AttHolder.hh,v 1.6 2007-06-08 14:24:29 gcosmo Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
|
||||
#ifndef G4ATTHOLDER_HH
|
||||
#define G4ATTHOLDER_HH
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4AttUtils.hh,v 1.1 2006/09/11 18:04:58 tinslay Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4AttUtils.hh,v 1.1 2006-09-11 18:04:58 tinslay Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
// Jane Tinslay September 2006
|
||||
//
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4AttValue.hh,v 1.5 2006/06/29 19:05:18 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4AttValue.hh,v 1.5 2006-06-29 19:05:18 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
|
||||
#ifndef G4ATTVALUE_HH
|
||||
#define G4ATTVALUE_HH
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Circle.hh,v 1.9 2006/06/29 19:05:20 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4Circle.hh,v 1.9 2006-06-29 19:05:20 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
//
|
||||
// John Allison 17/11/96.
|
||||
@@ -46,8 +46,8 @@ class G4Circle: public G4VMarker {
|
||||
public: // With description
|
||||
|
||||
G4Circle ();
|
||||
G4Circle (const G4VMarker& marker);
|
||||
G4Circle (const G4Point3D& pos);
|
||||
G4Circle (const G4VMarker&);
|
||||
G4Circle (const G4Point3D& position);
|
||||
virtual ~G4Circle ();
|
||||
|
||||
};
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Color.hh,v 1.5 2006/06/29 19:05:23 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4Color.hh,v 1.5 2006-06-29 19:05:23 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
//
|
||||
// John Allison 20th October 1996
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Colour.hh,v 1.14 2007/01/05 14:06:28 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4Colour.hh,v 1.14 2007-01-05 14:06:28 allison Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
//
|
||||
// John Allison 20th October 1996
|
||||
@@ -80,8 +80,6 @@
|
||||
#include <iostream>
|
||||
#include <map>
|
||||
|
||||
using std::map;
|
||||
|
||||
class G4Colour {
|
||||
friend std::ostream& operator << (std::ostream& os, const G4Colour& c);
|
||||
|
||||
@@ -115,16 +113,18 @@ public: // With description
|
||||
// Add user defined colour to colour map with given key. Standard
|
||||
// colours are added to map by default.
|
||||
|
||||
static bool GetColour(const G4String& key, G4Colour& result);
|
||||
static G4bool GetColour(const G4String& key, G4Colour& result);
|
||||
// Get colour for given key. Returns false if key doesn't exist
|
||||
// in colour map, leaving result unchanged. Colour map
|
||||
// is not sensitive to key case.
|
||||
|
||||
static const std::map<G4String, G4Colour>& GetMap();
|
||||
|
||||
private:
|
||||
G4double red, green, blue, alpha;
|
||||
|
||||
static map<G4String, G4Colour> fColourMap;
|
||||
static bool fInitColourMap;
|
||||
static std::map<G4String, G4Colour> fColourMap;
|
||||
static G4bool fInitColourMap;
|
||||
|
||||
static void InitialiseColourMap();
|
||||
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4ConversionFatalError.hh,v 1.2 2006/12/13 15:44:00 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4ConversionFatalError.hh,v 1.2 2006-12-13 15:44:00 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
// Fatal G4Exception error
|
||||
//
|
||||
@@ -35,15 +35,14 @@
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4String.hh"
|
||||
#include <sstream>
|
||||
|
||||
struct G4ConversionFatalError {
|
||||
|
||||
void ReportError(const G4String& input, const G4String& message) const {
|
||||
std::ostringstream o;
|
||||
o <<input<<": "<<message;
|
||||
G4Exception
|
||||
("G4ConversionAbort", "InvalidInput", FatalErrorInArgument, o.str().c_str());
|
||||
G4ExceptionDescription ed;
|
||||
ed <<input<<": "<<message<<G4endl;
|
||||
G4Exception("G4ConversionFatalError::ReportError",
|
||||
"greps0101", FatalErrorInArgument, ed);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4ConversionUtils.hh,v 1.2 2006/09/12 18:29:31 tinslay Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4ConversionUtils.hh,v 1.2 2006-09-12 18:29:31 tinslay Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
// Jane Tinslay September 2006
|
||||
//
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4CreatorFactoryT.hh,v 1.2 2006/12/13 15:44:03 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4CreatorFactoryT.hh,v 1.2 2006-12-13 15:44:03 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
// Generic identifier-creator based factory. Based on
|
||||
// factory presented in "Modern C++ Design, Andrei Alexandrescu"
|
||||
@@ -36,7 +36,6 @@
|
||||
|
||||
#include "globals.hh"
|
||||
#include <map>
|
||||
#include <sstream>
|
||||
|
||||
template <typename T, typename Identifier, typename Creator>
|
||||
class G4CreatorFactoryT {
|
||||
@@ -76,11 +75,12 @@ G4CreatorFactoryT<T, Identifier, Creator>::Register(const Identifier& id,
|
||||
Creator creator)
|
||||
{
|
||||
if (fMap.find(id) != fMap.end()) {
|
||||
std::ostringstream o;
|
||||
o << "Creator with identifier "<<id<<" already exists.";
|
||||
G4ExceptionDescription ed;
|
||||
ed << "Creator with identifier "<<id<<" already exists."<<G4endl;
|
||||
G4Exception
|
||||
("G4CreatorFactoryT::Register(const Identifier& id, Creator creator)",
|
||||
"CreatorExists", JustWarning, o.str().c_str());
|
||||
"greps0102", JustWarning, ed,
|
||||
"Creator exists");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -96,10 +96,11 @@ G4CreatorFactoryT<T, Identifier, Creator>::Create(const Identifier& id) const
|
||||
typename Map::const_iterator iter = fMap.find(id);
|
||||
|
||||
if (iter == fMap.end()) {
|
||||
std::ostringstream o;
|
||||
o << "Identifier "<<id<<" does not exist.";
|
||||
G4ExceptionDescription ed;
|
||||
ed << "Identifier "<<id<<" does not exist."<<G4endl;
|
||||
G4Exception("G4CreatorFactoryT::Create(const Identifier& id)",
|
||||
"NonExistentIdentifier", JustWarning, o.str().c_str());
|
||||
"greps0103", JustWarning, ed,
|
||||
"Non-existent identifier");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4DimensionedDouble.hh,v 1.2 2006/12/13 15:44:05 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4DimensionedDouble.hh,v 1.2 2006-12-13 15:44:05 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
// Dimensioned G4double.
|
||||
//
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4DimensionedThreeVector.hh,v 1.2 2006/12/13 15:44:07 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4DimensionedThreeVector.hh,v 1.2 2006-12-13 15:44:07 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
// Dimensioned G4Threevector.
|
||||
//
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4DimensionedType.hh,v 1.3 2006/12/13 15:44:09 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4DimensionedType.hh,v 1.3 2006-12-13 15:44:09 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
// Generic dimensioned type.
|
||||
//
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4NURBS.hh,v 1.10 2006/06/29 19:05:28 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4NURBS.hh,v 1.11 2010-12-07 09:36:59 allison Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
// Olivier Crumeyrolle 12 September 1996
|
||||
|
||||
@@ -60,7 +60,7 @@ class G4NURBS : public G4Visible
|
||||
// this string is *not* yours (const char)
|
||||
virtual const char* Whoami() const = 0;
|
||||
|
||||
// the copy constructor is private.
|
||||
// the copy constructor and assignment opertor are private.
|
||||
|
||||
// destructor.
|
||||
virtual ~G4NURBS();
|
||||
@@ -404,6 +404,10 @@ class G4NURBS : public G4Visible
|
||||
// Not really necessary for geant. A warning is issued when used.
|
||||
G4NURBS(const G4NURBS &);
|
||||
|
||||
// Private assignment operator - don't use, doesn't exist.
|
||||
// (Added to satisfy Coverity, JA 11/11/11.)
|
||||
G4NURBS& operator= (const G4NURBS&);
|
||||
|
||||
};
|
||||
|
||||
// external representation for t_KnotVectorGenFlag
|
||||
@@ -462,7 +466,7 @@ inline G4int G4NURBS::GetnbrCtrlPts(G4NURBS::t_direction in_dir) const {
|
||||
}
|
||||
|
||||
inline char G4NURBS::Tochar(G4NURBS::t_direction in_dir) {
|
||||
return (in_dir?'V':'U');
|
||||
return (in_dir != U? 'V': 'U');
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
@@ -494,7 +498,7 @@ G4NURBS::TofloatCtrlPt(const t_CtrlPt & in_krcp)
|
||||
inline G4NURBS::t_doubleCtrlPt*
|
||||
G4NURBS::TodoubleCtrlPt(const t_CtrlPt & in_krcp)
|
||||
{
|
||||
G4NURBS::t_doubleCtrlPt * pcopy = new G4NURBS::t_doubleCtrlPt [1];
|
||||
G4NURBS::t_doubleCtrlPt * pcopy = new G4NURBS::t_doubleCtrlPt [4];
|
||||
for (G4int indCoord = X; indCoord < NofC; indCoord++)
|
||||
(*pcopy)[indCoord] = (G4double)in_krcp[indCoord];
|
||||
return pcopy;
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4NURBSbox.hh,v 1.9 2006/06/29 19:05:30 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4NURBSbox.hh,v 1.9 2006-06-29 19:05:30 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
//
|
||||
// Olivier Crumeyrolle 12 September 1996
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4NURBScylinder.hh,v 1.9 2006/06/29 19:05:32 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4NURBScylinder.hh,v 1.9 2006-06-29 19:05:32 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
//
|
||||
// Olivier Crumeyrolle 12 September 1996
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4NURBShexahedron.hh,v 1.9 2006/06/29 19:05:34 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4NURBShexahedron.hh,v 1.9 2006-06-29 19:05:34 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
// Hexa hedron builder prototype
|
||||
// OC 17 9 96
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4NURBStube.hh,v 1.9 2006/06/29 19:05:36 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4NURBStube.hh,v 1.9 2006-06-29 19:05:36 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
//
|
||||
// Olivier Crumeyrolle 12 September 1996
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4NURBStubesector.hh,v 1.8 2006/06/29 19:05:38 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4NURBStubesector.hh,v 1.8 2006-06-29 19:05:38 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
//
|
||||
// Olivier Crumeyrolle 12 September 1996
|
||||
@@ -63,6 +63,11 @@ class G4NURBStubesector : public G4NURBS
|
||||
|
||||
private:
|
||||
static t_inddCtrlPt DecideNbrCtrlPts(G4double PHI1, G4double PHI2);
|
||||
// Private copy constructor and assignment operator added to satisfy
|
||||
// Coverity - JA 11/11/11.
|
||||
G4NURBStubesector(const G4NURBStubesector&);
|
||||
G4NURBStubesector& operator= (const G4NURBStubesector&);
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4PlacedPolyhedron.hh,v 1.11 2006/06/29 19:05:40 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4PlacedPolyhedron.hh,v 1.11 2006-06-29 19:05:40 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
|
||||
|
||||
// Class Description:
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Point3DList.hh,v 1.12 2006/06/29 19:05:43 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4Point3DList.hh,v 1.12 2006-06-29 19:05:43 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
//
|
||||
// John Allison July 1995
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Polyhedron.hh,v 1.21 2008/04/14 08:50:23 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4Polyhedron.hh,v 1.21 2008-04-14 08:50:23 gcosmo Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
|
||||
#ifndef G4POLYHEDRON_HH
|
||||
#define G4POLYHEDRON_HH
|
||||
|
||||
@@ -43,6 +43,13 @@
|
||||
// CHANGE HISTORY
|
||||
// --------------
|
||||
//
|
||||
// 11th November 2011, J Allison. Added private copy constructor and
|
||||
// assignment operator added to satisfy Coverity.
|
||||
// 27th July 2011, J Allison. Added SetReferences and InvertFacets.
|
||||
// SetReferences is necessary at the end to complete the polyhedron.
|
||||
// It particularly matters if the polyhedron suffers subsequent
|
||||
// boolean operations.
|
||||
// InvertFacets can be useful.
|
||||
// 13 January 2006, J Allison. Removed unnecessary operator= functions.
|
||||
// 31 October 2004, P R Truscott, QinetiQ Ltd, UK
|
||||
// Created.
|
||||
@@ -75,10 +82,21 @@ class G4PolyhedronArbitrary : public G4Polyhedron
|
||||
void AddFacet (const G4int iv1, const G4int iv2, const G4int iv3,
|
||||
const G4int iv4=0);
|
||||
|
||||
// Call this after all vertices and facets have been added.
|
||||
void SetReferences() {HepPolyhedron::SetReferences();}
|
||||
|
||||
// Can be useful.
|
||||
void InvertFacets() {HepPolyhedron::InvertFacets();}
|
||||
|
||||
protected:
|
||||
G4int nVertexCount;
|
||||
G4int nFacetCount;
|
||||
|
||||
private:
|
||||
// Private copy constructor and assignment operator added to satisfy
|
||||
// Coverity - JA 11/11/11.
|
||||
G4PolyhedronArbitrary(const G4PolyhedronArbitrary&);
|
||||
G4PolyhedronArbitrary& operator= (const G4PolyhedronArbitrary&);
|
||||
};
|
||||
#endif
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Polyline.hh,v 1.13 2006/06/29 19:05:50 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4Polyline.hh,v 1.13 2006-06-29 19:05:50 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
//
|
||||
// John Allison July 1995
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Polymarker.hh,v 1.11 2006/06/29 19:05:52 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4Polymarker.hh,v 1.11 2006-06-29 19:05:52 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
//
|
||||
// John Allison November 1996
|
||||
@@ -48,9 +48,10 @@ public: // With description
|
||||
friend std::ostream& operator << (std::ostream& os, const G4Polymarker& marker);
|
||||
enum MarkerType {dots, circles, squares};
|
||||
G4Polymarker ();
|
||||
G4Polymarker (const G4VMarker&);
|
||||
virtual ~G4Polymarker ();
|
||||
MarkerType GetMarkerType () const;
|
||||
void SetMarkerType (MarkerType type);
|
||||
void SetMarkerType (MarkerType);
|
||||
private:
|
||||
MarkerType fMarkerType;
|
||||
};
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Polymarker.icc,v 1.4 2006/06/29 19:05:54 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4Polymarker.icc,v 1.4 2006-06-29 19:05:54 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
//
|
||||
// John Allison November 1996
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Scale.hh,v 1.7 2006/06/29 19:05:56 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4Scale.hh,v 1.7 2006-06-29 19:05:56 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
//
|
||||
// John Allison 21st July 2001.
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Scale.icc,v 1.3 2006/06/29 19:05:58 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4Scale.icc,v 1.3 2006-06-29 19:05:58 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
//
|
||||
// John Allison 21st July 2001.
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4SmartFilter.hh,v 1.3 2006/08/25 19:39:39 tinslay Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4SmartFilter.hh,v 1.3 2006-08-25 19:39:39 tinslay Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
// Filter with additional funcionality such as active and inverted states,
|
||||
// and filtering statistics
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Square.hh,v 1.8 2006/06/29 19:06:02 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4Square.hh,v 1.8 2006-06-29 19:06:02 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
//
|
||||
// John Allison 17/11/96.
|
||||
@@ -46,8 +46,8 @@ class G4Square: public G4VMarker {
|
||||
public: // With description
|
||||
|
||||
G4Square ();
|
||||
G4Square (const G4Point3D& pos);
|
||||
G4Square (const G4VMarker& marker);
|
||||
G4Square (const G4VMarker&);
|
||||
G4Square (const G4Point3D& position);
|
||||
~G4Square ();
|
||||
|
||||
};
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Square.icc,v 1.4 2006/06/29 19:06:04 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4Square.icc,v 1.4 2006-06-29 19:06:04 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
//
|
||||
// John Allison 17/11/96.
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Text.hh,v 1.10 2006/06/29 19:06:06 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4Text.hh,v 1.10 2006-06-29 19:06:06 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
//
|
||||
// John Allison 17/11/96.
|
||||
@@ -77,8 +77,8 @@ public: // With description
|
||||
|
||||
enum Layout {left, centre, right};
|
||||
G4Text (const G4String& text);
|
||||
G4Text (const G4String& text, const G4Point3D& pos);
|
||||
G4Text (const G4VMarker& marker);
|
||||
G4Text (const G4String& text, const G4Point3D& position);
|
||||
G4Text (const G4VMarker&);
|
||||
~G4Text ();
|
||||
|
||||
G4String GetText () const;
|
||||
@@ -88,7 +88,7 @@ public: // With description
|
||||
G4double GetYOffset () const ;
|
||||
|
||||
void SetText (const G4String& text);
|
||||
void SetLayout (Layout layout);
|
||||
void SetLayout (Layout);
|
||||
|
||||
void SetOffset ( double dx, double dy ) ;
|
||||
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Text.icc,v 1.4 2006/06/29 19:06:08 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4Text.icc,v 1.4 2006-06-29 19:06:08 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
//
|
||||
// John Allison 17/11/96.
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4TypeKey.hh,v 1.2 2006/12/13 15:44:11 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4TypeKey.hh,v 1.2 2006-12-13 15:44:11 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
// Base type key class
|
||||
//
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4TypeKeyT.hh,v 1.2 2006/12/13 15:44:14 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4TypeKeyT.hh,v 1.2 2006-12-13 15:44:14 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
// Type key class
|
||||
//
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4VFilter.hh,v 1.4 2006/08/25 19:39:39 tinslay Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4VFilter.hh,v 1.4 2006-08-25 19:39:39 tinslay Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
// Abstract filter class.
|
||||
//
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VGraphicsScene.hh,v 1.13 2010/05/30 11:15:36 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04-beta-01 $
|
||||
// $Id: G4VGraphicsScene.hh,v 1.13 2010-05-30 11:15:36 allison Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// John Allison 19th July 1996
|
||||
//
|
||||
// Class Description:
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VMarker.hh,v 1.13 2009/02/24 10:58:04 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-03 $
|
||||
// $Id: G4VMarker.hh,v 1.13 2009-02-24 10:58:04 allison Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
//
|
||||
// G4VMarker - base class for markers - circles, squares, etc.
|
||||
@@ -101,12 +101,17 @@ public: // With description
|
||||
//////////////////////////////////////////////////////
|
||||
// Constructors...
|
||||
G4VMarker ();
|
||||
G4VMarker (const G4Point3D& pos);
|
||||
G4VMarker (const G4VMarker&);
|
||||
G4VMarker (const G4Point3D& position);
|
||||
|
||||
//////////////////////////////////////////////////////
|
||||
// Destructor...
|
||||
virtual ~G4VMarker ();
|
||||
|
||||
//////////////////////////////////////////////////////
|
||||
// Assignment...
|
||||
G4VMarker& operator = (const G4VMarker&);
|
||||
|
||||
//////////////////////////////////////////////////////
|
||||
// Logical...
|
||||
G4bool operator != (const G4VMarker&) const;
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VMarker.icc,v 1.8 2009/02/24 10:58:04 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-03 $
|
||||
// $Id: G4VMarker.icc,v 1.8 2009-02-24 10:58:04 allison Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VVisManager.hh,v 1.18 2010/05/30 11:15:36 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04-beta-01 $
|
||||
// $Id: G4VVisManager.hh,v 1.18 2010-05-30 11:15:36 allison Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// John Allison 19/Oct/1996.
|
||||
//
|
||||
// Class Description:
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VisAttributes.hh,v 1.19 2007/01/05 14:12:13 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4VisAttributes.hh,v 1.19 2007-01-05 14:12:13 allison Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
//
|
||||
// John Allison 23rd October 1996
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VisAttributes.icc,v 1.14 2007/01/05 14:12:13 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4VisAttributes.icc,v 1.14 2007-01-05 14:12:13 allison Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
//
|
||||
// John Allison 18th November 1996
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VisExtent.hh,v 1.10 2006/06/29 19:06:24 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4VisExtent.hh,v 1.10 2006-06-29 19:06:24 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
//
|
||||
// A.Walkden 28/11/95
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Visible.hh,v 1.13 2006/11/07 11:53:16 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4Visible.hh,v 1.13 2006-11-07 11:53:16 allison Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
//
|
||||
// John Allison 30th October 1996
|
||||
@@ -54,7 +54,7 @@ public: // With description
|
||||
|
||||
G4Visible ();
|
||||
G4Visible (const G4Visible&);
|
||||
G4Visible (const G4VisAttributes* pVA);
|
||||
G4Visible (const G4VisAttributes*);
|
||||
|
||||
virtual ~G4Visible ();
|
||||
|
||||
@@ -64,8 +64,8 @@ public: // With description
|
||||
|
||||
const G4VisAttributes* GetVisAttributes () const;
|
||||
|
||||
void SetVisAttributes (const G4VisAttributes* pVA);
|
||||
void SetVisAttributes (const G4VisAttributes& VA);
|
||||
void SetVisAttributes (const G4VisAttributes*);
|
||||
void SetVisAttributes (const G4VisAttributes&);
|
||||
// The G4VisAttributes object is not stored in a G4Visible; only a
|
||||
// reference, a const pointer, is kept. Therefore the
|
||||
// G4VisAttributes object to which it refers must have a life long
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Visible.icc,v 1.8 2006/11/07 11:53:16 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4Visible.icc,v 1.8 2006-11-07 11:53:16 allison Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
//
|
||||
// John Allison 30th October 1996
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: HepPolyhedron.h,v 1.25 2009/10/28 13:38:54 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-03 $
|
||||
// $Id: HepPolyhedron.h,v 1.25 2009-10-28 13:38:54 allison Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
//
|
||||
// Class Description:
|
||||
@@ -169,8 +169,10 @@
|
||||
#ifndef HEP_POLYHEDRON_HH
|
||||
#define HEP_POLYHEDRON_HH
|
||||
|
||||
#include <CLHEP/Geometry/Point3D.h>
|
||||
#include <CLHEP/Geometry/Normal3D.h>
|
||||
#include "G4Types.hh"
|
||||
#include "G4Point3D.hh"
|
||||
#include "G4Normal3D.hh"
|
||||
#include "G4Transform3D.hh"
|
||||
|
||||
#ifndef DEFAULT_NUMBER_OF_STEPS
|
||||
#define DEFAULT_NUMBER_OF_STEPS 24
|
||||
@@ -181,12 +183,12 @@ class G4Facet {
|
||||
friend std::ostream& operator<<(std::ostream&, const G4Facet &facet);
|
||||
|
||||
private:
|
||||
struct G4Edge { int v,f; };
|
||||
struct G4Edge { G4int v,f; };
|
||||
G4Edge edge[4];
|
||||
|
||||
public:
|
||||
G4Facet(int v1=0, int f1=0, int v2=0, int f2=0,
|
||||
int v3=0, int f3=0, int v4=0, int f4=0)
|
||||
G4Facet(G4int v1=0, G4int f1=0, G4int v2=0, G4int f2=0,
|
||||
G4int v3=0, G4int f3=0, G4int v4=0, G4int f4=0)
|
||||
{ edge[0].v=v1; edge[0].f=f1; edge[1].v=v2; edge[1].f=f2;
|
||||
edge[2].v=v3; edge[2].f=f3; edge[3].v=v4; edge[3].f=f4; }
|
||||
};
|
||||
@@ -195,38 +197,38 @@ class HepPolyhedron {
|
||||
friend std::ostream& operator<<(std::ostream&, const HepPolyhedron &ph);
|
||||
|
||||
protected:
|
||||
static int fNumberOfRotationSteps;
|
||||
int nvert, nface;
|
||||
HepGeom::Point3D<double> *pV;
|
||||
static G4int fNumberOfRotationSteps;
|
||||
G4int nvert, nface;
|
||||
G4Point3D *pV;
|
||||
G4Facet *pF;
|
||||
|
||||
// Re-allocate memory for HepPolyhedron
|
||||
void AllocateMemory(int Nvert, int Nface);
|
||||
void AllocateMemory(G4int Nvert, G4int Nface);
|
||||
|
||||
// Find neighbouring facet
|
||||
int FindNeighbour(int iFace, int iNode, int iOrder) const;
|
||||
G4int FindNeighbour(G4int iFace, G4int iNode, G4int iOrder) const;
|
||||
|
||||
// Find normal at node
|
||||
HepGeom::Normal3D<double> FindNodeNormal(int iFace, int iNode) const;
|
||||
G4Normal3D FindNodeNormal(G4int iFace, G4int iNode) const;
|
||||
|
||||
// Create HepPolyhedron for prism with quadrilateral base
|
||||
void CreatePrism();
|
||||
|
||||
// Generate facets by revolving an edge around Z-axis
|
||||
void RotateEdge(int k1, int k2, double r1, double r2,
|
||||
int v1, int v2, int vEdge,
|
||||
bool ifWholeCircle, int ns, int &kface);
|
||||
void RotateEdge(G4int k1, G4int k2, G4double r1, G4double r2,
|
||||
G4int v1, G4int v2, G4int vEdge,
|
||||
G4bool ifWholeCircle, G4int ns, G4int &kface);
|
||||
|
||||
// Set side facets for the case of incomplete rotation
|
||||
void SetSideFacets(int ii[4], int vv[4],
|
||||
int *kk, double *r,
|
||||
double dphi, int ns, int &kface);
|
||||
void SetSideFacets(G4int ii[4], G4int vv[4],
|
||||
G4int *kk, G4double *r,
|
||||
G4double dphi, G4int ns, G4int &kface);
|
||||
|
||||
// Create HepPolyhedron for body of revolution around Z-axis
|
||||
void RotateAroundZ(int nstep, double phi, double dphi,
|
||||
int np1, int np2,
|
||||
const double *z, double *r,
|
||||
int nodeVis, int edgeVis);
|
||||
void RotateAroundZ(G4int nstep, G4double phi, G4double dphi,
|
||||
G4int np1, G4int np2,
|
||||
const G4double *z, G4double *r,
|
||||
G4int nodeVis, G4int edgeVis);
|
||||
|
||||
// For each edge set reference to neighbouring facet
|
||||
void SetReferences();
|
||||
@@ -248,66 +250,64 @@ class HepPolyhedron {
|
||||
HepPolyhedron & operator=(const HepPolyhedron & from);
|
||||
|
||||
// Get number of vertices
|
||||
int GetNoVertices() const { return nvert; }
|
||||
G4int GetNoVertices() const { return nvert; }
|
||||
|
||||
// Get number of facets
|
||||
int GetNoFacets() const { return nface; }
|
||||
G4int GetNoFacets() const { return nface; }
|
||||
|
||||
// Transform the polyhedron
|
||||
HepPolyhedron & Transform(const HepGeom::Transform3D & t);
|
||||
HepPolyhedron & Transform(const G4Transform3D & t);
|
||||
|
||||
// Get next vertex index of the quadrilateral
|
||||
bool GetNextVertexIndex(int & index, int & edgeFlag) const;
|
||||
G4bool GetNextVertexIndex(G4int & index, G4int & edgeFlag) const;
|
||||
|
||||
// Get vertex by index
|
||||
HepGeom::Point3D<double> GetVertex(int index) const;
|
||||
G4Point3D GetVertex(G4int index) const;
|
||||
|
||||
// Get next vertex + edge visibility of the quadrilateral
|
||||
bool GetNextVertex(HepGeom::Point3D<double> & vertex, int & edgeFlag) const;
|
||||
G4bool GetNextVertex(G4Point3D & vertex, G4int & edgeFlag) const;
|
||||
|
||||
// Get next vertex + edge visibility + normal of the quadrilateral
|
||||
bool GetNextVertex(HepGeom::Point3D<double> & vertex, int & edgeFlag,
|
||||
HepGeom::Normal3D<double> & normal) const;
|
||||
G4bool GetNextVertex(G4Point3D & vertex, G4int & edgeFlag,
|
||||
G4Normal3D & normal) const;
|
||||
|
||||
// Get indeces of the next edge with indeces of the faces
|
||||
bool GetNextEdgeIndeces(int & i1, int & i2, int & edgeFlag,
|
||||
int & iface1, int & iface2) const;
|
||||
G4bool GetNextEdgeIndeces(G4int & i1, G4int & i2, G4int & edgeFlag,
|
||||
G4int & iface1, G4int & iface2) const;
|
||||
|
||||
// Get indeces of the next edge
|
||||
bool GetNextEdgeIndeces(int & i1, int & i2, int & edgeFlag) const;
|
||||
G4bool GetNextEdgeIndeces(G4int & i1, G4int & i2, G4int & edgeFlag) const;
|
||||
|
||||
// Get next edge
|
||||
bool GetNextEdge(HepGeom::Point3D<double> &p1,
|
||||
HepGeom::Point3D<double> &p2, int &edgeFlag) const;
|
||||
G4bool GetNextEdge(G4Point3D &p1, G4Point3D &p2, G4int &edgeFlag) const;
|
||||
|
||||
// Get next edge
|
||||
bool GetNextEdge(HepGeom::Point3D<double> &p1,
|
||||
HepGeom::Point3D<double> &p2, int &edgeFlag,
|
||||
int &iface1, int &iface2) const;
|
||||
G4bool GetNextEdge(G4Point3D &p1, G4Point3D &p2, G4int &edgeFlag,
|
||||
G4int &iface1, G4int &iface2) const;
|
||||
|
||||
// Get face by index
|
||||
void GetFacet(int iFace, int &n, int *iNodes,
|
||||
int *edgeFlags = 0, int *iFaces = 0) const;
|
||||
void GetFacet(G4int iFace, G4int &n, G4int *iNodes,
|
||||
G4int *edgeFlags = 0, G4int *iFaces = 0) const;
|
||||
|
||||
// Get face by index
|
||||
void GetFacet(int iFace, int &n, HepGeom::Point3D<double> *nodes,
|
||||
int *edgeFlags=0, HepGeom::Normal3D<double> *normals=0) const;
|
||||
void GetFacet(G4int iFace, G4int &n, G4Point3D *nodes,
|
||||
G4int *edgeFlags=0, G4Normal3D *normals=0) const;
|
||||
|
||||
// Get next face with normals at the nodes
|
||||
bool GetNextFacet(int &n, HepGeom::Point3D<double> *nodes, int *edgeFlags=0,
|
||||
HepGeom::Normal3D<double> *normals=0) const;
|
||||
G4bool GetNextFacet(G4int &n, G4Point3D *nodes, G4int *edgeFlags=0,
|
||||
G4Normal3D *normals=0) const;
|
||||
|
||||
// Get normal of the face given by index
|
||||
HepGeom::Normal3D<double> GetNormal(int iFace) const;
|
||||
G4Normal3D GetNormal(G4int iFace) const;
|
||||
|
||||
// Get unit normal of the face given by index
|
||||
HepGeom::Normal3D<double> GetUnitNormal(int iFace) const;
|
||||
G4Normal3D GetUnitNormal(G4int iFace) const;
|
||||
|
||||
// Get normal of the next face
|
||||
bool GetNextNormal(HepGeom::Normal3D<double> &normal) const;
|
||||
G4bool GetNextNormal(G4Normal3D &normal) const;
|
||||
|
||||
// Get normal of unit length of the next face
|
||||
bool GetNextUnitNormal(HepGeom::Normal3D<double> &normal) const;
|
||||
G4bool GetNextUnitNormal(G4Normal3D &normal) const;
|
||||
|
||||
// Boolean operations
|
||||
HepPolyhedron add(const HepPolyhedron &p) const;
|
||||
@@ -315,16 +315,16 @@ class HepPolyhedron {
|
||||
HepPolyhedron intersect(const HepPolyhedron &p) const;
|
||||
|
||||
// Get area of the surface of the polyhedron
|
||||
double GetSurfaceArea() const;
|
||||
G4double GetSurfaceArea() const;
|
||||
|
||||
// Get volume of the polyhedron
|
||||
double GetVolume() const;
|
||||
G4double GetVolume() const;
|
||||
|
||||
// Get number of steps for whole circle
|
||||
static int GetNumberOfRotationSteps();
|
||||
static G4int GetNumberOfRotationSteps();
|
||||
|
||||
// Set number of steps for whole circle
|
||||
static void SetNumberOfRotationSteps(int n);
|
||||
static void SetNumberOfRotationSteps(G4int n);
|
||||
|
||||
// Reset number of steps for whole circle to default value
|
||||
static void ResetNumberOfRotationSteps();
|
||||
@@ -338,8 +338,8 @@ class HepPolyhedron {
|
||||
* @param xy2 2nd base (at z = +Dz)
|
||||
* @return status of the operation - is non-zero in case of problem
|
||||
*/
|
||||
int createTwistedTrap(double Dz,
|
||||
const double xy1[][2], const double xy2[][2]);
|
||||
G4int createTwistedTrap(G4double Dz,
|
||||
const G4double xy1[][2], const G4double xy2[][2]);
|
||||
|
||||
/**
|
||||
* Creates user defined polyhedron.
|
||||
@@ -358,156 +358,156 @@ class HepPolyhedron {
|
||||
* @param faces faces (quadrilaterals or triangles)
|
||||
* @return status of the operation - is non-zero in case of problem
|
||||
*/
|
||||
int createPolyhedron(int Nnodes, int Nfaces,
|
||||
const double xyz[][3], const int faces[][4]);
|
||||
G4int createPolyhedron(G4int Nnodes, G4int Nfaces,
|
||||
const G4double xyz[][3], const G4int faces[][4]);
|
||||
};
|
||||
|
||||
class HepPolyhedronTrd2 : public HepPolyhedron
|
||||
{
|
||||
public:
|
||||
HepPolyhedronTrd2(double Dx1, double Dx2,
|
||||
double Dy1, double Dy2, double Dz);
|
||||
HepPolyhedronTrd2(G4double Dx1, G4double Dx2,
|
||||
G4double Dy1, G4double Dy2, G4double Dz);
|
||||
virtual ~HepPolyhedronTrd2();
|
||||
};
|
||||
|
||||
class HepPolyhedronTrd1 : public HepPolyhedronTrd2
|
||||
{
|
||||
public:
|
||||
HepPolyhedronTrd1(double Dx1, double Dx2,
|
||||
double Dy, double Dz);
|
||||
HepPolyhedronTrd1(G4double Dx1, G4double Dx2,
|
||||
G4double Dy, G4double Dz);
|
||||
virtual ~HepPolyhedronTrd1();
|
||||
};
|
||||
|
||||
class HepPolyhedronBox : public HepPolyhedronTrd2
|
||||
{
|
||||
public:
|
||||
HepPolyhedronBox(double Dx, double Dy, double Dz);
|
||||
HepPolyhedronBox(G4double Dx, G4double Dy, G4double Dz);
|
||||
virtual ~HepPolyhedronBox();
|
||||
};
|
||||
|
||||
class HepPolyhedronTrap : public HepPolyhedron
|
||||
{
|
||||
public:
|
||||
HepPolyhedronTrap(double Dz, double Theta, double Phi,
|
||||
double Dy1,
|
||||
double Dx1, double Dx2, double Alp1,
|
||||
double Dy2,
|
||||
double Dx3, double Dx4, double Alp2);
|
||||
HepPolyhedronTrap(G4double Dz, G4double Theta, G4double Phi,
|
||||
G4double Dy1,
|
||||
G4double Dx1, G4double Dx2, G4double Alp1,
|
||||
G4double Dy2,
|
||||
G4double Dx3, G4double Dx4, G4double Alp2);
|
||||
virtual ~HepPolyhedronTrap();
|
||||
};
|
||||
|
||||
class HepPolyhedronPara : public HepPolyhedronTrap
|
||||
{
|
||||
public:
|
||||
HepPolyhedronPara(double Dx, double Dy, double Dz,
|
||||
double Alpha, double Theta, double Phi);
|
||||
HepPolyhedronPara(G4double Dx, G4double Dy, G4double Dz,
|
||||
G4double Alpha, G4double Theta, G4double Phi);
|
||||
virtual ~HepPolyhedronPara();
|
||||
};
|
||||
|
||||
class HepPolyhedronParaboloid : public HepPolyhedron
|
||||
{
|
||||
public:
|
||||
HepPolyhedronParaboloid(double r1,
|
||||
double r2,
|
||||
double dz,
|
||||
double Phi1,
|
||||
double Dphi);
|
||||
HepPolyhedronParaboloid(G4double r1,
|
||||
G4double r2,
|
||||
G4double dz,
|
||||
G4double Phi1,
|
||||
G4double Dphi);
|
||||
virtual ~HepPolyhedronParaboloid();
|
||||
};
|
||||
|
||||
class HepPolyhedronHype : public HepPolyhedron
|
||||
{
|
||||
public:
|
||||
HepPolyhedronHype(double r1,
|
||||
double r2,
|
||||
double tan1,
|
||||
double tan2,
|
||||
double halfZ);
|
||||
HepPolyhedronHype(G4double r1,
|
||||
G4double r2,
|
||||
G4double tan1,
|
||||
G4double tan2,
|
||||
G4double halfZ);
|
||||
virtual ~HepPolyhedronHype();
|
||||
};
|
||||
|
||||
class HepPolyhedronCons : public HepPolyhedron
|
||||
{
|
||||
public:
|
||||
HepPolyhedronCons(double Rmn1, double Rmx1,
|
||||
double Rmn2, double Rmx2, double Dz,
|
||||
double Phi1, double Dphi);
|
||||
HepPolyhedronCons(G4double Rmn1, G4double Rmx1,
|
||||
G4double Rmn2, G4double Rmx2, G4double Dz,
|
||||
G4double Phi1, G4double Dphi);
|
||||
virtual ~HepPolyhedronCons();
|
||||
};
|
||||
|
||||
class HepPolyhedronCone : public HepPolyhedronCons
|
||||
{
|
||||
public:
|
||||
HepPolyhedronCone(double Rmn1, double Rmx1,
|
||||
double Rmn2, double Rmx2, double Dz);
|
||||
HepPolyhedronCone(G4double Rmn1, G4double Rmx1,
|
||||
G4double Rmn2, G4double Rmx2, G4double Dz);
|
||||
virtual ~HepPolyhedronCone();
|
||||
};
|
||||
|
||||
class HepPolyhedronTubs : public HepPolyhedronCons
|
||||
{
|
||||
public:
|
||||
HepPolyhedronTubs(double Rmin, double Rmax, double Dz,
|
||||
double Phi1, double Dphi);
|
||||
HepPolyhedronTubs(G4double Rmin, G4double Rmax, G4double Dz,
|
||||
G4double Phi1, G4double Dphi);
|
||||
virtual ~HepPolyhedronTubs();
|
||||
};
|
||||
|
||||
class HepPolyhedronTube : public HepPolyhedronCons
|
||||
{
|
||||
public:
|
||||
HepPolyhedronTube (double Rmin, double Rmax, double Dz);
|
||||
HepPolyhedronTube (G4double Rmin, G4double Rmax, G4double Dz);
|
||||
virtual ~HepPolyhedronTube();
|
||||
};
|
||||
|
||||
class HepPolyhedronPgon : public HepPolyhedron
|
||||
{
|
||||
public:
|
||||
HepPolyhedronPgon(double phi, double dphi, int npdv, int nz,
|
||||
const double *z,
|
||||
const double *rmin,
|
||||
const double *rmax);
|
||||
HepPolyhedronPgon(G4double phi, G4double dphi, G4int npdv, G4int nz,
|
||||
const G4double *z,
|
||||
const G4double *rmin,
|
||||
const G4double *rmax);
|
||||
virtual ~HepPolyhedronPgon();
|
||||
};
|
||||
|
||||
class HepPolyhedronPcon : public HepPolyhedronPgon
|
||||
{
|
||||
public:
|
||||
HepPolyhedronPcon(double phi, double dphi, int nz,
|
||||
const double *z,
|
||||
const double *rmin,
|
||||
const double *rmax);
|
||||
HepPolyhedronPcon(G4double phi, G4double dphi, G4int nz,
|
||||
const G4double *z,
|
||||
const G4double *rmin,
|
||||
const G4double *rmax);
|
||||
virtual ~HepPolyhedronPcon();
|
||||
};
|
||||
|
||||
class HepPolyhedronSphere : public HepPolyhedron
|
||||
{
|
||||
public:
|
||||
HepPolyhedronSphere(double rmin, double rmax,
|
||||
double phi, double dphi,
|
||||
double the, double dthe);
|
||||
HepPolyhedronSphere(G4double rmin, G4double rmax,
|
||||
G4double phi, G4double dphi,
|
||||
G4double the, G4double dthe);
|
||||
virtual ~HepPolyhedronSphere();
|
||||
};
|
||||
|
||||
class HepPolyhedronTorus : public HepPolyhedron
|
||||
{
|
||||
public:
|
||||
HepPolyhedronTorus(double rmin, double rmax, double rtor,
|
||||
double phi, double dphi);
|
||||
HepPolyhedronTorus(G4double rmin, G4double rmax, G4double rtor,
|
||||
G4double phi, G4double dphi);
|
||||
virtual ~HepPolyhedronTorus();
|
||||
};
|
||||
|
||||
class HepPolyhedronEllipsoid : public HepPolyhedron
|
||||
{
|
||||
public:
|
||||
HepPolyhedronEllipsoid(double dx, double dy, double dz,
|
||||
double zcut1, double zcut2);
|
||||
HepPolyhedronEllipsoid(G4double dx, G4double dy, G4double dz,
|
||||
G4double zcut1, G4double zcut2);
|
||||
virtual ~HepPolyhedronEllipsoid();
|
||||
};
|
||||
|
||||
class HepPolyhedronEllipticalCone : public HepPolyhedron
|
||||
{
|
||||
public:
|
||||
HepPolyhedronEllipticalCone(double dx, double dy, double z,
|
||||
double zcut1);
|
||||
HepPolyhedronEllipticalCone(G4double dx, G4double dy, G4double z,
|
||||
G4double zcut1);
|
||||
virtual ~HepPolyhedronEllipticalCone();
|
||||
};
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#
|
||||
# Generated on : 24/9/2010
|
||||
#
|
||||
# $Id: sources.cmake,v 1.1 2010/09/29 18:45:06 bmorgan Exp $
|
||||
# $Id: sources.cmake,v 1.1 2010-09-29 18:45:06 bmorgan Exp $
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -13,11 +13,12 @@
|
||||
|
||||
#ifdef BP_GEANT4 //G.Barrand
|
||||
|
||||
#include <CLHEP/Geometry/Plane3D.h>
|
||||
#include <CLHEP/Geometry/Plane3D.h>
|
||||
typedef HepGeom::Plane3D<double> HVPlane3D;
|
||||
typedef HepGeom::Point3D<double> HVPoint3D;
|
||||
typedef HepGeom::Normal3D<double> HVNormal3D;
|
||||
#include "G4Plane3D.hh"
|
||||
#include "G4Point3D.hh"
|
||||
#include "G4Normal3D.hh"
|
||||
typedef G4Plane3D HVPlane3D;
|
||||
typedef G4Point3D HVPoint3D;
|
||||
typedef G4Normal3D HVNormal3D;
|
||||
|
||||
#else //BP_HEPVIS
|
||||
|
||||
@@ -119,6 +120,7 @@ class ExtNode {
|
||||
ExtNode(const ExtNode & node) : v(node.v), s(node.s) {}
|
||||
|
||||
ExtNode & operator=(const ExtNode & node) {
|
||||
if (&node == this) return *this;
|
||||
v = node.v;
|
||||
s = node.s;
|
||||
return *this;
|
||||
@@ -145,6 +147,7 @@ class ExtEdge {
|
||||
ivis(edge.ivis), inext(edge.inext) {}
|
||||
|
||||
ExtEdge & operator=(const ExtEdge & edge) {
|
||||
if (&edge == this) return *this;
|
||||
i1 = edge.i1;
|
||||
i2 = edge.i2;
|
||||
iface1 = edge.iface1;
|
||||
@@ -194,6 +197,7 @@ class ExtFace {
|
||||
}
|
||||
|
||||
ExtFace & operator=(const ExtFace & face) {
|
||||
if (&face == this) return *this;
|
||||
//FIXME : edges(face.edges) ???? //G.Barrand
|
||||
int i;
|
||||
for (i=0; i<4; i++) { iedges[i] = face.iedges[i]; }
|
||||
@@ -325,11 +329,24 @@ class BooleanProcessor {
|
||||
public:
|
||||
//G.Barrand : BooleanProcessor() {}
|
||||
BooleanProcessor() //G.Barrand
|
||||
:result_faces(faces)
|
||||
:processor_error(0) // The next few fields are work space, initialised
|
||||
,operation(0) // here to prevent Coverity warnings.
|
||||
,ifaces1(0) // "
|
||||
,ifaces2(0) // "
|
||||
,iout1(0) // "
|
||||
,iout2(0) // "
|
||||
,iunk1(0) // "
|
||||
,iunk2(0) // "
|
||||
,del(0.) // "
|
||||
,result_faces(faces)
|
||||
,suitable_faces(faces)
|
||||
,unsuitable_faces(faces)
|
||||
,unknown_faces(faces)
|
||||
{
|
||||
{ // rmin, rmax also initialised here to prevent Coverity warnings.
|
||||
for (int i = 0; i < 3; i++) {
|
||||
rmin[i] = 0.;
|
||||
rmax[i] = 0.;
|
||||
}
|
||||
}
|
||||
|
||||
~BooleanProcessor() {}
|
||||
@@ -444,17 +461,17 @@ void BooleanProcessor::takePolyhedron(const HepPolyhedron & p,
|
||||
if (iNodes[i] < 1 || iNodes[i] > p.GetNoVertices()) { //G.Barrand
|
||||
processor_error = 1;
|
||||
#ifdef BP_DEBUG
|
||||
std::cerr
|
||||
G4cerr
|
||||
<< "BooleanProcessor::takePolyhedron : problem 1."
|
||||
<< std::endl;
|
||||
<< G4endl;
|
||||
#endif
|
||||
}
|
||||
if (iFaces[i] < 1 || iFaces[i] > p.GetNoFacets()) { //G.Barrand
|
||||
processor_error = 1;
|
||||
#ifdef BP_DEBUG
|
||||
std::cerr
|
||||
G4cerr
|
||||
<< "BooleanProcessor::takePolyhedron : problem 2."
|
||||
<< std::endl;
|
||||
<< G4endl;
|
||||
#endif
|
||||
}
|
||||
iNodes[i] += dnode;
|
||||
@@ -494,12 +511,12 @@ void BooleanProcessor::takePolyhedron(const HepPolyhedron & p,
|
||||
|
||||
HVNormal3D n = (nodes[iNodes[2]].v-nodes[iNodes[0]].v).cross
|
||||
(nodes[iNodes[3]].v-nodes[iNodes[1]].v);
|
||||
HVPoint3D p(0,0,0);
|
||||
HVPoint3D point(0,0,0);
|
||||
|
||||
for (i=0; i<nnode; i++) { p += nodes[iNodes[i]].v; }
|
||||
p *= (1./nnode);
|
||||
//G.Barrand : faces.back().plane = HVPlane3D(n.unit(), p);
|
||||
faces.back().plane = HVPlane3D(n, p); //G.Barrand
|
||||
for (i=0; i<nnode; i++) { point += nodes[iNodes[i]].v; }
|
||||
if (nnode > 0) point *= (1./nnode);
|
||||
//G.Barrand : faces.back().plane = HVPlane3D(n.unit(), point);
|
||||
faces.back().plane = HVPlane3D(n, point); //G.Barrand
|
||||
|
||||
// S E T R E F E R E N C E T O T H E N E X T F A C E
|
||||
|
||||
@@ -905,9 +922,9 @@ void BooleanProcessor::caseIE(ExtEdge &, ExtEdge &)
|
||||
{
|
||||
processor_error = 1;
|
||||
#ifdef BP_DEBUG
|
||||
std::cout
|
||||
G4cout
|
||||
<< "BooleanProcessor::caseIE : unimplemented case"
|
||||
<< std::endl;
|
||||
<< G4endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -923,9 +940,9 @@ void BooleanProcessor::caseEE(ExtEdge &, ExtEdge &)
|
||||
{
|
||||
processor_error = 1;
|
||||
#ifdef BP_DEBUG
|
||||
std::cout
|
||||
G4cout
|
||||
<< "BooleanProcessor::caseEE : unimplemented case"
|
||||
<< std::endl;
|
||||
<< G4endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -1085,10 +1102,10 @@ void BooleanProcessor::assembleFace(int what, int iface)
|
||||
}else{
|
||||
processor_error = 1;
|
||||
#ifdef BP_DEBUG
|
||||
std::cerr
|
||||
G4cerr
|
||||
<< "BooleanProcessor::assembleFace(" << iface << ") : "
|
||||
<< "could not find next edge of the contour"
|
||||
<< std::endl;
|
||||
<< G4endl;
|
||||
#endif
|
||||
face.inew = DEFECTIVE_FACE;
|
||||
return;
|
||||
@@ -1611,7 +1628,7 @@ void BooleanProcessor::triangulateContour(int ix, int iy, int ihead)
|
||||
***********************************************************************/
|
||||
{
|
||||
|
||||
//std::cout << "Next Countour" << std::endl;
|
||||
//G4cout << "Next Countour" << G4endl;
|
||||
//int draw_flag = 0;
|
||||
//if (draw_flag) draw_contour(5, 3, ihead);
|
||||
|
||||
@@ -1630,7 +1647,7 @@ void BooleanProcessor::triangulateContour(int ix, int iy, int ihead)
|
||||
|
||||
// L O O P A L O N G C O N T O U R
|
||||
|
||||
//std::cerr << "debug : contour : begin : =================" << std::endl;
|
||||
//G4cerr << "debug : contour : begin : =================" << G4endl;
|
||||
//dump();//debug
|
||||
|
||||
int iedge1, iedge2, iedge3, istart = 0;
|
||||
@@ -1638,12 +1655,12 @@ void BooleanProcessor::triangulateContour(int ix, int iy, int ihead)
|
||||
iedge1 = edges[ipnext].inext;
|
||||
iedge2 = edges[iedge1].inext;
|
||||
/*
|
||||
std::cerr << "debug :"
|
||||
G4cerr << "debug :"
|
||||
<< " ipnext " << ipnext
|
||||
<< " iedge1 " << iedge1
|
||||
<< " iedge2 " << iedge2
|
||||
<< " : istart " << istart
|
||||
<< std::endl;
|
||||
<< G4endl;
|
||||
*/
|
||||
if (istart == 0) {
|
||||
istart = iedge1;
|
||||
@@ -1664,10 +1681,10 @@ void BooleanProcessor::triangulateContour(int ix, int iy, int ihead)
|
||||
}else if (istart == iedge1) {
|
||||
processor_error = 1;
|
||||
#ifdef BP_DEBUG
|
||||
std::cerr
|
||||
G4cerr
|
||||
<< "BooleanProcessor::triangulateContour : "
|
||||
<< "could not generate a triangle (infinite loop)"
|
||||
<< std::endl;
|
||||
<< G4endl;
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
@@ -1728,10 +1745,10 @@ void BooleanProcessor::modifyReference(int iface, int i1, int i2, int iref)
|
||||
}
|
||||
processor_error = 1;
|
||||
#ifdef BP_DEBUG
|
||||
std::cerr
|
||||
G4cerr
|
||||
<< "BooleanProcessor::modifyReference : could not find the edge, "
|
||||
<< "iface=" << iface << ", i1,i2=" << i1 << "," << i2 << ", iref=" << iref
|
||||
<< std::endl;
|
||||
<< G4endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -1793,9 +1810,9 @@ void BooleanProcessor::triangulateFace(int iface)
|
||||
}else{
|
||||
processor_error = 1;
|
||||
#ifdef BP_DEBUG
|
||||
std::cerr
|
||||
G4cerr
|
||||
<< "BooleanProcessor::triangulateFace : too small contour"
|
||||
<< std::endl;
|
||||
<< G4endl;
|
||||
#endif
|
||||
}
|
||||
icontour = edges[iedge].inext;
|
||||
@@ -1805,9 +1822,9 @@ void BooleanProcessor::triangulateFace(int iface)
|
||||
}else{
|
||||
processor_error = 1;
|
||||
#ifdef BP_DEBUG
|
||||
std::cerr
|
||||
G4cerr
|
||||
<< "BooleanProcessor::triangulateFace : broken contour"
|
||||
<< std::endl;
|
||||
<< G4endl;
|
||||
#endif
|
||||
icontour = 0;
|
||||
break;
|
||||
@@ -1826,10 +1843,10 @@ void BooleanProcessor::triangulateFace(int iface)
|
||||
if (kext == (int)external_contours.size()) {
|
||||
processor_error = 1;
|
||||
#ifdef BP_DEBUG
|
||||
std::cerr
|
||||
G4cerr
|
||||
<< "BooleanProcessor::triangulateFace : "
|
||||
<< "could not merge internal contour " << kint
|
||||
<< std::endl;
|
||||
<< G4endl;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -1841,10 +1858,10 @@ void BooleanProcessor::triangulateFace(int iface)
|
||||
triangulateContour(ix, iy, external_contours[kext]);
|
||||
#ifdef BP_DEBUG
|
||||
if(processor_error) { //G.Barrand
|
||||
std::cerr
|
||||
G4cerr
|
||||
<< "BooleanProcessor::triangulateFace : "
|
||||
<< "triangulateContour failed."
|
||||
<< std::endl;
|
||||
<< G4endl;
|
||||
break; //G.Barrand : ok ?
|
||||
}
|
||||
#endif
|
||||
@@ -1859,10 +1876,10 @@ void BooleanProcessor::triangulateFace(int iface)
|
||||
if (edges[iedge].iface1 != ifa) {
|
||||
processor_error = 1;
|
||||
#ifdef BP_DEBUG
|
||||
std::cerr
|
||||
G4cerr
|
||||
<< "BooleanProcessor::triangulateFace : wrong reference to itself, "
|
||||
<< "iface=" << ifa << ", iface1=" << edges[iedge].iface1
|
||||
<< std::endl;
|
||||
<< G4endl;
|
||||
#endif
|
||||
}else if (edges[iedge].iface2 > 0) {
|
||||
modifyReference(edges[iedge].iface2,
|
||||
@@ -1929,9 +1946,9 @@ HepPolyhedron BooleanProcessor::createPolyhedron()
|
||||
iedge = faces[i].iold;
|
||||
while (iedge > 0) {
|
||||
if (k > 3) {
|
||||
std::cerr
|
||||
G4cerr
|
||||
<< "BooleanProcessor::createPolyhedron : too many edges"
|
||||
<< std::endl;
|
||||
<< G4endl;
|
||||
break;
|
||||
}
|
||||
v[k] = nodes[edges[iedge].i1].s;
|
||||
@@ -1941,10 +1958,10 @@ HepPolyhedron BooleanProcessor::createPolyhedron()
|
||||
k++;
|
||||
}
|
||||
if (k < 3) {
|
||||
std::cerr
|
||||
G4cerr
|
||||
<< "BooleanProcessor::createPolyhedron : "
|
||||
<< "face has only " << k << " edges"
|
||||
<< std::endl;
|
||||
<< G4endl;
|
||||
}
|
||||
polyhedron.pF[faces[i].inew] =
|
||||
G4Facet(v[0],f[0], v[1],f[1], v[2],f[2], v[3],f[3]);
|
||||
@@ -1985,10 +2002,10 @@ HepPolyhedron BooleanProcessor::execute(int op,
|
||||
};
|
||||
|
||||
/*
|
||||
std::cerr << "BooleanProcessor::execute : ++++++++++++++++++++++"
|
||||
G4cerr << "BooleanProcessor::execute : ++++++++++++++++++++++"
|
||||
<< a.getName().getString()
|
||||
<< b.getName().getString()
|
||||
<< std::endl;
|
||||
<< G4endl;
|
||||
*/
|
||||
|
||||
// I N I T I A T E P R O C E S S O R
|
||||
@@ -2005,9 +2022,9 @@ HepPolyhedron BooleanProcessor::execute(int op,
|
||||
ifaces2 = faces.size(); takePolyhedron(b,0,0,0);
|
||||
|
||||
if (processor_error) { // corrapted polyhedron
|
||||
std::cerr
|
||||
G4cerr
|
||||
<< "BooleanProcessor: corrapted input polyhedron"
|
||||
<< std::endl;
|
||||
<< G4endl;
|
||||
err = processor_error; //G.Barrand
|
||||
return HepPolyhedron();
|
||||
}
|
||||
@@ -2017,14 +2034,14 @@ HepPolyhedron BooleanProcessor::execute(int op,
|
||||
case OP_UNION:
|
||||
return b;
|
||||
case OP_INTERSECTION:
|
||||
std::cerr
|
||||
G4cerr
|
||||
<< "BooleanProcessor: intersection with empty polyhedron"
|
||||
<< std::endl;
|
||||
<< G4endl;
|
||||
return HepPolyhedron();
|
||||
case OP_SUBTRACTION:
|
||||
std::cerr
|
||||
G4cerr
|
||||
<< "BooleanProcessor: subtraction from empty polyhedron"
|
||||
<< std::endl;
|
||||
<< G4endl;
|
||||
return HepPolyhedron();
|
||||
}
|
||||
}
|
||||
@@ -2034,9 +2051,9 @@ HepPolyhedron BooleanProcessor::execute(int op,
|
||||
case OP_UNION:
|
||||
return a;
|
||||
case OP_INTERSECTION:
|
||||
std::cerr
|
||||
G4cerr
|
||||
<< "BooleanProcessor: intersection with empty polyhedron"
|
||||
<< std::endl;
|
||||
<< G4endl;
|
||||
return HepPolyhedron();
|
||||
case OP_SUBTRACTION:
|
||||
return a;
|
||||
@@ -2051,9 +2068,9 @@ HepPolyhedron BooleanProcessor::execute(int op,
|
||||
|
||||
/*
|
||||
#define PROCESSOR_ERROR(a_what) \
|
||||
std::cerr << "BooleanProcessor: boolean operation problem (" << a_what \
|
||||
G4cerr << "BooleanProcessor: boolean operation problem (" << a_what \
|
||||
<< "). Try again with other shifts."\
|
||||
<< std::endl;
|
||||
<< G4endl;
|
||||
*/
|
||||
#define PROCESSOR_ERROR(a_what)
|
||||
|
||||
@@ -2128,17 +2145,14 @@ HepPolyhedron BooleanProcessor::execute(int op,
|
||||
// A S S E M B L E S U I T A B L E F A C E S
|
||||
|
||||
initiateLists();
|
||||
for (;;) {
|
||||
assemblePolyhedra();
|
||||
if (unknown_faces.front() != 0) {
|
||||
processor_error = 1;
|
||||
assemblePolyhedra();
|
||||
if (unknown_faces.front() != 0) {
|
||||
processor_error = 1;
|
||||
#ifdef BP_DEBUG
|
||||
std::cerr
|
||||
<< "BooleanProcessor::execute : unknown faces !!!"
|
||||
<< std::endl;
|
||||
G4cerr
|
||||
<< "BooleanProcessor::execute : unknown faces !!!"
|
||||
<< G4endl;
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (processor_error) { PROCESSOR_ERROR(7) } //G.Barrand
|
||||
|
||||
@@ -2158,9 +2172,9 @@ HepPolyhedron BooleanProcessor::execute(int op,
|
||||
if(!processor_error) {
|
||||
#ifdef BP_DEBUG
|
||||
if(try_count!=1) {
|
||||
std::cerr
|
||||
G4cerr
|
||||
<< "BooleanProcessor::execute : had converged."
|
||||
<< std::endl;
|
||||
<< G4endl;
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
@@ -2168,20 +2182,22 @@ HepPolyhedron BooleanProcessor::execute(int op,
|
||||
|
||||
if((int)try_count>get_num_shift()) {
|
||||
#ifdef BP_DEBUG
|
||||
std::cerr << "BooleanProcessor: "
|
||||
/*** Commented out because HepPolyhedron does not have getName...?!
|
||||
G4cerr << "BooleanProcessor: "
|
||||
<< " all shifts tried. Boolean operation (" << op << ") failure."
|
||||
<< " a name \"" << a.getName().getString() << "\""
|
||||
<< " b name \"" << b.getName().getString() << "\""
|
||||
<< std::endl;
|
||||
<< G4endl;
|
||||
***/
|
||||
#endif
|
||||
err = processor_error;
|
||||
return a;
|
||||
}
|
||||
|
||||
#ifdef BP_DEBUG
|
||||
std::cerr
|
||||
G4cerr
|
||||
<< "BooleanProcessor::execute : try another tilt..."
|
||||
<< std::endl;
|
||||
<< G4endl;
|
||||
#endif
|
||||
|
||||
try_count++;
|
||||
@@ -2221,28 +2237,28 @@ HepPolyhedron BooleanProcessor::execute(int op,
|
||||
|
||||
for (int i=0; i<4; i++) {
|
||||
|
||||
if (i == 0) cout << "========= Ifaces_1" << endl;
|
||||
if (i == 1) cout << "========= Ifaces_2" << endl;
|
||||
if (i == 2) cout << "========= Iout_1" << endl;
|
||||
if (i == 3) cout << "========= Iout_2" << endl;
|
||||
if (i == 0) G4cout << "========= Ifaces_1" << G4endl;
|
||||
if (i == 1) G4cout << "========= Ifaces_2" << G4endl;
|
||||
if (i == 2) G4cout << "========= Iout_1" << G4endl;
|
||||
if (i == 3) G4cout << "========= Iout_2" << G4endl;
|
||||
|
||||
icol = i+1;
|
||||
iface = ilist[i];
|
||||
while (iface > 0) {
|
||||
|
||||
cout << "iface = " << iface << endl;
|
||||
cout << "--- iold" << endl;
|
||||
G4cout << "iface = " << iface << G4endl;
|
||||
G4cout << "--- iold" << G4endl;
|
||||
|
||||
iedge = faces[iface].iold;
|
||||
icol = 2;
|
||||
|
||||
while (iedge > 0) {
|
||||
|
||||
cout << " iegde = " << iedge
|
||||
G4cout << " iegde = " << iedge
|
||||
<< " i1,i2 =" << edges[iedge].i1 << "," << edges[iedge].i2
|
||||
<< " iface1,iface2 = "
|
||||
<< edges[iedge].iface1 << "," << edges[iedge].iface2
|
||||
<< endl;
|
||||
<< G4endl;
|
||||
|
||||
i1 = edges[iedge].i1;
|
||||
p1[0] = nodes[i1].v.x();
|
||||
@@ -2259,18 +2275,18 @@ HepPolyhedron BooleanProcessor::execute(int op,
|
||||
iedge = edges[iedge].inext;
|
||||
}
|
||||
|
||||
cout << "--- inew" << endl;
|
||||
G4cout << "--- inew" << G4endl;
|
||||
|
||||
iedge = faces[iface].inew;
|
||||
icol = 3;
|
||||
|
||||
while (iedge > 0) {
|
||||
|
||||
cout << " iegde = " << iedge
|
||||
G4cout << " iegde = " << iedge
|
||||
<< " i1,i2 =" << edges[iedge].i1 << "," << edges[iedge].i2
|
||||
<< " iface1,iface2 = "
|
||||
<< edges[iedge].iface1 << "," << edges[iedge].iface2
|
||||
<< endl;
|
||||
<< G4endl;
|
||||
|
||||
i1 = edges[iedge].i1;
|
||||
p1[0] = nodes[i1].v.x();
|
||||
@@ -2339,49 +2355,49 @@ BooleanProcessor::draw_contour(int i1col, int i2col, int ihead) {
|
||||
//--------------------------------------------------------------------
|
||||
void
|
||||
BooleanProcessor::print_face(int iface) {
|
||||
cout.precision(3);
|
||||
cout << "\n====== Face N " << iface << endl;
|
||||
cout << "iedges[4] = "
|
||||
G4cout.precision(3);
|
||||
G4cout << "\n====== Face N " << iface << G4endl;
|
||||
G4cout << "iedges[4] = "
|
||||
<< faces[iface].iedges[0] << ", "
|
||||
<< faces[iface].iedges[1] << ", "
|
||||
<< faces[iface].iedges[2] << ", "
|
||||
<< faces[iface].iedges[3] << endl;
|
||||
cout << "rmin[3] = "
|
||||
<< faces[iface].iedges[3] << G4endl;
|
||||
G4cout << "rmin[3] = "
|
||||
<< faces[iface].rmin[0] << ", "
|
||||
<< faces[iface].rmin[1] << ", "
|
||||
<< faces[iface].rmin[2] << endl;
|
||||
cout << "rmax[3] = "
|
||||
<< faces[iface].rmin[2] << G4endl;
|
||||
G4cout << "rmax[3] = "
|
||||
<< faces[iface].rmax[0] << ", "
|
||||
<< faces[iface].rmax[1] << ", "
|
||||
<< faces[iface].rmax[2] << endl;
|
||||
cout << "iprev,inext = "
|
||||
<< faces[iface].rmax[2] << G4endl;
|
||||
G4cout << "iprev,inext = "
|
||||
<< faces[iface].iprev << ", "
|
||||
<< faces[iface].inext << endl;
|
||||
cout << "iold = " << faces[iface].iold << endl;
|
||||
<< faces[iface].inext << G4endl;
|
||||
G4cout << "iold = " << faces[iface].iold << G4endl;
|
||||
for(int i = faces[iface].iold; i != 0;) {
|
||||
print_edge(i);
|
||||
i = edges[abs(i)].inext;
|
||||
}
|
||||
|
||||
cout << "inew = ";
|
||||
G4cout << "inew = ";
|
||||
switch (faces[iface].inew) {
|
||||
case UNKNOWN_FACE:
|
||||
cout << "UNKNOWN_FACE" << endl;
|
||||
G4cout << "UNKNOWN_FACE" << G4endl;
|
||||
break;
|
||||
case ORIGINAL_FACE:
|
||||
cout << "ORIGINAL_FACE" << endl;
|
||||
G4cout << "ORIGINAL_FACE" << G4endl;
|
||||
break;
|
||||
case NEW_FACE:
|
||||
cout << "NEW_FACE" << endl;
|
||||
G4cout << "NEW_FACE" << G4endl;
|
||||
break;
|
||||
case UNSUITABLE_FACE:
|
||||
cout << "UNSUITABLE_FACE" << endl;
|
||||
G4cout << "UNSUITABLE_FACE" << G4endl;
|
||||
break;
|
||||
case DEFECTIVE_FACE:
|
||||
cout << "DEFECTIVE_FACE" << endl;
|
||||
G4cout << "DEFECTIVE_FACE" << G4endl;
|
||||
break;
|
||||
default:
|
||||
cout << faces[iface].inew << endl;
|
||||
G4cout << faces[iface].inew << G4endl;
|
||||
for(int k = faces[iface].inew; k != 0;) {
|
||||
print_edge(k);
|
||||
k = edges[abs(k)].inext;
|
||||
@@ -2392,37 +2408,37 @@ BooleanProcessor::print_face(int iface) {
|
||||
//--------------------------------------------------------------------
|
||||
void
|
||||
BooleanProcessor::print_edge(int iedge) {
|
||||
cout << "==== Edge N " << iedge << endl;
|
||||
G4cout << "==== Edge N " << iedge << G4endl;
|
||||
int i = std::abs(iedge);
|
||||
int i1 = edges[i].i1;
|
||||
int i2 = edges[i].i2;
|
||||
cout << "node[" << i1 << "] = "
|
||||
G4cout << "node[" << i1 << "] = "
|
||||
<< nodes[i1].v.x() << ", "
|
||||
<< nodes[i1].v.y() << ", "
|
||||
<< nodes[i1].v.z() << endl;
|
||||
<< nodes[i1].v.z() << G4endl;
|
||||
|
||||
cout << "node[" << i2 << "] = "
|
||||
G4cout << "node[" << i2 << "] = "
|
||||
<< nodes[i2].v.x() << ", "
|
||||
<< nodes[i2].v.y() << ", "
|
||||
<< nodes[i2].v.z() << endl;
|
||||
<< nodes[i2].v.z() << G4endl;
|
||||
|
||||
cout << "iface1,iface2,ivis,inext = "
|
||||
G4cout << "iface1,iface2,ivis,inext = "
|
||||
<< edges[i].iface1 << ", "
|
||||
<< edges[i].iface2 << ", "
|
||||
<< edges[i].ivis << ", "
|
||||
<< edges[i].inext << endl;
|
||||
<< edges[i].inext << G4endl;
|
||||
}
|
||||
*/
|
||||
|
||||
void BooleanProcessor::dump() {//G.Barrand
|
||||
unsigned int number = nodes.size();
|
||||
std::cout << "nodes : " << number << endl;
|
||||
G4cout << "nodes : " << number << G4endl;
|
||||
for(unsigned int index=0;index<number;index++) {
|
||||
const ExtNode& node = nodes[index];
|
||||
std::cout << " " << index
|
||||
<< " x = " << node.v[0]
|
||||
<< " y = " << node.v[1]
|
||||
<< " z = " << node.v[2]
|
||||
<< std::endl;
|
||||
G4cout << " " << index
|
||||
<< " x = " << node.v[0]
|
||||
<< " y = " << node.v[1]
|
||||
<< " z = " << node.v[2]
|
||||
<< G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4AttCheck.cc,v 1.15 2006/11/07 11:50:22 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4AttCheck.cc,v 1.16 2010-12-07 09:36:59 allison Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
|
||||
#include "G4AttCheck.hh"
|
||||
|
||||
@@ -131,8 +131,8 @@ G4bool G4AttCheck::Check(const G4String& leader) const {
|
||||
"\nG4AttCheck: ERROR " << iError << ": Null definitions pointer"
|
||||
"\n*******************************************************"
|
||||
<< G4endl;
|
||||
return error;
|
||||
}
|
||||
return error;
|
||||
}
|
||||
vector<G4AttValue>::const_iterator iValue;
|
||||
for (iValue = fpValues->begin(); iValue != fpValues->end(); ++iValue) {
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4AttDef.cc,v 1.2 2006/11/01 10:15:05 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4AttDef.cc,v 1.2 2006-11-01 10:15:05 allison Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
|
||||
#include "G4AttDef.hh"
|
||||
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4AttDefStore.cc,v 1.11 2007/04/03 13:58:08 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4AttDefStore.cc,v 1.11 2007-04-03 13:58:08 allison Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
|
||||
#include "G4AttDefStore.hh"
|
||||
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4AttHolder.cc,v 1.3 2006/11/01 10:11:44 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4AttHolder.cc,v 1.3 2006-11-01 10:11:44 allison Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
|
||||
#include "G4AttHolder.hh"
|
||||
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4AttUtils.cc,v 1.1 2006/09/11 18:04:59 tinslay Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4AttUtils.cc,v 1.1 2006-09-11 18:04:59 tinslay Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
// Jane Tinslay September 2006
|
||||
//
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Circle.cc,v 1.7 2006/06/29 19:06:38 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4Circle.cc,v 1.7 2006-06-29 19:06:38 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -24,16 +24,14 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Colour.cc,v 1.11 2007/01/05 14:06:28 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4Colour.cc,v 1.11 2007-01-05 14:06:28 allison Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
//
|
||||
// John Allison 20th October 1996
|
||||
|
||||
#include "G4Colour.hh"
|
||||
|
||||
#include <sstream>
|
||||
|
||||
G4Colour::G4Colour (G4double r, G4double g, G4double b, G4double a):
|
||||
red (r), green (g), blue (b), alpha (a)
|
||||
{
|
||||
@@ -71,7 +69,7 @@ G4bool G4Colour::operator != (const G4Colour& c) const {
|
||||
return false;
|
||||
}
|
||||
|
||||
map<G4String, G4Colour> G4Colour::fColourMap;
|
||||
std::map<G4String, G4Colour> G4Colour::fColourMap;
|
||||
bool G4Colour::fInitColourMap = false;
|
||||
|
||||
void
|
||||
@@ -81,15 +79,16 @@ G4Colour::AddToMap(const G4String& key, const G4Colour& colour)
|
||||
G4String myKey(key);
|
||||
myKey.toLower();
|
||||
|
||||
map<G4String, G4Colour>::iterator iter = fColourMap.find(myKey);
|
||||
std::map<G4String, G4Colour>::iterator iter = fColourMap.find(myKey);
|
||||
|
||||
if (iter == fColourMap.end()) fColourMap[myKey] = colour;
|
||||
else {
|
||||
std::ostringstream o;
|
||||
o << "G4Colour with key "<<myKey<<" already exists ";
|
||||
G4ExceptionDescription ed;
|
||||
ed << "G4Colour with key "<<myKey<<" already exists."<<G4endl;
|
||||
G4Exception
|
||||
("G4Colour::AddToMap(const G4String& key, const G4Colour& colour)",
|
||||
"ColourKeyExists", JustWarning, o.str().c_str());
|
||||
"greps0001", JustWarning, ed,
|
||||
"Colour key exists");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -121,7 +120,7 @@ G4Colour::GetColour(const G4String& key, G4Colour& result)
|
||||
G4String myKey(key);
|
||||
myKey.toLower();
|
||||
|
||||
map<G4String, G4Colour>::iterator iter = fColourMap.find(myKey);
|
||||
std::map<G4String, G4Colour>::iterator iter = fColourMap.find(myKey);
|
||||
|
||||
// Don't modify "result" if colour was not found in map
|
||||
if (iter == fColourMap.end()) return false;
|
||||
@@ -130,3 +129,14 @@ G4Colour::GetColour(const G4String& key, G4Colour& result)
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
const std::map<G4String, G4Colour>& G4Colour::GetMap()
|
||||
{
|
||||
if (false == fInitColourMap) {
|
||||
fInitColourMap = true;
|
||||
// Add standard colours to map
|
||||
InitialiseColourMap();
|
||||
}
|
||||
|
||||
return fColourMap;
|
||||
}
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4NURBS.cc,v 1.9 2006/06/29 19:06:42 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4NURBS.cc,v 1.10 2010-12-07 09:36:59 allison Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
//
|
||||
// Olivier Crumeyrolle 12 September 1996
|
||||
@@ -391,17 +391,21 @@ void G4NURBS::Conscheck() const
|
||||
{
|
||||
if (m[dir].order<=0)
|
||||
{
|
||||
G4cerr << "\nFATAL ERROR: G4NURBS::G4NURBS: The order in the "
|
||||
<< G4NURBS::Tochar(dir)
|
||||
<< " direction must be >= 1" << G4endl;
|
||||
G4Exception("ERROR - G4NURBS::Conscheck()");
|
||||
G4ExceptionDescription ed;
|
||||
ed << "The order in the "
|
||||
<< G4NURBS::Tochar(dir)
|
||||
<< " direction must be >= 1" << G4endl;
|
||||
G4Exception("G4NURBS::Conscheck()",
|
||||
"greps1001", FatalException, ed);
|
||||
}
|
||||
if (m[dir].nbrCtrlPts<=0)
|
||||
{
|
||||
G4cerr << "\nFATAL ERROR: G4NURBS::G4NURBS: The number of control points "
|
||||
G4ExceptionDescription ed;
|
||||
ed << "The number of control points "
|
||||
<< G4NURBS::Tochar(dir)
|
||||
<< " direction must be >= 1" << G4endl;
|
||||
G4Exception("ERROR - G4NURBS::Conscheck()");
|
||||
G4Exception("G4NURBS::Conscheck()",
|
||||
"greps1002", FatalException, ed);
|
||||
}
|
||||
} // end of dummy
|
||||
}
|
||||
@@ -425,11 +429,12 @@ G4NURBS::G4NURBS ( t_order in_Uorder, t_order in_Vorder,
|
||||
// CtrlPts
|
||||
if (! (mpCtrlPts = in_pCtrlPts) )
|
||||
{
|
||||
G4cerr << "\nFATAL ERROR: G4NURBS::G4NURBS: "
|
||||
<< "A NURBS MUST HAVE CONTROL POINTS!\n"
|
||||
<< "\teven if they are defined later, the array must be allocated."
|
||||
<< G4endl;
|
||||
G4Exception("ERROR - G4NURBS::G4NURBS()");
|
||||
G4ExceptionDescription ed;
|
||||
ed << "A NURBS MUST HAVE CONTROL POINTS!\n"
|
||||
<< "\teven if they are defined later, the array must be allocated."
|
||||
<< G4endl;
|
||||
G4Exception("G4NURBS::G4NURBS()",
|
||||
"greps1003", FatalException, ed);
|
||||
}
|
||||
//mnbralias = 0;
|
||||
|
||||
@@ -442,12 +447,13 @@ G4NURBS::G4NURBS ( t_order in_Uorder, t_order in_Vorder,
|
||||
{ // make some regular knots between 0 & 1
|
||||
if(!MakeKnotVector(m[dir], Regular))
|
||||
{
|
||||
G4cerr << "\nFATAL ERROR: G4NURBS::G4NURBS: "
|
||||
<< "Unable to make a Regular knot vector along "
|
||||
<< G4NURBS::Tochar(dir)
|
||||
<< " direction."
|
||||
<< G4endl;
|
||||
G4Exception("ERROR - G4NURBS::G4NURBS()");
|
||||
G4ExceptionDescription ed;
|
||||
ed << "Unable to make a Regular knot vector along "
|
||||
<< G4NURBS::Tochar(dir)
|
||||
<< " direction."
|
||||
<< G4endl;
|
||||
G4Exception("G4NURBS::G4NURBS()",
|
||||
"greps1004", FatalException, ed);
|
||||
}
|
||||
//m[dir].nbralias = 0;
|
||||
} // end of knots-making
|
||||
@@ -483,17 +489,18 @@ G4NURBS::G4NURBS( t_order in_Uorder, t_order in_Vorder,
|
||||
{
|
||||
t_KnotVectorGenFlag flag = (dummy?in_VKVGFlag:in_UKVGFlag);
|
||||
m[dir].pKnots = 0; // (allocation under our control)
|
||||
if ( flag && !MakeKnotVector(m[dir], flag) )
|
||||
if ( flag != UserDefined && !MakeKnotVector(m[dir], flag) )
|
||||
{
|
||||
G4cerr << "\nFATAL ERROR: G4NURBS::G4NURBS: "
|
||||
<< "Unable to make knot vector along "
|
||||
<< G4NURBS::Tochar(dir)
|
||||
<< " direction. (" << m[dir].nbrKnots
|
||||
<< " knots requested for a "
|
||||
<< flag
|
||||
<< " knots vector)"
|
||||
<< G4endl;
|
||||
G4Exception("ERROR - G4NURBS::G4NURBS()");
|
||||
G4ExceptionDescription ed;
|
||||
ed << "Unable to make knot vector along "
|
||||
<< G4NURBS::Tochar(dir)
|
||||
<< " direction. (" << m[dir].nbrKnots
|
||||
<< " knots requested for a "
|
||||
<< flag
|
||||
<< " knots vector)"
|
||||
<< G4endl;
|
||||
G4Exception("G4NURBS::G4NURBS()",
|
||||
"greps1005", FatalException, ed);
|
||||
}
|
||||
//m[dir].nbralias = 0;
|
||||
}
|
||||
@@ -700,11 +707,14 @@ void G4NURBS::CalcPoint(G4double u, G4double v, G4Point3D &p,
|
||||
rj = orderU - 1 - j;
|
||||
|
||||
tmp = bu[rj] * bv[ri];
|
||||
|
||||
cpoint = GetdoubleCtrlPt(j+ufirst, i+vfirst);
|
||||
cp.x = *cpoint[G4NURBS::X];
|
||||
cp.y = *cpoint[G4NURBS::Y];
|
||||
cp.z = *cpoint[G4NURBS::Z];
|
||||
cp.w = *cpoint[G4NURBS::W];
|
||||
delete [] cpoint;
|
||||
|
||||
r.x += cp.x * tmp;
|
||||
r.y += cp.y * tmp;
|
||||
r.z += cp.z * tmp;
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4NURBSbox.cc,v 1.7 2006/06/29 19:06:45 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4NURBSbox.cc,v 1.7 2006-06-29 19:06:45 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
//
|
||||
// Olivier Crumeyrolle 12 September 1996
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4NURBScylinder.cc,v 1.8 2006/06/29 19:06:47 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4NURBScylinder.cc,v 1.8 2006-06-29 19:06:47 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
//
|
||||
// Olivier Crumeyrolle 12 September 1996
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4NURBShexahedron.cc,v 1.7 2006/06/29 19:06:49 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4NURBShexahedron.cc,v 1.7 2006-06-29 19:06:49 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
// hexahedron implementation
|
||||
// OC 17 9 96
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4NURBStube.cc,v 1.8 2006/06/29 19:06:52 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4NURBStube.cc,v 1.8 2006-06-29 19:06:52 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
//
|
||||
// Olivier Crumeyrolle 12 September 1996
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4NURBStubesector.cc,v 1.12 2006/06/29 19:06:55 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4NURBStubesector.cc,v 1.12 2006-06-29 19:06:55 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
//
|
||||
// Olivier Crumeyrolle 12 September 1996
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4PlacedPolyhedron.cc,v 1.4 2006/06/29 19:06:58 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4PlacedPolyhedron.cc,v 1.4 2006-06-29 19:06:58 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
|
||||
#include "G4PlacedPolyhedron.hh"
|
||||
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Point3DList.cc,v 1.7 2006/06/29 19:07:01 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4Point3DList.cc,v 1.7 2006-06-29 19:07:01 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
//
|
||||
// John Allison July 1995
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Polyhedron.cc,v 1.23 2008/04/14 08:50:23 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4Polyhedron.cc,v 1.23 2008-04-14 08:50:23 gcosmo Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
|
||||
#include "G4Polyhedron.hh"
|
||||
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Polyline.cc,v 1.11 2006/06/29 19:07:08 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4Polyline.cc,v 1.11 2006-06-29 19:07:08 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
//
|
||||
// John Allison July 1995
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Polymarker.cc,v 1.11 2006/06/29 19:07:11 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4Polymarker.cc,v 1.12 2010-12-07 09:36:59 allison Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
//
|
||||
// John Allison November 1996
|
||||
@@ -36,6 +36,11 @@ G4Polymarker::G4Polymarker ():
|
||||
fMarkerType (G4Polymarker::dots)
|
||||
{}
|
||||
|
||||
G4Polymarker::G4Polymarker (const G4VMarker& marker):
|
||||
G4VMarker (marker),
|
||||
fMarkerType (G4Polymarker::dots)
|
||||
{}
|
||||
|
||||
G4Polymarker::~G4Polymarker () {}
|
||||
|
||||
std::ostream& operator << (std::ostream& os, const G4Polymarker& marker) {
|
||||
@@ -50,8 +55,7 @@ std::ostream& operator << (std::ostream& os, const G4Polymarker& marker) {
|
||||
default:
|
||||
os << "unrecognised"; break;
|
||||
}
|
||||
os << "\n ";
|
||||
os << (G4VMarker) marker;
|
||||
os << (G4Point3DList) marker;
|
||||
os << "\n " << (G4VMarker) marker;
|
||||
os << "\n " << (G4Point3DList) marker;
|
||||
return os;
|
||||
}
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Scale.cc,v 1.9 2006/06/29 19:07:14 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4Scale.cc,v 1.9 2006-06-29 19:07:14 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
//
|
||||
// John Allison 21st July 2001
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Square.cc,v 1.6 2006/06/29 19:07:16 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4Square.cc,v 1.6 2006-06-29 19:07:16 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Text.cc,v 1.9 2006/06/29 19:07:19 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4Text.cc,v 1.9 2006-06-29 19:07:19 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
//
|
||||
// John Allison 17/11/96.
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VGraphicsScene.cc,v 1.1 2007/07/17 17:52:20 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4VGraphicsScene.cc,v 1.1 2007-07-17 17:52:20 allison Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// John Allison 19th July 1996
|
||||
|
||||
#include "G4VGraphicsScene.hh"
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VMarker.cc,v 1.12 2009/02/24 10:58:04 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-03 $
|
||||
// $Id: G4VMarker.cc,v 1.12 2009-02-24 10:58:04 allison Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -37,8 +37,18 @@ G4VMarker::G4VMarker ():
|
||||
fPosition (G4Point3D ()),
|
||||
fWorldSize (0.),
|
||||
fScreenSize (0.),
|
||||
fFillStyle (noFill),
|
||||
fInfo (G4String())
|
||||
fFillStyle (noFill)
|
||||
{
|
||||
// fInfo: default initialisation.
|
||||
}
|
||||
|
||||
G4VMarker::G4VMarker (const G4VMarker& m):
|
||||
G4Visible (m),
|
||||
fPosition (m.fPosition),
|
||||
fWorldSize (m.fWorldSize),
|
||||
fScreenSize (m.fScreenSize),
|
||||
fFillStyle (m.fFillStyle),
|
||||
fInfo (m.fInfo)
|
||||
{}
|
||||
|
||||
G4VMarker::G4VMarker (const G4Point3D& pos):
|
||||
@@ -47,17 +57,31 @@ G4VMarker::G4VMarker (const G4Point3D& pos):
|
||||
fScreenSize (0.),
|
||||
fFillStyle (noFill),
|
||||
fInfo (G4String())
|
||||
{}
|
||||
{
|
||||
// fInfo: default initialisation.
|
||||
}
|
||||
|
||||
G4VMarker::~G4VMarker () {}
|
||||
|
||||
G4VMarker& G4VMarker::operator = (const G4VMarker& m) {
|
||||
if (&m == this) return *this;
|
||||
G4Visible::operator = (m);
|
||||
fPosition = m.fPosition;
|
||||
fWorldSize = m.fWorldSize;
|
||||
fScreenSize = m.fScreenSize;
|
||||
fFillStyle = m.fFillStyle;
|
||||
fInfo = m.fInfo;
|
||||
return *this;
|
||||
}
|
||||
|
||||
G4bool G4VMarker::operator != (const G4VMarker& m) const {
|
||||
if (
|
||||
(G4Visible::operator != (m)) ||
|
||||
(fWorldSize != m.fWorldSize) ||
|
||||
(fScreenSize != m.fScreenSize) ||
|
||||
(fFillStyle != m.fFillStyle) ||
|
||||
!(fPosition == m.fPosition)
|
||||
!(fPosition == m.fPosition) ||
|
||||
(fInfo != m.fInfo)
|
||||
)
|
||||
return true;
|
||||
return false;
|
||||
@@ -81,6 +105,7 @@ std::ostream& operator << (std::ostream& os, const G4VMarker& marker) {
|
||||
default:
|
||||
os << "unrecognised"; break;
|
||||
}
|
||||
if (!marker.fInfo.empty()) os << "\n User information: " << marker.fInfo;
|
||||
os << "\n " << (const G4Visible&) marker;
|
||||
return os;
|
||||
}
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VVisManager.cc,v 1.6 2010/05/29 21:35:16 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04-beta-01 $
|
||||
// $Id: G4VVisManager.cc,v 1.6 2010-05-29 21:35:16 allison Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
//
|
||||
// Abstract interface for GEANT4 Visualization Manager.
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VisAttributes.cc,v 1.16 2007/01/05 14:12:13 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4VisAttributes.cc,v 1.17 2010-12-07 09:36:59 allison Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
//
|
||||
// John Allison 23rd October 1996
|
||||
@@ -41,6 +41,7 @@ fColour (G4Colour ()),
|
||||
fLineStyle (unbroken),
|
||||
fLineWidth (1.),
|
||||
fForceDrawingStyle (false),
|
||||
fForcedStyle (wireframe),
|
||||
fForceAuxEdgeVisible (false),
|
||||
fForcedLineSegmentsPerCircle (0), // <=0 means not forced.
|
||||
fStartTime (-DBL_MAX),
|
||||
@@ -56,6 +57,7 @@ fColour (G4Colour ()),
|
||||
fLineStyle (unbroken),
|
||||
fLineWidth (1.),
|
||||
fForceDrawingStyle (false),
|
||||
fForcedStyle (wireframe),
|
||||
fForceAuxEdgeVisible (false),
|
||||
fForcedLineSegmentsPerCircle (0), // <=0 means not forced.
|
||||
fStartTime (-DBL_MAX),
|
||||
@@ -71,6 +73,7 @@ fColour (colour),
|
||||
fLineStyle (unbroken),
|
||||
fLineWidth (1.),
|
||||
fForceDrawingStyle (false),
|
||||
fForcedStyle (wireframe),
|
||||
fForceAuxEdgeVisible (false),
|
||||
fForcedLineSegmentsPerCircle (0), // <=0 means not forced.
|
||||
fStartTime (-DBL_MAX),
|
||||
@@ -81,17 +84,19 @@ fAttDefs (0)
|
||||
|
||||
G4VisAttributes::G4VisAttributes (G4bool visibility,
|
||||
const G4Colour& colour):
|
||||
fVisible (visibility),
|
||||
fDaughtersInvisible (false),
|
||||
fColour (colour),
|
||||
fLineStyle (unbroken),
|
||||
fLineWidth (1.),
|
||||
fForceDrawingStyle (false),
|
||||
fVisible (visibility),
|
||||
fDaughtersInvisible (false),
|
||||
fColour (colour),
|
||||
fLineStyle (unbroken),
|
||||
fLineWidth (1.),
|
||||
fForceDrawingStyle (false),
|
||||
fForcedStyle (wireframe),
|
||||
fForceAuxEdgeVisible (false),
|
||||
fForcedLineSegmentsPerCircle (0), // <=0 means not forced.
|
||||
fStartTime (-DBL_MAX),
|
||||
fEndTime (DBL_MAX),
|
||||
fAttValues (0),
|
||||
fAttDefs (0)
|
||||
fAttValues (0),
|
||||
fAttDefs (0)
|
||||
{}
|
||||
|
||||
const G4VisAttributes G4VisAttributes::Invisible = G4VisAttributes (false);
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VisExtent.cc,v 1.10 2006/06/29 19:07:28 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4VisExtent.cc,v 1.10 2006-06-29 19:07:28 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
//
|
||||
// A.Walkden 28/11/95
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Visible.cc,v 1.17 2006/11/07 11:53:16 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4Visible.cc,v 1.18 2010-12-06 14:39:28 allison Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
//
|
||||
// John Allison 30th October 1996
|
||||
@@ -57,9 +57,12 @@ G4Visible::~G4Visible () {
|
||||
}
|
||||
|
||||
G4Visible& G4Visible::operator= (const G4Visible& rhs) {
|
||||
if (&rhs == this) return *this;
|
||||
fAllocatedVisAttributes = rhs.fAllocatedVisAttributes;
|
||||
if (fAllocatedVisAttributes)
|
||||
if (fAllocatedVisAttributes) {
|
||||
delete fpVisAttributes;
|
||||
fpVisAttributes = new G4VisAttributes(rhs.fpVisAttributes);
|
||||
}
|
||||
else fpVisAttributes = rhs.fpVisAttributes;
|
||||
return *this;
|
||||
}
|
||||
@@ -83,7 +86,10 @@ void G4Visible::SetVisAttributes (const G4VisAttributes* pVA) {
|
||||
}
|
||||
|
||||
G4bool G4Visible::operator != (const G4Visible& right) const {
|
||||
return *fpVisAttributes != *right.fpVisAttributes;
|
||||
if (fpVisAttributes && right.fpVisAttributes)
|
||||
return *fpVisAttributes != *right.fpVisAttributes;
|
||||
else if (!fpVisAttributes && !right.fpVisAttributes) return false;
|
||||
else return true;
|
||||
}
|
||||
|
||||
std::ostream& operator << (std::ostream& os, const G4Visible& v) {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user