Geant4  10.03
G4RayTrajectoryPoint.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. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 //
27 // $Id: G4RayTrajectoryPoint.hh 77479 2013-11-25 10:01:22Z gcosmo $
28 //
29 //
30 
31 // class description:
32 //
33 // This is a concrete class of G4VTrajectoryPoint which represents a point where
34 // a ray crosses upon a surface of a volume regardless of its visibility. Objects
35 // of this class are created by G4RayTrajectory class object.
36 //
37 
39 //G4RayTrajectoryPoint.hh
41 
42 #ifndef G4RayTrajectoryPoint_h
43 #define G4RayTrajectoryPoint_h 1
44 
45 class G4VisAttributes;
46 #include "globals.hh"
47 #include "G4VTrajectoryPoint.hh"
48 #include "G4Allocator.hh"
49 #include "G4ThreeVector.hh"
50 
52 {
53  public:
55  virtual ~G4RayTrajectoryPoint();
56 
57  inline void *operator new(size_t);
58  inline void operator delete(void *aTrajectoryPoint);
59  // inline int operator==(const G4RayTrajectoryPoint& right) const
60  // { return (this==&right); };
61 
62  private:
67 
68  public:
69  inline void SetPreStepAtt(const G4VisAttributes* val) { preStepAtt = val; }
70  inline const G4VisAttributes* GetPreStepAtt() const { return preStepAtt; }
71  inline void SetPostStepAtt(const G4VisAttributes* val) { postStepAtt = val; }
72  inline const G4VisAttributes* GetPostStepAtt() const { return postStepAtt; }
73  inline void SetSurfaceNormal(const G4ThreeVector& val) { surfaceNormal = val; }
74  inline G4ThreeVector GetSurfaceNormal() const { return surfaceNormal; }
75  inline void SetStepLength(G4double val) { stepLength = val; }
76  inline G4double GetStepLength() const { return stepLength; }
77 
78  inline const G4ThreeVector GetPosition() const { return G4ThreeVector();}
79  // Dummy function (not used) to satisfy base class pure virtual function.
80 };
81 
82 #if defined G4VIS_ALLOC_EXPORT
84 #else
86 #endif
87 
88 inline void* G4RayTrajectoryPoint::operator new(size_t)
89 {
92  return (void *) rayTrajectoryPointAllocator->MallocSingle();
93 }
94 
95 inline void G4RayTrajectoryPoint::operator delete(void *aTrajectoryPoint)
96 {
97  rayTrajectoryPointAllocator->FreeSingle((G4RayTrajectoryPoint *) aTrajectoryPoint);
98 }
99 
100 #endif
101 
#define G4DLLEXPORT
Definition: G4Types.hh:62
CLHEP::Hep3Vector G4ThreeVector
#define G4DLLIMPORT
Definition: G4Types.hh:63
void SetPostStepAtt(const G4VisAttributes *val)
const G4VisAttributes * GetPreStepAtt() const
const G4ThreeVector GetPosition() const
void SetStepLength(G4double val)
void SetSurfaceNormal(const G4ThreeVector &val)
#define G4ThreadLocal
Definition: tls.hh:89
G4DLLIMPORT G4ThreadLocal G4Allocator< G4RayTrajectoryPoint > * rayTrajectoryPointAllocator
void SetPreStepAtt(const G4VisAttributes *val)
G4ThreeVector GetSurfaceNormal() const
const G4VisAttributes * postStepAtt
const G4VisAttributes * GetPostStepAtt() const
const G4VisAttributes * preStepAtt
double G4double
Definition: G4Types.hh:76
G4double GetStepLength() const