|
| Matrix () |
|
| Matrix (float m0, float m4, float m8, float m12, float m1, float m5, float m9, float m13, float m2, float m6, float m10, float m14, float m3, float m7, float m11, float m15) |
|
float | getAtRowCol (int r, int c) |
|
float[] | getRowMajor () |
|
Matrix | preConcat (Matrix b) |
|
Matrix | translate (float x, float y, float z) |
|
Matrix | translate (float x, float y) |
|
Matrix | scale (float x, float y, float z) |
|
Matrix | scale (float x, float y) |
|
Matrix | rotateX (float rad) |
|
Matrix | rotateY (float rad) |
|
Matrix | rotateZ (float rad) |
|
Matrix | rotate (float x, float y, float z, float rad) |
|
void | release () |
|
|
static Matrix | makeLookAt (float eyeX, float eyeY, float eyeZ, float coaX, float coaY, float coaZ, float upX, float upY, float upZ) |
|
static Matrix | makePerspective (float near, float far, float angle) |
|
static Matrix | makeInverse (Matrix m) throws RuntimeException |
|
static Matrix | makeTranspose (Matrix m) |
|
static Matrix | makeConcat (Matrix a, Matrix b) |
|
Definition at line 13 of file Matrix.java.
◆ Matrix() [1/3]
org.skia.jetski.Matrix.Matrix |
( |
| ) |
|
|
inline |
Definition at line 19 of file Matrix.java.
19 {
20 mNativeInstance = nCreate(1, 0, 0, 0,
21 0, 1, 0, 0,
22 0, 0, 1, 0,
23 0, 0, 0, 1);
24 }
◆ Matrix() [2/3]
org.skia.jetski.Matrix.Matrix |
( |
float |
m0, |
|
|
float |
m4, |
|
|
float |
m8, |
|
|
float |
m12, |
|
|
float |
m1, |
|
|
float |
m5, |
|
|
float |
m9, |
|
|
float |
m13, |
|
|
float |
m2, |
|
|
float |
m6, |
|
|
float |
m10, |
|
|
float |
m14, |
|
|
float |
m3, |
|
|
float |
m7, |
|
|
float |
m11, |
|
|
float |
m15 |
|
) |
| |
|
inline |
Definition at line 29 of file Matrix.java.
32 {
33 mNativeInstance = nCreate(m0, m4, m8, m12,
34 m1, m5, m9, m13,
35 m2, m6, m10, m14,
36 m3, m7, m11, m15);
37 }
◆ Matrix() [3/3]
org.skia.jetski.Matrix.Matrix |
( |
long |
nativeInstance | ) |
|
|
inlinepackage |
Definition at line 39 of file Matrix.java.
39 {
40 mNativeInstance = nativeInstance;
41 }
◆ finalize()
void org.skia.jetski.Matrix.finalize |
( |
| ) |
throws Throwable |
|
inlineprotected |
◆ getAtRowCol()
float org.skia.jetski.Matrix.getAtRowCol |
( |
int |
r, |
|
|
int |
c |
|
) |
| |
|
inline |
Definition at line 85 of file Matrix.java.
85 {
87 return a[r*4 + c];
88 }
◆ getNativeInstance()
long org.skia.jetski.Matrix.getNativeInstance |
( |
| ) |
|
|
inlinepackage |
Definition at line 190 of file Matrix.java.
190{ return mNativeInstance; }
◆ getRowMajor()
float[] org.skia.jetski.Matrix.getRowMajor |
( |
| ) |
|
|
inline |
Definition at line 90 of file Matrix.java.
90 {
91 float[] vals = nGetRowMajor(this.mNativeInstance);
92 if (vals == null) {
93 throw new RuntimeException("Cannot make native float array, out of memory");
94 }
95 return nGetRowMajor(this.mNativeInstance);
96 }
◆ makeConcat()
Definition at line 74 of file Matrix.java.
74 {
75 long nativeA =
a.mNativeInstance;
76 long nativeB =
b.mNativeInstance;
77 long nativeC = nConcat(nativeA, nativeB);
78 return new Matrix(nativeC);
79 }
◆ makeInverse()
static Matrix org.skia.jetski.Matrix.makeInverse |
( |
Matrix |
m | ) |
throws RuntimeException |
|
inlinestatic |
Definition at line 55 of file Matrix.java.
55 {
56 long nativeMatrix = nInverse(
m.getNativeInstance());
57 if (nativeMatrix == 0){
58
59 throw new RuntimeException("Matrix m was not an invertible Matrix");
60 }
61 return new Matrix(nativeMatrix);
62 }
◆ makeLookAt()
static Matrix org.skia.jetski.Matrix.makeLookAt |
( |
float |
eyeX, |
|
|
float |
eyeY, |
|
|
float |
eyeZ, |
|
|
float |
coaX, |
|
|
float |
coaY, |
|
|
float |
coaZ, |
|
|
float |
upX, |
|
|
float |
upY, |
|
|
float |
upZ |
|
) |
| |
|
inlinestatic |
Definition at line 43 of file Matrix.java.
45 {
46 return new Matrix(nCreateLookAt(eyeX, eyeY, eyeZ,
47 coaX, coaY, coaZ,
48 upX, upY, upZ));
49 }
◆ makePerspective()
static Matrix org.skia.jetski.Matrix.makePerspective |
( |
float |
near, |
|
|
float |
far, |
|
|
float |
angle |
|
) |
| |
|
inlinestatic |
Definition at line 51 of file Matrix.java.
51 {
52 return new Matrix(nCreatePerspective(near, far, angle));
53 }
◆ makeTranspose()
static Matrix org.skia.jetski.Matrix.makeTranspose |
( |
Matrix |
m | ) |
|
|
inlinestatic |
Definition at line 64 of file Matrix.java.
64 {
65 long nativeTranspose = nTranspose(
m.getNativeInstance());
66 return new Matrix(nativeTranspose);
67 }
◆ preConcat()
Definition at line 103 of file Matrix.java.
103 {
104 long nativeA = this.mNativeInstance;
105 long nativeB =
b.mNativeInstance;
106 nPreConcat(nativeA, nativeB);
107 return this;
108 }
◆ release()
void org.skia.jetski.Matrix.release |
( |
| ) |
|
|
inline |
Releases any resources associated with this Matrix.
Definition at line 179 of file Matrix.java.
179 {
180 nRelease(mNativeInstance);
181 mNativeInstance = 0;
182 }
◆ rotate()
Matrix org.skia.jetski.Matrix.rotate |
( |
float |
x, |
|
|
float |
y, |
|
|
float |
z, |
|
|
float |
rad |
|
) |
| |
|
inline |
Definition at line 171 of file Matrix.java.
171 {
172 nRotate(this.mNativeInstance,
x,
y, z, rad);
173 return this;
174 }
◆ rotateX()
Matrix org.skia.jetski.Matrix.rotateX |
( |
float |
rad | ) |
|
|
inline |
Definition at line 141 of file Matrix.java.
141 {
142 nRotate(this.mNativeInstance, 1, 0, 0, rad);
143 return this;
144 }
◆ rotateY()
Matrix org.skia.jetski.Matrix.rotateY |
( |
float |
rad | ) |
|
|
inline |
Definition at line 151 of file Matrix.java.
151 {
152 nRotate(this.mNativeInstance, 0, 1, 0, rad);
153 return this;
154 }
◆ rotateZ()
Matrix org.skia.jetski.Matrix.rotateZ |
( |
float |
rad | ) |
|
|
inline |
Definition at line 161 of file Matrix.java.
161 {
162 nRotate(this.mNativeInstance, 0, 0, 1, rad);
163 return this;
164 }
◆ scale() [1/2]
Matrix org.skia.jetski.Matrix.scale |
( |
float |
x, |
|
|
float |
y |
|
) |
| |
|
inline |
Definition at line 132 of file Matrix.java.
132 {
134 }
Matrix scale(float x, float y, float z)
◆ scale() [2/2]
Matrix org.skia.jetski.Matrix.scale |
( |
float |
x, |
|
|
float |
y, |
|
|
float |
z |
|
) |
| |
|
inline |
Definition at line 128 of file Matrix.java.
128 {
129 nScale(this.mNativeInstance,
x,
y, z);
130 return this;
131 }
◆ translate() [1/2]
Matrix org.skia.jetski.Matrix.translate |
( |
float |
x, |
|
|
float |
y |
|
) |
| |
|
inline |
Definition at line 119 of file Matrix.java.
119 {
121 }
Matrix translate(float x, float y, float z)
◆ translate() [2/2]
Matrix org.skia.jetski.Matrix.translate |
( |
float |
x, |
|
|
float |
y, |
|
|
float |
z |
|
) |
| |
|
inline |
Definition at line 115 of file Matrix.java.
115 {
116 nTranslate(this.mNativeInstance,
x,
y, z);
117 return this;
118 }
The documentation for this class was generated from the following file:
- third_party/skia/platform_tools/android/apps/jetski/src/main/java/org/skia/jetski/Matrix.java