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

Definition of a LCPlane3D describing a geometrical plane in 3D space. More...

#include <LCPlane3D.h>

Public Member Functions

 LCPlane3D (double a=0, double b=0, double c=1, double d=0)
 Constructor from four numbers - creates plane a*x+b*y+c*z+d=0. More...
 
 LCPlane3D (LCVector3D normal, LCVector3D point)
 Constructor from normal and point. More...
 
 LCPlane3D (LCVector3D point1, LCVector3D point2, LCVector3D point3)
 Constructor from three different points. More...
 
 LCPlane3D (LCVector3D normal, double distance)
 Constructor for a plane using a normal and the Distance between Origen and the plane. More...
 
 LCPlane3D (const LCPlane3D &plane)
 Copy constructor. More...
 
 ~LCPlane3D ()
 Destructor. More...
 
LCPlane3Doperator= (const LCPlane3D &rhs)
 Assignment. More...
 
double a () const
 Returns the a-coefficient in the plane equation: a*x+b*y+c*z+d=0. More...
 
double b () const
 Returns the b-coefficient in the plane equation: a*x+b*y+c*z+d=0. More...
 
double c () const
 Returns the c-coefficient in the plane equation: a*x+b*y+c*z+d=0. More...
 
double d () const
 Returns the free member of the plane equation: a*x+b*y+c*z+d=0. More...
 
LCVector3D normal () const
 Returns normal. More...
 
LCPlane3Dnormalize ()
 Normalization. More...
 
double distance (const LCVector3D &point) const
 Distance of a point to the plane. More...
 
LCVector3D projectPoint (const LCVector3D &point) const
 Projection of a point on to the plane. More...
 
LCVector3D projectPoint () const
 Projection of the origin onto the plane. More...
 
bool operator== (const LCPlane3D &plane) const
 Test for equality. More...
 
bool operator!= (const LCPlane3D &plane) const
 Test for inequality. More...
 

Protected Attributes

double _a
 
double _b
 
double _c
 
double _d
 

Detailed Description

Definition of a LCPlane3D describing a geometrical plane in 3D space.

Author
T.Kraemer, DESY
Version
Id:
LCPlane3D.h,v 1.3 2006-10-19 15:59:26 tkraemer Exp

Constructor & Destructor Documentation

LCPlane3D::LCPlane3D ( double  a = 0,
double  b = 0,
double  c = 1,
double  d = 0 
)

Constructor from four numbers - creates plane a*x+b*y+c*z+d=0.

Parameters
a
b
c
d

References a(), b(), c(), d(), and normalize().

LCPlane3D::LCPlane3D ( LCVector3D  normal,
LCVector3D  point 
)

Constructor from normal and point.

Parameters
normalvector pointing in the direction of the normal. This vector does not have to be normalised.
pointPoint on the plane.
LCPlane3D::LCPlane3D ( LCVector3D  point1,
LCVector3D  point2,
LCVector3D  point3 
)

Constructor from three different points.

Parameters
point1Point on the plane.
point2Point on the plane.
point3Point on the plane.
LCPlane3D::LCPlane3D ( LCVector3D  normal,
double  distance 
)

Constructor for a plane using a normal and the Distance between Origen and the plane.

Parameters
normalvector pointing in the direction of the normal. This vector does not have to be normalised.
distancedistance is the distance from the origen to the plane.

References distance().

LCPlane3D::LCPlane3D ( const LCPlane3D plane)

Copy constructor.

Parameters
planeplane is an other LCPlane3D.
LCPlane3D::~LCPlane3D ( )
inline

Destructor.

Member Function Documentation

double LCPlane3D::a ( ) const

Returns the a-coefficient in the plane equation: a*x+b*y+c*z+d=0.

Referenced by LCPlane3D().

double LCPlane3D::b ( ) const

Returns the b-coefficient in the plane equation: a*x+b*y+c*z+d=0.

Referenced by LCPlane3D().

double LCPlane3D::c ( ) const

Returns the c-coefficient in the plane equation: a*x+b*y+c*z+d=0.

Referenced by LCPlane3D().

double LCPlane3D::d ( ) const

Returns the free member of the plane equation: a*x+b*y+c*z+d=0.

Referenced by LCLine3D::intersectionWithPlane(), and LCPlane3D().

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

Distance of a point to the plane.

The value of the distance is

  • negative if the point and the origen are on the same side of the plane
  • positive if the Point and the origen are on opposite sides of the plane.
    Parameters
    pointpoint is a point in space

Referenced by SimpleHelix::getIntersectionWithPlane(), LCPlane3D(), and projectPoint().

LCVector3D LCPlane3D::normal ( ) const
LCPlane3D & LCPlane3D::normalize ( )

Normalization.

Referenced by LCPlane3D().

bool LCPlane3D::operator!= ( const LCPlane3D plane) const

Test for inequality.

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

Assignment.

bool LCPlane3D::operator== ( const LCPlane3D plane) const

Test for equality.

LCVector3D LCPlane3D::projectPoint ( const LCVector3D &  point) const

Projection of a point on to the plane.

Parameters
pointpoint is a point in space.

References distance().

Referenced by LCCylinder::projectPoint().

LCVector3D LCPlane3D::projectPoint ( ) const

Projection of the origin onto the plane.


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