# 三维矩阵（[name]）

## 代码示例

``` const m = new Matrix3(); ```

## 方法（Methods）

### [method:this extractBasis]( [param:Vector3 xAxis], [param:Vector3 yAxis], [param:Vector3 zAxis] )

Extracts the [link:https://en.wikipedia.org/wiki/Basis_(linear_algebra) basis] of this matrix into the three axis vectors provided. If this matrix is: ``` a, b, c, d, e, f, g, h, i ``` then the [page:Vector3 xAxis], [page:Vector3 yAxis], [page:Vector3 zAxis] will be set to: ``` xAxis = (a, d, g) yAxis = (b, e, h) zAxis = (c, f, i) ```

### [method:this fromArray]( [param:Array array], [param:Integer offset] )

[page:Array array] - 用来存储设置元素数据的数组
[page:Integer offset] - (可选参数) 数组的偏移量，默认值为 0。

### [method:this invert]()

Inverts this matrix, using the [link:https://en.wikipedia.org/wiki/Invertible_matrix#Analytic_solution analytic method]. You can not invert with a determinant of zero. If you attempt this, the method produces a zero matrix instead.

### [method:this getNormalMatrix]( [param:Matrix4 m] )

[page:Matrix4 m] - [page:Matrix4]

### [method:this set]( [param:Float n11], [param:Float n12], [param:Float n13], [param:Float n21], [param:Float n22], [param:Float n23], [param:Float n31], [param:Float n32], [param:Float n33] )

[page:Float n11] - 设置第一行第一列的值。
[page:Float n12] - 设置第一行第二列的值。
...
...
[page:Float n32] - 设置第三行第二列的值。
[page:Float n33] - 设置第三行第三列的值。

Sets the 3x3 matrix values to the given [link:https://en.wikipedia.org/wiki/Row-_and_column-major_order row-major] sequence of values.

### [method:this setUvTransform]( [param:Float tx], [param:Float ty], [param:Float sx], [param:Float sy], [param:Float rotation], [param:Float cx], [param:Float cy] )

[page:Float tx] - x偏移量
[page:Float ty] - y偏移量
[page:Float sx] - x方向的重复比例
[page:Float sy] - y方向的重复比例
[page:Float rotation] - 旋转（弧度）
[page:Float cx] - 旋转中心x
[page:Float cy] - 旋转中心y

### [method:Array toArray]( [param:Array array], [param:Integer offset] )

[page:Array array] - (可选参数) 存储矩阵元素的数组，如果未指定会创建一个新的数组。
[page:Integer offset] - (可选参数) 存放矩阵元素数组的偏移量。

### [method:this transposeIntoArray]( [param:Array array] )

[page:Array array] - 用于存储当前矩阵转置结果的数组。