FOM 参考 > Application > Datatypes > fMatrix interface
fMatrix interface
This represents a 3x3 matrix of the form:
[a c e] [b d f] [0 0 1]
a attribute
The a component of the matrix.
a
Access
read-only
Returns
float
b attribute
The b component of the matrix.
b
Access
read-only
Returns
float
c attribute
The c component of the matrix.
c
Access
read-only
Returns
float
d attribute
The d component of the matrix.
d
Access
read-only
Returns
float
e attribute
The e component of the matrix.
e
Access
read-only
Returns
float
f attribute
The f component of the matrix.
f
Access
read-only
Returns
float
fMatrix method
The constructor for the fMatrix object.
fMatrix a b c d e f
Parameters
float a
The a component of the matrix.
float b
The b component of the matrix.
float c
The c component of the matrix.
float d
The d component of the matrix.
float e
The e component of the matrix.
float f
The f component of the matrix.
Returns
fMatrix. The new matrix created with these values.
rotate method
Post-multiplies a rotation transformation on the current matrix and returns the resulting matrix.
rotate angle
Parameters
float angle
The rotation angle to apply.
Returns
fMatrix. The resulting matrix.
scale method
Post-multiplies a scale transformation on the current matrix and returns the resulting matrix.
scale scaleX scaleY
Parameters
float scaleX
The scale factor to apply to the x-axis.
float scaleY
The scale factor to apply to the y-axis.
Returns
fMatrix. The resulting matrix.
translate method
Post-multiplies a translation transformation on the current matrix and returns the resulting matrix.
translate x y
Parameters
float x
The distance to translate along the x-axis.
float y
The distance to translate along the y-axis.
Returns
fMatrix. The resulting matrix.
这对您有帮助吗?