Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
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$
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
38/////////////////////////
39//G4RayTrajectoryPoint.hh
40/////////////////////////
41
42#ifndef G4RayTrajectoryPoint_h
43#define G4RayTrajectoryPoint_h 1
44
45class 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:
63 const G4VisAttributes* preStepAtt;
64 const G4VisAttributes* postStepAtt;
65 G4ThreeVector surfaceNormal;
66 G4double stepLength;
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(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
88inline void* G4RayTrajectoryPoint::operator new(size_t)
89{
90 void *aTrajectoryPoint;
91 aTrajectoryPoint = (void *) G4RayTrajectoryPointAllocator.MallocSingle();
92 return aTrajectoryPoint;
93}
94
95inline void G4RayTrajectoryPoint::operator delete(void *aTrajectoryPoint)
96{
97 G4RayTrajectoryPointAllocator.FreeSingle((G4RayTrajectoryPoint *) aTrajectoryPoint);
98}
99
100#endif
101
G4DLLIMPORT G4Allocator< G4RayTrajectoryPoint > G4RayTrajectoryPointAllocator
CLHEP::Hep3Vector G4ThreeVector
double G4double
Definition: G4Types.hh:64
#define G4DLLIMPORT
Definition: G4Types.hh:56
#define G4DLLEXPORT
Definition: G4Types.hh:55
G4ThreeVector GetSurfaceNormal() const
const G4VisAttributes * GetPostStepAtt() const
void SetSurfaceNormal(G4ThreeVector val)
const G4ThreeVector GetPosition() const
void SetStepLength(G4double val)
G4double GetStepLength() const
const G4VisAttributes * GetPreStepAtt() const
void SetPreStepAtt(const G4VisAttributes *val)
void SetPostStepAtt(const G4VisAttributes *val)