Easy3D 2.5.3
|
A generic line representation, which supports both 2D and 3D lines. More...
#include <easy3d/core/line.h>
Public Types | |
typedef Vec< DIM, FT > | Point |
typedef Vec< DIM, FT > | Vector |
typedef GenericLine< DIM, FT > | thisclass |
Public Member Functions | |
GenericLine ()=default | |
Default constructor. | |
void | set (const Point &p, const Vector &dir) |
Sets a line from a point p and its direction dir . | |
const Vector & | direction () const |
Returns the direction of a line. | |
const Point & | point () const |
Returns an arbitrary point on a line. | |
Point | projection (const Point &p) const |
Returns the projection of a point p on this line. | |
FT | squared_distance (const Point &p) const |
Returns the squared distance of a point p to this line. | |
bool | feet (const thisclass &other, Point &p1, Point &p2) const |
Computes the perpendicular feet with another line. More... | |
Static Public Member Functions | |
static GenericLine | from_point_and_direction (const Point &p, const Vector &dir) |
Constructs a line from a point p and its direction dir . | |
static GenericLine | from_two_points (const Point &p, const Point &q) |
Constructs a line from two points p and q . | |
A generic line representation, which supports both 2D and 3D lines.
Computes the perpendicular feet with another line.
other | Another line. |
p1 | The perpendicular foot on the current line. |
p2 | The perpendicular foot on the other line. |