public class Matrix3f
extends Object
| java.lang.Object | |
| android.support.v8.renderscript.Matrix3f | |
用于将本机RenderScript rs_matrix3x3类型公开给Android系统的类。
Public constructors |
|
|---|---|
Matrix3f() 创建一个新的身份3x3矩阵 |
|
Matrix3f(float[] dataArray) 创建一个新的矩阵,并根据给定的参数设置它的值 |
|
公共方法(Public methods) |
|
|---|---|
float |
get(int x, int y) 返回给定行和列的值 |
float[] |
getArray() 返回表示矩阵值的内部数组的引用。 |
void |
load(Matrix3f src) 将矩阵的值设置为参数的值 |
void |
loadIdentity() 将矩阵值设置为标识 |
void |
loadMultiply(Matrix3f lhs, Matrix3f rhs) 将当前值设置为乘以两个给定矩阵的结果 |
void |
loadRotate(float rot, float x, float y, float z) 将当前值设置为关于给定轴的特定角度的旋转矩阵 |
void |
loadRotate(float rot) 使上部2x2成为给定角度的旋转矩阵 |
void |
loadScale(float x, float y) 使上面的2x2成为给定维度的比例矩阵 |
void |
loadScale(float x, float y, float z) 将当前值设置为给定维度的比例矩阵 |
void |
loadTranslate(float x, float y) 将当前值设置为给定尺寸的平移矩阵 |
void |
multiply(Matrix3f rhs) 将当前矩阵乘以给定参数 |
void |
rotate(float rot) 通过与给定角度的旋转矩阵进行后乘,修改当前矩阵的上2×2 |
void |
rotate(float rot, float x, float y, float z) 通过将它与一个关于给定轴的特定角度的旋转矩阵进行后乘,来修改当前矩阵 |
void |
scale(float x, float y) 通过将它与给定维度的比例矩阵进行后乘,修改当前矩阵的上部2x2 |
void |
scale(float x, float y, float z) 通过将其与给定维度的比例矩阵进行后乘,修改当前矩阵 |
void |
set(int x, int y, float v) 设置给定行和列的值 |
void |
translate(float x, float y) 通过与给定维度的平移矩阵进行后乘,修改当前矩阵 |
void |
transpose() 将当前矩阵设置为其转置 |
继承方法(Inherited methods) |
|
|---|---|
java.lang.Object
|
|
Matrix3f ()
创建一个新的身份3x3矩阵
Matrix3f (float[] dataArray)
创建一个新的矩阵,并根据给定的参数设置它的值
| 参数(Parameters) | |
|---|---|
dataArray |
float: values to set the matrix to, must be 9 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 (Matrix3f src)
将矩阵的值设置为参数的值
| 参数(Parameters) | |
|---|---|
src |
Matrix3f: matrix to load the values from |
void loadIdentity ()
将矩阵值设置为标识
void loadMultiply (Matrix3f lhs, Matrix3f rhs)
将当前值设置为乘以两个给定矩阵的结果
| 参数(Parameters) | |
|---|---|
lhs |
Matrix3f: left hand side matrix |
rhs |
Matrix3f: right hand side matrix |
void loadRotate (float rot,
float x,
float y,
float z)
将当前值设置为关于给定轴的特定角度的旋转矩阵
| 参数(Parameters) | |
|---|---|
rot |
float: angle of rotation |
x |
float: rotation axis x |
y |
float: rotation axis y |
z |
float: rotation axis z |
void loadRotate (float rot)
使上部2x2成为给定角度的旋转矩阵
| 参数(Parameters) | |
|---|---|
rot |
float: rotation angle |
void loadScale (float x,
float y)
使上面的2x2成为给定维度的比例矩阵
| 参数(Parameters) | |
|---|---|
x |
float: scale component x |
y |
float: scale component y |
void loadScale (float x,
float y,
float z)
将当前值设置为给定维度的比例矩阵
| 参数(Parameters) | |
|---|---|
x |
float: scale component x |
y |
float: scale component y |
z |
float: scale component z |
void loadTranslate (float x,
float y)
将当前值设置为给定尺寸的平移矩阵
| 参数(Parameters) | |
|---|---|
x |
float: translation component x |
y |
float: translation component y |
void multiply (Matrix3f rhs)
将当前矩阵乘以给定参数
| 参数(Parameters) | |
|---|---|
rhs |
Matrix3f: right hand side to multiply by |
void rotate (float rot)
通过与给定角度的旋转矩阵进行后乘,修改当前矩阵的上2×2
| 参数(Parameters) | |
|---|---|
rot |
float: angle of rotation |
void rotate (float rot,
float x,
float y,
float z)
通过将它与一个关于给定轴的特定角度的旋转矩阵进行后乘,来修改当前矩阵
| 参数(Parameters) | |
|---|---|
rot |
float: angle of rotation |
x |
float: rotation axis x |
y |
float: rotation axis y |
z |
float: rotation axis z |
void scale (float x,
float y)
通过将它与给定维度的比例矩阵进行后乘,修改当前矩阵的上部2x2
| 参数(Parameters) | |
|---|---|
x |
float: scale component x |
y |
float: scale component y |
void scale (float x,
float y,
float z)
通过将其与给定维度的比例矩阵进行后乘,修改当前矩阵
| 参数(Parameters) | |
|---|---|
x |
float: scale component x |
y |
float: scale component y |
z |
float: scale component z |
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
|
void translate (float x,
float y)
通过与给定维度的平移矩阵进行后乘,修改当前矩阵
| 参数(Parameters) | |
|---|---|
x |
float: translation component x |
y |
float: translation component y |
void transpose ()
将当前矩阵设置为其转置