MarlinUtil  1.12.1
Public Member Functions | Protected Attributes | List of all members
LCCylinder Class Reference

Definition of a LCCylinder describing a geometrical cylinder in 3D space. More...

#include <LCCylinder.h>

Public Member Functions

 LCCylinder (LCVector3D point1, LCVector3D point2, double radius, bool endPlane=false)
 Constructor from two points and a radius. More...
 
 LCCylinder (double radius, LCVector3D point, LCVector3D axis, bool endPlane)
 Constructor from one point, th Axis of the cylinder and the radius. More...
 
 LCCylinder (const LCCylinder &cylinder)
 Copy constructor. More...
 
 ~LCCylinder ()
 Destructor. More...
 
LCCylinderoperator= (const LCCylinder &rhs)
 Assignment. More...
 
LCVector3D startPoint () const
 startpoint of cylinder axis
 
LCVector3D endPoint () const
 end point of cylinder axis
 
LCVector3D axisDirection () const
 orientation of cylinder axis. More...
 
double length () const
 length of cylinder axis
 
double radius () const
 Radius of cylinder. More...
 
double distance (const LCVector3D &point) const
 Distance of a point to the cylinder. More...
 
LCVector3D projectPoint (const LCVector3D &point, int &code) const
 Projection of a point on to the surface of the cylinder. More...
 
bool isInside (const LCVector3D &point) const
 Checks if a given point is inside the clyinder. More...
 
bool operator== (const LCCylinder &rhs) const
 Test for equality. More...
 
bool operator!= (const LCCylinder &rhs) const
 Test for inequality. More...
 

Protected Attributes

double _radius
 
bool _endPlane
 
LCVector3D _axisSstartPoint
 
LCVector3D _axisEndPoint
 

Detailed Description

Definition of a LCCylinder describing a geometrical cylinder in 3D space.

Author
T.Kraemer, DESY
Version
Id:
LCCylinder.h,v 1.1 2006-10-16 15:23:32 tkraemer Exp

Constructor & Destructor Documentation

LCCylinder::LCCylinder ( LCVector3D  point1,
LCVector3D  point2,
double  radius,
bool  endPlane = false 
)

Constructor from two points and a radius.

Parameters
point1point1 is the start point of the cylinder axis
point2point2 is the end point of the cylinder axis
radiusradius is the radius of the xylinder
endPlaneendPlane switches if cylinder is open or not
LCCylinder::LCCylinder ( double  radius,
LCVector3D  point,
LCVector3D  axis,
bool  endPlane 
)

Constructor from one point, th Axis of the cylinder and the radius.

Parameters
radiusradius of cylinder.
pointpoint in the middle of the axis of the xylinder
axisaxis is the orientation of the xylinder axis. the length of axis is the half length of the cylinder
endPlaneendPlane switches if cylinder is open or not
LCCylinder::LCCylinder ( const LCCylinder cylinder)

Copy constructor.

Parameters
cylindercylinder is an other LCCylinder.
LCCylinder::~LCCylinder ( )
inline

Destructor.

Member Function Documentation

LCVector3D LCCylinder::axisDirection ( ) const

orientation of cylinder axis.

the return vector is normalised

Referenced by isInside(), and projectPoint().

double LCCylinder::distance ( const LCVector3D &  point) const

Distance of a point to the cylinder.

Parameters
pointpoint is a point in space

References projectPoint().

Referenced by SimpleHelix::getIntersectionWithCylinder(), and SimpleLine::getIntersectionWithCylinder().

bool LCCylinder::isInside ( const LCVector3D &  point) const

Checks if a given point is inside the clyinder.

Parameters
pointpoint is a point in space.

References axisDirection(), LCLine3D::distance(), LCLine3D::projectPoint(), and radius().

bool LCCylinder::operator!= ( const LCCylinder rhs) const

Test for inequality.

LCCylinder & LCCylinder::operator= ( const LCCylinder rhs)

Assignment.

bool LCCylinder::operator== ( const LCCylinder rhs) const

Test for equality.

LCVector3D LCCylinder::projectPoint ( const LCVector3D &  point,
int &  code 
) const

Projection of a point on to the surface of the cylinder.

Parameters
pointpoint is a point in space.
codecode gives an integer code for the type of area the point gets projected to: 0 : No projection possible (point is not normal above the surface) 1 : prjection hits plane at start point ( startPoint() ) 2 : prjection hits plane at end point ( endPoint() ) 3 : projection hits the finite tube of the cylinder

References axisDirection(), LCLine3D::distance(), LCLine3D::position(), LCPlane3D::projectPoint(), LCLine3D::projectPoint(), and radius().

Referenced by distance().

double LCCylinder::radius ( ) const

The documentation for this class was generated from the following files: