|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.robokind.api.animation.Transforms
public class Transforms
Provides functions to transforming Animations, Channels, and Motion Paths.
Constructor Summary | |
---|---|
Transforms()
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Transforms()
Method Detail |
---|
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 point
public 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 point
public static List<Point2D> translatePoints(List<Point2D> points, double amtX, double amtY)
points
- the points to moveamtX
- x amountamtY
- y amount
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |