public final class Matrix4 extends java.lang.Object implements com.aspose.threed.Struct<Matrix4>, java.io.Serializable
Modifier and Type | Field and Description |
---|---|
double |
m00
The m00.
|
double |
m01
The m01.
|
double |
m02
The m02.
|
double |
m03
The m03.
|
double |
m10
The m10.
|
double |
m11
The m11.
|
double |
m12
The m12.
|
double |
m13
The m13.
|
double |
m20
The m20.
|
double |
m21
The m21.
|
double |
m22
The m22.
|
double |
m23
The m23.
|
double |
m30
The m30.
|
double |
m31
The m31.
|
double |
m32
The m32.
|
double |
m33
The m33.
|
Constructor and Description |
---|
Matrix4() |
Matrix4(double[] m)
Initializes a new instance of the
Matrix4 struct. |
Matrix4(double m00,
double m01,
double m02,
double m03,
double m10,
double m11,
double m12,
double m13,
double m20,
double m21,
double m22,
double m23,
double m30,
double m31,
double m32,
double m33)
Initializes a new instance of the
Matrix4 struct. |
Matrix4(Vector4 r0,
Vector4 r1,
Vector4 r2,
Vector4 r3)
Constructs matrix from 4 rows.
|
Modifier and Type | Method and Description |
---|---|
Matrix4 |
clone() |
Matrix4 |
concatenate(Matrix4 m2)
Concatenates the two matrices
|
void |
copyFrom(Matrix4 src) |
boolean |
decompose(Vector3 translation,
Vector3 scaling,
Quaternion rotation)
Decompose the transformation matrix.
|
boolean |
equals(java.lang.Object obj) |
double |
getDeterminant()
Gets the determinant of the matrix.
|
static Matrix4 |
getIdentity()
Gets the identity matrix.
|
int |
hashCode() |
Matrix4 |
inverse()
Inverses this instance.
|
static Matrix4 |
mul(Matrix4 lhs,
double v)
Multiply the matrix and double value
|
static Matrix4 |
mul(Matrix4 lhs,
Matrix4 rhs)
Multiply the two matrices
|
static Vector3 |
mul(Matrix4 lhs,
Vector3 v)
Multiply the matrix and vector3
|
static Vector4 |
mul(Matrix4 lhs,
Vector4 v)
Multiply the matrix and vector4
|
Matrix4 |
normalize()
Normalizes this instance.
|
static Matrix4 |
rotate(double angle,
Vector3 axis)
Create a rotation matrix by rotation angle and axis
|
static Matrix4 |
rotate(Quaternion q)
Create a rotation matrix from a quaternion
|
static Matrix4 |
rotateFromEuler(double rx,
double ry,
double rz)
Create a rotation matrix from Euler angle
|
static Matrix4 |
rotateFromEuler(Vector3 eul)
Create a rotation matrix from Euler angle
|
static Matrix4 |
scale(double s)
Creates a matrix that scales along the x-axis, the y-axis and the z-axis.
|
static Matrix4 |
scale(double sx,
double sy,
double sz)
Creates a matrix that scales along the x-axis, the y-axis and the z-axis.
|
static Matrix4 |
scale(Vector3 s)
Creates a matrix that scales along the x-axis, the y-axis and the z-axis.
|
void |
setTRS(Vector3 translation,
Vector3 rotation,
Vector3 scale)
Initializes the matrix with translation/rotation/scale
|
double[] |
toArray()
Converts matrix to array.
|
java.lang.String |
toString()
Returns a
String that represents the current Matrix4 . |
static Matrix4 |
translate(double tx,
double ty,
double tz)
Creates a matrix that translates along the x-axis, the y-axis and the z-axis
|
static Matrix4 |
translate(Vector3 t)
Creates a matrix that translates along the x-axis, the y-axis and the z-axis
|
Matrix4 |
transpose()
Transposes this instance.
|
public double m00
public double m01
public double m02
public double m03
public double m10
public double m11
public double m12
public double m13
public double m20
public double m21
public double m22
public double m23
public double m30
public double m31
public double m32
public double m33
public Matrix4(Vector4 r0, Vector4 r1, Vector4 r2, Vector4 r3)
r0
- R0.r1
- R1.r2
- R2.r3
- R3.public Matrix4(double m00, double m01, double m02, double m03, double m10, double m11, double m12, double m13, double m20, double m21, double m22, double m23, double m30, double m31, double m32, double m33)
Matrix4
struct.m00
- M00.m01
- M01.m02
- M02.m03
- M03.m10
- M10.m11
- M11.m12
- M12.m13
- M13.m20
- M20.m21
- M21.m22
- M22.m23
- M23.m30
- M30.m31
- M31.m32
- M32.m33
- M33.public Matrix4(double[] m)
Matrix4
struct.m
- M.public Matrix4()
public static Matrix4 getIdentity()
public Matrix4 concatenate(Matrix4 m2)
m2
- M2.public Matrix4 transpose()
public Matrix4 normalize()
public Matrix4 inverse()
public double getDeterminant()
public static Matrix4 mul(Matrix4 lhs, Matrix4 rhs)
lhs
- Lhs.rhs
- Rhs.public static Vector3 mul(Matrix4 lhs, Vector3 v)
lhs
- Lhs.v
- V.public void setTRS(Vector3 translation, Vector3 rotation, Vector3 scale)
translation
- Translation.rotation
- Euler angles for rotation, fields are in degree.scale
- Scale.public static Vector4 mul(Matrix4 lhs, Vector4 v)
lhs
- Lhs.v
- V.public static Matrix4 mul(Matrix4 lhs, double v)
lhs
- Lhs.v
- V.public double[] toArray()
public boolean decompose(Vector3 translation, Vector3 scaling, Quaternion rotation)
translation
- The translation.scaling
- The scaling.rotation
- The rotation.public java.lang.String toString()
String
that represents the current Matrix4
.toString
in class java.lang.Object
String
that represents the current Matrix4
.public static Matrix4 translate(Vector3 t)
t
- Translate offsetpublic static Matrix4 translate(double tx, double ty, double tz)
tx
- X-coordinate offsetty
- Y-coordinate offsettz
- Z-coordinate offsetpublic static Matrix4 scale(Vector3 s)
s
- Scaling factories applies to the x-axis, the y-axis and the z-axispublic static Matrix4 scale(double s)
s
- Scaling factories applies to all axexpublic static Matrix4 scale(double sx, double sy, double sz)
sx
- Scaling factories applies to the x-axissy
- Scaling factories applies to the y-axissz
- Scaling factories applies to the z-axispublic static Matrix4 rotateFromEuler(Vector3 eul)
eul
- Rotation in radianpublic static Matrix4 rotateFromEuler(double rx, double ry, double rz)
rx
- Rotation in x axis in radianry
- Rotation in y axis in radianrz
- Rotation in z axis in radianpublic static Matrix4 rotate(double angle, Vector3 axis)
angle
- Rotate angle in radianaxis
- Rotation axispublic static Matrix4 rotate(Quaternion q)
q
- Rotation quaternionpublic Matrix4 clone()
clone
in interface com.aspose.threed.Struct<Matrix4>
clone
in class java.lang.Object
public void copyFrom(Matrix4 src)
copyFrom
in interface com.aspose.threed.Struct<Matrix4>
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object