![]() |
ImFusion SDK 4.3
|
#include <ImFusion/Core/Geometry/Line.h>
Class representing a full line, i.e. More...
Inheritance diagram for Line:Class representing a full line, i.e.
one of infinite length.
Public Member Functions | |
| Line (const vec3 &point, const vec3 &direction) | |
| Creates a line going through point along direction. | |
| Line (const Line &)=default | |
| Line & | operator= (const Line &)=default |
| vec3 | direction () const override |
| Returns the normalized direction vector. | |
| bool | isApprox (const Line &) const |
| Comparison using the same epsilon as Eigen::isApprox. | |
| Utils::Variant< LineSegment, vec3, std::nullptr_t > | shortestConnectingLine (const LineBase &l) const |
| Returns the shortest connection to l as a LineSegment. | |
| double | clampLambda (double lambda) const override |
| Returns the input without doing anything, since this line has no end points. | |
Public Member Functions inherited from LineBase | |
| const vec3 & | point () const |
| Returns a point on the line. | |
| vec3 | closestPoint (const vec3 &p) const |
| Returns the point on the line closest to p. | |
| double | distanceToPoint (const vec3 &p) const |
| Returns the L2 distance between p and the closest point on the line. | |
| bool | includesPoint (const vec3 &p) const |
| Returns if the distance between p and the closest point on the line is less than epsilon. | |
| std::vector< vec3 > | cylinderWallIntersection (const Line &axis, double radius) const |
| Computes the intersection points with the outer wall of a cylinder of infinite length, specified by radius and central axis. | |
| double | pointToLambda (const vec3 &p) const |
| Projects p onto the (extended) line and returns the unclamped lambda. | |
| vec3 | lambdaToPoint (double lambda) const |
| Returns point() + lambda*direction() | |
Protected Attributes | |
| vec3 | m_direction |
| Normalized direction. | |
Protected Attributes inherited from LineBase | |
| vec3 | m_point |
| A point on the line. | |
| bool | operator== (const Line &) const |
| Exact comparisons. | |
| bool | operator!= (const Line &) const |
Additional Inherited Members | |
Protected Member Functions inherited from LineBase | |
| LineBase (const vec3 &p) | |
|
overridevirtual |
Returns the normalized direction vector.
Implements LineBase.
| Utils::Variant< LineSegment, vec3, std::nullptr_t > shortestConnectingLine | ( | const LineBase & | l | ) | const |
Returns the shortest connection to l as a LineSegment.
If the objects intersect or overlap, a point on both lines is returned instead. Empty return indicates that either object is not well defined, i.e. contains NAN.
|
overridevirtual |
Returns the input without doing anything, since this line has no end points.
Implements LineBase.