G4Axis2Placement3D Class Reference

#include <G4Axis2Placement3D.hh>


Public Member Functions

 G4Axis2Placement3D ()
 G4Axis2Placement3D (const G4Vector3D &refDirection0, const G4Vector3D &axis0, const G4Point3D &location0)
 ~G4Axis2Placement3D ()
 G4Axis2Placement3D (const G4Axis2Placement3D &)
G4Axis2Placement3D & operator= (const G4Axis2Placement3D &)
G4bool operator== (const G4Axis2Placement3D &other) const
void Init (const G4Vector3D &refDirection0, const G4Vector3D &axis0, const G4Point3D &location0)
G4Point3D GetLocation () const
G4Vector3D GetAxis () const
G4Vector3D GetRefDirection () const
G4Vector3D GetPX () const
G4Vector3D GetPY () const
G4Vector3D GetPZ () const
const G4Transform3D & GetToPlacementCoordinates () const
const G4Transform3D & GetFromPlacementCoordinates () const


Detailed Description

Definition at line 50 of file G4Axis2Placement3D.hh.


Constructor & Destructor Documentation

G4Axis2Placement3D::G4Axis2Placement3D (  ) 

Definition at line 39 of file G4Axis2Placement3D.cc.

00039 {}

G4Axis2Placement3D::G4Axis2Placement3D ( const G4Vector3D &  refDirection0,
const G4Vector3D &  axis0,
const G4Point3D &  location0 
) [inline]

Definition at line 74 of file G4Axis2Placement3D.icc.

References Init().

00077 {
00078   Init( refDirection0, axis0, location0);
00079 }

G4Axis2Placement3D::~G4Axis2Placement3D (  ) 

Definition at line 40 of file G4Axis2Placement3D.cc.

00040 {}

G4Axis2Placement3D::G4Axis2Placement3D ( const G4Axis2Placement3D &   ) 

Definition at line 44 of file G4Axis2Placement3D.cc.

00045   : location(place.location), axis(place.axis),
00046     refDirection(place.refDirection), 
00047     pX(place.pX), pY(place.pY), pZ(place.pZ),
00048     toPlacementCoordinates(place.toPlacementCoordinates),
00049     fromPlacementCoordinates(place.fromPlacementCoordinates)
00050 {
00051 }


Member Function Documentation

G4Vector3D G4Axis2Placement3D::GetAxis (  )  const [inline]

Definition at line 89 of file G4Axis2Placement3D.icc.

Referenced by G4FCylindricalSurface::CalcBBox(), G4FConicalSurface::CalcBBox(), G4FPlane::CalcNormal(), G4PlacedSolid::G4PlacedSolid(), G4ToroidalSurface::GetAxis(), G4FCylindricalSurface::GetAxis(), G4FConicalSurface::HowNear(), G4FCylindricalSurface::Intersect(), G4FConicalSurface::Intersect(), G4FConicalSurface::operator==(), G4FCylindricalSurface::PrintOn(), G4FConicalSurface::PrintOn(), G4FCylindricalSurface::SurfaceNormal(), G4FConicalSurface::SurfaceNormal(), and G4FCylindricalSurface::WithinBoundary().

00090 {
00091   return axis;
00092 }

const G4Transform3D & G4Axis2Placement3D::GetFromPlacementCoordinates (  )  const [inline]

Definition at line 109 of file G4Axis2Placement3D.icc.

00110 {
00111   return fromPlacementCoordinates;
00112 }

G4Point3D G4Axis2Placement3D::GetLocation (  )  const [inline]

Definition at line 83 of file G4Axis2Placement3D.icc.

Referenced by G4ToroidalSurface::CalcBBox(), G4FCylindricalSurface::CalcBBox(), G4FConicalSurface::CalcBBox(), G4FPlane::CalcNormal(), G4ToroidalSurface::ClosestDistanceToPoint(), G4PlacedSolid::G4PlacedSolid(), G4ToroidalSurface::GetLocation(), G4Parabola::GetPoint(), G4Hyperbola::GetPoint(), G4Ellipse::GetPoint(), G4CircularCurve::GetPoint(), G4FPlane::GetSrfPoint(), G4Parabola::Init(), G4FPlane::Intersect(), G4FCylindricalSurface::Intersect(), G4FConicalSurface::Intersect(), G4Parabola::Project(), G4Hyperbola::Project(), G4Ellipse::Project(), G4FCylindricalSurface::SurfaceNormal(), and G4FCylindricalSurface::WithinBoundary().

00084 {
00085   return location;
00086 }

G4Vector3D G4Axis2Placement3D::GetPX (  )  const [inline]

Definition at line 115 of file G4Axis2Placement3D.icc.

Referenced by G4Parabola::GetPoint(), G4Hyperbola::GetPoint(), G4Ellipse::GetPoint(), G4CircularCurve::GetPoint(), G4Parabola::Init(), G4Parabola::InitBounded(), G4Hyperbola::InitBounded(), G4Ellipse::InitBounded(), G4CircularCurve::InitBounded(), G4Parabola::Project(), G4Hyperbola::Project(), G4Ellipse::Project(), G4Parabola::Tangent(), G4Hyperbola::Tangent(), G4Ellipse::Tangent(), and G4CircularCurve::Tangent().

