MarlinUtil  1.12.1
LCPlane3D.h
1 #ifndef LCPlane3D_H
2 #define LCPlane3D_H 1
3 
4 // #include "CLHEP/Vector/ThreeVector.h"
5 #include <LCGeometryTypes.h>
6 
12 class LCPlane3D {
13 
14 public:
15 
23  LCPlane3D(double a = 0, double b = 0, double c = 1, double d = 0) ;
24 
31  LCPlane3D(LCVector3D normal, LCVector3D point) ;
32 
39  LCPlane3D(LCVector3D point1, LCVector3D point2, LCVector3D point3) ;
40 
47  LCPlane3D(LCVector3D normal, double distance) ;
48 
52  LCPlane3D(const LCPlane3D & plane) ;
53 
57 
61  LCPlane3D & operator=(const LCPlane3D & rhs) ;
62 
65  double a() const ;
66 
69  double b() const ;
70 
73  double c() const ;
74 
77  double d() const ;
78 
81  LCVector3D normal() const ;
82 
85  LCPlane3D & normalize() ;
86 
95  double distance(const LCVector3D & point) const ;
96 
101  LCVector3D projectPoint(const LCVector3D & point) const ;
102 
105  LCVector3D projectPoint() const ;
106 
109  bool operator==(const LCPlane3D & plane) const ;
110 
113  bool operator!=(const LCPlane3D & plane) const ;
114 
115 protected:
116  double _a, _b, _c, _d;
117 };
118 
119 std::ostream & operator << (std::ostream &os, const LCPlane3D &p) ;
120 #endif /* ifndef LCPlane3D_H */
double a() const
Returns the a-coefficient in the plane equation: a*x+b*y+c*z+d=0.
Definition: LCPlane3D.cc:76
LCPlane3D & operator=(const LCPlane3D &rhs)
Assignment.
Definition: LCPlane3D.cc:66
double d() const
Returns the free member of the plane equation: a*x+b*y+c*z+d=0.
Definition: LCPlane3D.cc:91
~LCPlane3D()
Destructor.
Definition: LCPlane3D.h:56
double b() const
Returns the b-coefficient in the plane equation: a*x+b*y+c*z+d=0.
Definition: LCPlane3D.cc:81
bool operator==(const LCPlane3D &plane) const
Test for equality.
Definition: LCPlane3D.cc:134
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.
Definition: LCPlane3D.cc:11
double distance(const LCVector3D &point) const
Distance of a point to the plane.
Definition: LCPlane3D.cc:117
bool operator!=(const LCPlane3D &plane) const
Test for inequality.
Definition: LCPlane3D.cc:142
LCVector3D projectPoint() const
Projection of the origin onto the plane.
Definition: LCPlane3D.cc:128
Definition of a LCPlane3D describing a geometrical plane in 3D space.
Definition: LCPlane3D.h:12
double c() const
Returns the c-coefficient in the plane equation: a*x+b*y+c*z+d=0.
Definition: LCPlane3D.cc:86
LCPlane3D & normalize()
Normalization.
Definition: LCPlane3D.cc:102
LCVector3D normal() const
Returns normal.
Definition: LCPlane3D.cc:96