|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgov.nasa.worldwind.geom.Matrix4
public class Matrix4
| Constructor Summary | |
|---|---|
Matrix4()
Creates a new Matrix4 as the identity matrix. |
|
Matrix4(double[] entries)
Creates a new Matrix4 from an array of double precision floating point values. |
|
Matrix4(float[] entries)
Creates a new Matrix4 from an array of single precision floating point values. |
|
| Method Summary | |
|---|---|
Matrix |
add(Matrix m)
Adds this another matrix to this one. |
double |
determinant()
Obtains the determinant of this Matrix. |
boolean |
equals(Object o)
|
double[] |
getEntries()
Retrieves the entries comprising this Matrix. |
Matrix |
getInverse()
Obtain the inverse of this Matrix. |
Matrix |
getTranspose()
Obtains the transpose of this Matrix. |
int |
hashCode()
|
boolean |
isOrthonormal()
Obtains whether or not this Matrix is orthonormal. |
Matrix |
multiply(Matrix m)
Performs a cross multiplication with another Matrix. |
Matrix |
rotate(Angle rotation,
double axisX,
double axisY,
double axisZ)
Rotate this matrix by some angle around an arbitrary axis. |
Matrix |
rotateX(Angle rotation)
Rotate this Matrix around the x-axis. |
Matrix |
rotateY(Angle rotation)
Rotate this Matrix around the y-axis. |
Matrix |
rotateZ(Angle rotation)
Rotate this Matrix around the z-axis. |
Matrix |
setToIdentity()
Sets this Matrix to the identity matrix. |
String |
toString()
|
Point |
transform(Point p)
Applies this Matrix to a Point. |
Matrix |
translate(double x,
double y,
double z)
Translates this Matrix in three dimensional space. |
Matrix |
translate(Point p)
Translates this Matrix in three dimansional space. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Matrix4()
Matrix4 as the identity matrix.
public Matrix4(double[] entries)
Matrix4 from an array of double precision floating point values. The caller must
provide at least sixteen values, and any values beyond the sixteenth are ignored. Values are assigned in the
following order: (1, 1), (2, 1), (3, 1), (4, 1), (1, 2), (2, 2), (3, 2), (4, 2), (3, 3), (2, 3), (3, 3), (4, 3),
(1, 4), (2, 4), (3, 4), (4, 4).
entries - the values, must contain at least 16 values and may not be null
IllegalArgumentException - if entries is too short or nullpublic Matrix4(float[] entries)
Matrix4 from an array of single precision floating point values. The caller must
provide at least sixteen values, and any values beyond the sixteenth are ignored. Values are assigned in the
following order: (1, 1), (2, 1), (3, 1), (4, 1), (1, 2), (2, 2), (3, 2), (4, 2), (3, 3), (2, 3), (3, 3), (4, 3),
(1, 4), (2, 4), (3, 4), (4, 4).
entries - the values, must contain at least 16 values and may not be null
IllegalArgumentException - if entries is too short or null| Method Detail |
|---|
public final Matrix add(Matrix m)
add in interface Matrixm - the Matrix to add to this one
m added to it
IllegalArgumentException - if m is nullpublic final double determinant()
Matrix.
determinant in interface Matrixpublic boolean equals(Object o)
equals in class Objectpublic final double[] getEntries()
Matrix. The returned array is always 16 entries long. Values
are place in as in the aray as follows: (1, 1), (2, 1), (3, 1), (4, 1), (1, 2), (2, 2), (3, 2), (4, 2), (3, 3),
(2, 3), (3, 3), (4, 3), (1, 4), (2, 4), (3, 4), (4, 4).
getEntries in interface Matrixpublic final Matrix getInverse()
Matrix.
getInverse in interface MatrixMatrix.public final Matrix getTranspose()
Matrix. Does not alter the state of this Matrix.
getTranspose in interface MatrixMatrixpublic int hashCode()
hashCode in class Objectpublic final boolean isOrthonormal()
Matrix is orthonormal. Orthonormal matrices possess unique properties
that can make algorithms more efficient.
isOrthonormal in interface Matrixpublic final Matrix multiply(Matrix m)
Matrix. Alters the state of this Matrix.
multiply in interface Matrixm - another Matrix
m
IllegalArgumentException - if m is null
public final Matrix rotate(Angle rotation,
double axisX,
double axisY,
double axisZ)
Angle indicates an
anti-clockwise direction. This method affects the internal state of this matrix.
rotate in interface Matrixrotation - the distance to rotate this matrixaxisX - the x component of the axis of rotationaxisY - the y component of the axis of rotationaxisZ - the z component of the axis of rotation
Matrix, with the rotation applied
IllegalArgumentException - if rotation is nullpublic final Matrix rotateX(Angle rotation)
Matrix around the x-axis. A positive Angle indicates an anti-clockwise
direction. Changes the internal state of this Matrix.
rotateX in interface Matrixrotation - the distance to rotate
Matrix, rotated around the x-axis by rotation distance
IllegalArgumentException - if rotation is nullpublic final Matrix rotateY(Angle rotation)
Matrix around the y-axis. A positive Angle indicates an anti-clockwise
direction. Changes the internal state of this Matrix.
rotateY in interface Matrixrotation - the distance to rotate
Matrix, rotated around the y-axis by rotation distance
IllegalArgumentException - if rotation is nullpublic final Matrix rotateZ(Angle rotation)
Matrix around the z-axis. A positive Angle indicates an anti-clockwise
direction. Changes the internal state of this Matrix.
rotateZ in interface Matrixrotation - the distance to rotate
Matrix, rotated around the z-axis by rotation distance
IllegalArgumentException - if rotation is nullpublic final Matrix setToIdentity()
Matrix to the identity matrix. This method causes internal changes to the
Matrix it operates on.
setToIdentity in interface Matrixthis, set to the identitypublic String toString()
toString in class Objectpublic final Point transform(Point p)
Matrix to a Point.
transform in interface Matrixp - the Point to transform
Matrix
IllegalArgumentException - if p is null
public Matrix translate(double x,
double y,
double z)
Matrix in three dimensional space. Changes the internal state of this
Matrix.
translate in interface Matrixx - the distance to translate along the x-axisy - the distance to translate along the y-axisz - the distance to translate along the z-axis
public final Matrix translate(Point p)
Matrix in three dimansional space. Changes the internal state of this
Matrix. The x, y and z co-ordinates are used to translate along the x, y and z axes respectively.
translate in interface Matrixp - the x, y and z distances to translate as a Point
Matrix, translated by the distances defined in p
IllegalArgumentException - if p is null
|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||