Geant4  10.03.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4TessellatedGeometryAlgorithms.hh
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration and of QinetiQ Ltd, *
20 // * subject to DEFCON 705 IPR conditions. *
21 // * By using, copying, modifying or distributing the software (or *
22 // * any work based on the software) you agree to acknowledge its *
23 // * use in resulting scientific publications, and indicate your *
24 // * acceptance of all terms of the Geant4 Software license. *
25 // ********************************************************************
26 //
27 // $Id:
28 //
29 // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
30 //
31 // Class G4TessellatedGeometryAlgorithms
32 //
33 // Class description:
34 //
35 // The G4TessellatedGeometryAlgorithms class is used to contain standard
36 // routines to determine whether (and if so where) simple geometric shapes
37 // intersect.
38 //
39 // The constructor doesn't need to do anything, and neither does the
40 // destructor.
41 //
42 // IntersectLineAndTriangle2D
43 // Determines whether there is an intersection between a line defined
44 // by r = p + s.v and a triangle defined by verticies P0, P0+E0 and P0+E1.
45 // Here:
46 // p = 2D vector
47 // s = scaler on [0,infinity)
48 // v = 2D vector
49 // P0, E0 and E1 are 2D vectors
50 // Information about where the intersection occurs is returned in the
51 // variable location.
52 //
53 // IntersectLineAndLineSegment2D
54 // Determines whether there is an intersection between a line defined
55 // by r = P0 + s.D0 and a line-segment with endpoints P1 and P1+D1.
56 // Here:
57 // P0 = 2D vector
58 // s = scaler on [0,infinity)
59 // D0 = 2D vector
60 // P1 and D1 are 2D vectors
61 // Information about where the intersection occurs is returned in the
62 // variable location.
63 
64 // CHANGE HISTORY
65 // --------------
66 //
67 // 07 August 2007, P R Truscott, QinetiQ Ltd, UK - Created, with member
68 // functions based on the work of Rickard Holmberg.
69 // 12 October 2012, M Gayer, CERN, - Reviewed optimized implementation.
70 //
72 #ifndef G4TessellatedGeometryAlgorithms_hh
73 #define G4TessellatedGeometryAlgorithms_hh 1
74 
75 #include "G4TwoVector.hh"
76 
78 {
79  public:
80 
82  const G4TwoVector &v,
83  const G4TwoVector &p0,
84  const G4TwoVector &e0,
85  const G4TwoVector &e1,
86  G4TwoVector location[2]);
88  const G4TwoVector &d0,
89  const G4TwoVector &p1,
90  const G4TwoVector &d1,
91  G4TwoVector location[2]);
92  static G4double cross(const G4TwoVector &v1, const G4TwoVector &v2);
93 };
94 
95 #endif
const char * p
Definition: xmltok.h:285
static G4double cross(const G4TwoVector &v1, const G4TwoVector &v2)
int G4int
Definition: G4Types.hh:78
bool G4bool
Definition: G4Types.hh:79
static const G4double d1
tuple v
Definition: test.py:18
static G4bool IntersectLineAndTriangle2D(const G4TwoVector &p, const G4TwoVector &v, const G4TwoVector &p0, const G4TwoVector &e0, const G4TwoVector &e1, G4TwoVector location[2])
double G4double
Definition: G4Types.hh:76
static G4int IntersectLineAndLineSegment2D(const G4TwoVector &p0, const G4TwoVector &d0, const G4TwoVector &p1, const G4TwoVector &d1, G4TwoVector location[2])