|
AGX Dynamics
2.37.3.2
|
A line segment. Note that the direction does not have to be normalized. More...
#include <LineSegmentIntersectionFinder.h>
Public Member Functions | |
| LineSegment (const agx::Vec3 &point0, const agx::Vec3 &point1) | |
| Creates a line segment given two end points. More... | |
| LineSegment () | |
| Creates an empty line segment, with both end points at origin. More... | |
| bool | containsPoint (const agx::Vec3 &point, const agx::Real epsilon=agx::RealEpsilon) const |
| Does the line segment contain the point, given an epsilon threshold? More... | |
| const agx::Vec3 & | dir () const |
| Gets the direction; not necessarily normalized. More... | |
| agx::Real | dirLength2 () const |
| Gets the squared length of the line direction. More... | |
| agx::Vec3 | evaluateAt (const agx::Real lineParameter) const |
| Evaluates the line equation at the parameter. More... | |
| agxGeometryQueries::Line | getLine () const |
| Gets the line segment's line. More... | |
| bool | isDegeneratedToPoint () const |
| Is the line segment degenerated to a point? More... | |
| const agx::Vec3 & | point0 () const |
| Gets the line segment's first point. More... | |
| const agx::Vec3 & | point1 () const |
| Gets the line segment's second point. More... | |
| agx::Real | projectPointToInfiniteLine (const agx::Vec3 &point) const |
| Computes the scalar value of the projection of a point along the segment's line. More... | |
A line segment. Note that the direction does not have to be normalized.
Definition at line 83 of file LineSegmentIntersectionFinder.h.
| agxCollide::agxGeometryQueries::LineSegment::LineSegment | ( | const agx::Vec3 & | point0, |
| const agx::Vec3 & | point1 | ||
| ) |
Creates a line segment given two end points.
Definition at line 301 of file LineSegmentIntersectionFinder.h.
| agxCollide::agxGeometryQueries::LineSegment::LineSegment | ( | ) |
Creates an empty line segment, with both end points at origin.
Definition at line 307 of file LineSegmentIntersectionFinder.h.
| bool agxCollide::agxGeometryQueries::LineSegment::containsPoint | ( | const agx::Vec3 & | point, |
| const agx::Real | epsilon = agx::RealEpsilon |
||
| ) | const |
Does the line segment contain the point, given an epsilon threshold?
Definition at line 321 of file LineSegmentIntersectionFinder.h.
References agx::Vec3T< T >::length2(), and projectPointToInfiniteLine().
| const agx::Vec3 & agxCollide::agxGeometryQueries::LineSegment::dir | ( | ) | const |
Gets the direction; not necessarily normalized.
Definition at line 356 of file LineSegmentIntersectionFinder.h.
Referenced by getLine().
| agx::Real agxCollide::agxGeometryQueries::LineSegment::dirLength2 | ( | ) | const |
Gets the squared length of the line direction.
Definition at line 362 of file LineSegmentIntersectionFinder.h.
| agx::Vec3 agxCollide::agxGeometryQueries::LineSegment::evaluateAt | ( | const agx::Real | lineParameter | ) | const |
Evaluates the line equation at the parameter.
Note that no sanity check on the parameter is being done, only values between 0 and 1 make sense.
| lineParameter | The line parameter (should be in [0,1]). |
| The | point at the line segment given the parameter. |
Definition at line 368 of file LineSegmentIntersectionFinder.h.
Referenced by agxCollide::agxGeometryQueries::SweptLineSegment::evaluateAt().
| agxGeometryQueries::Line agxCollide::agxGeometryQueries::LineSegment::getLine | ( | ) | const |
Gets the line segment's line.
Definition at line 338 of file LineSegmentIntersectionFinder.h.
| bool agxCollide::agxGeometryQueries::LineSegment::isDegeneratedToPoint | ( | ) | const |
Is the line segment degenerated to a point?
Definition at line 332 of file LineSegmentIntersectionFinder.h.
References agx::equalsZero(), and agx::RealEpsilon.
Referenced by agxCollide::agxGeometryQueries::SweptLineSegment::isDegeneratedToLine(), agxCollide::agxGeometryQueries::SweptLineSegment::isDegeneratedToPoint(), and projectPointToInfiniteLine().
| const agx::Vec3 & agxCollide::agxGeometryQueries::LineSegment::point0 | ( | ) | const |
Gets the line segment's first point.
Definition at line 344 of file LineSegmentIntersectionFinder.h.
Referenced by agxCollide::agxGeometryQueries::SweptLineSegment::computeSweepDirectionPoint0(), agxCollide::agxGeometryQueries::SweptLineSegment::computeSweepSegmentPoint0(), agxCollide::agxGeometryQueries::SweptLineSegment::evaluateAt(), getLine(), agxCollide::agxGeometryQueries::SweptLineSegment::isDegeneratedToPoint(), and agxCollide::agxGeometryQueries::Line::projectLineSegment().
| const agx::Vec3 & agxCollide::agxGeometryQueries::LineSegment::point1 | ( | ) | const |
Gets the line segment's second point.
Definition at line 350 of file LineSegmentIntersectionFinder.h.
Referenced by agxCollide::agxGeometryQueries::SweptLineSegment::computeSweepDirectionPoint1(), agxCollide::agxGeometryQueries::SweptLineSegment::computeSweepSegmentPoint1(), agxCollide::agxGeometryQueries::SweptLineSegment::evaluateAt(), and agxCollide::agxGeometryQueries::Line::projectLineSegment().
| agx::Real agxCollide::agxGeometryQueries::LineSegment::projectPointToInfiniteLine | ( | const agx::Vec3 & | point | ) | const |
Computes the scalar value of the projection of a point along the segment's line.
Definition at line 312 of file LineSegmentIntersectionFinder.h.
References isDegeneratedToPoint().
Referenced by containsPoint().