Import Geant4 9.2.0 source tree
This commit is contained in:
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4PolyPhiFace.hh,v 1.10 2007/05/11 13:54:28 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// $Id: G4PolyPhiFace.hh,v 1.12 2008/05/15 11:41:58 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
@@ -57,6 +57,7 @@
|
||||
#define G4PolyPhiFace_hh
|
||||
|
||||
#include "G4VCSGface.hh"
|
||||
#include "G4TwoVector.hh"
|
||||
|
||||
class G4ReduciblePolygon;
|
||||
|
||||
@@ -66,6 +67,11 @@ struct G4PolyPhiFaceVertex
|
||||
G4double rNorm,
|
||||
zNorm; // r/z normal
|
||||
G4ThreeVector norm3D; // 3D normal
|
||||
|
||||
// Needed for Triangulation Algorithm
|
||||
//
|
||||
G4bool ear;
|
||||
G4PolyPhiFaceVertex *next,*prev;
|
||||
};
|
||||
|
||||
struct G4PolyPhiFaceEdge
|
||||
@@ -121,6 +127,12 @@ class G4PolyPhiFace : public G4VCSGface
|
||||
inline G4VCSGface *Clone();
|
||||
// Allocates on the heap a clone of this face.
|
||||
|
||||
G4double SurfaceArea();
|
||||
G4double SurfaceTriangle( G4ThreeVector p1, G4ThreeVector p2,
|
||||
G4ThreeVector p3, G4ThreeVector* p4);
|
||||
G4ThreeVector GetPointOnFace();
|
||||
// Auxiliary methods for determination of points on surface.
|
||||
|
||||
public: // without description
|
||||
|
||||
G4PolyPhiFace(__void__&);
|
||||
@@ -155,6 +167,56 @@ class G4PolyPhiFace : public G4VCSGface
|
||||
|
||||
void CopyStuff( const G4PolyPhiFace &source );
|
||||
|
||||
protected:
|
||||
|
||||
// Functions used for Triangulation in Case of generic Polygone.
|
||||
// The triangulation is used for GetPointOnFace()
|
||||
|
||||
G4double Area2( G4TwoVector a, G4TwoVector b, G4TwoVector c);
|
||||
// Calculation of 2*Area of Triangle with Sign
|
||||
|
||||
G4bool Left( G4TwoVector a, G4TwoVector b, G4TwoVector c );
|
||||
G4bool LeftOn( G4TwoVector a, G4TwoVector b, G4TwoVector c );
|
||||
G4bool Collinear( G4TwoVector a, G4TwoVector b, G4TwoVector c );
|
||||
// Boolean functions for sign of Surface
|
||||
|
||||
G4bool IntersectProp( G4TwoVector a, G4TwoVector b,
|
||||
G4TwoVector c, G4TwoVector d );
|
||||
// Boolean function for finding proper intersection of two
|
||||
// line segments (a,b) and (c,d).
|
||||
|
||||
G4bool Between( G4TwoVector a, G4TwoVector b, G4TwoVector c );
|
||||
// Boolean function for determining if point c is between a and b
|
||||
// where the three points (a,b,c) are on the same line.
|
||||
|
||||
G4bool Intersect( G4TwoVector a, G4TwoVector b,
|
||||
G4TwoVector c, G4TwoVector d );
|
||||
// Boolean function for finding proper intersection or not
|
||||
// of two line segments (a,b) and (c,d).
|
||||
|
||||
G4bool Diagonalie( G4PolyPhiFaceVertex *a, G4PolyPhiFaceVertex *b );
|
||||
// Boolean Diagonalie help to determine if diagonal s
|
||||
// of segment (a,b) is convex or reflex.
|
||||
|
||||
G4bool InCone( G4PolyPhiFaceVertex *a, G4PolyPhiFaceVertex *b );
|
||||
// Boolean function for determining if b is inside the cone (a0,a,a1)
|
||||
// where a is the center of the cone.
|
||||
|
||||
G4bool Diagonal( G4PolyPhiFaceVertex *a, G4PolyPhiFaceVertex *b );
|
||||
// Boolean function for determining if Diagonal is possible
|
||||
// inside Polycone or PolyHedra.
|
||||
|
||||
void EarInit();
|
||||
// Initialisation for Triangulisation by ear tips.
|
||||
// For details see "Computational Geometry in C" by Joseph O'Rourke.
|
||||
|
||||
void Triangulate();
|
||||
// Triangulisation by ear tips for Polycone or Polyhedra.
|
||||
// For details see "Computational Geometry in C" by Joseph O'Rourke.
|
||||
// NOTE: a copy of the shape is made and this copy is reordered in
|
||||
// order to have a list of triangles. This list is used by the
|
||||
// method GetPointOnFace().
|
||||
|
||||
protected:
|
||||
|
||||
G4int numEdges; // Number of edges
|
||||
@@ -163,11 +225,17 @@ class G4PolyPhiFace : public G4VCSGface
|
||||
G4ThreeVector normal; // Normal unit vector
|
||||
G4ThreeVector radial; // Unit vector along radial direction
|
||||
G4ThreeVector surface; // Point on surface
|
||||
G4ThreeVector surface_point; // Auxiliary point on surface used for
|
||||
// method GetPointOnFace()
|
||||
G4double rMin, rMax, // Extent in r
|
||||
zMin, zMax; // Extent in z
|
||||
G4bool allBehind; // True if the polycone/polyhedra
|
||||
// is behind the place of this face
|
||||
G4double kCarTolerance; // Surface thickness
|
||||
G4double kCarTolerance;// Surface thickness
|
||||
G4double fSurfaceArea; // Surface Area of PolyPhiFace
|
||||
G4PolyPhiFaceVertex *triangles; // Auxiliary pointer to 'corners' used for
|
||||
// triangulation. Copy structure, changing
|
||||
// the structure of 'corners' (ear removal)
|
||||
};
|
||||
|
||||
#include "G4PolyPhiFace.icc"
|
||||
|
||||
Reference in New Issue
Block a user