|
| PixPathAc (const PixPath &path) |
| ctor copies from a PixPath. This is the only public ctor. More...
|
|
PixPathAc & | assign (unsigned index, const PixPoint &newp) |
| assign a location in a PixPathAc More...
|
|
void | swap (PixPathAc &vpp) |
| swap representations of two PixPathAc objects More...
|
|
void | push_back (const PixPoint &pp) |
| add a new point to the end of the path More...
|
|
void | clear () |
| throw away all points More...
|
|
PixPathAc & | append (const_iterator begin, const_iterator end) |
| append range of another path to this More...
|
|
PixPathAc & | append (const PixPath &suffix) |
| tack on a copy of a given path to the end of this path More...
|
|
int | append_no_overlap (const PixPath &suffix) |
| see description of PixPath::append_no_overlap() More...
|
|
PixPathAc & | ow_reverse () |
| Reverse the order of this path, IN PLACE! More...
|
|
int | arclength (std::vector< float > *alvec) const |
| compute polygonal path length along path, ret. vector of results. More...
|
|
float | arclength (size_t index) const |
| Return the polygonal path length from front() to indexed point. More...
|
|
float | arclength () const |
| Return the polygonal path length for this path, front() to back() More...
|
|
size_t | whereis_arclength_ratio (float) const |
| Return index of PixPoint in path at a given arclength ratio. More...
|
|
size_t | halfway () const |
| Return index of PixPoint closest to but not beyond mid-arclength. More...
|
|
virtual | ~PixPath () |
| obligatory dtor More...
|
|
const PixPoint & | operator[] (unsigned index) const |
| Vector-like access to points (returning an rvalue). More...
|
|
virtual void | pop_back () |
|
size_t | size () const |
| Number of points in the path (not the same as its length). More...
|
|
virtual void | swap (PixPath &vpp) |
| Swap the contents of two PixPaths. More...
|
|
const_iterator | begin () const |
| Return an iterator pointing to the first point in the path. More...
|
|
const_iterator | end () const |
| Rtn iterator pointing to just beyond the last point in the path. More...
|
|
const_reverse_iterator | rbegin () const |
| return a reverse-moving iterator to the last point in path More...
|
|
const_reverse_iterator | rend () const |
| return one-before-first iterator, in symmetry with end(). More...
|
|
PixPath | subrange (unsigned, unsigned) const |
| Returns a subrange of this PixPath object. More...
|
|
PixPath | prefix (unsigned postlast) const |
| Variation on subrange: return a prefix of this path (by value) More...
|
|
PixPath | suffix (unsigned first) const |
| Variation on subrange: return a suffix of this path (by value) More...
|
|
bool | self_intersect (PixPoint *where=00) const |
| Reveal whether the path has any self-intersections. More...
|
|
bool | connected8 (bool emit_verbose_debug_output=false) const |
| Is the path all connected, using 8-connectivity? More...
|
|
PixPoint | front () const |
| Return (by value) the first point in the path. More...
|
|
PixPoint | back () const |
| Return (by value) the last point in the path. More...
|
|
std::string | str (const std::string &separator="\n") const |
| Return the path as an ASCII string. More...
|
|
int | save (const std::string &filename) const |
| Saves the path to an ASCII file, returns NO_ERROR or ERROR. More...
|
|
bool | operator== (const PixPath &) const |
| Compare PixPaths; true iff the sequence of points is identical. More...
|
|
bool | operator!= (const PixPath &other) const |
| Compare PixPaths; true iff the sequence of points differs. More...
|
|
PixPath | operator+ (const PixPath &) const |
| Add, element-by-element, two PixPaths of the same length. More...
|
|
virtual PixPoint | boundbox_min_min () const |
| Return the corner point of a bounding box, with min x and y. More...
|
|
virtual PixPoint | boundbox_max_max () const |
| Similar to boundbox_min_min() but returns maximum x, y coords. More...
|
|
bool | boundbox_within_boundbox (const PixPath &outer) const |
| Test whether the axis-aligned bounding box of this path lies within the axis-aligned bounding box of the given path. More...
|
|
bool | so_boundbox_holds_within (const PixPoint &q) const |
| sort of like boundbox_within_boundbox but works on a single point More...
|
|
unsigned | hits (const PixPoint &query_point) const |
| Return number of times (maybe 0) the path hits a query point. More...
|
|
unsigned | hits (const PixPath &query_path) const |
| return number of common points between query_path and this path More...
|
|
PixPoint | nearest (const PixPoint &, const_iterator *q=00) const |
| Return the PixPath member closest to a given query point. More...
|
|
PixPoint | nearest (const kjb::Vector2 &, const_iterator *q=00) const |
| Return the PixPath member closest to the given real xy coordinates. More...
|
|
PixPath & | ow_reverse () |
| Reverse the order of the points in the path (overwriting!) More...
|
|
PixPath | reverse () const |
| return a copy of this list after reversing the front-back order. More...
|
|
int | cubic_fit (std::vector< float > *x, std::vector< float > *y, int ref=0) const |
| Fit a cubic polynomial to the given list of x and y points. More...
|
|
PixPath | interpolate (bool forbid_self_intersection=false) const |
| This interpolates pixels between unconnected pixels. More...
|
|
PixPath | cull_redundant_points () const |
| Remove "unnecessary" points (ones that can be bresenham interpolated) More...
|
|
PixPath | merge_redundant_slopes () const |
| return a path with interior points removed but preserve all slopes. More...
|
|
PixPath | expel (const_iterator) const |
| Duplicate this path, except that we omit the indicated point. More...
|
|
PixPath | expel (size_t index_of_unwanted_point) const |
| Duplicate this path, except we omit the point with given index. More...
|
|
virtual float | hausdorff_distance (const PixPath &that) const |
| Compute the Hausdorff metric between two sets of points. More...
|
|
float | closest_pair (const_iterator *pa=0, const_iterator *pb=0) const |
| Find the distance between closest pair of points, ignoring adjacency. More...
|
|
float | closest_adjacent_pair (const_iterator *pa=0) const |
| Find a pair of adjacent points at least as close as any other. More...
|
|
bool | has_subsequence (const PixPath &subseq) const |
| tests whether a given path is a subsequence of this path More...
|
|
double | angle_at (unsigned) const |
| Compute included angle at some interior point in a path. More...
|
|
PixPoint::Integer | bracket_cross_at (unsigned index) const |
| cross product of line segs (index-1,index+1) x (index,index+1) More...
|
|
double | heading_shift_at (unsigned index) const |
| compute shift in "heading" angle at an interior point More...
|
|
bool | intersect_at_with (unsigned preindex1, unsigned preindex2, unsigned *endpoint_intersector_index=00) const |
| Test whether two segments of this path intersect. More...
|
|
bool | do_segments_intersect (unsigned *s1=00, unsigned *s2=00, unsigned *count=00) const |
| quadratic time test whether any 2 path segments cross each other More...
|
|
unsigned | longest_segment (float *length=00) const |
| return index of first point of longest segment More...
|
|
kjb::Vector2 | centroid () const |
| return the "mean" of the points (nonempty, none may be unused) More...
|
|
unsigned | member_near_centroid () const |
| return index of a member point nearest centroid() (qv) More...
|
|
This is like PixPath except that it has an arclength cache, for teh performance.