MarlinUtil
1.12.1
|
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... | |
LCPlane3D & | operator= (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... | |
LCPlane3D & | normalize () |
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 |
Definition of a LCPlane3D describing a geometrical plane in 3D space.
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.
a | |
b | |
c | |
d |
References a(), b(), c(), d(), and normalize().
LCPlane3D::LCPlane3D | ( | LCVector3D | normal, |
LCVector3D | point | ||
) |
Constructor from normal and point.
normal | vector pointing in the direction of the normal. This vector does not have to be normalised. |
point | Point on the plane. |
LCPlane3D::LCPlane3D | ( | LCVector3D | point1, |
LCVector3D | point2, | ||
LCVector3D | point3 | ||
) |
Constructor from three different points.
point1 | Point on the plane. |
point2 | Point on the plane. |
point3 | Point on the plane. |
LCPlane3D::LCPlane3D | ( | LCVector3D | normal, |
double | distance | ||
) |
Constructor for a plane using a normal and the Distance between Origen and the plane.
normal | vector pointing in the direction of the normal. This vector does not have to be normalised. |
distance | distance is the distance from the origen to the plane. |
References distance().
LCPlane3D::LCPlane3D | ( | const LCPlane3D & | plane | ) |
Copy constructor.
plane | plane is an other LCPlane3D. |
|
inline |
Destructor.
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
point | point is a point in space |
Referenced by SimpleHelix::getIntersectionWithPlane(), LCPlane3D(), and projectPoint().
LCVector3D LCPlane3D::normal | ( | ) | const |
Returns normal.
Referenced by SimpleHelix::getIntersectionWithPlane(), and LCLine3D::intersectionWithPlane().
LCPlane3D & LCPlane3D::normalize | ( | ) |
Normalization.
Referenced by LCPlane3D().
bool LCPlane3D::operator!= | ( | const LCPlane3D & | plane | ) | const |
Test for inequality.
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.
point | point is a point in space. |
References distance().
Referenced by LCCylinder::projectPoint().
LCVector3D LCPlane3D::projectPoint | ( | ) | const |
Projection of the origin onto the plane.