![]() |
ROOT 6.12/07 Reference Guide |
Class describing a geometrical plane in 3 dimensions.
A Plane3D is a 2 dimensional surface spanned by two linearly independent vectors. The plane is described by the equation a*x + b*y + c*z + d = 0 where (a,b,c) are the components of the normal vector to the plane n = (a,b,c) and d = - n \dot x , where x is any point belonging to plane. More information on the mathematics describing a plane in 3D is available on MathWord. The Plane3D class contains the 4 scalar values in T which represent the four coefficients, fA, fB, fC, fD. fA, fB, fC are the normal components normalized to 1, i.e. fA**2 + fB**2 + fC**2 = 1
Public Types | |
typedef PositionVector3D< Cartesian3D< T >, DefaultCoordinateSystemTag > | Point |
typedef T | Scalar |
typedef DisplacementVector3D< Cartesian3D< T >, DefaultCoordinateSystemTag > | Vector |
Public Member Functions | |
Plane3D () | |
default constructor create plane z = 0 More... | |
Plane3D (const Scalar &a, const Scalar &b, const Scalar &c, const Scalar &d) | |
generic constructors from the four scalar values describing the plane according to the equation ax + by + cz + d = 0 More... | |
Plane3D (const Vector &n, const Point &p) | |
constructor a Plane3D from a normal vector and a point coplanar to the plane More... | |
template<class T1 , class T2 , class U > | |
Plane3D (const DisplacementVector3D< T1, U > &n, const PositionVector3D< T2, U > &p) | |
Construct from a generic DisplacementVector3D (normal vector) and PositionVector3D (point coplanar to the plane) More... | |
Plane3D (const Point &p1, const Point &p2, const Point &p3) | |
constructor from three Cartesian point belonging to the plane More... | |
template<class T1 , class T2 , class T3 , class U > | |
Plane3D (const PositionVector3D< T1, U > &p1, const PositionVector3D< T2, U > &p2, const PositionVector3D< T3, U > &p3) | |
constructor from three generic point belonging to the plane More... | |
Scalar | A () const |
Return the a coefficient of the plane equation a*x + b*y + c*z + d = 0 . More... | |
Scalar | B () const |
Return the b coefficient of the plane equation a*x + b*y + c*z + d = 0 . More... | |
Scalar | C () const |
Return the c coefficient of the plane equation a*x + b*y + c*z + d = 0 . More... | |
Scalar | D () const |
Return the d coefficient of the plane equation a*x + b*y + c*z + d = 0 . More... | |
Scalar | Distance (const Point &p) const |
Return the signed distance to a Point. More... | |
template<class T1 , class U > | |
Scalar | Distance (const PositionVector3D< T1, U > &p) const |
Return the distance to a Point described with generic coordinates. More... | |
Scalar | HesseDistance () const |
Return the Hesse Distance (distance from the origin) of the plane or the d coefficient expressed in normalize form. More... | |
Vector | Normal () const |
Return normal vector to the plane as Cartesian DisplacementVector. More... | |
bool | operator!= (const Plane3D &rhs) const |
Plane3D & | operator= (const Plane3D &plane) |
Assignment operator from other Plane3D class. More... | |
bool | operator== (const Plane3D &rhs) const |
Exact equality. More... | |
Point | ProjectOntoPlane (const Point &p) const |
Return the projection of a Cartesian point to a plane. More... | |
template<class T1 , class U > | |
PositionVector3D< T1, U > | ProjectOntoPlane (const PositionVector3D< T1, U > &p) const |
Return the projection of a point to a plane. More... | |
Protected Member Functions | |
template<typename SCALAR = T, typename std::enable_if< std::is_arithmetic< SCALAR >::value >::type * = nullptr> | |
void | Normalize () |
Normalize the normal (a,b,c) plane components. More... | |
template<typename SCALAR = T, typename std::enable_if<!std::is_arithmetic< SCALAR >::value >::type * = nullptr> | |
void | Normalize () |
Normalize the normal (a,b,c) plane components. More... | |
Private Member Functions | |
void | BuildFrom3Points (const Point &p1, const Point &p2, const Point &p3) |
void | BuildFromVecAndPoint (const Vector &n, const Point &p) |
Private Attributes | |
Scalar | fA |
Scalar | fB |
Scalar | fC |
Scalar | fD |
#include <Math/GenVector/Plane3D.h>
typedef PositionVector3D<Cartesian3D<T>, DefaultCoordinateSystemTag> ROOT::Math::Impl::Plane3D< T >::Point |
typedef T ROOT::Math::Impl::Plane3D< T >::Scalar |
typedef DisplacementVector3D<Cartesian3D<T>, DefaultCoordinateSystemTag> ROOT::Math::Impl::Plane3D< T >::Vector |
|
inline |
|
inline |
constructor a Plane3D from a normal vector and a point coplanar to the plane
n | normal expressed as a ROOT::Math::DisplacementVector3D<Cartesian3D<T> > |
p | point expressed as a ROOT::Math::PositionVector3D<Cartesian3D<T> > |
|
inline |
Construct from a generic DisplacementVector3D (normal vector) and PositionVector3D (point coplanar to the plane)
n | normal expressed as a generic ROOT::Math::DisplacementVector3D |
p | point expressed as a generic ROOT::Math::PositionVector3D |
|
inline |
constructor from three Cartesian point belonging to the plane
p1 | point1 expressed as a generic ROOT::Math::PositionVector3D |
p2 | point2 expressed as a generic ROOT::Math::PositionVector3D |
p3 | point3 expressed as a generic ROOT::Math::PositionVector3D |
|
inline |
constructor from three generic point belonging to the plane
p1 | point1 expressed as ROOT::Math::DisplacementVector3D<Cartesian3D<T> > |
p2 | point2 expressed as ROOT::Math::DisplacementVector3D<Cartesian3D<T> > |
p3 | point3 expressed as ROOT::Math::DisplacementVector3D<Cartesian3D<T> > |
|
inline |
|
inline |
|
inlineprivate |
|
inlineprivate |
|
inline |
|
inline |
|
inline |
|
inline |
Return the distance to a Point described with generic coordinates.
p | Point expressed as generic ROOT::Math::PositionVector3D |
|
inline |
|
inline |
|
inlineprotected |
|
inlineprotected |
|
inline |
|
inline |
|
inline |
|
inline |
Return the projection of a Cartesian point to a plane.
p | Point expressed as PositionVector3D<Cartesian3D<T> > |
|
inline |
Return the projection of a point to a plane.
p | Point expressed as generic ROOT::Math::PositionVector3D |
|
private |
|
private |
|
private |
|
private |