AGX Dynamics  2.37.3.2
agxCollide::agxGeometryQueries::Line Class Reference

An infinite line, defined by a starting point and a (not necessarily normalized) direction. More...

#include <LineSegmentIntersectionFinder.h>

Public Member Functions

 Line (const agx::Vec3 &point, const agx::Vec3 &dir)
 Note that the direction does not have to be normalized. More...
 
bool containsPoint (const agx::Vec3 &point, const agx::Real epsilon=agx::RealEpsilon) const
 Does the line 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
 Note that the line dir does not have to be normalized. More...
 
bool isDegeneratedToPoint () const
 Is the line degenerated to a point? More...
 
const agx::Vec3 & point () const
 Gets the starting point of the line. More...
 
agx::Interval projectLineSegment (const LineSegment &segment) const
 Computes the interval of the projection of a line segment onto this line. More...
 
agx::Real projectPoint (const agx::Vec3 &point) const
 Computes the scalar value of the projection of a point along the line. More...
 

Detailed Description

An infinite line, defined by a starting point and a (not necessarily normalized) direction.

Definition at line 47 of file LineSegmentIntersectionFinder.h.

Constructor & Destructor Documentation

◆ Line()

agxCollide::agxGeometryQueries::Line::Line ( const agx::Vec3 &  point,
const agx::Vec3 &  dir 
)

Note that the direction does not have to be normalized.

Definition at line 243 of file LineSegmentIntersectionFinder.h.

Member Function Documentation

◆ containsPoint()

bool agxCollide::agxGeometryQueries::Line::containsPoint ( const agx::Vec3 &  point,
const agx::Real  epsilon = agx::RealEpsilon 
) const

Does the line contain the point, given an epsilon threshold?

Definition at line 257 of file LineSegmentIntersectionFinder.h.

References agxCollide::agxGeometryQueries::pointsAreIdentical(), and projectPoint().

◆ dir()

const agx::Vec3 & agxCollide::agxGeometryQueries::Line::dir ( ) const

Gets the direction; not necessarily normalized.

Definition at line 288 of file LineSegmentIntersectionFinder.h.

◆ dirLength2()

agx::Real agxCollide::agxGeometryQueries::Line::dirLength2 ( ) const

Gets the squared length of the line direction.

Definition at line 294 of file LineSegmentIntersectionFinder.h.

◆ evaluateAt()

agx::Vec3 agxCollide::agxGeometryQueries::Line::evaluateAt ( const agx::Real  lineParameter) const

Note that the line dir does not have to be normalized.

Definition at line 282 of file LineSegmentIntersectionFinder.h.

◆ isDegeneratedToPoint()

bool agxCollide::agxGeometryQueries::Line::isDegeneratedToPoint ( ) const

Is the line degenerated to a point?

Definition at line 264 of file LineSegmentIntersectionFinder.h.

References agx::equalsZero(), and agx::RealEpsilon.

Referenced by projectPoint().

◆ point()

const agx::Vec3 & agxCollide::agxGeometryQueries::Line::point ( ) const

Gets the starting point of the line.

Definition at line 276 of file LineSegmentIntersectionFinder.h.

◆ projectLineSegment()

agx::Interval agxCollide::agxGeometryQueries::Line::projectLineSegment ( const LineSegment &  segment) const

Computes the interval of the projection of a line segment onto this line.

Definition at line 270 of file LineSegmentIntersectionFinder.h.

References agxCollide::agxGeometryQueries::LineSegment::point0(), agxCollide::agxGeometryQueries::LineSegment::point1(), and projectPoint().

◆ projectPoint()

agx::Real agxCollide::agxGeometryQueries::Line::projectPoint ( const agx::Vec3 &  point) const

Computes the scalar value of the projection of a point along the line.

Definition at line 248 of file LineSegmentIntersectionFinder.h.

References isDegeneratedToPoint().

Referenced by containsPoint(), and projectLineSegment().


The documentation for this class was generated from the following file: