MCPcopy Create free account
hub / github.com/MapServer/MapServer / vertex_dist

Class vertex_dist

renderers/agg/include/agg_vertex_sequence.h:131–151  ·  view source on GitHub ↗

-------------------------------------------------------------vertex_dist Vertex (x, y) with the distance to the next one. The last vertex has distance between the last and the first points if the polygon is closed and 0.0 if it's a polyline.

Source from the content-addressed store, hash-verified

129 // distance between the last and the first points if the polygon is closed
130 // and 0.0 if it's a polyline.
131 struct vertex_dist
132 {
133 double x;
134 double y;
135 double dist;
136
137 vertex_dist() {}
138 vertex_dist(double x_, double y_) :
139 x(x_),
140 y(y_),
141 dist(0.0)
142 {
143 }
144
145 bool operator () (const vertex_dist& val)
146 {
147 bool ret = (dist = calc_distance(x, y, val.x, val.y)) > vertex_dist_epsilon;
148 if(!ret) dist = 1.0 / vertex_dist_epsilon;
149 return ret;
150 }
151 };
152
153
154

Callers 10

add_vertexMethod · 0.85
move_toMethod · 0.85
line_toMethod · 0.85
add_vertexMethod · 0.85
add_vertexMethod · 0.85
add_vertexMethod · 0.85
move_to1Method · 0.85
line_to1Method · 0.85
move_to2Method · 0.85
line_to2Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected