TransformationMatrix

All Implemented Interfaces: com.aspose.ms.System.ICloneable

Represents 3d transformation matrix

Constructors

ConstructorDescription
TransformationMatrix()Initializes a new instance of the TransformationMatrix class
TransformationMatrix(double[] items, boolean inverseRowCol)Initializes a new instance of the TransformationMatrix class.

Methods

MethodDescription
getMatrix()Gets or sets transformation matrix.
setMatrix(double[][] value)Gets or sets transformation matrix.
copy(TransformationMatrix matrix)Performs copy of one TransformationMatrix into other.
scale(double sx, double sy, double sz)Scaling of a matrix
fromAxis(Point3D xAxis, Point3D yAxis, Point3D zAxis)From the axis.
rotateX(double theta)Rotation matrix around X
rotateY(double theta)Rotation matrix around Y
rotateZ(double theta)Rotation matrix around Z
topView()TopView matrix
frontView()FrontView matrix
sideView()SideView matrix
op_Multiply(TransformationMatrix matrix, double value)Multiplies matrix by value.
op_Addition(TransformationMatrix matrix1, TransformationMatrix matrix2)Performs summation of two matrices.
perspective(double fov, double aspect, double near, double far, double distance)Creates perspective matrix.
transpose(TransformationMatrix initialMatrix)Performs transposing of matrix.
axonometric(double alpha, double beta)Axonometric projection
translate(double dx, double dy, double dz)Translation matrix
op_Multiply(TransformationMatrix matrix1, TransformationMatrix matrix2)Matrix multiplication operator.
vectorMultiply(double[] point)Applies transformation to point
getWCS(Point3D normalVector)WCSs the specified normal vector.
ucsToWcs(Point3D vX, Point3D vY)Ucses to WCS.
oCStoWCS(Point3D normalVector)Transforms OCS coordinates to WSC
invert()Given an nXn matrix A, solve n linear equations to find the inverse of A.
deepClone()
determinant()Estimates determinant of a matrix.

TransformationMatrix()

public TransformationMatrix()

Initializes a new instance of the TransformationMatrix class

TransformationMatrix(double[] items, boolean inverseRowCol)

public TransformationMatrix(double[] items, boolean inverseRowCol)

Initializes a new instance of the TransformationMatrix class.

Parameters:

ParameterTypeDescription
itemsdouble[]The items.
inverseRowColbooleanif set to true [inverse row col].

getMatrix()

public double[][] getMatrix()

Gets or sets transformation matrix.

Returns: double[][]

setMatrix(double[][] value)

public void setMatrix(double[][] value)

Gets or sets transformation matrix.

copy(TransformationMatrix matrix)

public static TransformationMatrix copy(TransformationMatrix matrix)

Performs copy of one TransformationMatrix into other.

Parameters:

ParameterTypeDescription
matrixTransformationMatrixMatrix to copy values from.

Returns: TransformationMatrix - Copy matrix.

scale(double sx, double sy, double sz)

public static TransformationMatrix scale(double sx, double sy, double sz)

Scaling of a matrix

Parameters:

ParameterTypeDescription
sxdoubleX scale value
sydoubleY scale value
szdoubleZ scale value

Returns: TransformationMatrix - Scaling matrix

fromAxis(Point3D xAxis, Point3D yAxis, Point3D zAxis)

public static TransformationMatrix fromAxis(Point3D xAxis, Point3D yAxis, Point3D zAxis)

From the axis.

Parameters:

ParameterTypeDescription
xAxisPoint3DThe x axis.
yAxisPoint3DThe y axis.
zAxisPoint3DThe z axis.

Returns: TransformationMatrix

rotateX(double theta)

public static TransformationMatrix rotateX(double theta)

Rotation matrix around X

Parameters:

ParameterTypeDescription
thetadoubleAngle of rotation

Returns: TransformationMatrix - Rotation matrix

rotateY(double theta)

public static TransformationMatrix rotateY(double theta)

Rotation matrix around Y

Parameters:

ParameterTypeDescription
thetadoubleAngle of rotation

Returns: TransformationMatrix - Rotation matrix

rotateZ(double theta)

public static TransformationMatrix rotateZ(double theta)

Rotation matrix around Z

Parameters:

ParameterTypeDescription
thetadoubleAngle of rotation

Returns: TransformationMatrix - Rotation matrix

