58 {
return _pos + lambda * _dir; }
Class to define the geometry primitive "Line" consisting of a position and a direction.
bool setValue(const Vector3 &p0, const Vector3 &p1)
Initializes line passing through p0 and p1.
Line()
Constructor. Position is set to (0,0,0) and dir is set to (1,0,0).
Vector3 getClosestPoint(const Vector3 &point) const
Returns the point on the line which is closest to point.
const Vector3 & getDirection() const
Returns the direction of the line.
const Vector3 & getPosition() const
Returns the reference point on the line.
Vector3 getVector(double lambda) const
Returns a point on line parametrized by lambda.
bool getClosestPoints(const Line &line2, Vector3 &pointOnLine, Vector3 &pointOnLine2) const
Finds the two closest points on this and line2 and stores them in pointOnLine and pointOnLine2,...
Line(const Vector3 &p0, const Vector3 &p1)
Constructor for line passing p0 and p1.
double distance(const Vector3 &point) const
Returns the distance of point to the line.
#define ML_LINEAR_ALGEBRA_EXPORT
Defines all system specific settings for all linear algebra classes.