17#ifndef ROOT_Math_GenVector_Plane3D
18#define ROOT_Math_GenVector_Plane3D 1
52template <
typename T =
double>
95 template <
class T1,
class T2,
class U>
115 template <
class T1,
class T2,
class T3,
class U>
178 template <
class T1,
class U>
198 template <
class T1,
class U>
217 template <typename SCALAR = T, typename std::enable_if<std::is_arithmetic<SCALAR>::value>
::type * =
nullptr>
224 if (s == SCALAR(0)) {
227 const SCALAR
w =
Scalar(1) / s;
238 template <typename SCALAR = T, typename std::enable_if<!std::is_arithmetic<SCALAR>::value>
::type * =
nullptr>
245 const auto m = (s == SCALAR(0));
249 const SCALAR
w = SCALAR(1) / s;
295 template <
typename T>
299 <<
p.Normal().X() <<
" " <<
p.Normal().Y() <<
" " <<
p.Normal().Z() <<
" " <<
p.HesseDistance() <<
"\n";
TBuffer & operator<<(TBuffer &buf, const Tmpl *obj)
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
DefaultCoordinateSystemTag Default tag for identifying any coordinate system.
Class describing a generic displacement vector in 3 dimensions.
Scalar X() const
Cartesian X, converting if necessary from internal coordinate system.
Class describing a geometrical plane in 3 dimensions.
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 + ...
Vector Normal() const
Return normal vector to the plane as Cartesian DisplacementVector.
Plane3D & operator=(const Plane3D &)=default
Assignment operator from other Plane3D class.
Plane3D()
default constructor create plane z = 0
bool operator!=(const Plane3D &rhs) const
DisplacementVector3D< Cartesian3D< T >, DefaultCoordinateSystemTag > Vector
Point ProjectOntoPlane(const Point &p) const
Return the projection of a Cartesian point to a plane.
PositionVector3D< T1, U > ProjectOntoPlane(const PositionVector3D< T1, U > &p) const
Return the projection of a point to a plane.
Scalar HesseDistance() const
Return the Hesse Distance (distance from the origin) of the plane or the d coefficient expressed in n...
Scalar C() const
Return the c coefficient of the plane equation .
Plane3D(const Vector &n, const Point &p)
constructor a Plane3D from a normal vector and a point coplanar to the plane
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
Scalar A() const
Return the a coefficient of the plane equation .
Scalar D() const
Return the d coefficient of the plane equation .
Scalar Distance(const Point &p) const
Return the signed distance to a Point.
Scalar B() const
Return the b coefficient of the plane equation .
void Normalize()
Normalize the normal (a,b,c) plane components.
PositionVector3D< Cartesian3D< T >, DefaultCoordinateSystemTag > Point
bool operator==(const Plane3D &rhs) const
Exact equality.
void BuildFromVecAndPoint(const Vector &n, const Point &p)
Plane3D(const Plane3D &)=default
Plane3D(const DisplacementVector3D< T1, U > &n, const PositionVector3D< T2, U > &p)
Construct from a generic DisplacementVector3D (normal vector) and PositionVector3D (point coplanar to...
void BuildFrom3Points(const Point &p1, const Point &p2, const Point &p3)
Plane3D(const Point &p1, const Point &p2, const Point &p3)
constructor from three Cartesian point belonging to the plane
Scalar Distance(const PositionVector3D< T1, U > &p) const
Return the distance to a Point described with generic coordinates.
Class describing a generic position vector (point) in 3 dimensions.
Scalar Y() const
Cartesian Y, converting if necessary from internal coordinate system.
Scalar Z() const
Cartesian Z, converting if necessary from internal coordinate system.
Scalar X() const
Cartesian X, converting if necessary from internal coordinate system.
SVector< T, 3 > Cross(const SVector< T, 3 > &lhs, const SVector< T, 3 > &rhs)
Vector Cross Product (only for 3-dim vectors) .
Namespace for new Math classes and functions.
Impl::Plane3D< double > Plane3D
PositionVector3D< Cartesian3D< double >, DefaultCoordinateSystemTag > XYZPoint
3D Point based on the cartesian coordinates x,y,z in double precision
VecExpr< UnaryOp< Sqrt< T >, VecExpr< A, T, D >, T >, T, D > sqrt(const VecExpr< A, T, D > &rhs)
Impl::Plane3D< float > Plane3DF
This file contains a specialised ROOT message handler to test for diagnostic in unit tests.