KJB
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Namespaces | Macros | Functions
ratpoint.h File Reference

Support for points and line segments with rational coordinates. More...

#include <l_cpp/l_exception.h>
#include <qd_cpp/pixpoint.h>
#include <iosfwd>
#include <l_cpp/l_util.h>
#include <l/l_sys_lib.h>
#include <l/l_sys_io.h>
#include <boost/rational.hpp>

Go to the source code of this file.

Classes

struct  kjb::qd::RatPoint
 very basic structure to represent X, Y points with rational coords. More...
 
struct  kjb::qd::PixPoint_line_segment
 basic line segment when endpoints are PixPoints (int coords) More...
 
struct  kjb::qd::RatPoint_line_segment
 closed line segment with rational coords More...
 

Namespaces

 kjb
 Classes and functions for dealing with trajectory files.
 
 kjb::qd
 support for the path algorithm I call the quasi-Dijkstra method.
 

Macros

#define UNLIMITED_RATIONAL_PRECISION_QD_CPP_IVILAB   0
 

Functions

bool kjb::qd::operator== (const RatPoint &a, const RatPoint &b)
 test equality of two RatPoints, totally unsurprising. More...
 
bool kjb::qd::operator!= (const RatPoint &a, const RatPoint &b)
 test inequality of two RatPoints. More...
 
bool kjb::qd::operator< (const RatPoint &a, const RatPoint &b)
 "row-major" ordering of points More...
 
bool kjb::qd::operator<= (const RatPoint &a, const RatPoint &b)
 "row-major" ordering of points More...
 
RatPoint kjb::qd::operator- (const RatPoint &a, const RatPoint &b)
 subtraction of RatPoints as if they are position vectors More...
 
std::ostream & kjb::qd::operator<< (std::ostream &s, const RatPoint &p)
 simple ascii putter More...
 
bool kjb::qd::is_degenerate (const PixPoint_line_segment &s)
 
bool kjb::qd::are_parallel (const PixPoint_line_segment &s, const PixPoint_line_segment &t)
 test whether these segments lie on parallel lines or are collinear. More...
 
bool kjb::qd::is_intersecting (const PixPoint_line_segment &, const PixPoint_line_segment &)
 Test whether two closed line segments intersect. More...
 
template<typename LINE_SEGMENT >
bool kjb::qd::are_sharing_a_continuum (const LINE_SEGMENT &s, const LINE_SEGMENT &t)
 test whether two segments share an infinity of common points More...
 
template<typename LINE_SEGMENT >
bool kjb::qd::are_sharing_a_continuum (const LINE_SEGMENT &s, const LINE_SEGMENT &t, LINE_SEGMENT *shared_continuum)
 if 2 closed segs intersect in a line segment, return it and true More...
 
bool kjb::qd::is_degenerate (const RatPoint_line_segment &s)
 
RatPoint::Rat kjb::qd::triangle_area (const RatPoint_line_segment &s, const RatPoint &apex)
 find signed area of triangle defined by segment endpoints and apex. More...
 
bool kjb::qd::is_on (const RatPoint_line_segment &s, const RatPoint &c)
 test whether a given point lies on a given segment More...
 
bool kjb::qd::is_intersecting (const RatPoint_line_segment &s, const RatPoint_line_segment &t)
 
bool kjb::qd::are_parallel (const RatPoint_line_segment &s, const RatPoint_line_segment &t)
 
RatPoint kjb::qd::line_intersection (const RatPoint_line_segment &, const RatPoint_line_segment &)
 find intersection point of nonparallel lines through these segments More...
 
bool kjb::qd::segment_intersection (const RatPoint_line_segment &s, const RatPoint_line_segment &t, RatPoint_line_segment *intersection)
 if segments intersect, return true and compute intersection More...
 

Detailed Description

Support for points and line segments with rational coordinates.

Author
Andrew Predoehl

Macro Definition Documentation

#define UNLIMITED_RATIONAL_PRECISION_QD_CPP_IVILAB   0