#include <Plane3D.h>
template<class T>
class HepGeom::Plane3D< T >
Template class for geometrical plane in 3D.
- Author
- Evgeni Chernyaev Evgue.nosp@m.ni.T.nosp@m.chern.nosp@m.iaev.nosp@m.@cern.nosp@m..ch
Definition at line 30 of file Plane3D.h.
◆ Plane3D() [1/7]
Default constructor - creates plane z=0.
Definition at line 37 of file Plane3D.h.
◆ Plane3D() [2/7]
Constructor from four numbers - creates plane a*x+b*y+c*z+d=0.
Definition at line 41 of file Plane3D.h.
◆ Plane3D() [3/7]
Constructor from normal and point.
Definition at line 45 of file Plane3D.h.
◆ Plane3D() [4/7]
Constructor from three points.
Definition at line 50 of file Plane3D.h.
52 {
53 Normal3D<T>
n = (p2-p1).cross(p3-p1);
55 }
◆ Plane3D() [5/7]
◆ Plane3D() [6/7]
template<class T >
template<typename U = T, typename = typename std::enable_if<!std::is_same<U,float>::value >::type>
Constructor for Plane3D<double> from Plane3D<float>.
Definition at line 65 of file Plane3D.h.
66 :
a_(p.a_),
b_(p.b_),
c_(p.c_),
d_(p.d_) {}
◆ Plane3D() [7/7]
◆ ~Plane3D()
◆ a()
◆ b()
◆ c()
◆ d()
◆ distance()
◆ normal()
◆ normalize()
Normalization.
Definition at line 103 of file Plane3D.h.
103 {
105 if (ll > 0.) {
a_ /= ll;
b_ /= ll;
c_ /= ll,
d_ /= ll; }
106 return *this;
107 }
◆ operator!=()
Test for inequality.
Definition at line 137 of file Plane3D.h.
137 {
138 return a() != p.a() ||
b() != p.b() ||
c() != p.c() ||
d() != p.d();
139 }
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ operator==()
Test for equality.
Definition at line 131 of file Plane3D.h.
131 {
132 return a() == p.a() &&
b() == p.b() &&
c() == p.c() &&
d() == p.d();
133 }
◆ point() [1/2]
◆ point() [2/2]
Returns projection of the point to the plane.
Definition at line 117 of file Plane3D.h.
117 {
119 return Point3D<T>(p.x()-
a()*k, p.y()-
b()*k, p.z()-
c()*k);
120 }
T distance(const Point3D< T > &p) const
◆ transform()
Transformation by Transform3D.
Definition at line 143 of file Plane3D.h.
143 {
147 return *this;
148 }
Normal3D< T > normal() const
Point3D< T > point() const
◆ operator<<() [1/2]
template<class T >
std::ostream & operator<< |
( |
std::ostream & |
os, |
|
|
const Plane3D< double > & |
p |
|
) |
| |
|
related |
Output to the stream.
Definition at line 29 of file Plane3D.cc.
30 {
31 return os
32 << '(' << p.a() << ',' << p.b() << ',' << p.c() << ',' << p.d() << ')';
33 }
◆ operator<<() [2/2]
template<class T >
std::ostream & operator<< |
( |
std::ostream & |
os, |
|
|
const Plane3D< float > & |
p |
|
) |
| |
|
related |
Output to the stream.
Definition at line 22 of file Plane3D.cc.
23 {
24 return os
25 << '(' << p.a() << ',' << p.b() << ',' << p.c() << ',' << p.d() << ')';
26 }
◆ a_
◆ b_
◆ c_
◆ d_
The documentation for this class was generated from the following file: