13#ifndef SEEN_LINE_GEOMETRY_H
14#define SEEN_LINE_GEOMETRY_H
33 virtual std::optional<Geom::Point>
intersect(
Line const &line);
38 friend inline std::ostream &
operator<< (std::ostream &out_file,
const Line &in_line);
77inline std::ostream &operator<< (std::ostream &out_file,
const Line &in_line) {
78 out_file <<
"Start: " << in_line.
pt <<
" Direction: " << in_line.
v_dir;
Cartesian point / 2D vector and related operations.
friend std::ostream & operator<<(std::ostream &out_file, const Line &in_line)
A function to print out the Line.
Geom::Point point_from_lambda(double const lambda)
bool lie_on_same_side(Geom::Point const &A, Geom::Point const &B)
Line & operator=(Line const &line)
static bool pts_coincide(Geom::Point const pt1, Geom::Point const pt2)
Geom::Point closest_to(Geom::Point const &pt)
void set_direction(Geom::Point const &dir)
virtual std::optional< Geom::Point > intersect(Line const &line)
double lambda(Geom::Point const pt)
std::optional< Geom::Point > intersection_with_viewbox(SPDesktop *desktop)
Two-dimensional point that doubles as a vector.
To do: update description of desktop.
double Coord
Floating point type used to store coordinates.
Perspective line for 3D perspectives.
std::pair< double, double > coordinates(Geom::Point const &v1, Geom::Point const &v2, Geom::Point const &w)
double determinant(Geom::Point const &a, Geom::Point const &b)
bool lies_in_sector(Geom::Point const &v1, Geom::Point const &v2, Geom::Point const &w)
std::pair< Geom::Point, Geom::Point > side_of_intersection(Geom::Point const &A, Geom::Point const &B, Geom::Point const &C, Geom::Point const &D, Geom::Point const &pt, Geom::Point const &dir)
bool lies_in_quadrangle(Geom::Point const &A, Geom::Point const &B, Geom::Point const &C, Geom::Point const &D, Geom::Point const &pt)
SBasis L2(D2< SBasis > const &a, unsigned k)
T dot(D2< T > const &a, D2< T > const &b)
Point unit_vector(Point const &a)