line-geometry.h revision 6b76ef6bb3e9b4e1cc83e01cd81a55bbd0450989
/*
* Routines for dealing with lines (intersections, etc.)
*
* Authors:
* Maximilian Albert <Anhalter42@gmx.de>
*
* Copyright (C) 2007 authors
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#ifndef SEEN_LINE_GEOMETRY_H
#define SEEN_LINE_GEOMETRY_H
#include <boost/optional.hpp>
#include "glib.h"
#include "display/sp-ctrlline.h"
#include "axis-manip.h" // FIXME: This is only for Box3D::epsilon; move that to a better location
#include "document.h"
/* If A is a point in the plane and n is the normal vector of the line then
the sign of dot(A, n) specifies the half-plane in which A lies.
Thus A and B lie on the same side if the dot products have equal sign. */
}
{
}
};
{
}
std::pair<double, double> coordinates (Geom::Point const &v1, Geom::Point const &v2, Geom::Point const &w);
bool lies_in_quadrangle (Geom::Point const &A, Geom::Point const &B, Geom::Point const &C, Geom::Point const &D, Geom::Point const &pt);
std::pair<Geom::Point, Geom::Point> side_of_intersection (Geom::Point const &A, Geom::Point const &B,
/*** For debugging purposes: Draw a knot/node of specified size and color at the given position ***/
/*** For debugging purposes: Draw a line between the specified points ***/
/** A function to print out the Line. It just prints out the coordinates of start point and
direction on the given output stream */
return out_file;
}
} // namespace Box3D
#endif /* !SEEN_LINE_GEOMETRY_H */
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :