#include <Plane3D.h>
|
(Note that these are not member functions.)
|
std::ostream & | operator<< (std::ostream &os, const Plane3D< float > &p) |
|
std::ostream & | operator<< (std::ostream &os, const Plane3D< double > &p) |
|
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 29 of file Plane3D.h.
◆ Plane3D() [1/5]
Default constructor - creates plane z=0.
Definition at line 36 of file Plane3D.h.
◆ Plane3D() [2/5]
Constructor from four numbers - creates plane a*x+b*y+c*z+d=0.
Definition at line 40 of file Plane3D.h.
◆ Plane3D() [3/5]
Constructor from normal and point.
Definition at line 44 of file Plane3D.h.
◆ Plane3D() [4/5]
Constructor from three points.
Definition at line 49 of file Plane3D.h.
52 Normal3D<T>
n = (p2-p1).cross(p3-p1);
53 a_ = n.x();
b_ = n.y();
c_ = n.z();
d_ = -n*p1;
◆ Plane3D() [5/5]
Copy constructor. Plane3D<double> has two constructors: from Plane3D<double> (provided by compiler) and from Plane3D<float> (defined in this file). Plane3D<float> has only the last one.
Definition at line 62 of file Plane3D.h.
63 :
a_(p.a_),
b_(p.b_),
c_(p.c_),
d_(p.d_) {}
◆ ~Plane3D()
◆ a()
Returns the a-coefficient in the plane equation: a*x+b*y+c*z+d=0.
Definition at line 77 of file Plane3D.h.
◆ b()
Returns the b-coefficient in the plane equation: a*x+b*y+c*z+d=0.
Definition at line 80 of file Plane3D.h.
◆ c()
Returns the c-coefficient in the plane equation: a*x+b*y+c*z+d=0.
Definition at line 83 of file Plane3D.h.
◆ d()
Returns the free member of the plane equation: a*x+b*y+c*z+d=0.
Definition at line 86 of file Plane3D.h.
◆ distance()
Returns distance to the point.
Definition at line 102 of file Plane3D.h.
103 return a()*p.x() +
b()*p.y() +
c()*p.z() +
d();
◆ normal()
Returns normal.
Definition at line 90 of file Plane3D.h.
90 {
return Normal3D<T>(
a_,
b_,
c_); }
◆ normalize()
Normalization.
Definition at line 94 of file Plane3D.h.
96 if (ll > 0.) {
a_ /= ll;
b_ /= ll;
c_ /= ll,
d_ /= ll; }
◆ operator!=()
Test for inequality.
Definition at line 128 of file Plane3D.h.
129 return a() != p.a() ||
b() != p.b() ||
c() != p.c() ||
d() != p.d();
◆ operator=()
Assignment.
Definition at line 71 of file Plane3D.h.
72 a_ = p.a_;
b_ = p.b_;
c_ = p.c_;
d_ = p.d_;
return *
this;
◆ operator==()
Test for equality.
Definition at line 122 of file Plane3D.h.
123 return a() == p.a() &&
b() == p.b() &&
c() == p.c() &&
d() == p.d();
◆ point() [1/2]
Returns projection of the point to the plane.
Definition at line 108 of file Plane3D.h.
110 return Point3D<T>(p.x()-
a()*k, p.y()-
b()*k, p.z()-
c()*k);
T distance(const Point3D< T > &p) const
◆ point() [2/2]
Returns projection of the origin to the plane.
Definition at line 115 of file Plane3D.h.
116 T k = -
d()/(
a()*
a()+
b()*
b()+
c()*
c());
117 return Point3D<T>(
a()*k,
b()*k,
c()*k);
◆ transform()
Transformation by Transform3D.
Definition at line 134 of file Plane3D.h.
Normal3D< T > normal() const
Point3D< T > point() const
◆ operator<<() [1/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.
24 <<
'(' << p.a() <<
',' << p.b() <<
',' << p.c() <<
',' << p.d() <<
')';
◆ operator<<() [2/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.
31 <<
'(' << p.a() <<
',' << p.b() <<
',' << p.c() <<
',' << p.d() <<
')';
◆ a_
◆ b_
◆ c_
◆ d_
The documentation for this class was generated from the following file: