public class Matrix2f
extends Object
| java.lang.Object | |
| android.renderscript.Matrix2f | |
用于将本机RenderScript rs_matrix2x2类型公开给Android系统的类。
Public constructors |
|
|---|---|
Matrix2f() 创建一个新的身份2x2矩阵 |
|
Matrix2f(float[] dataArray) 创建一个新的矩阵,并根据给定的参数设置它的值 |
|
公共方法(Public methods) |
|
|---|---|
float |
get(int x, int y) 返回给定行和列的值 |
float[] |
getArray() 返回表示矩阵值的内部数组的引用。 |
void |
load(Matrix2f src) 将矩阵的值设置为参数的值 |
void |
loadIdentity() 将矩阵值设置为标识 |
void |
loadMultiply(Matrix2f lhs, Matrix2f rhs) 将当前值设置为乘以两个给定矩阵的结果 |
void |
loadRotate(float rot) 将当前值设置为给定角度的旋转矩阵 |
void |
loadScale(float x, float y) 将当前值设置为给定维度的比例矩阵 |
void |
multiply(Matrix2f rhs) 将当前矩阵乘以给定参数 |
void |
rotate(float rot) 通过将它与给定角度的旋转矩阵进行后乘,修改当前矩阵 |
void |
scale(float x, float y) 通过将其与给定维度的比例矩阵进行后乘,修改当前矩阵 |
void |
set(int x, int y, float v) 设置给定行和列的值 |
void |
transpose() 将当前矩阵设置为其转置 |
继承方法(Inherited methods) |
|
|---|---|
java.lang.Object
|
|
Matrix2f (float[] dataArray)
创建一个新的矩阵,并根据给定的参数设置它的值
| 参数(Parameters) | |
|---|---|
dataArray |
float: values to set the matrix to, must be 4 floats long |
float get (int x,
int y)
返回给定行和列的值
| 参数(Parameters) | |
|---|---|
x |
int: column of the value to return |
y |
int: row of the value to return |
| 返回(Returns) | |
|---|---|
float |
value in the yth row and xth column |
float[] getArray ()
返回表示矩阵值的内部数组的引用。 修改这个数组也会改变矩阵
| 返回(Returns) | |
|---|---|
float[] |
internal array representing the matrix |
void load (Matrix2f src)
将矩阵的值设置为参数的值
| 参数(Parameters) | |
|---|---|
src |
Matrix2f: matrix to load the values from |
void loadMultiply (Matrix2f lhs, Matrix2f rhs)
将当前值设置为乘以两个给定矩阵的结果
| 参数(Parameters) | |
|---|---|
lhs |
Matrix2f: left hand side matrix |
rhs |
Matrix2f: right hand side matrix |
void loadRotate (float rot)
将当前值设置为给定角度的旋转矩阵
| 参数(Parameters) | |
|---|---|
rot |
float: rotation angle |
void loadScale (float x,
float y)
将当前值设置为给定维度的比例矩阵
| 参数(Parameters) | |
|---|---|
x |
float: scale component x |
y |
float: scale component y |
void multiply (Matrix2f rhs)
将当前矩阵乘以给定参数
| 参数(Parameters) | |
|---|---|
rhs |
Matrix2f: right hand side to multiply by |
void rotate (float rot)
通过将它与给定角度的旋转矩阵进行后乘,修改当前矩阵
| 参数(Parameters) | |
|---|---|
rot |
float: angle of rotation |
void scale (float x,
float y)
通过将其与给定维度的比例矩阵进行后乘,修改当前矩阵
| 参数(Parameters) | |
|---|---|
x |
float: scale component x |
y |
float: scale component y |
void set (int x,
int y,
float v)
设置给定行和列的值
| 参数(Parameters) | |
|---|---|
x |
int: column of the value to set |
y |
int: row of the value to set |
v |
float
|