#include <mlLine.h>
Public Member Functions | |
| Line () | |
| Constructor. Position is set to (0,0,0) and dir is set to (1,0,0). | |
| Line (const Vector3 &p0, const Vector3 &p1) | |
| Constructor for line passing p0 and p1. | |
| bool | setValue (const Vector3 &p0, const Vector3 &p1) |
| Initialize line passing through p0 and p1. | |
| Vector3 | getClosestPoint (const Vector3 &point) const |
| Returns the point on the line which is closest to point. | |
| double | distance (const Vector3 &point) const |
| Returns the distance of point to the line. | |
| const Vector3 & | getPosition () const |
| Return the reference point on the line. | |
| const Vector3 & | getDirection () const |
| Return the direction of the line. | |
| Vector3 | getVector (double lambda) const |
| Return point on line parametrized by lambda. | |
| bool | getClosestPoints (const Line &line2, Vector3 &pointOnLine, Vector3 &pointOnLine2) const |
| Find the two closest points on this and line2 and store them in pointOnLine and pointOnLine2, respectively. | |
Definition at line 22 of file mlLine.h.
| ml::Line::Line | ( | ) |
Constructor. Position is set to (0,0,0) and dir is set to (1,0,0).
| double ml::Line::distance | ( | const Vector3 & | point | ) | const |
Returns the distance of point to the line.
Returns the point on the line which is closest to point.
| bool ml::Line::getClosestPoints | ( | const Line & | line2, | |
| Vector3 & | pointOnLine, | |||
| Vector3 & | pointOnLine2 | |||
| ) | const |
Find the two closest points on this and line2 and store them in pointOnLine and pointOnLine2, respectively.
Return true if lines are not parallel.
| const Vector3& ml::Line::getDirection | ( | ) | const [inline] |
| const Vector3& ml::Line::getPosition | ( | ) | const [inline] |
| Vector3 ml::Line::getVector | ( | double | lambda | ) | const [inline] |
Initialize line passing through p0 and p1.
Return true if p0 != p1, otherwise the direction of the line is left unchanged and false is returned.
1.5.8