|
| Line2D () |
| Default constructor for ROOT compatibility.
|
|
| Line2D (const double n0, const double n1, const double n2) |
| Constructs taking all three line parameters.
|
|
| Line2D (const double n0, const Vector2D &n12) |
| Constructs taking the distance to the origin ( n0 ) and the normal vector.
|
|
double | n0 () const |
| Getter for the first line parameter.
|
|
double | n1 () const |
| Getter for the second line parameter.
|
|
double | n2 () const |
| Getter for the third line parameter.
|
|
const Vector2D & | n12 () const |
| Getter for the unit normal vector to the line.
|
|
void | setN0 (const double n0) |
| Setter for first line parameter This sets the signed distance of the line to the origin. More...
|
|
void | setN (const double n0, const double n1, const double n2) |
| Setter the for the line parameters which takes care of the correct normalization of the normal vector.
|
|
void | invalidate () |
| Sets all line parameters to zero.
|
|
void | setSlopeIntercept (const double slope, const double intercept) |
| Sets the new intercept and slope of the line the direction is set to be forward with the increasing x axes.
|
|
void | setSlopeIntercept (const double slope, const double intercept, const EForwardBackward orientation) |
| Sets the new intercept and slope of the line the direction is set to be forward with the increasing x axes.
|
|
void | normalize () |
| Updates the parameters to obey the normalization condition.
|
|
void | reverse () |
| Flips orientation the line in place.
|
|
Line2D | reversed () const |
| Returns a copy of the line with the reversed orientation.
|
|
double | distance (const Vector2D &point) const |
| Calculates the signed distance of the point to the line. More...
|
|
double | distance (const double first, const double second) const |
| Calculates the signed distance of the point given by its to coordinates to the line. More...
|
|
double | distanceToOrigin () const |
| Returns the distance to the origin The distance to the origin is equivalent to the first line parameter.
|
|
double | absoluteDistance (const Vector2D &point) const |
| Returns the absolute value of distance(point)
|
|
ERightLeft | isRightOrLeft (const Vector2D &point) const |
| Return if the point given is right or left of the line.
|
|
bool | isLeft (const Vector2D &rhs) const |
| Return if the point given is left of the line.
|
|
bool | isRight (const Vector2D &rhs) const |
| Return if the point given is right of the line.
|
|
Vector2D | closest (const Vector2D &point) const |
| Calculates the point of closest approach on the line to the point.
|
|
Vector2D | closestToOrigin () const |
| Returns the point closest to the origin.
|
|
double | lengthOnCurve (const Vector2D &from, const Vector2D &to) const |
| Calculates the length on the curve between two points. More...
|
|
bool | isInvalid () const |
| Indicates if all circle parameters are zero.
|
|
Vector2D | tangential () const |
| Gives the tangential vector in the direction of positiv advance on the line.
|
|
const Vector2D & | normal () const |
| Getter for the unit normal vector of the line.
|
|
const Vector2D & | gradient () const |
| Getter for the gradient of the distance field.
|
|
Vector2D | support () const |
| Getter for the support point of the line being the point closest to the origin.
|
|
EForwardBackward | alignedWithFirst () const |
| Returns if the direction of positiv advance has a common component aligned or anti aligned with the first coordinate.
|
|
EForwardBackward | alignedWithSecond () const |
| Returns if the direction of positiv advance has a common component aligned or anti aligned with the second coordinate.
|
|
Vector2D | intersection (const Line2D &line) const |
| Calculates the intersection point of two line. Infinity for parallels.
|
|
|
void | moveBy (const Vector2D &by) |
| Activelly moves the line in the direction given in place by the vector given.
|
|
void | moveAlongFirst (const double first) |
| Activelly moves the line in the direction given in place along the first coordinate.
|
|
void | moveAlongSecond (const double second) |
| Activelly moves the line in the direction given in place along the second coordinate.
|
|
Line2D | movedAlongFirst (const double first) const |
| Return a copy of the line activally moved long the first coordinate.
|
|
Line2D | movedAlongSecond (const double second) const |
| Return a copy of the line activally moved long the first coordinate.
|
|
void | passiveMoveBy (const Vector2D &by) |
| Passivelly move the coordinate system in place by the given vector.
|
|
void | passiveMoveAlongFirst (const double first) |
| Passively move the coordinate system in place along the first coordinate.
|
|
void | passiveMoveAlongSecond (const double second) |
| Passively move the coordinate system in place along the second coordinate.
|
|
Line2D | passiveMovedAlongFirst (const double first) const |
| Return a copy of the line passively moved long the first coordinate.
|
|
Line2D | passiveMovedAlongSecond (const double second) const |
| Return a copy of the line passively moved long the first coordinate.
|
|
void | flipFirst () |
| Flips the first coordinate inplace (no difference between active and pasive)
|
|
void | flipSecond () |
| Flips the first coordinate inplace (no difference between active and pasive)
|
|
Line2D | flippedFirst () const |
| Makes a copy of the line with the first coordinate flipped (no difference between active and pasive)
|
|
Line2D | flippedSecond () const |
| Makes a copy of the line with the second coordinate flipped (no difference between active and pasive)
|
|
|
double | slope () const |
| Returns the slope over the first coordinate.
|
|
double | inverseSlope () const |
| Returns the slope over the second coordinate.
|
|
double | intercept () const |
| Returns the intercept over the first coordinate.
|
|
double | zero () const |
| Returns the root of the line.
|
|
double | map (const double first) const |
| Maps the first coordinate to the second.
|
|
double | operator() (const double first) const |
| Maps the first coordinate to the second.
|
|
double | inverseMap (const double second) const |
| Maps the second coordinate to the first.
|
|
void | invert () |
| Turns the line function into its inverse function in place.
|
|
Line2D | inverted () const |
| Returns the inverse function line as a copy.
|
|
A two dimensional normal line.
This class represents a line in two dimensional space by its normal definition n0 + n1*x + n2*y = 0 subjected to n1*n1 + n2*n2 = 1. The vector (n1, n2) is called unit normal vector. It has an orientation. It is defining a right half plane with all points having n0 + n1*x + n2*y > 0 and a left half plane for point having n0 + n1*x + n2*y < 0 This naturally corresponds to a direction of positiv advance being the tangential to the line (-n2, n1). This line is best suited for linear least square fits.
Definition at line 37 of file Line2D.h.