Auxiliary class to construct a circle from three arbitrary points in space.
The center point, (signed) radius and the normal vector to the plane spanned by the points are evaluated.
Definition at line 15 of file Circle.h.
Constructor taking three points in a plane If points are on a line, the plane is set to be the null vector.
- Parameters
-
| pointA | First circle point |
| pointB | Second circle point |
| pointC | Third circle point |
Construct the connection line A -> C
Construct the connection line A -> B
The circle plane normal is the normalized cross product between the 2
Calculate the bisector between A + B
Calculate the bisector between A + C
Definition at line 16 of file Circle.cxx.
18 {
19
30
33
34 const std::optional<double> midIsect =
Amg::intersect<3>(midAB, normAB, midAC, normAC);
35 if (!midIsect) {
37 return;
38 }
39 m_center = midAC + (*midIsect) * normAC;
41 }
Scalar mag() const
mag method
const PlainObject unit() const
This is a plugin that makes Eigen look like CLHEP & defines some convenience methods.
double m_radius
The radius of the circle.
Amg::Vector3D m_center
The center point of the circle.
Amg::Vector3D m_normal
The plane normal of the circle.
std::optional< double > intersect(const AmgVector(N)&posA, const AmgVector(N)&dirA, const AmgVector(N)&posB, const AmgVector(N)&dirB)
Calculates the point B' along the line B that's closest to a second line A.
Eigen::Matrix< double, 3, 1 > Vector3D