00116 {
00117   return pX;
00118 }

G4Vector3D G4Axis2Placement3D::GetPY (  )  const [inline]

Definition at line 121 of file G4Axis2Placement3D.icc.

Referenced by G4Parabola::GetPoint(), G4Hyperbola::GetPoint(), G4Ellipse::GetPoint(), G4CircularCurve::GetPoint(), G4Parabola::InitBounded(), G4Hyperbola::InitBounded(), G4Ellipse::InitBounded(), G4CircularCurve::InitBounded(), G4Parabola::IntersectRay2D(), G4Parabola::Project(), G4Hyperbola::Project(), G4Ellipse::Project(), G4Parabola::Tangent(), G4Hyperbola::Tangent(), G4Ellipse::Tangent(), and G4CircularCurve::Tangent().

00122 {
00123   return pY;
00124 }

G4Vector3D G4Axis2Placement3D::GetPZ (  )  const [inline]

Definition at line 127 of file G4Axis2Placement3D.icc.

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

00128 {
00129   return pZ;
00130 }

G4Vector3D G4Axis2Placement3D::GetRefDirection (  )  const [inline]

Definition at line 95 of file G4Axis2Placement3D.icc.

Referenced by G4PlacedSolid::G4PlacedSolid(), and G4ToroidalSurface::GetDirection().

00096 {
00097   return refDirection;
00098 }

const G4Transform3D & G4Axis2Placement3D::GetToPlacementCoordinates (  )  const [inline]

Definition at line 103 of file G4Axis2Placement3D.icc.

Referenced by G4Parabola::GetPPoint(), G4Hyperbola::GetPPoint(), G4Ellipse::GetPPoint(), G4CircularCurve::GetPPoint(), G4Hyperbola::Init(), G4Ellipse::Init(), G4FPlane::InitBounded(), G4FPlane::Intersect(), G4Parabola::Tangent(), G4Hyperbola::Tangent(), G4Ellipse::Tangent(), and G4CircularCurve::Tangent().

00104 {
00105   return toPlacementCoordinates;
00106 }

void G4Axis2Placement3D::Init ( const G4Vector3D &  refDirection0,
const G4Vector3D &  axis0,
const G4Point3D &  location0 
) [inline]

Definition at line 49 of file G4Axis2Placement3D.icc.

References CLHEP::HepXHat(), CLHEP::HepYHat(), and CLHEP::HepZHat().

Referenced by G4Axis2Placement3D(), G4FConicalSurface::G4FConicalSurface(), G4FCylindricalSurface::G4FCylindricalSurface(), G4ToroidalSurface::G4ToroidalSurface(), G4Parabola::Project(), G4Hyperbola::Project(), and G4Ellipse::Project().

00052 {
00053   refDirection = refDirection0;
00054   axis         = axis0;
00055   location     = location0;
00056   
00057   // get the axes of the placement coordinate system
00058   // (p[] of the STEP standard)
00059   pZ = axis.unit();
00060   pX = (refDirection-(refDirection*pZ)*pZ).unit();
00061   pY = pZ.cross(pX); // normalized
00062   
00063   // basis transformation
00064   fromPlacementCoordinates =
00065                 G4Translate3D(location0) *
00066                 G4Transform3D(CLHEP::HepXHat, CLHEP::HepYHat, CLHEP::HepZHat,
00067                               pX, pY, pZ);
00068 
00069   toPlacementCoordinates= fromPlacementCoordinates.inverse();
00070 }

G4Axis2Placement3D & G4Axis2Placement3D::operator= ( const G4Axis2Placement3D &   ) 

Definition at line 56 of file G4Axis2Placement3D.cc.

References axis, fromPlacementCoordinates, location, pX, pY, pZ, refDirection, and toPlacementCoordinates.

00057 {
00058   if (&place == this) return *this;
00059   
00060   refDirection             = place.refDirection; 
00061   axis                     = place.axis;
00062   location                 = place.location;
00063   pX                       = place.pX;
00064   pY                       = place.pY;
00065   pZ                       = place.pZ;
00066   toPlacementCoordinates   = place.toPlacementCoordinates;
00067   fromPlacementCoordinates = place.fromPlacementCoordinates; 
00068 
00069   return *this;
00070 }

G4bool G4Axis2Placement3D::operator== ( const G4Axis2Placement3D &  other  )  const [inline]

Definition at line 38 of file G4Axis2Placement3D.icc.

References axis, fromPlacementCoordinates, location, pX, pY, pZ, refDirection, and toPlacementCoordinates.

00039 {
00040   return ((location == other.location) && (axis == other.axis) &&
00041           (refDirection == other.refDirection) &&
00042           (pX == other.pX) && (pY == other.pY) && (pZ == other.pZ) &&
00043           (toPlacementCoordinates == other.toPlacementCoordinates) &&
00044           (fromPlacementCoordinates == other.fromPlacementCoordinates))
00045          ? true : false; 
00046 }


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