G4Curve Class Reference

#include <G4Curve.hh>

Inheritance diagram for G4Curve:

G4BSplineCurve G4CompositeCurve G4Conic G4Line G4BSplineCurveWithKnots G4CircularCurve G4Ellipse G4Hyperbola G4Parabola

Public Member Functions

 G4Curve ()
virtual ~G4Curve ()
 G4Curve (const G4Curve &c)
G4Curveoperator= (const G4Curve &c)
G4bool operator== (const G4Curve &right) const
virtual G4String GetEntityType () const
virtual G4CurveProject (const G4Transform3D &tr=G4Transform3D::Identity)=0
virtual G4bool Tangent (G4CurvePoint &cp, G4Vector3D &v)=0
virtual G4int IntersectRay2D (const G4Ray &ray)=0
const G4Point3DGetStart () const
const G4Point3DGetEnd () const
G4double GetPStart () const
G4double GetPEnd () const
void SetBounds (G4double p1, G4double p2)
void SetBounds (G4double p1, const G4Point3D &p2)
void SetBounds (const G4Point3D &p1, G4double p2)
void SetBounds (const G4Point3D &p1, const G4Point3D &p2)
G4bool IsBounded () const
G4bool IsPOn (G4double param) const
void SetSameSense (G4int sameSense0)
G4int GetSameSense () const
virtual G4double GetPMax () const =0
virtual G4Point3D GetPoint (G4double param) const =0
virtual G4double GetPPoint (const G4Point3D &p) const =0
const G4BoundingBox3DBBox () const
virtual const char * Name () const
virtual void SetParentSrfPtr (const G4Surface *)

Protected Member Functions

virtual void InitBounded ()=0

Protected Attributes

G4BoundingBox3D bBox
G4Point3D start
G4Point3D end
G4double pStart
G4double pEnd
G4double pRange
G4bool bounded
G4int sameSense
G4double kCarTolerance

Detailed Description

Definition at line 58 of file G4Curve.hh.


Constructor & Destructor Documentation

G4Curve::G4Curve (  ) 

Definition at line 39 of file G4Curve.cc.

References G4GeometryTolerance::GetInstance(), G4GeometryTolerance::GetSurfaceTolerance(), and kCarTolerance.

00040  : bBox(G4BoundingBox3D::space), pStart(0.), pEnd(0.), pRange(0.),
00041    bounded(false), sameSense(true)
00042 {
00043   kCarTolerance = G4GeometryTolerance::GetInstance()->GetSurfaceTolerance();
00044 }

G4Curve::~G4Curve (  )  [virtual]

Definition at line 46 of file G4Curve.cc.

00047 {
00048 }

G4Curve::G4Curve ( const G4Curve c  ) 

Definition at line 50 of file G4Curve.cc.

00051  : start(c.start), end(c.end), pStart(c.pStart), pEnd(c.pEnd),
00052    pRange(c.pRange), bounded(c.bounded), sameSense(c.sameSense),
00053    kCarTolerance(c.kCarTolerance)
00054 {
00055 }


Member Function Documentation

const G4BoundingBox3D * G4Curve::BBox (  )  const [inline]

Definition at line 43 of file G4Curve.icc.

References bBox.

Referenced by G4CompositeCurve::InitBounded().

00044 {
00045   return &bBox;
00046 }

const G4Point3D & G4Curve::GetEnd (  )  const [inline]

Definition at line 57 of file G4Curve.icc.

References end.

Referenced by G4Parabola::InitBounded(), G4Line::InitBounded(), G4Hyperbola::InitBounded(), G4Ellipse::InitBounded(), and G4CircularCurve::InitBounded().

00058 {
00059   return end;
00060 }

G4String G4Curve::GetEntityType (  )  const [virtual]

Reimplemented in G4CompositeCurve.

Definition at line 72 of file G4Curve.cc.

00073 {
00074   return G4String("G4Curve");
00075 }

G4double G4Curve::GetPEnd (  )  const [inline]

Definition at line 69 of file G4Curve.icc.

References pEnd.

Referenced by G4Parabola::Project(), G4Line::Project(), G4Hyperbola::Project(), G4Ellipse::Project(), G4CircularCurve::Project(), and G4BSplineCurve::Project().

00070 {
00071   return pEnd;
00072 }

virtual G4double G4Curve::GetPMax (  )  const [pure virtual]

Implemented in G4BSplineCurve, G4CircularCurve, G4CompositeCurve, G4Ellipse, G4Hyperbola, G4Line, and G4Parabola.

Referenced by IsPOn().

virtual G4Point3D G4Curve::GetPoint ( G4double  param  )  const [pure virtual]

Implemented in G4BSplineCurve, G4CircularCurve, G4CompositeCurve, G4Ellipse, G4Hyperbola, G4Line, and G4Parabola.

Referenced by G4CurveRayIntersection::GetDistance(), G4CurveRayIntersection::GetPoint(), and G4CurvePoint::GetPoint().

virtual G4double G4Curve::GetPPoint ( const G4Point3D p  )  const [pure virtual]

Implemented in G4BSplineCurve, G4CircularCurve, G4CompositeCurve, G4Ellipse, G4Hyperbola, G4Line, and G4Parabola.

Referenced by G4CurveRayIntersection::GetPPoint(), and G4CurvePoint::GetPPoint().

G4double G4Curve::GetPStart (  )  const [inline]

Definition at line 63 of file G4Curve.icc.

References pStart.

Referenced by G4Parabola::Project(), G4Line::Project(), G4Hyperbola::Project(), G4Ellipse::Project(), G4CircularCurve::Project(), and G4BSplineCurve::Project().

00064 {
00065   return pStart;
00066 }

G4int G4Curve::GetSameSense (  )  const [inline]

Definition at line 174 of file G4Curve.icc.

References sameSense.

Referenced by G4Ellipse::Project(), G4Line::Tangent(), and G4Ellipse::Tangent().

00175 {
00176   return sameSense;
00177 }

const G4Point3D & G4Curve::GetStart (  )  const [inline]

Definition at line 51 of file G4Curve.icc.

References start.

Referenced by G4Parabola::InitBounded(), G4Line::InitBounded(), G4Hyperbola::InitBounded(), G4Ellipse::InitBounded(), and G4CircularCurve::InitBounded().

00052 {
00053   return start;
00054 }

virtual void G4Curve::InitBounded (  )  [protected, pure virtual]

Implemented in G4BSplineCurve, G4CircularCurve, G4CompositeCurve, G4Ellipse, G4Hyperbola, G4Line, and G4Parabola.

virtual G4int G4Curve::IntersectRay2D ( const G4Ray ray  )  [pure virtual]

Implemented in G4BSplineCurve, G4CircularCurve, G4CompositeCurve, G4Ellipse, G4Hyperbola, G4Line, and G4Parabola.

G4bool G4Curve::IsBounded (  )  const [inline]

Definition at line 162 of file G4Curve.icc.

References bounded.

Referenced by G4Parabola::Project(), G4Hyperbola::Project(), G4Ellipse::Project(), G4BSplineCurve::Project(), and G4CurveRayIntersection::Update().

00163 {
00164   return bounded;
00165 }

G4bool G4Curve::IsPOn ( G4double  param  )  const [inline]

Definition at line 150 of file G4Curve.icc.

References GetPMax(), and pRange.

Referenced by G4Parabola::InitBounded(), G4Hyperbola::InitBounded(), G4Ellipse::InitBounded(), G4CircularCurve::InitBounded(), and G4CurveRayIntersection::Update().

00151 {
00152   G4double diff= param-pStart;
00153   G4double pMax= GetPMax();
00154 
00155   if (pMax>0) 
00156     diff-= std::floor(diff/pMax)*pMax;
00157   
00158   return diff<=pRange;
00159 }

const char * G4Curve::Name (  )  const [virtual]

Definition at line 77 of file G4Curve.cc.

00078 {
00079   return "G4Curve";
00080 }

G4Curve & G4Curve::operator= ( const G4Curve c  ) 

Definition at line 57 of file G4Curve.cc.

References bounded, end, kCarTolerance, pEnd, pRange, pStart, sameSense, and start.

00058 {
00059   if (&c == this)  { return *this; }
00060   start     = c.start;
00061   end       = c.end;
00062   pStart    = c.pStart;
00063   pEnd      = c.pEnd;
00064   pRange    = c.pRange;
00065   bounded   = c.bounded;
00066   sameSense = c.sameSense;
00067   kCarTolerance = c.kCarTolerance;
00068 
00069   return *this;
00070 }

G4bool G4Curve::operator== ( const G4Curve right  )  const [inline]

Definition at line 37 of file G4Curve.icc.

00038 {
00039   return this == &right;
00040 }

virtual G4Curve* G4Curve::Project ( const G4Transform3D tr = G4Transform3D::Identity  )  [pure virtual]

Implemented in G4BSplineCurve, G4CircularCurve, G4CompositeCurve, G4Ellipse, G4Hyperbola, G4Line, and G4Parabola.

void G4Curve::SetBounds ( const G4Point3D p1,
const G4Point3D p2 
) [inline]

Definition at line 142 of file G4Curve.icc.

00143 {
00144   SetStart(p1);
00145   SetEnd(p2);
00146   SetBoundsRest();
00147 }

void G4Curve::SetBounds ( const G4Point3D p1,
G4double  p2 
) [inline]

Definition at line 134 of file G4Curve.icc.

00135 {
00136   SetStart(p1);
00137   SetEnd(p2);
00138   SetBoundsRest();
00139 }

void G4Curve::SetBounds ( G4double  p1,
const G4Point3D p2 
) [inline]

Definition at line 126 of file G4Curve.icc.

00127 {
00128   SetStart(p1);
00129   SetEnd(p2);
00130   SetBoundsRest();
00131 }

void G4Curve::SetBounds ( G4double  p1,
G4double  p2 
) [inline]

Definition at line 118 of file G4Curve.icc.

Referenced by G4CompositeCurve::G4CompositeCurve(), G4Ellipse::Init(), G4BSplineCurve::Init(), G4Parabola::Project(), G4Line::Project(), G4Hyperbola::Project(), G4Ellipse::Project(), and G4CircularCurve::Project().

00119 {
00120   SetStart(p1); 
00121   SetEnd(p2);
00122   SetBoundsRest();
00123 }

void G4Curve::SetParentSrfPtr ( const G4Surface  )  [virtual]

Definition at line 82 of file G4Curve.cc.

00083 {
00084 }

void G4Curve::SetSameSense ( G4int  sameSense0  )  [inline]

Definition at line 168 of file G4Curve.icc.

References sameSense.

Referenced by G4SurfaceBoundary::Project(), and G4Ellipse::Project().

00169 {
00170   sameSense= sameSense0;
00171 }

virtual G4bool G4Curve::Tangent ( G4CurvePoint cp,
G4Vector3D v 
) [pure virtual]

Implemented in G4BSplineCurve, G4CircularCurve, G4CompositeCurve, G4Ellipse, G4Hyperbola, G4Line, and G4Parabola.

Referenced by G4SurfaceBoundary::Tangent(), and G4CompositeCurve::Tangent().


Field Documentation

G4BoundingBox3D G4Curve::bBox [protected]

Definition at line 160 of file G4Curve.hh.

Referenced by BBox(), G4BSplineCurve::G4BSplineCurve(), G4CircularCurve::G4CircularCurve(), G4Conic::G4Conic(), G4Ellipse::G4Ellipse(), G4Hyperbola::G4Hyperbola(), G4Line::G4Line(), G4Parabola::G4Parabola(), G4Parabola::InitBounded(), G4Line::InitBounded(), G4Hyperbola::InitBounded(), G4Ellipse::InitBounded(), G4CompositeCurve::InitBounded(), G4CircularCurve::InitBounded(), G4BSplineCurve::InitBounded(), G4Parabola::operator=(), G4Line::operator=(), G4Hyperbola::operator=(), G4Ellipse::operator=(), G4Conic::operator=(), G4CircularCurve::operator=(), and G4BSplineCurve::operator=().

G4bool G4Curve::bounded [protected]

Definition at line 166 of file G4Curve.hh.

Referenced by G4BSplineCurve::G4BSplineCurve(), G4CircularCurve::G4CircularCurve(), G4Conic::G4Conic(), G4Ellipse::G4Ellipse(), G4Hyperbola::G4Hyperbola(), G4Line::G4Line(), G4Parabola::G4Parabola(), IsBounded(), G4Parabola::operator=(), G4Line::operator=(), G4Hyperbola::operator=(), G4Ellipse::operator=(), operator=(), G4Conic::operator=(), G4CircularCurve::operator=(), and G4BSplineCurve::operator=().

