Import Geant4 11.2.0 source tree
This commit is contained in:
@@ -6,6 +6,16 @@ It must **not** be used as a substitute for writing good git commit messages!
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
## 2023-09-27 Stewart Boogert (greps-V11-01-06)
|
||||
- Added centre calculation to HepPolyhedron for use in vis systems
|
||||
|
||||
## 2023-07-01 John Allison (greps-V11-01-05)
|
||||
- G4VisAttributes:
|
||||
- Trap under-limit requested number of line segments per circle for polyhedral
|
||||
representation of circular surfaces.
|
||||
- An under-limit request sets number to minimum (3). (3 may sound ridiculously
|
||||
small, but it's OK for axes and arrows.)
|
||||
|
||||
## 2023-05-09 John Allison (greps-V11-01-04)
|
||||
- Coworks: visman-V11-01-10 and interfaces-V11-01-15.
|
||||
- G4SceneTreeItem:
|
||||
|
||||
@@ -435,6 +435,13 @@ class HepPolyhedron {
|
||||
*/
|
||||
G4int createPolyhedron(G4int Nnodes, G4int Nfaces,
|
||||
const G4double xyz[][3], const G4int faces[][4]);
|
||||
|
||||
/**
|
||||
* Calculate the unweighted mean of all the vertices in the polyhedron. Not to be
|
||||
* confused with the polyhedron centre or centre of mass
|
||||
* @return G4Point3D of the unweighted mean vertex position
|
||||
*/
|
||||
G4Point3D vertexUnweightedMean() const;
|
||||
};
|
||||
|
||||
class HepPolyhedronTrd2 : public HepPolyhedron
|
||||
|
||||
@@ -199,7 +199,7 @@ const std::vector<G4AttValue>* G4VisAttributes::CreateAttValues () const {
|
||||
|
||||
void G4VisAttributes::SetForceLineSegmentsPerCircle (G4int nSegments) {
|
||||
const G4int nSegmentsMin = fMinLineSegmentsPerCircle;
|
||||
if (nSegments > 0 && nSegments < nSegmentsMin) {
|
||||
if (nSegments < nSegmentsMin) {
|
||||
nSegments = nSegmentsMin;
|
||||
G4cout <<
|
||||
"G4VisAttributes::SetForcedLineSegmentsPerCircle: attempt to set the"
|
||||
|
||||
@@ -1929,6 +1929,25 @@ HepPolyhedron::createPolyhedron(G4int Nnodes, G4int Nfaces,
|
||||
return 0;
|
||||
}
|
||||
|
||||
G4Point3D HepPolyhedron::vertexUnweightedMean() const {
|
||||
/***********************************************************************
|
||||
* *
|
||||
* Name: vertexUnweightedMean Date: 23.10.23 *
|
||||
* Author: S. Boogert (Manchester) Revised: *
|
||||
* *
|
||||
* Function: Calculate the unweighted mean of all the vertices *
|
||||
* in the polyhedron. Not to be confused with the polyhedron centre or *
|
||||
* centre of mass *
|
||||
***********************************************************************/
|
||||
|
||||
auto centre = G4Point3D();
|
||||
for(int i=1;i<=nvert;i++) {
|
||||
centre += pV[i];
|
||||
}
|
||||
centre = centre/nvert;
|
||||
return centre;
|
||||
}
|
||||
|
||||
HepPolyhedronTrd2::HepPolyhedronTrd2(G4double Dx1, G4double Dx2,
|
||||
G4double Dy1, G4double Dy2,
|
||||
G4double Dz)
|
||||
|
||||
Reference in New Issue
Block a user