|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--net.rim.device.api.math.VecMath
Implementations of a stack for use in matrix multiplication. Does matrix multiplication on 3x3 matrices. Matrix indices are fixed point ints with 16:16 format.
| Field Summary | ||
static int[] |
IDENTITY_3X3
3 x 3 identity matrix. |
|
| Constructor Summary | ||
VecMath()
|
||
| Method Summary | ||
static boolean |
intersects(int ax0,
int ay0,
int ax1,
int ay1,
int bx0,
int by0,
int bx1,
int by1)
Does line segment A intersection line segment B? |
|
static boolean |
isIdentity(int[] source,
int index)
Is this matrix, represented by this array, the indentity matrix? |
|
static void |
multiply3x3(int[] a,
int aStartIndex,
int[] b,
int bStartIndex)
Deprecated. use multiply3x3(int[],int,int[],int,int[],int) and pass B as the destination matrix. |
|
static void |
multiply3x3(int[] a,
int aStartIndex,
int[] b,
int bStartIndex,
int[] dest,
int destStartIndex)
Multiplies 2 3x3 matrices (A x B). |
|
static void |
multiply3x3Affine(int[] a,
int aStartIndex,
int[] b,
int bStartIndex,
int[] dest,
int destStartIndex)
Multiplies 2 affine 3x3 matrices (A x B). |
|
static long |
multiplyPoint(int[] matrix,
int pos,
int x,
int y)
|
|
static void |
pointMultiply3x3(int[] a,
int aStartIndex,
int x,
int y,
int[] dest,
int destStartIndex)
Multiplies a given x,y point by a given 3x3 matrix. |
|
static void |
transformPoints(int[] matrix,
int matrixOffset,
int[] coordsX,
int[] coordsY,
int[] destX,
int[] destY)
|
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
| Constructor Detail |
| Method Detail |
public static long multiplyPoint(int[] matrix,
int pos,
int x,
int y)
public static void transformPoints(int[] matrix,
int matrixOffset,
int[] coordsX,
int[] coordsY,
int[] destX,
int[] destY)
public static final boolean isIdentity(int[] source,
int index)
source - Integer array containing the matrix.index - Offset inside the matrix
public static boolean intersects(int ax0,
int ay0,
int ax1,
int ay1,
int bx0,
int by0,
int bx1,
int by1)
public static void multiply3x3(int[] a,
int aStartIndex,
int[] b,
int bStartIndex)
a - the array containing matrix AaStartIndex - the index of the start of matrix Ab - the array containing matrix BbStartIndex - the index of the start of matrix B
public static void multiply3x3(int[] a,
int aStartIndex,
int[] b,
int bStartIndex,
int[] dest,
int destStartIndex)
a - the array containing matrix AaStartIndex - the index of the start of matrix Ab - the array containing matrix BbStartIndex - the index of the start of matrix Bdest - the array to store the result of the multiplicationdestStartIndex - the index at which to store the first value in
the matrix.
public static void multiply3x3Affine(int[] a,
int aStartIndex,
int[] b,
int bStartIndex,
int[] dest,
int destStartIndex)
The result is stored in the specified destination array. Please note, no bounds checks are made by this method. It assumes that the arrays are non-null and contain enough values/space for a 3x3 matrix. Also this method is optimized for affine matrices. Using it with non-affine matrices give incorrect and undefined behavior.
a - the array containing matrix AaStartIndex - the index of the start of matrix Ab - the array containing matrix BbStartIndex - the index of the start of matrix Bdest - the array to store the result of the multiplicationdestStartIndex - the index at which to store the first value in
the matrix.
public static void pointMultiply3x3(int[] a,
int aStartIndex,
int x,
int y,
int[] dest,
int destStartIndex)
a - the array containing the matrix to multiply.aStartIndex - the index in a where the matrix begins.x - the x coordinate (in Fixed 32 notation).y - the y coordinate (in Fixed 32 notation).dest - the array in which to store the results.destStartOffset - the index in dest where the results should be
stored.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2004 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.