public class Transforms extends Object
| Constructor and Description |
|---|
Transforms() |
| Modifier and Type | Method and Description |
|---|---|
static void |
scalePathTime(MotionPath src,
MotionPath dest,
double scale,
double ref)
Scales the x-distance from the reference point by the given amount for
each point in the MotionPath.
|
static List<Point2D> |
scalePositions(List<Point2D> points,
double scale,
double ref)
Scales the y-distance from the reference point by the given amount for
each point in the list.
|
static List<Point2D> |
scaleTimes(List<Point2D> points,
double scale,
double ref)
Scales the x-distance from the reference point by the given amount for
each point in the list.
|
static void |
setPathControlPoints(MotionPath path,
List<Point2D> points)
Sets the coordinates of the MotionPath control points to the given points.
|
static void |
translatePath(MotionPath src,
MotionPath dest,
double amtX,
double amtY)
Moves all the points in a MotionPath by the given x and y amounts.
|
static List<Point2D> |
translatePoints(List<Point2D> points,
double amtX,
double amtY)
Moves all the points in the list be the given x and y amounts.
|
public static void translatePath(MotionPath src, MotionPath dest, double amtX, double amtY)
src - the MotionPath defining the starting points. This MotionPath
is unchangeddest - the MotionPath to set. The Points in dest are set to the
translated coordinates from srcamtX - x amountamtY - y amountpublic static void scalePathTime(MotionPath src, MotionPath dest, double scale, double ref)
src - the MotionPath defining the starting points. This MotionPath
is unchangeddest - the MotionPath to set. The Points in dest are set to the
scale coordinates from srcscale - the scale amountref - x-value to scale frompublic static void setPathControlPoints(MotionPath path, List<Point2D> points)
path - the path to changepoints - the new positionspublic static List<Point2D> scaleTimes(List<Point2D> points, double scale, double ref)
points - the list of points to scalescale - the amount to scale the pointsref - the scale reference pointpublic static List<Point2D> scalePositions(List<Point2D> points, double scale, double ref)
points - the list of points to scalescale - the amount to scale the pointsref - the scale reference pointpublic static List<Point2D> translatePoints(List<Point2D> points, double amtX, double amtY)
points - the points to moveamtX - x amountamtY - y amountCopyright © 2011-2014. All Rights Reserved.