Mat3 类型
继承于 ValueType
Mathematical 3x3 matrix.
NOTE: we use column-major matrix for all matrix calculation.
This may lead to some confusion when referencing OpenGL documentation, however, which represents out all matricies in column-major format. This means that while in code a matrix may be typed out as:
[1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, x, y, z, 0]
The same matrix in the OpenGL documentation is written as:
1 0 0 x 0 1 0 y 0 0 1 z 0 0 0 0
Please rest assured, however, that they are the same thing! This is not unique to glMatrix, either, as OpenGL developers have long been confused by the apparent lack of consistency between the memory layout and the documentation.
索引
属性(properties)
方法
toArray矩阵转数组fromArray数组转矩阵constructorclone克隆当前值,该方法返回一个新对象,新对象的值和原对象相等。equals当前对象是否等于指定对象。lerp线性插值。set从其它对象把所有属性复制到当前对象。toString转换为方便阅读的字符串。
Details
属性(properties)
IDENTITY
Identity of Mat3
| meta | description |
|---|---|
| 类型 | Mat3 |
| 定义于 | cocos2d/core/value-types/mat3.ts:43 |
m
矩阵数据
| meta | description |
|---|---|
| 类型 | Float64Array | Float32Array |
| 定义于 | cocos2d/core/value-types/mat3.ts:836 |
方法
toArray
矩阵转数组
| meta | description |
|---|---|
| 定义于 | cocos2d/core/value-types/mat3.ts:802 |
参数列表
ofsUnknown 数组内的起始偏移量
fromArray
数组转矩阵
| meta | description |
|---|---|
| 定义于 | cocos2d/core/value-types/mat3.ts:819 |
参数列表
ofsUnknown 数组起始偏移量
constructor
| meta | description |
|---|---|
| 定义于 | cocos2d/core/value-types/mat3.ts:844 |
clone
克隆当前值,该方法返回一个新对象,新对象的值和原对象相等。
| meta | description |
|---|---|
| 返回 | ValueType |
| 定义于 | cocos2d/core/value-types/value-type.ts:39 |
equals
当前对象是否等于指定对象。
| meta | description |
|---|---|
| 返回 | Boolean |
| 定义于 | cocos2d/core/value-types/value-type.ts:51 |
参数列表
otherValueType
lerp
线性插值。
当 ratio = 0 时返回自身,ratio = 1 时返回目标,ratio = 0.5 返回自身和目标的平均值。。
| meta | description |
|---|---|
| 返回 | ValueType |
| 定义于 | cocos2d/core/value-types/value-type.ts:63 |
参数列表
set
从其它对象把所有属性复制到当前对象。
| meta | description |
|---|---|
| 定义于 | cocos2d/core/value-types/value-type.ts:80 |
参数列表
sourceValueType the source to copy
toString
转换为方便阅读的字符串。
| meta | description |
|---|---|
| 返回 | string |
| 定义于 | cocos2d/core/value-types/value-type.ts:92 |