public class Transform
extends java.lang.Object
Shape implemenations.| Constructor and Description | 
|---|
| Transform()Create and identity transform | 
| Transform(float[] matrixPosition)Create a transform for the given positions | 
| Transform(float point00,
         float point01,
         float point02,
         float point10,
         float point11,
         float point12)Create a transform for the given positions | 
| Transform(Transform other)Copy a transform | 
| Transform(Transform t1,
         Transform t2)Concatanate to transform into one | 
| Modifier and Type | Method and Description | 
|---|---|
| Transform | concatenate(Transform tx)Update this Transform by concatenating the given Transform to this one. | 
| static Transform | createRotateTransform(float angle)Create a new rotation Transform | 
| static Transform | createRotateTransform(float angle,
                     float x,
                     float y)Create a new rotation Transform around the specified point | 
| static Transform | createScaleTransform(float xScale,
                    float yScale)Create an new scaling Transform | 
| static Transform | createTranslateTransform(float xOffset,
                        float yOffset)Create a new translation Transform | 
| float[] | getMatrixPosition()Get an array representing this Transform. | 
| java.lang.String | toString()Convert this Transform to a String. | 
| void | transform(float[] source,
         int sourceOffset,
         float[] destination,
         int destOffset,
         int numberOfPoints)Transform the point pairs in the source array and store them in the destination array. | 
| Vector2f | transform(Vector2f pt)Transform the vector2f based on the matrix defined in this transform | 
public Transform()
public Transform(Transform other)
other - The other transform to copypublic Transform(Transform t1, Transform t2)
t1 - The first transform to joint2 - The second transform to joinpublic Transform(float[] matrixPosition)
matrixPosition - An array of float[6] to set up a transformjava.lang.RuntimeException - if the array is not of length 6public Transform(float point00,
                 float point01,
                 float point02,
                 float point10,
                 float point11,
                 float point12)
point00 - float for the first positionpoint01 - float for the second positionpoint02 - float for the third positionpoint10 - float for the fourth positionpoint11 - float for the fifth positionpoint12 - float for the sixth positionpublic void transform(float[] source,
                      int sourceOffset,
                      float[] destination,
                      int destOffset,
                      int numberOfPoints)
source - Array of floats containing the points to be transformedsourceOffset - Where in the array to start processingdestination - Array of floats to store the results.destOffset - Where in the array to start storingnumberOfPoints - Number of points to be transformedjava.lang.ArrayIndexOutOfBoundsException - if sourceOffset + numberOfPoints * 2 is greater than source.length or the same operation on the destination arraypublic Transform concatenate(Transform tx)
tx - The Transfrom to concatenate to this one.public java.lang.String toString()
toString in class java.lang.Objectpublic float[] getMatrixPosition()
public static Transform createRotateTransform(float angle)
angle - The angle in radians to set the transform.public static Transform createRotateTransform(float angle, float x, float y)
angle - The angle in radians to set the transform.x - The x coordinate around which to rotate.y - The y coordinate around which to rotate.public static Transform createTranslateTransform(float xOffset, float yOffset)
xOffset - The amount to move in the x directionyOffset - The amount to move in the y directionpublic static Transform createScaleTransform(float xScale, float yScale)
xScale - The amount to scale in the x coordinateyScale - The amount to scale in the x coordinate