Import Geant4 10.3.0 source tree
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VSceneHandler.hh 73126 2013-08-19 08:01:37Z gcosmo $
|
||||
// $Id: G4VSceneHandler.hh 101714 2016-11-22 08:53:13Z gcosmo $
|
||||
//
|
||||
//
|
||||
// John Allison 19th July 1996.
|
||||
@@ -104,17 +104,24 @@ public: // With description
|
||||
// G4VSceneHandler::PostAddSolid ();
|
||||
// }
|
||||
|
||||
// From geometry/solids/CSG
|
||||
virtual void AddSolid (const G4Box&);
|
||||
virtual void AddSolid (const G4Cons&);
|
||||
virtual void AddSolid (const G4Tubs&);
|
||||
virtual void AddSolid (const G4Trd&);
|
||||
virtual void AddSolid (const G4Trap&);
|
||||
virtual void AddSolid (const G4Sphere&);
|
||||
virtual void AddSolid (const G4Orb&);
|
||||
virtual void AddSolid (const G4Para&);
|
||||
virtual void AddSolid (const G4Sphere&);
|
||||
virtual void AddSolid (const G4Torus&);
|
||||
virtual void AddSolid (const G4Trap&);
|
||||
virtual void AddSolid (const G4Trd&);
|
||||
virtual void AddSolid (const G4Tubs&);
|
||||
|
||||
// From geometry/solids/specific
|
||||
virtual void AddSolid (const G4Ellipsoid&);
|
||||
virtual void AddSolid (const G4Polycone&);
|
||||
virtual void AddSolid (const G4Polyhedra&);
|
||||
virtual void AddSolid (const G4VSolid&); // For solids not above.
|
||||
|
||||
// For solids not above.
|
||||
virtual void AddSolid (const G4VSolid&);
|
||||
|
||||
///////////////////////////////////////////////////////////////////
|
||||
// Methods for adding "compound" GEANT4 objects to the scene
|
||||
@@ -130,6 +137,7 @@ public: // With description
|
||||
virtual void AddCompound (const G4VHit&);
|
||||
virtual void AddCompound (const G4VDigi&);
|
||||
virtual void AddCompound (const G4THitsMap<G4double>&);
|
||||
virtual void AddCompound (const G4THitsMap<G4StatDouble>&);
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
// Functions for adding primitives.
|
||||
@@ -226,9 +234,9 @@ public: // With description
|
||||
//////////////////////////////////////////////////////////////
|
||||
// Public utility functions.
|
||||
|
||||
const G4Colour& GetColour (const G4Visible&);
|
||||
const G4Colour& GetColor (const G4Visible&);
|
||||
// Returns colour of G4Visible object, or default global colour.
|
||||
const G4Colour& GetColour ();
|
||||
const G4Colour& GetColor ();
|
||||
// Returns colour - checks fpVisAttribs and gets applicable colour.
|
||||
|
||||
const G4Colour& GetTextColour (const G4Text&);
|
||||
const G4Colour& GetTextColor (const G4Text&);
|
||||
@@ -279,6 +287,9 @@ public: // With description
|
||||
//////////////////////////////////////////////////////////////
|
||||
// Administration functions.
|
||||
|
||||
template <class T> void AddSolidT (const T& solid);
|
||||
template <class T> void AddSolidWithAuxiliaryEdges (const T& solid);
|
||||
|
||||
G4int IncrementViewCount ();
|
||||
|
||||
virtual void ClearStore ();
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VSceneHandler.icc 66373 2012-12-18 09:41:34Z gcosmo $
|
||||
// $Id: G4VSceneHandler.icc 101714 2016-11-22 08:53:13Z gcosmo $
|
||||
//
|
||||
//
|
||||
// John Allison 19th July 1996.
|
||||
@@ -130,9 +130,14 @@ inline void G4VSceneHandler::SetObjectTransformation (const G4Transform3D& t) {
|
||||
fObjectTransformation = t;
|
||||
}
|
||||
|
||||
inline const G4Colour& G4VSceneHandler::GetColour () {
|
||||
fpVisAttribs = fpViewer->GetApplicableVisAttributes(fpVisAttribs);
|
||||
const G4Colour& colour = fpVisAttribs -> GetColour ();
|
||||
return colour;
|
||||
}
|
||||
|
||||
inline const G4Colour& G4VSceneHandler::GetColor (const G4Visible& visible) {
|
||||
return GetColour (visible);
|
||||
inline const G4Colour& G4VSceneHandler::GetColor () {
|
||||
return GetColour ();
|
||||
}
|
||||
|
||||
inline const G4Colour& G4VSceneHandler::GetTextColor (const G4Text& text) {
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VViewer.hh 95006 2016-01-15 08:26:18Z gcosmo $
|
||||
// $Id: G4VViewer.hh 99668 2016-09-30 08:02:13Z gcosmo $
|
||||
//
|
||||
//
|
||||
// John Allison 27th March 1996
|
||||
@@ -39,6 +39,7 @@
|
||||
#include "globals.hh"
|
||||
|
||||
#include "G4ViewParameters.hh"
|
||||
#include "G4PhysicalVolumeModel.hh"
|
||||
|
||||
class G4VSceneHandler;
|
||||
|
||||
@@ -153,6 +154,48 @@ public: // With description
|
||||
|
||||
protected:
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
// Protected utility functions.
|
||||
|
||||
void SetTouchable
|
||||
(const std::vector<G4PhysicalVolumeModel::G4PhysicalVolumeNodeID>& fullPath);
|
||||
// Set the touchable for /vis/touchable/set/... commands.
|
||||
|
||||
void TouchableSetVisibility
|
||||
(const std::vector<G4PhysicalVolumeModel::G4PhysicalVolumeNodeID>& fullPath,
|
||||
G4bool visibility);
|
||||
// Set the touchable visibility attribute.
|
||||
// Changes the Vis Attribute Modifiers WITHOUT triggering a rebuild.
|
||||
|
||||
void TouchableSetColour
|
||||
(const std::vector<G4PhysicalVolumeModel::G4PhysicalVolumeNodeID>& fullPath,
|
||||
const G4Colour&);
|
||||
// Set the touchable colour attribute.
|
||||
// Changes the Vis Attribute Modifiers WITHOUT triggering a rebuild.
|
||||
|
||||
class G4Spline
|
||||
{
|
||||
public:
|
||||
|
||||
// Constructors and destructor
|
||||
G4Spline();
|
||||
~G4Spline();
|
||||
|
||||
// Operations
|
||||
void AddSplinePoint(const G4Vector3D& v);
|
||||
G4Vector3D GetInterpolatedSplinePoint(float t); // t = 0...1; 0=vp[0] ... 1=vp[max]
|
||||
int GetNumPoints();
|
||||
G4Vector3D GetPoint(int);
|
||||
// method for computing the Catmull-Rom parametric equation
|
||||
// given a time (t) and a vector quadruple (p1,p2,p3,p4).
|
||||
G4Vector3D CatmullRom_Eq(float t, const G4Vector3D& p1, const G4Vector3D& p2,
|
||||
const G4Vector3D& p3, const G4Vector3D& p4);
|
||||
|
||||
private:
|
||||
std::vector<G4Vector3D> vp;
|
||||
float delta_t;
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
// Data members
|
||||
G4VSceneHandler& fSceneHandler; // Abstract scene for this view.
|
||||
@@ -196,26 +239,4 @@ void G4VViewer::DrawView () { // Default - concrete view usually overrides.
|
||||
|
||||
*********************************************/
|
||||
|
||||
class G4Spline
|
||||
{
|
||||
public:
|
||||
|
||||
// Constructors and destructor
|
||||
G4Spline();
|
||||
~G4Spline();
|
||||
|
||||
// Operations
|
||||
void AddSplinePoint(const G4Vector3D& v);
|
||||
G4Vector3D GetInterpolatedSplinePoint(float t); // t = 0...1; 0=vp[0] ... 1=vp[max]
|
||||
int GetNumPoints();
|
||||
G4Vector3D GetPoint(int);
|
||||
// method for computing the Catmull-Rom parametric equation
|
||||
// given a time (t) and a vector quadruple (p1,p2,p3,p4).
|
||||
G4Vector3D CatmullRom_Eq(float t, const G4Vector3D& p1, const G4Vector3D& p2,
|
||||
const G4Vector3D& p3, const G4Vector3D& p4);
|
||||
|
||||
private:
|
||||
std::vector<G4Vector3D> vp;
|
||||
float delta_t;
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VViewer.icc 90651 2015-06-05 13:30:54Z gcosmo $
|
||||
// $Id: G4VViewer.icc 101714 2016-11-22 08:53:13Z gcosmo $
|
||||
//
|
||||
//
|
||||
// John Allison 30th December 1996
|
||||
@@ -72,6 +72,16 @@ inline void G4VViewer::SetDefaultViewParameters (const G4ViewParameters& vp) {
|
||||
fDefaultVP = vp;
|
||||
}
|
||||
|
||||
inline const G4VisAttributes* G4VViewer::GetApplicableVisAttributes
|
||||
(const G4VisAttributes* pVisAttribs) const
|
||||
{
|
||||
// If pVisAttribs is zero, pick up the default vis attributes from
|
||||
// the view parameters.
|
||||
if (!pVisAttribs)
|
||||
pVisAttribs = GetViewParameters().GetDefaultVisAttributes();
|
||||
return pVisAttribs;
|
||||
}
|
||||
|
||||
inline void G4VViewer::SetNeedKernelVisit (G4bool need) {
|
||||
fNeedKernelVisit = need;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ViewParameters.hh 97316 2016-06-01 12:12:58Z gcosmo $
|
||||
// $Id: G4ViewParameters.hh 99418 2016-09-21 09:18:42Z gcosmo $
|
||||
//
|
||||
//
|
||||
// John Allison 19th July 1996
|
||||
@@ -108,11 +108,11 @@ public: // With description
|
||||
freeRotation // Free, Google-like rotation, using mouse-grab.
|
||||
};
|
||||
|
||||
friend std::ostream& operator << (std::ostream&,
|
||||
const DrawingStyle&);
|
||||
friend std::ostream& operator <<
|
||||
(std::ostream&, const DrawingStyle&);
|
||||
|
||||
friend std::ostream& operator << (std::ostream&,
|
||||
const G4ViewParameters&);
|
||||
friend std::ostream& operator <<
|
||||
(std::ostream&, const G4ViewParameters&);
|
||||
|
||||
G4ViewParameters ();
|
||||
~G4ViewParameters ();
|
||||
@@ -249,8 +249,7 @@ public: // With description
|
||||
void SetPicking (G4bool);
|
||||
void SetRotationStyle (RotationStyle);
|
||||
void ClearVisAttributesModifiers ();
|
||||
void AddVisAttributesModifier
|
||||
(const G4ModelingParameters::VisAttributesModifier&);
|
||||
void AddVisAttributesModifier(const G4ModelingParameters::VisAttributesModifier&);
|
||||
|
||||
// Command dumping functions.
|
||||
// For camera commands we need to provide the standard target point from
|
||||
@@ -329,8 +328,7 @@ private:
|
||||
G4Colour fBackgroundColour;
|
||||
G4bool fPicking; // Request picking.
|
||||
RotationStyle fRotationStyle; // Rotation style.
|
||||
std::vector<G4ModelingParameters::VisAttributesModifier>
|
||||
fVisAttributesModifiers;
|
||||
std::vector<G4ModelingParameters::VisAttributesModifier> fVisAttributesModifiers;
|
||||
|
||||
enum { // Constants for geometry mask in ParseGeometry and related functions.
|
||||
fNoValue = 0,
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ViewParameters.icc 97316 2016-06-01 12:12:58Z gcosmo $
|
||||
// $Id: G4ViewParameters.icc 99418 2016-09-21 09:18:42Z gcosmo $
|
||||
//
|
||||
//
|
||||
// John Allison 20th October 1996
|
||||
@@ -390,3 +390,4 @@ inline void G4ViewParameters::SetRotationStyle
|
||||
inline void G4ViewParameters::ClearVisAttributesModifiers () {
|
||||
fVisAttributesModifiers.clear ();
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VisExecutive.icc 96765 2016-05-04 13:28:37Z gcosmo $
|
||||
// $Id: G4VisExecutive.icc 98766 2016-08-09 14:17:17Z gcosmo $
|
||||
//
|
||||
//
|
||||
// John Allison 24th January 1998.
|
||||
@@ -243,14 +243,14 @@ G4VisExecutive::RegisterModelFactories()
|
||||
RegisterModelFactory(new G4TrajectoryDrawByChargeFactory());
|
||||
RegisterModelFactory(new G4TrajectoryDrawByOriginVolumeFactory());
|
||||
RegisterModelFactory(new G4TrajectoryDrawByParticleIDFactory());
|
||||
RegisterModelFactory(new G4TrajectoryDrawByTouchedVolumeFactory());
|
||||
RegisterModelFactory(new G4TrajectoryDrawByEncounteredVolumeFactory());
|
||||
|
||||
// Trajectory filter models
|
||||
RegisterModelFactory(new G4TrajectoryAttributeFilterFactory());
|
||||
RegisterModelFactory(new G4TrajectoryChargeFilterFactory());
|
||||
RegisterModelFactory(new G4TrajectoryOriginVolumeFilterFactory());
|
||||
RegisterModelFactory(new G4TrajectoryParticleFilterFactory());
|
||||
RegisterModelFactory(new G4TrajectoryTouchedVolumeFilterFactory());
|
||||
RegisterModelFactory(new G4TrajectoryEncounteredVolumeFilterFactory());
|
||||
|
||||
// Hit filter models
|
||||
RegisterModelFactory(new G4HitAttributeFilterFactory());
|
||||
|
||||
Reference in New Issue
Block a user