目录

Matrix4

Class Info

public class Matrix4 implements Parcelable

四维矩阵。

Public Field Summary

Qualifier and Type

Field and Description

static final Matrix4

IDENTITY

四维单位矩阵。

static final Matrix4

ZERO

0矩阵。

Public Constructor Summary

Constructor Name

Matrix4()

构造方法,默认构造为四维单位矩阵。

Matrix4(float[] array)

构造方法,使用数组初始化Matrix4。

Matrix4(Matrix4 matrix)

构造方法,使用其他四维矩阵初始化Matrix4。

Public Method Summary

Qualifier and Type

Method Name and Description

float

at(int row, int col)

获取矩阵中指定坐标的元素值。

float[]

getValue()

获取保存四维矩阵数值的数组。

Matrix4

inverse()

获取当前矩阵的逆矩阵。

static Matrix4

multiply(Matrix4 lth, Matrix4 rth)

计算四维矩阵乘法。

Public Fields

[h2]IDENTITY

Property

public static final Matrix4 IDENTITY

四维单位矩阵。

[h2]ZERO

Property

public static final Matrix4 ZERO

0矩阵。

Public Constructors

[h2]Matrix4

Constructor

public Matrix4()

默认构造,初始化为四维单位矩阵。

[h2]Matrix4(float[] array)

Constructor

public Matrix4(float[] array)

使用数组初始化。

Parameters

Name

Description

array

保存矩阵值的数组。

[h2]Matrix4(Matrix4 matrix)

Constructor

public Matrix4(Matrix4 matrix)

构造方法,使用其他四维矩阵初始化Matrix4。

Parameters

Name

Description

matrix

四维矩阵。

Public Methods

[h2]at

Method

public float at(int row, int col)

获取矩阵中指定坐标的元素值。

Parameters

Name

Description

row

行坐标。

col

列坐标。

Returns

Type

Description

float

指定坐标的元素值。

[h2]getValue

Method

public float[] getValue()

获取存放四维矩阵数值的数组。

Returns

Type

Description

float[]

存放四维矩阵数值的数组。

[h2]inverse

Method

public Matrix4 inverse()

获取当前矩阵的逆矩阵。

Returns

Type

Description

Matrix4

当前矩阵的逆矩阵。

[h2]multiply

Method

public static Matrix4 multiply(Matrix4 lth, Matrix4 rth)

计算四维矩阵乘法。

Parameters

Name

Description

lth

四维矩阵。

rth

四维矩阵

Returns

Type

Description

Matrix4

两个矩阵的乘积。