Logo ROOT   6.08/07
Reference Guide
List of all members | Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
ROOT::Math::Plane3D Class Reference

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 double 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

Definition at line 47 of file Plane3D.h.

Public Types

typedef PositionVector3D< Cartesian3D< double >, DefaultCoordinateSystemTagPoint
 
typedef double Scalar
 
typedef DisplacementVector3D< Cartesian3D< double >, DefaultCoordinateSystemTagVector
 

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 T , class U >
Scalar Distance (const PositionVector3D< T, 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
 
Plane3Doperator= (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 T , class U >
PositionVector3D< T, U > ProjectOntoPlane (const PositionVector3D< T, U > &p) const
 Return the projection of a point to a plane. More...
 

Protected Member Functions

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>

Member Typedef Documentation

◆ Point

Definition at line 56 of file Plane3D.h.

◆ Scalar

Definition at line 53 of file Plane3D.h.

◆ Vector

Definition at line 55 of file Plane3D.h.

Constructor & Destructor Documentation

◆ Plane3D() [1/6]

ROOT::Math::Plane3D::Plane3D ( )
inline

default constructor create plane z = 0

Definition at line 63 of file Plane3D.h.

◆ Plane3D() [2/6]

ROOT::Math::Plane3D::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

Parameters
ascalar value
bscalar value
cscalar value
dsxcalar value

Definition at line 37 of file Plane3D.cxx.

◆ Plane3D() [3/6]

ROOT::Math::Plane3D::Plane3D ( const Vector n,
const Point p 
)
inline

constructor a Plane3D from a normal vector and a point coplanar to the plane

Parameters
nnormal expressed as a ROOT::Math::DisplacementVector3D<Cartesian3D<double> >
ppoint expressed as a ROOT::Math::PositionVector3D<Cartesian3D<double> >

Definition at line 80 of file Plane3D.h.

◆ Plane3D() [4/6]

template<class T1 , class T2 , class U >
ROOT::Math::Plane3D::Plane3D ( const DisplacementVector3D< T1, U > &  n,
const PositionVector3D< T2, U > &  p 
)
inline

Construct from a generic DisplacementVector3D (normal vector) and PositionVector3D (point coplanar to the plane)

Parameters
nnormal expressed as a generic ROOT::Math::DisplacementVector3D
ppoint expressed as a generic ROOT::Math::PositionVector3D

Definition at line 93 of file Plane3D.h.

◆ Plane3D() [5/6]

ROOT::Math::Plane3D::Plane3D ( const Point p1,
const Point p2,
const Point p3 
)
inline

constructor from three Cartesian point belonging to the plane

Parameters
p1point1 expressed as a generic ROOT::Math::PositionVector3D
p2point2 expressed as a generic ROOT::Math::PositionVector3D
p3point3 expressed as a generic ROOT::Math::PositionVector3D

Definition at line 104 of file Plane3D.h.

◆ Plane3D() [6/6]

template<class T1 , class T2 , class T3 , class U >
ROOT::Math::Plane3D::Plane3D ( const PositionVector3D< T1, U > &  p1,
const PositionVector3D< T2, U > &  p2,
const PositionVector3D< T3, U > &  p3 
)
inline

constructor from three generic point belonging to the plane

Parameters
p1point1 expressed as ROOT::Math::DisplacementVector3D<Cartesian3D<double> >
p2point2 expressed as ROOT::Math::DisplacementVector3D<Cartesian3D<double> >
p3point3 expressed as ROOT::Math::DisplacementVector3D<Cartesian3D<double> >

Definition at line 115 of file Plane3D.h.

Member Function Documentation

◆ A()

Scalar ROOT::Math::Plane3D::A ( ) const
inline

Return the a coefficient of the plane equation \( a*x + b*y + c*z + d = 0 \).

It is also the x-component of the vector perpendicular to the plane.

Definition at line 143 of file Plane3D.h.

◆ B()

Scalar ROOT::Math::Plane3D::B ( ) const
inline

Return the b coefficient of the plane equation \( a*x + b*y + c*z + d = 0 \).

It is also the y-component of the vector perpendicular to the plane

Definition at line 149 of file Plane3D.h.

◆ BuildFrom3Points()

void ROOT::Math::Plane3D::BuildFrom3Points ( const Point p1,
const Point p2,
const Point p3 
)
private

Definition at line 56 of file Plane3D.cxx.

◆ BuildFromVecAndPoint()

void ROOT::Math::Plane3D::BuildFromVecAndPoint ( const Vector n,
const Point p 
)
private

Definition at line 45 of file Plane3D.cxx.

◆ C()

Scalar ROOT::Math::Plane3D::C ( ) const
inline

Return the c coefficient of the plane equation \( a*x + b*y + c*z + d = 0 \).

It is also the z-component of the vector perpendicular to the plane

Definition at line 155 of file Plane3D.h.

◆ D()

Scalar ROOT::Math::Plane3D::D ( ) const
inline

Return the d coefficient of the plane equation \( a*x + b*y + c*z + d = 0 \).

It is also the distance from the origin (HesseDistance)

Definition at line 161 of file Plane3D.h.

◆ Distance() [1/2]

Scalar ROOT::Math::Plane3D::Distance ( const Point p) const

Return the signed distance to a Point.

The distance is signed positive if the Point is in the same side of the normal vector to the plane.

Parameters
pPoint expressed in Cartesian Coordinates

Definition at line 69 of file Plane3D.cxx.

◆ Distance() [2/2]

template<class T , class U >
Scalar ROOT::Math::Plane3D::Distance ( const PositionVector3D< T, U > &  p) const
inline

Return the distance to a Point described with generic coordinates.

Parameters
pPoint expressed as generic ROOT::Math::PositionVector3D

Definition at line 192 of file Plane3D.h.

◆ HesseDistance()

Scalar ROOT::Math::Plane3D::HesseDistance ( ) const
inline

Return the Hesse Distance (distance from the origin) of the plane or the d coefficient expressed in normalize form.

Definition at line 174 of file Plane3D.h.

◆ Normal()

Vector ROOT::Math::Plane3D::Normal ( ) const
inline

Return normal vector to the plane as Cartesian DisplacementVector.

Definition at line 166 of file Plane3D.h.

◆ Normalize()

void ROOT::Math::Plane3D::Normalize ( )
protected

Normalize the normal (a,b,c) plane components.

Definition at line 73 of file Plane3D.cxx.

◆ operator!=()

bool ROOT::Math::Plane3D::operator!= ( const Plane3D rhs) const
inline

Definition at line 224 of file Plane3D.h.

◆ operator=()

Plane3D& ROOT::Math::Plane3D::operator= ( const Plane3D plane)
inline

Assignment operator from other Plane3D class.

Definition at line 131 of file Plane3D.h.

◆ operator==()

bool ROOT::Math::Plane3D::operator== ( const Plane3D rhs) const
inline

Exact equality.

Definition at line 221 of file Plane3D.h.

◆ ProjectOntoPlane() [1/2]

XYZPoint ROOT::Math::Plane3D::ProjectOntoPlane ( const Point p) const

Return the projection of a Cartesian point to a plane.

Parameters
pPoint expressed as PositionVector3D<Cartesian3D<double> >

Definition at line 87 of file Plane3D.cxx.

◆ ProjectOntoPlane() [2/2]

template<class T , class U >
PositionVector3D<T,U> ROOT::Math::Plane3D::ProjectOntoPlane ( const PositionVector3D< T, U > &  p) const
inline

Return the projection of a point to a plane.

Parameters
pPoint expressed as generic ROOT::Math::PositionVector3D

Definition at line 207 of file Plane3D.h.

Member Data Documentation

◆ fA

Scalar ROOT::Math::Plane3D::fA
private

Definition at line 246 of file Plane3D.h.

◆ fB

Scalar ROOT::Math::Plane3D::fB
private

Definition at line 247 of file Plane3D.h.

◆ fC

Scalar ROOT::Math::Plane3D::fC
private

Definition at line 248 of file Plane3D.h.

◆ fD

Scalar ROOT::Math::Plane3D::fD
private

Definition at line 249 of file Plane3D.h.


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