G4Point3D G4Curve::end [protected]

Definition at line 162 of file G4Curve.hh.

Referenced by G4BSplineCurve::G4BSplineCurve(), G4CircularCurve::G4CircularCurve(), G4Conic::G4Conic(), G4Ellipse::G4Ellipse(), G4Hyperbola::G4Hyperbola(), G4Line::G4Line(), G4Parabola::G4Parabola(), GetEnd(), G4Parabola::operator=(), G4Line::operator=(), G4Hyperbola::operator=(), G4Ellipse::operator=(), operator=(), G4Conic::operator=(), G4CircularCurve::operator=(), and G4BSplineCurve::operator=().

G4double G4Curve::kCarTolerance [protected]

Definition at line 168 of file G4Curve.hh.

Referenced by G4Curve(), G4Parabola::IntersectRay2D(), G4Line::IntersectRay2D(), G4Hyperbola::IntersectRay2D(), G4Ellipse::IntersectRay2D(), operator=(), and G4Line::Project().

G4double G4Curve::pEnd [protected]

Definition at line 164 of file G4Curve.hh.

Referenced by G4BSplineCurve::G4BSplineCurve(), G4CircularCurve::G4CircularCurve(), G4Conic::G4Conic(), G4Ellipse::G4Ellipse(), G4Hyperbola::G4Hyperbola(), G4Line::G4Line(), G4Parabola::G4Parabola(), GetPEnd(), G4Parabola::operator=(), G4Line::operator=(), G4Hyperbola::operator=(), G4Ellipse::operator=(), operator=(), G4Conic::operator=(), G4CircularCurve::operator=(), and G4BSplineCurve::operator=().

G4double G4Curve::pRange [protected]

Definition at line 165 of file G4Curve.hh.

Referenced by G4BSplineCurve::G4BSplineCurve(), G4CircularCurve::G4CircularCurve(), G4Conic::G4Conic(), G4Ellipse::G4Ellipse(), G4Hyperbola::G4Hyperbola(), G4Line::G4Line(), G4Parabola::G4Parabola(), IsPOn(), G4Parabola::operator=(), G4Line::operator=(), G4Hyperbola::operator=(), G4Ellipse::operator=(), operator=(), G4Conic::operator=(), G4CircularCurve::operator=(), and G4BSplineCurve::operator=().

G4double G4Curve::pStart [protected]

Definition at line 163 of file G4Curve.hh.

Referenced by G4BSplineCurve::G4BSplineCurve(), G4CircularCurve::G4CircularCurve(), G4Conic::G4Conic(), G4Ellipse::G4Ellipse(), G4Hyperbola::G4Hyperbola(), G4Line::G4Line(), G4Parabola::G4Parabola(), GetPStart(), G4Parabola::operator=(), G4Line::operator=(), G4Hyperbola::operator=(), G4Ellipse::operator=(), operator=(), G4Conic::operator=(), G4CircularCurve::operator=(), and G4BSplineCurve::operator=().

G4int G4Curve::sameSense [protected]

Definition at line 167 of file G4Curve.hh.

Referenced by G4BSplineCurve::G4BSplineCurve(), G4CircularCurve::G4CircularCurve(), G4Conic::G4Conic(), G4Ellipse::G4Ellipse(), G4Hyperbola::G4Hyperbola(), G4Line::G4Line(), G4Parabola::G4Parabola(), GetSameSense(), G4Parabola::operator=(), G4Line::operator=(), G4Hyperbola::operator=(), G4Ellipse::operator=(), operator=(), G4Conic::operator=(), G4CircularCurve::operator=(), G4BSplineCurve::operator=(), and SetSameSense().

G4Point3D G4Curve::start [protected]

Definition at line 161 of file G4Curve.hh.

Referenced by G4BSplineCurve::G4BSplineCurve(), G4CircularCurve::G4CircularCurve(), G4Conic::G4Conic(), G4Ellipse::G4Ellipse(), G4Hyperbola::G4Hyperbola(), G4Line::G4Line(), G4Parabola::G4Parabola(), GetStart(), G4Parabola::operator=(), G4Line::operator=(), G4Hyperbola::operator=(), G4Ellipse::operator=(), operator=(), G4Conic::operator=(), G4CircularCurve::operator=(), and G4BSplineCurve::operator=().


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