public class TransformationMatrix extends Object implements com.aspose.ms.System.ICloneable
Represents 3d transformation matrix
Constructor and Description |
---|
TransformationMatrix()
Initializes a new instance of the
TransformationMatrix class |
TransformationMatrix(double[] items,
boolean inverseRowCol)
Initializes a new instance of the
TransformationMatrix class. |
Modifier and Type | Method and Description |
---|---|
static TransformationMatrix |
axonometric(double alpha,
double beta)
Axonometric projection
|
static TransformationMatrix |
copy(TransformationMatrix matrix)
Performs copy of one TransformationMatrix into other.
|
Object |
deepClone() |
double |
determinant()
Estimates determinant of a matrix.
|
static TransformationMatrix |
fromAxis(Point3D xAxis,
Point3D yAxis,
Point3D zAxis)
From the axis.
|
static TransformationMatrix |
frontView()
FrontView matrix
|
double[][] |
getMatrix()
Gets or sets transformation matrix.
|
static TransformationMatrix |
getWCS(Point3D normalVector)
WCSs the specified normal vector.
|
TransformationMatrix |
invert()
Given an nXn matrix A, solve n linear equations to find the inverse of A.
|
static TransformationMatrix |
oCStoWCS(Point3D normalVector)
Transforms OCS coordinates to WSC
|
static TransformationMatrix |
op_Addition(TransformationMatrix matrix1,
TransformationMatrix matrix2)
Performs summation of two matrices.
|
static TransformationMatrix |
op_Multiply(TransformationMatrix matrix,
double value)
Multiplies matrix by value.
|
static TransformationMatrix |
op_Multiply(TransformationMatrix matrix1,
TransformationMatrix matrix2)
Matrix multiplication operator.
|
static TransformationMatrix |
perspective(double fov,
double aspect,
double near,
double far,
double distance)
Creates perspective matrix.
|
static TransformationMatrix |
rotateX(double theta)
Rotation matrix around X
|
static TransformationMatrix |
rotateY(double theta)
Rotation matrix around Y
|
static TransformationMatrix |
rotateZ(double theta)
Rotation matrix around Z
|
static TransformationMatrix |
scale(double sx,
double sy,
double sz)
Scaling of a matrix
|
void |
setMatrix(double[][] value)
Gets or sets transformation matrix.
|
static TransformationMatrix |
sideView()
SideView matrix
|
static TransformationMatrix |
topView()
TopView matrix
|
static TransformationMatrix |
translate(double dx,
double dy,
double dz)
Translation matrix
|
static TransformationMatrix |
transpose(TransformationMatrix initialMatrix)
Performs transposing of matrix.
|
static TransformationMatrix |
ucsToWcs(Point3D vX,
Point3D vY)
Ucses to WCS.
|
double[] |
vectorMultiply(double[] point)
Applies transformation to point
|
public TransformationMatrix()
Initializes a new instance of the TransformationMatrix
class
public TransformationMatrix(double[] items, boolean inverseRowCol)
Initializes a new instance of the TransformationMatrix
class.
items
- The items.inverseRowCol
- if set to true
[inverse row col].public double[][] getMatrix()
Gets or sets transformation matrix.
public void setMatrix(double[][] value)
Gets or sets transformation matrix.
public static TransformationMatrix copy(TransformationMatrix matrix)
Performs copy of one TransformationMatrix into other.
matrix
- Matrix to copy values from.public static TransformationMatrix scale(double sx, double sy, double sz)
Scaling of a matrix
sx
- X scale valuesy
- Y scale valuesz
- Z scale valuepublic static TransformationMatrix fromAxis(Point3D xAxis, Point3D yAxis, Point3D zAxis)
From the axis.
xAxis
- The x axis.yAxis
- The y axis.zAxis
- The z axis.public static TransformationMatrix rotateX(double theta)
Rotation matrix around X
theta
- Angle of rotationpublic static TransformationMatrix rotateY(double theta)
Rotation matrix around Y
theta
- Angle of rotationpublic static TransformationMatrix rotateZ(double theta)
Rotation matrix around Z
theta
- Angle of rotationpublic static TransformationMatrix topView()
TopView matrix
public static TransformationMatrix frontView()
FrontView matrix
public static TransformationMatrix sideView()
SideView matrix
public static TransformationMatrix op_Multiply(TransformationMatrix matrix, double value)
Multiplies matrix by value.
matrix
- Matrix to multiply.value
- Value to multiply matrix on.public static TransformationMatrix op_Addition(TransformationMatrix matrix1, TransformationMatrix matrix2)
Performs summation of two matrices.
matrix1
- First matrix.matrix2
- Second matrix.public static TransformationMatrix perspective(double fov, double aspect, double near, double far, double distance)
Creates perspective matrix.
fov
- Field of view value.aspect
- Aspect ratio.near
- Near Z value.far
- Far Z value.distance
- Distance to object.public static TransformationMatrix transpose(TransformationMatrix initialMatrix)
Performs transposing of matrix.
initialMatrix
- Matrix to transpose.public static TransformationMatrix axonometric(double alpha, double beta)
Axonometric projection
alpha
- Alpha anglebeta
- Beta anglepublic static TransformationMatrix translate(double dx, double dy, double dz)
Translation matrix
dx
- X shift valuedy
- Y shift valuedz
- Z shift valuepublic static TransformationMatrix op_Multiply(TransformationMatrix matrix1, TransformationMatrix matrix2)
Matrix multiplication operator.
matrix1
- First matrix.matrix2
- Second matrix.public double[] vectorMultiply(double[] point)
Applies transformation to point
point
- Point to transformpublic static TransformationMatrix getWCS(Point3D normalVector)
WCSs the specified normal vector.
normalVector
- The normal vector.public static TransformationMatrix ucsToWcs(Point3D vX, Point3D vY)
Ucses to WCS.
vX
- The v x.vY
- The v y.public static TransformationMatrix oCStoWCS(Point3D normalVector)
Transforms OCS coordinates to WSC
normalVector
- Normal vector.public TransformationMatrix invert()
Given an nXn matrix A, solve n linear equations to find the inverse of A.
public Object deepClone()
deepClone
in interface com.aspose.ms.System.ICloneable
public double determinant()
Estimates determinant of a matrix.