izzi
SVG SUBSET C++ API
Loading...
Searching...
No Matches
izzi-points.h File Reference

Go to the source code of this file.

Classes

struct  Point
struct  WeightedPoint

Namespaces

namespace  svg

Typedefs

using svg::point_2t = std::tuple<space_type, space_type>
 Point (x,y) in 2D space, space_type defaults to double.
using svg::point_2tn = std::tuple<ulong, point_2t>
 Point (x,y) in 2D space with weight n.
using svg::point_2ts = std::tuple<string, point_2t>
 Named Point (x,y) in 2D space.
using svg::point_3t = std::tuple<space_type, space_type, space_type>
 Point (x,y,z) in 3D space, space_type defaults to double.
using svg::vspace = std::vector<space_type>
 Split range, so one dimension of (x,y) cartesian plane.
using svg::srange = std::set<point_2t>
 Latitude and Longitude Ranges.
using svg::srangen = std::set<point_2tn>
using svg::vrange = std::vector<point_2t>
using svg::vrangen = std::vector<point_2tn>
using svg::vvranges = std::vector<vrange>
using svg::vrangenamed = std::vector<point_2ts>
using vpoints = std::vector<Point>
using vwpoints = std::vector<WeightedPoint>

Functions

string svg::to_string (point_2t p)
 Convert point_2t to string.
string svg::to_string (point_3t p)
 Convert point_3t to string.
void svg::split_vrange (const vrange &cpoints, vspace &xpoints, vspace &ypoints, const double xscale=1, const double yscale=1)
 Decompose/split 2D ranges to 1D spaces, perhaps with scaling.
vrange svg::union_vrange (const vrange &r1, const vrange &r2)
 Union two ranges.
point_2t svg::max_vrange (vspace &xpoints, vspace &ypoints, const uint pown)
 For each dimension of vrnage, find min/max and return (xmax, ymax) NB: Assumes zero is min.
point_2t svg::max_vrange (const vrange &points, const uint pown, const double xscale=1, const double yscale=1)
 Just the range info, none of the temporary objects.
vspace svg::narrow_vspace (const vspace &points, uint pown)
 Truncate double to double with pown signifigant digits.
space_type svg::distance_cartesian (const point_2t &p1, const point_2t &p2)
 Find cartesian distance between two 2D points.
bool svg::detect_collision (const point_2t &p1, const int r1, const point_2t &p2, const int r2)
vpoints svg::vrangenamed_to_points (const vrangenamed &inpoints)
 Convert point_2ts to Point.
vrangenamed svg::points_to_vrangenamed (const vpoints &inpoints)
 Convert Point to point_2t.

Typedef Documentation

◆ vpoints

using vpoints = std::vector<Point>

Definition at line 222 of file izzi-points.h.

◆ vwpoints

using vwpoints = std::vector<WeightedPoint>

Definition at line 223 of file izzi-points.h.