topView()

public static TransformationMatrix topView()

TopView matrix

Returns: TransformationMatrix - Top view matrix

frontView()

public static TransformationMatrix frontView()

FrontView matrix

Returns: TransformationMatrix - Front view matrix

sideView()

public static TransformationMatrix sideView()

SideView matrix

Returns: TransformationMatrix - Side view matrix

op_Multiply(TransformationMatrix matrix, double value)

public static TransformationMatrix op_Multiply(TransformationMatrix matrix, double value)

Multiplies matrix by value.

Parameters:

ParameterTypeDescription
matrixTransformationMatrixMatrix to multiply.
valuedoubleValue to multiply matrix on.

Returns: TransformationMatrix - Matrix multiplied by a factor.

op_Addition(TransformationMatrix matrix1, TransformationMatrix matrix2)

public static TransformationMatrix op_Addition(TransformationMatrix matrix1, TransformationMatrix matrix2)

Performs summation of two matrices.

Parameters:

ParameterTypeDescription
matrix1TransformationMatrixFirst matrix.
matrix2TransformationMatrixSecond matrix.

Returns: TransformationMatrix - Summary matrix.

perspective(double fov, double aspect, double near, double far, double distance)

public static TransformationMatrix perspective(double fov, double aspect, double near, double far, double distance)

Creates perspective matrix.

Parameters:

ParameterTypeDescription
fovdoubleField of view value.
aspectdoubleAspect ratio.
neardoubleNear Z value.
fardoubleFar Z value.
distancedoubleDistance to object.

Returns: TransformationMatrix - Perspective transformation matrix.

transpose(TransformationMatrix initialMatrix)

public static TransformationMatrix transpose(TransformationMatrix initialMatrix)

Performs transposing of matrix.

Parameters:

ParameterTypeDescription
initialMatrixTransformationMatrixMatrix to transpose.

Returns: TransformationMatrix - Transposed matrix.

axonometric(double alpha, double beta)

public static TransformationMatrix axonometric(double alpha, double beta)

Axonometric projection

Parameters:

ParameterTypeDescription
alphadoubleAlpha angle
betadoubleBeta angle

Returns: TransformationMatrix - Axonometric matrix

translate(double dx, double dy, double dz)

public static TransformationMatrix translate(double dx, double dy, double dz)

Translation matrix

Parameters:

ParameterTypeDescription
dxdoubleX shift value
dydoubleY shift value
dzdoubleZ shift value

Returns: TransformationMatrix - Shift matrix

op_Multiply(TransformationMatrix matrix1, TransformationMatrix matrix2)

public static TransformationMatrix op_Multiply(TransformationMatrix matrix1, TransformationMatrix matrix2)

Matrix multiplication operator.

Parameters:

ParameterTypeDescription
matrix1TransformationMatrixFirst matrix.
matrix2TransformationMatrixSecond matrix.

Returns: TransformationMatrix - Multiplication of a matrices.

vectorMultiply(double[] point)

public double[] vectorMultiply(double[] point)

Applies transformation to point

Parameters:

ParameterTypeDescription
pointdouble[]Point to transform

Returns: double[] - Transformed point

getWCS(Point3D normalVector)

public static TransformationMatrix getWCS(Point3D normalVector)

WCSs the specified normal vector.

Parameters:

ParameterTypeDescription
normalVectorPoint3DThe normal vector.

Returns: TransformationMatrix

ucsToWcs(Point3D vX, Point3D vY)

public static TransformationMatrix ucsToWcs(Point3D vX, Point3D vY)

Ucses to WCS.

Parameters:

ParameterTypeDescription
vXPoint3DThe v x.
vYPoint3DThe v y.

Returns: TransformationMatrix

oCStoWCS(Point3D normalVector)

public static TransformationMatrix oCStoWCS(Point3D normalVector)

Transforms OCS coordinates to WSC

Parameters:

ParameterTypeDescription
normalVectorPoint3DNormal vector.

Returns: TransformationMatrix - Transformatuon matrix.

invert()

public TransformationMatrix invert()

Given an nXn matrix A, solve n linear equations to find the inverse of A.

Returns: TransformationMatrix - Inverted matrix

deepClone()

public Object deepClone()

Returns: Object

determinant()

public double determinant()

Estimates determinant of a matrix.

Returns: double - Determinant value.