|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthhreco.toolbox.Util
General utilities.
Constructor Summary | |
Util()
|
Method Summary | |
static double |
distance(double x1,
double y1,
double x2,
double y2)
Return the Euclidean distance between two points, (x1, y1) and (x2, y2). |
static java.awt.geom.Rectangle2D |
getBounds(TimedStroke[] s)
Return the bounding box enclosing the set of strokes. |
static java.awt.geom.AffineTransform |
normScaling(TimedStroke[] strokes,
double height,
double width)
Scale the set of strokes uniformly (maintaining the aspect ratio). |
static double |
pathLength(double[] xvals,
double[] yvals,
int num)
Return the total pathlength by summing over the distance of consecutive points in the array. |
static double |
pathLength(double[] xvals,
double[] yvals,
int startIndex,
int endIndex)
calculate the path length starting from the startIndex to the endIndex (inclusive) of the points in the array. |
static double |
pathLength(TimedStroke s)
Return the path length of a stroke by enumerating over the points in the stroke and summing up the distances between every two consecutive points. |
static void |
strokesToArrays(TimedStroke[] strokes,
double[][] xvals,
double[][] yvals,
int[] npoints)
Store the stroke points in array forms. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Util()
Method Detail |
public static void strokesToArrays(TimedStroke[] strokes, double[][] xvals, double[][] yvals, int[] npoints)
public static java.awt.geom.Rectangle2D getBounds(TimedStroke[] s)
public static java.awt.geom.AffineTransform normScaling(TimedStroke[] strokes, double height, double width)
public static double distance(double x1, double y1, double x2, double y2)
public static double pathLength(double[] xvals, double[] yvals, int num)
public static double pathLength(double[] xvals, double[] yvals, int startIndex, int endIndex)
public static double pathLength(TimedStroke s)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |