public class LineUtil
extends java.lang.Object
Constructor and Description |
---|
LineUtil() |
Modifier and Type | Method and Description |
---|---|
static java.awt.geom.Point2D |
interpolatedPoint(java.awt.geom.Point2D A,
java.awt.geom.Point2D B,
double d)
Interpolates a point on a segment.
|
static double |
norm(java.awt.geom.Point2D A,
java.awt.geom.Point2D B)
Computes the segment length
|
static double |
norm2(java.awt.geom.Point2D A,
java.awt.geom.Point2D B)
Computes the segment square length
|
protected static boolean |
retrievePoints(float length,
java.util.LinkedList points,
java.util.LinkedList polysegment)
Extract a length on a polyline.
|
public static double norm2(java.awt.geom.Point2D A, java.awt.geom.Point2D B)
A
- the begin pointB
- the end pointpublic static double norm(java.awt.geom.Point2D A, java.awt.geom.Point2D B)
A
- the begin pointB
- the end pointpublic static java.awt.geom.Point2D interpolatedPoint(java.awt.geom.Point2D A, java.awt.geom.Point2D B, double d)
A
- the begin pointB
- the end pointd
- the distance from A to the wanted pointprotected static boolean retrievePoints(float length, java.util.LinkedList points, java.util.LinkedList polysegment)
length
- the curve length to extract from pointspoints
- the original pointspolysegment
- the returned pointsCopyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details