public class MatrixNd extends Object implements Matrixd, Serializable, Cloneable
| Modifier and Type | Field and Description |
|---|---|
static MatrixNd |
IDENTITY_2 |
static MatrixNd |
IDENTITY_3 |
static MatrixNd |
IDENTITY_4 |
| Constructor and Description |
|---|
MatrixNd(double... m) |
MatrixNd(int size) |
MatrixNd(Matrix2d m) |
MatrixNd(Matrix3d m) |
MatrixNd(Matrix4d m) |
MatrixNd(MatrixNd m) |
| Modifier and Type | Method and Description |
|---|---|
MatrixNd |
abs() |
MatrixNd |
add(MatrixNd m) |
MatrixNd |
ceil() |
MatrixNd |
clone() |
static MatrixNd |
createLookAt(int size,
Vector3d eye,
Vector3d at,
Vector3d up)
Creates a "look at" matrix for the given eye point.
|
static MatrixNd |
createOrthographic(int size,
double right,
double left,
double top,
double bottom,
double near,
double far)
Creates an orthographic viewing frustum built from the provided values
|
static MatrixNd |
createOrthographic(int size,
float right,
float left,
float top,
float bottom,
float near,
float far)
Creates an orthographic viewing frustum built from the provided values
|
static MatrixNd |
createPerspective(int size,
double fov,
double aspect,
double near,
double far)
Creates a perspective projection matrix with the given (x) FOV, aspect, near and far planes
|
static MatrixNd |
createPerspective(int size,
float fov,
float aspect,
float near,
float far)
Creates a perspective projection matrix with the given (x) FOV, aspect, near and far planes
|
static MatrixNd |
createRotation(int size,
Complexd rot) |
static MatrixNd |
createRotation(int size,
Quaterniond rot) |
static MatrixNd |
createScaling(double... vec) |
static MatrixNd |
createScaling(VectorNd v) |
static MatrixNd |
createTranslation(double... vec) |
static MatrixNd |
createTranslation(VectorNd v) |
double |
determinant() |
MatrixNd |
div(double a) |
MatrixNd |
div(float a) |
MatrixNd |
div(MatrixNd m) |
boolean |
equals(Object obj) |
MatrixNd |
floor() |
double |
get(int row,
int col) |
VectorNd |
getColumn(int col) |
VectorNd |
getRow(int row) |
int |
hashCode() |
MatrixNd |
invert() |
MatrixNd |
mul(double a) |
MatrixNd |
mul(float a) |
MatrixNd |
mul(MatrixNd m) |
MatrixNd |
negate() |
MatrixNd |
pow(double pow) |
MatrixNd |
pow(float pow) |
MatrixNd |
resize(int size) |
MatrixNd |
rotate(Complexd rot) |
MatrixNd |
rotate(Quaterniond rot) |
MatrixNd |
round() |
MatrixNd |
scale(double... v) |
MatrixNd |
scale(VectorNd v) |
void |
set(int row,
int col,
double val) |
void |
set(int row,
int col,
float val) |
void |
setIdentity() |
void |
setZero() |
int |
size() |
MatrixNd |
sub(MatrixNd m) |
double[] |
toArray() |
double[] |
toArray(boolean columnMajor) |
MatrixNd |
toDouble() |
MatrixNf |
toFloat() |
Matrix2d |
toMatrix2() |
Matrix3d |
toMatrix3() |
Matrix4d |
toMatrix4() |
String |
toString() |
double |
trace() |
VectorNd |
transform(double... vec) |
VectorNd |
transform(VectorNd v) |
MatrixNd |
translate(double... v) |
MatrixNd |
translate(VectorNd v) |
MatrixNd |
transpose() |
public static final MatrixNd IDENTITY_2
public static final MatrixNd IDENTITY_3
public static final MatrixNd IDENTITY_4
public MatrixNd(int size)
public MatrixNd(Matrix2d m)
public MatrixNd(Matrix3d m)
public MatrixNd(Matrix4d m)
public MatrixNd(double... m)
public MatrixNd(MatrixNd m)
public int size()
public void set(int row,
int col,
float val)
public void set(int row,
int col,
double val)
public final void setIdentity()
public void setZero()
public MatrixNd resize(int size)
public MatrixNd mul(float a)
public MatrixNd div(float a)
public MatrixNd pow(float pow)
public MatrixNd translate(double... v)
public MatrixNd scale(double... v)
public MatrixNd rotate(Quaterniond rot)
public VectorNd transform(double... vec)
public double determinant()
determinant in interface Matrixdpublic Matrix2d toMatrix2()
public Matrix3d toMatrix3()
public Matrix4d toMatrix4()
public double[] toArray()
public static MatrixNd createScaling(double... vec)
public static MatrixNd createTranslation(double... vec)
public static MatrixNd createRotation(int size, Quaterniond rot)
public static MatrixNd createLookAt(int size, Vector3d eye, Vector3d at, Vector3d up)
size - The size of the matrix, minimum of 4eye - The position of the cameraat - The point that the camera is looking atup - The "up" vectorpublic static MatrixNd createPerspective(int size, float fov, float aspect, float near, float far)
size - The size of the matrix, minimum of 4fov - The field of view in the x directionaspect - The aspect ratio, usually width/heightnear - The near plane, cannot be 0far - the far plane, zFar cannot equal zNearpublic static MatrixNd createPerspective(int size, double fov, double aspect, double near, double far)
size - The size of the matrix, minimum of 4fov - The field of view in the x directionaspect - The aspect ratio, usually width/heightnear - The near plane, cannot be 0far - the far plane, zFar cannot equal zNearpublic static MatrixNd createOrthographic(int size, float right, float left, float top, float bottom, float near, float far)
size - The size of the matrix, minimum of 4right - the right most plane of the viewing frustumleft - the left most plane of the viewing frustumtop - the top plane of the viewing frustumbottom - the bottom plane of the viewing frustumnear - the near plane of the viewing frustumfar - the far plane of the viewing frustumpublic static MatrixNd createOrthographic(int size, double right, double left, double top, double bottom, double near, double far)
size - The size of the matrix, minimum of 4right - the right most plane of the viewing frustumleft - the left most plane of the viewing frustumtop - the top plane of the viewing frustumbottom - the bottom plane of the viewing frustumnear - the near plane of the viewing frustumfar - the far plane of the viewing frustumCopyright © 2013–2016 Flow Powered. All rights reserved.