G4VTwistSurface::CurrentStatus Class Reference

#include <G4VTwistSurface.hh>


Public Member Functions

 CurrentStatus ()
virtual ~CurrentStatus ()
G4ThreeVector GetXX (G4int i) const
G4double GetDistance (G4int i) const
G4int GetAreacode (G4int i) const
G4int GetNXX () const
G4bool IsDone () const
G4bool IsValid (G4int i) const
void SetCurrentStatus (G4int i, G4ThreeVector &xx, G4double &dist, G4int &areacode, G4bool &isvalid, G4int nxx, EValidate validate, const G4ThreeVector *p, const G4ThreeVector *v=0)
void ResetfDone (EValidate validate, const G4ThreeVector *p, const G4ThreeVector *v=0)
void DebugPrint () const


Detailed Description

Definition at line 251 of file G4VTwistSurface.hh.


Constructor & Destructor Documentation

G4VTwistSurface::CurrentStatus::CurrentStatus (  ) 

Definition at line 1124 of file G4VTwistSurface.cc.

References G4VSURFACENXX, G4VTwistSurface::kUninitialized, and G4VTwistSurface::sOutside.

01125 {
01126   for (size_t i=0; i<G4VSURFACENXX; i++)
01127   {
01128     fDistance[i] = kInfinity;
01129     fAreacode[i] = sOutside;
01130     fIsValid[i]  = false;
01131     fXX[i].set(kInfinity, kInfinity, kInfinity);
01132   }
01133   fNXX   = 0;
01134   fLastp.set(kInfinity, kInfinity, kInfinity);
01135   fLastv.set(kInfinity, kInfinity, kInfinity);
01136   fLastValidate = kUninitialized;
01137   fDone = false;
01138 }

G4VTwistSurface::CurrentStatus::~CurrentStatus (  )  [virtual]

Definition at line 1143 of file G4VTwistSurface.cc.

01144 {
01145 }


Member Function Documentation

void G4VTwistSurface::CurrentStatus::DebugPrint (  )  const

Definition at line 1219 of file G4VTwistSurface.cc.

References G4cout, and G4endl.

01220 {
01221   G4cout << "CurrentStatus::Dist0,1= " << fDistance[0] 
01222          << " " << fDistance[1] << " areacode = " << fAreacode[0] 
01223          << " " << fAreacode[1] << G4endl;
01224 }

G4int G4VTwistSurface::CurrentStatus::GetAreacode ( G4int  i  )  const [inline]

Definition at line 260 of file G4VTwistSurface.hh.

00260 { return fAreacode[i]; }

G4double G4VTwistSurface::CurrentStatus::GetDistance ( G4int  i  )  const [inline]

Definition at line 259 of file G4VTwistSurface.hh.

00259 { return fDistance[i]; }

G4int G4VTwistSurface::CurrentStatus::GetNXX (  )  const [inline]

Definition at line 261 of file G4VTwistSurface.hh.

00261 { return fNXX;         }

G4ThreeVector G4VTwistSurface::CurrentStatus::GetXX ( G4int  i  )  const [inline]

Definition at line 258 of file G4VTwistSurface.hh.

00258 { return fXX[i];       }

G4bool G4VTwistSurface::CurrentStatus::IsDone (  )  const [inline]

Definition at line 262 of file G4VTwistSurface.hh.

00262 { return fDone;        }

G4bool G4VTwistSurface::CurrentStatus::IsValid ( G4int  i  )  const [inline]

Definition at line 263 of file G4VTwistSurface.hh.

00263 { return fIsValid[i];  }

void G4VTwistSurface::CurrentStatus::ResetfDone ( EValidate  validate,
const G4ThreeVector p,
const G4ThreeVector v = 0 
)

Definition at line 1191 of file G4VTwistSurface.cc.

References G4VSURFACENXX, G4VTwistSurface::kUninitialized, and G4VTwistSurface::sOutside.

01195 {
01196   if (validate == fLastValidate && p && *p == fLastp)
01197   {
01198      if (!v || (v && *v == fLastv)) return;
01199   }         
01200   G4ThreeVector xx(kInfinity, kInfinity, kInfinity);
01201   for (size_t i=0; i<G4VSURFACENXX; i++)
01202   {
01203     fDistance[i] = kInfinity;
01204     fAreacode[i] = sOutside;
01205     fIsValid[i]  = false;
01206     fXX[i] = xx;   // bug in old code ( was fXX[i] =  xx[i]  )
01207   }
01208   fNXX   = 0;
01209   fLastp.set(kInfinity, kInfinity, kInfinity);
01210   fLastv.set(kInfinity, kInfinity, kInfinity);
01211   fLastValidate = kUninitialized;
01212   fDone = false;
01213 }

void G4VTwistSurface::CurrentStatus::SetCurrentStatus ( G4int  i,
G4ThreeVector xx,
G4double dist,
G4int areacode,
G4bool isvalid,
G4int  nxx,
EValidate  validate,
const G4ThreeVector p,
const G4ThreeVector v = 0 
)

Definition at line 1151 of file G4VTwistSurface.cc.

References FatalException, and G4Exception().

01160 {
01161   fDistance[i]  = dist;
01162   fAreacode[i]  = areacode;
01163   fIsValid[i]   = isvalid;
01164   fXX[i]        = xx;
01165   fNXX          = nxx;
01166   fLastValidate = validate;
01167   if (p)
01168   {
01169     fLastp = *p;
01170   }
01171   else
01172   {
01173     G4Exception("G4VTwistSurface::CurrentStatus::SetCurrentStatus()",
01174                 "GeomSolids0003", FatalException, "SetCurrentStatus: p = 0!");
01175   }
01176   if (v) 
01177   {
01178     fLastv = *v;
01179   }
01180   else
01181   {
01182     fLastv.set(kInfinity, kInfinity, kInfinity);
01183   }
01184   fDone = true;
01185 }


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:53:57 2013 for Geant4 by  doxygen 1.4.7