#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.
Default constructor - creates plane z=0.
Definition at line 36 of file Plane3D.h.
Constructor from four numbers - creates plane a*x+b*y+c*z+d=0.
Definition at line 40 of file Plane3D.h.
Constructor from normal and point.
Definition at line 44 of file Plane3D.h.
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;
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.
Returns the a-coefficient in the plane equation: a*x+b*y+c*z+d=0.
Definition at line 77 of file Plane3D.h.
Returns the b-coefficient in the plane equation: a*x+b*y+c*z+d=0.
Definition at line 80 of file Plane3D.h.
Returns the c-coefficient in the plane equation: a*x+b*y+c*z+d=0.
Definition at line 83 of file Plane3D.h.
Returns the free member of the plane equation: a*x+b*y+c*z+d=0.
Definition at line 86 of file Plane3D.h.
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();
Returns normal.
Definition at line 90 of file Plane3D.h.
90 {
return Normal3D<T>(
a_,
b_,
c_); }
Normalization.
Definition at line 94 of file Plane3D.h.
96 if (ll > 0.) {
a_ /= ll;
b_ /= ll;
c_ /= ll,
d_ /= ll; }
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();
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();
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
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);
Transformation by Transform3D.
Definition at line 134 of file Plane3D.h.
Normal3D< T > normal() const
static constexpr double m
Point3D< T > point() const
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() <<
')';
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() <<
')';
The documentation for this class was generated from the following file:
- geant4.10.03.p01/source/externals/clhep/include/CLHEP/Geometry/Plane3D.h