10 #ifndef POLYPATH_H_UOFARIZONAVISION
11 #define POLYPATH_H_UOFARIZONAVISION 1
55 std::vector<size_t> sdmap;
56 std::vector<Vector2> m_tangent;
104 return m_tangent.at(i -
begin());
111 return m_tangent.at(ix);
118 return std::find(sdmap.begin(), sdmap.end(), ix) != sdmap.end();
const PixPath & get_vertices() const
provide read-only access to the sequence of polygon vertices
Definition: polypath.h:81
VecPP::const_iterator const_iterator
constant iterator through PixPath points
Definition: pixpath.h:235
Vector2 get_unit_vector_2x_angle_of_unit_vector(const Vector2 &u)
like compute_unit_vector_2x_angle but for unit-magnitude input.
Definition: polypath.cpp:203
Vector2 get_unit_vector_2x_angle_nothrow(const Vector2 &v)
like get_unit_vector_2x_angle() but return zero vector on zero input
Definition: polypath.h:161
PixPath cull_redundant_points() const
Remove "unnecessary" points (ones that can be bresenham interpolated)
Definition: pixpath.cpp:914
double y() const
Definition: m_vector_d.impl.h:169
represents an open polygonal path with a tangent at each point
Definition: polypath.h:51
Representation of a sequence of pixel coordinates.
Definition: pixpath.h:117
double x() const
Definition: m_vector_d.impl.h:134
const_iterator begin() const
Return an iterator pointing to the first point in the path.
Definition: pixpath.h:358
Vector2 get_unit_vector_2x_angle(const Vector2 &v)
double the angle relative to (1,0) and return a unit vector that way.
Definition: polypath.cpp:192
#define KJB_THROW_2(ex, msg)
Definition: l_exception.h:48
bool is_valid_as_polypath(const PixPath &path, bool throw_failure)
test whether a pixel path is convertible to PolyPath (maybe say why)
Definition: polypath.cpp:212
Vector2 tangent_at(size_t ix) const
access unit vector at a point along path, specified by index
Definition: polypath.h:109
Vector2 tangent_at(const_iterator i) const
access unit vector at a point along path, spec by const_iterator
Definition: polypath.h:102
bool self_intersect(PixPoint *where=00) const
Reveal whether the path has any self-intersections.
Definition: pixpath.cpp:324
Object thrown when an argument to a function is not acceptable.
Definition: l_exception.h:377
static PolyPath construct_from_path(const PixPath &path)
static ctor: reconstruct a path with extra information
Definition: polypath.h:74
int debug_print(std::ostream &) const
print the inner state of a PolyPath object to a stream
Definition: polypath.cpp:152
get the indices of edges in each direction for i
Definition: APPgetLargeConnectedEdges.m:48
Support for error handling exception classes in libKJB.
static PolyPath construct_from_vertices(const PixPath &vertices)
static ctor: build polygonal path from a sequence of vertices
Definition: polypath.h:63
Contains definition for class PixPath.
bool is_a_vertex(size_t ix) const
test whether the point at a given index is a polygonal vertex
Definition: polypath.h:116