picrate 0.2.0-java → 0.3.0-java
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +8 -5
- data/Rakefile +10 -2
- data/docs/_posts/2018-06-26-auto_install_picrate.md +15 -0
- data/lib/export.txt +8 -0
- data/lib/picrate/app.rb +4 -4
- data/lib/picrate/version.rb +1 -1
- data/picrate.gemspec +1 -1
- data/pom.rb +1 -1
- data/pom.xml +1 -1
- data/src/main/java/processing/awt/PGraphicsJava2D.java +16 -85
- data/src/main/java/processing/awt/PShapeJava2D.java +9 -33
- data/src/main/java/processing/awt/PSurfaceAWT.java +76 -169
- data/src/main/java/processing/core/PApplet.java +14019 -15963
- data/src/main/java/processing/core/PConstants.java +475 -981
- data/src/main/java/processing/core/PFont.java +50 -202
- data/src/main/java/processing/core/PGraphics.java +7330 -8477
- data/src/main/java/processing/core/PImage.java +42 -212
- data/src/main/java/processing/core/PMatrix.java +21 -160
- data/src/main/java/processing/core/PMatrix2D.java +18 -178
- data/src/main/java/processing/core/PMatrix3D.java +48 -324
- data/src/main/java/processing/core/PShape.java +294 -1181
- data/src/main/java/processing/core/PShapeOBJ.java +16 -91
- data/src/main/java/processing/core/PShapeSVG.java +53 -253
- data/src/main/java/processing/core/PStyle.java +34 -179
- data/src/main/java/processing/core/PSurface.java +13 -94
- data/src/main/java/processing/core/PSurfaceNone.java +35 -140
- data/src/main/java/processing/core/PVector.java +10 -87
- data/src/main/java/processing/event/Event.java +86 -69
- data/src/main/java/processing/event/MouseEvent.java +102 -102
- data/src/main/java/processing/opengl/PGL.java +23 -16
- data/src/main/java/processing/opengl/PGraphicsOpenGL.java +13 -10
- data/src/main/java/processing/opengl/PJOGL.java +32 -12
- data/src/main/java/processing/opengl/shaders/LightVert-brcm.glsl +154 -0
- data/src/main/java/processing/opengl/shaders/LightVert-vc4.glsl +2 -2
- data/src/main/java/processing/opengl/shaders/TexLightVert-brcm.glsl +160 -0
- data/src/main/java/processing/opengl/shaders/TexLightVert-vc4.glsl +2 -2
- metadata +7 -3
@@ -43,197 +43,89 @@ public interface PMatrix {
|
|
43
43
|
|
44
44
|
/**
|
45
45
|
* Returns a copy of this PMatrix.
|
46
|
-
* @return
|
47
46
|
*/
|
48
47
|
public PMatrix get();
|
49
48
|
|
50
49
|
/**
|
51
50
|
* Copies the matrix contents into a float array.
|
52
51
|
* If target is null (or not the correct size), a new array will be created.
|
53
|
-
* @param target
|
54
|
-
* @return
|
55
52
|
*/
|
56
53
|
public float[] get(float[] target);
|
57
54
|
|
58
55
|
|
59
56
|
/**
|
60
57
|
* Make this matrix become a copy of src.
|
61
|
-
* @param src
|
62
58
|
*/
|
63
59
|
public void set(PMatrix src);
|
64
60
|
|
65
61
|
/**
|
66
62
|
* Set the contents of this matrix to the contents of source. Fills the
|
67
63
|
* matrix left-to-right, starting in the top row.
|
68
|
-
* @param source
|
69
64
|
*/
|
70
65
|
public void set(float[] source);
|
71
66
|
|
72
67
|
/**
|
73
68
|
* Set the matrix content to this 2D matrix or its 3D equivalent.
|
74
|
-
* @param m00
|
75
|
-
* @param m01
|
76
|
-
* @param m10
|
77
|
-
* @param m02
|
78
|
-
* @param m12
|
79
|
-
* @param m11
|
80
69
|
*/
|
81
70
|
public void set(float m00, float m01, float m02,
|
82
71
|
float m10, float m11, float m12);
|
83
72
|
|
84
73
|
/**
|
85
74
|
* Set the matrix content to the 3D matrix supplied, if this matrix is 3D.
|
86
|
-
* @param m00
|
87
|
-
* @param m01
|
88
|
-
* @param m20
|
89
|
-
* @param m02
|
90
|
-
* @param m03
|
91
|
-
* @param m10
|
92
|
-
* @param m12
|
93
|
-
* @param m11
|
94
|
-
* @param m22
|
95
|
-
* @param m33
|
96
|
-
* @param m13
|
97
|
-
* @param m23
|
98
|
-
* @param m30
|
99
|
-
* @param m31
|
100
|
-
* @param m21
|
101
|
-
* @param m32
|
102
75
|
*/
|
103
76
|
public void set(float m00, float m01, float m02, float m03,
|
104
77
|
float m10, float m11, float m12, float m13,
|
105
78
|
float m20, float m21, float m22, float m23,
|
106
79
|
float m30, float m31, float m32, float m33);
|
107
80
|
|
108
|
-
/**
|
109
|
-
*
|
110
|
-
* @param tx
|
111
|
-
* @param ty
|
112
|
-
*/
|
113
|
-
public void translate(float tx, float ty);
|
114
81
|
|
115
|
-
|
116
|
-
*
|
117
|
-
* @param tx
|
118
|
-
* @param ty
|
119
|
-
* @param tz
|
120
|
-
*/
|
121
|
-
public void translate(float tx, float ty, float tz);
|
122
|
-
|
123
|
-
/**
|
124
|
-
*
|
125
|
-
* @param angle
|
126
|
-
*/
|
127
|
-
public void rotate(float angle);
|
128
|
-
|
129
|
-
/**
|
130
|
-
*
|
131
|
-
* @param angle
|
132
|
-
*/
|
133
|
-
public void rotateX(float angle);
|
134
|
-
|
135
|
-
/**
|
136
|
-
*
|
137
|
-
* @param angle
|
138
|
-
*/
|
139
|
-
public void rotateY(float angle);
|
140
|
-
|
141
|
-
/**
|
142
|
-
*
|
143
|
-
* @param angle
|
144
|
-
*/
|
145
|
-
public void rotateZ(float angle);
|
146
|
-
|
147
|
-
/**
|
148
|
-
*
|
149
|
-
* @param angle
|
150
|
-
* @param v0
|
151
|
-
* @param v1
|
152
|
-
* @param v2
|
153
|
-
*/
|
154
|
-
public void rotate(float angle, float v0, float v1, float v2);
|
155
|
-
|
156
|
-
/**
|
157
|
-
*
|
158
|
-
* @param s
|
159
|
-
*/
|
160
|
-
public void scale(float s);
|
161
|
-
|
162
|
-
/**
|
163
|
-
*
|
164
|
-
* @param sx
|
165
|
-
* @param sy
|
166
|
-
*/
|
167
|
-
public void scale(float sx, float sy);
|
168
|
-
|
169
|
-
/**
|
170
|
-
*
|
171
|
-
* @param x
|
172
|
-
* @param y
|
173
|
-
* @param z
|
174
|
-
*/
|
175
|
-
public void scale(float x, float y, float z);
|
82
|
+
public void translate(float tx, float ty);
|
176
83
|
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
84
|
+
public void translate(float tx, float ty, float tz);
|
85
|
+
|
86
|
+
public void rotate(float angle);
|
87
|
+
|
88
|
+
public void rotateX(float angle);
|
89
|
+
|
90
|
+
public void rotateY(float angle);
|
91
|
+
|
92
|
+
public void rotateZ(float angle);
|
93
|
+
|
94
|
+
public void rotate(float angle, float v0, float v1, float v2);
|
95
|
+
|
96
|
+
public void scale(float s);
|
97
|
+
|
98
|
+
public void scale(float sx, float sy);
|
99
|
+
|
100
|
+
public void scale(float x, float y, float z);
|
101
|
+
|
102
|
+
public void shearX(float angle);
|
182
103
|
|
183
|
-
|
184
|
-
*
|
185
|
-
* @param angle
|
186
|
-
*/
|
187
|
-
public void shearY(float angle);
|
104
|
+
public void shearY(float angle);
|
188
105
|
|
189
106
|
/**
|
190
107
|
* Multiply this matrix by another.
|
191
|
-
* @param source
|
192
108
|
*/
|
193
109
|
public void apply(PMatrix source);
|
194
110
|
|
195
111
|
/**
|
196
112
|
* Multiply this matrix by another.
|
197
|
-
* @param source
|
198
113
|
*/
|
199
114
|
public void apply(PMatrix2D source);
|
200
115
|
|
201
116
|
/**
|
202
117
|
* Multiply this matrix by another.
|
203
|
-
* @param source
|
204
118
|
*/
|
205
119
|
public void apply(PMatrix3D source);
|
206
120
|
|
207
121
|
/**
|
208
122
|
* Multiply this matrix by another.
|
209
|
-
* @param n00
|
210
|
-
* @param n11
|
211
|
-
* @param n02
|
212
|
-
* @param n10
|
213
|
-
* @param n01
|
214
|
-
* @param n12
|
215
123
|
*/
|
216
124
|
public void apply(float n00, float n01, float n02,
|
217
125
|
float n10, float n11, float n12);
|
218
126
|
|
219
127
|
/**
|
220
128
|
* Multiply this matrix by another.
|
221
|
-
* @param n00
|
222
|
-
* @param n32
|
223
|
-
* @param n02
|
224
|
-
* @param n01
|
225
|
-
* @param n21
|
226
|
-
* @param n10
|
227
|
-
* @param n03
|
228
|
-
* @param n11
|
229
|
-
* @param n13
|
230
|
-
* @param n23
|
231
|
-
* @param n22
|
232
|
-
* @param n20
|
233
|
-
* @param n12
|
234
|
-
* @param n31
|
235
|
-
* @param n30
|
236
|
-
* @param n33
|
237
129
|
*/
|
238
130
|
public void apply(float n00, float n01, float n02, float n03,
|
239
131
|
float n10, float n11, float n12, float n13,
|
@@ -242,52 +134,27 @@ public interface PMatrix {
|
|
242
134
|
|
243
135
|
/**
|
244
136
|
* Apply another matrix to the left of this one.
|
245
|
-
* @param left
|
246
137
|
*/
|
247
138
|
public void preApply(PMatrix left);
|
248
139
|
|
249
140
|
/**
|
250
141
|
* Apply another matrix to the left of this one.
|
251
|
-
* @param left
|
252
142
|
*/
|
253
143
|
public void preApply(PMatrix2D left);
|
254
144
|
|
255
145
|
/**
|
256
146
|
* Apply another matrix to the left of this one. 3D only.
|
257
|
-
* @param left
|
258
147
|
*/
|
259
148
|
public void preApply(PMatrix3D left);
|
260
149
|
|
261
150
|
/**
|
262
151
|
* Apply another matrix to the left of this one.
|
263
|
-
* @param n00
|
264
|
-
* @param n12
|
265
|
-
* @param n02
|
266
|
-
* @param n10
|
267
|
-
* @param n01
|
268
|
-
* @param n11
|
269
152
|
*/
|
270
153
|
public void preApply(float n00, float n01, float n02,
|
271
154
|
float n10, float n11, float n12);
|
272
155
|
|
273
156
|
/**
|
274
157
|
* Apply another matrix to the left of this one. 3D only.
|
275
|
-
* @param n00
|
276
|
-
* @param n10
|
277
|
-
* @param n02
|
278
|
-
* @param n01
|
279
|
-
* @param n33
|
280
|
-
* @param n13
|
281
|
-
* @param n11
|
282
|
-
* @param n03
|
283
|
-
* @param n20
|
284
|
-
* @param n21
|
285
|
-
* @param n12
|
286
|
-
* @param n30
|
287
|
-
* @param n23
|
288
|
-
* @param n22
|
289
|
-
* @param n32
|
290
|
-
* @param n31
|
291
158
|
*/
|
292
159
|
public void preApply(float n00, float n01, float n02, float n03,
|
293
160
|
float n10, float n11, float n12, float n13,
|
@@ -300,9 +167,6 @@ public interface PMatrix {
|
|
300
167
|
* The result will be stored in target if target is non-null, and target
|
301
168
|
* will then be the matrix returned. This improves performance if you reuse
|
302
169
|
* target, so it's recommended if you call this many times in draw().
|
303
|
-
* @param source
|
304
|
-
* @param target
|
305
|
-
* @return
|
306
170
|
*/
|
307
171
|
public PVector mult(PVector source, PVector target);
|
308
172
|
|
@@ -311,9 +175,6 @@ public interface PMatrix {
|
|
311
175
|
* Multiply a multi-element vector against this matrix.
|
312
176
|
* Supplying and recycling a target array improves performance, so it's
|
313
177
|
* recommended if you call this many times in draw().
|
314
|
-
* @param source
|
315
|
-
* @param target
|
316
|
-
* @return
|
317
178
|
*/
|
318
179
|
public float[] mult(float[] source, float[] target);
|
319
180
|
|
@@ -38,35 +38,8 @@ package processing.core;
|
|
38
38
|
*/
|
39
39
|
public class PMatrix2D implements PMatrix {
|
40
40
|
|
41
|
-
|
42
|
-
|
43
|
-
*/
|
44
|
-
public float m00,
|
45
|
-
|
46
|
-
/**
|
47
|
-
*
|
48
|
-
*/
|
49
|
-
m01,
|
50
|
-
|
51
|
-
/**
|
52
|
-
*
|
53
|
-
*/
|
54
|
-
m02;
|
55
|
-
|
56
|
-
/**
|
57
|
-
*
|
58
|
-
*/
|
59
|
-
public float m10,
|
60
|
-
|
61
|
-
/**
|
62
|
-
*
|
63
|
-
*/
|
64
|
-
m11,
|
65
|
-
|
66
|
-
/**
|
67
|
-
*
|
68
|
-
*/
|
69
|
-
m12;
|
41
|
+
public float m00, m01, m02;
|
42
|
+
public float m10, m11, m12;
|
70
43
|
|
71
44
|
|
72
45
|
/**
|
@@ -76,26 +49,15 @@ public class PMatrix2D implements PMatrix {
|
|
76
49
|
reset();
|
77
50
|
}
|
78
51
|
|
79
|
-
|
80
|
-
|
81
|
-
* @param m00
|
82
|
-
* @param m01
|
83
|
-
* @param m02
|
84
|
-
* @param m10
|
85
|
-
* @param m11
|
86
|
-
* @param m12
|
87
|
-
*/
|
88
|
-
public PMatrix2D(float m00, float m01, float m02,
|
52
|
+
|
53
|
+
public PMatrix2D(float m00, float m01, float m02,
|
89
54
|
float m10, float m11, float m12) {
|
90
55
|
set(m00, m01, m02,
|
91
56
|
m10, m11, m12);
|
92
57
|
}
|
93
58
|
|
94
|
-
|
95
|
-
|
96
|
-
* @param matrix
|
97
|
-
*/
|
98
|
-
public PMatrix2D(PMatrix matrix) {
|
59
|
+
|
60
|
+
public PMatrix2D(PMatrix matrix) {
|
99
61
|
set(matrix);
|
100
62
|
}
|
101
63
|
|
@@ -108,7 +70,6 @@ public class PMatrix2D implements PMatrix {
|
|
108
70
|
|
109
71
|
/**
|
110
72
|
* Returns a copy of this PMatrix.
|
111
|
-
* @return
|
112
73
|
*/
|
113
74
|
public PMatrix2D get() {
|
114
75
|
PMatrix2D outgoing = new PMatrix2D();
|
@@ -121,8 +82,6 @@ public class PMatrix2D implements PMatrix {
|
|
121
82
|
* Copies the matrix contents into a 6 entry float array.
|
122
83
|
* If target is null (or not the correct size), a new array will be created.
|
123
84
|
* Returned in the order {@code {m00, m01, m02, m10, m11, m12}}.
|
124
|
-
* @param target
|
125
|
-
* @return
|
126
85
|
*/
|
127
86
|
public float[] get(float[] target) {
|
128
87
|
if ((target == null) || (target.length != 6)) {
|
@@ -142,7 +101,6 @@ public class PMatrix2D implements PMatrix {
|
|
142
101
|
|
143
102
|
/**
|
144
103
|
* If matrix is a PMatrix2D, sets this matrix to be a copy of it.
|
145
|
-
* @param matrix
|
146
104
|
* @throws IllegalArgumentException If <tt>matrix</tt> is not 2D.
|
147
105
|
*/
|
148
106
|
public void set(PMatrix matrix) {
|
@@ -158,7 +116,6 @@ public class PMatrix2D implements PMatrix {
|
|
158
116
|
|
159
117
|
/**
|
160
118
|
* Unavailable in 2D. Does nothing.
|
161
|
-
* @param src
|
162
119
|
*/
|
163
120
|
public void set(PMatrix3D src) {
|
164
121
|
}
|
@@ -177,12 +134,6 @@ public class PMatrix2D implements PMatrix {
|
|
177
134
|
|
178
135
|
/**
|
179
136
|
* Sets the matrix content.
|
180
|
-
* @param m00
|
181
|
-
* @param m01
|
182
|
-
* @param m02
|
183
|
-
* @param m11
|
184
|
-
* @param m10
|
185
|
-
* @param m12
|
186
137
|
*/
|
187
138
|
public void set(float m00, float m01, float m02,
|
188
139
|
float m10, float m11, float m12) {
|
@@ -193,22 +144,6 @@ public class PMatrix2D implements PMatrix {
|
|
193
144
|
|
194
145
|
/**
|
195
146
|
* Unavailable in 2D. Does nothing.
|
196
|
-
* @param m00
|
197
|
-
* @param m23
|
198
|
-
* @param m02
|
199
|
-
* @param m01
|
200
|
-
* @param m10
|
201
|
-
* @param m12
|
202
|
-
* @param m03
|
203
|
-
* @param m11
|
204
|
-
* @param m20
|
205
|
-
* @param m21
|
206
|
-
* @param m13
|
207
|
-
* @param m31
|
208
|
-
* @param m33
|
209
|
-
* @param m22
|
210
|
-
* @param m30
|
211
|
-
* @param m32
|
212
147
|
*/
|
213
148
|
public void set(float m00, float m01, float m02, float m03,
|
214
149
|
float m10, float m11, float m12, float m13,
|
@@ -217,12 +152,8 @@ public class PMatrix2D implements PMatrix {
|
|
217
152
|
|
218
153
|
}
|
219
154
|
|
220
|
-
|
221
|
-
|
222
|
-
* @param tx
|
223
|
-
* @param ty
|
224
|
-
*/
|
225
|
-
public void translate(float tx, float ty) {
|
155
|
+
|
156
|
+
public void translate(float tx, float ty) {
|
226
157
|
m02 = tx*m00 + ty*m01 + m02;
|
227
158
|
m12 = tx*m10 + ty*m11 + m12;
|
228
159
|
}
|
@@ -230,9 +161,6 @@ public class PMatrix2D implements PMatrix {
|
|
230
161
|
|
231
162
|
/**
|
232
163
|
* Unavailable in 2D.
|
233
|
-
* @param x
|
234
|
-
* @param y
|
235
|
-
* @param z
|
236
164
|
* @throws IllegalArgumentException
|
237
165
|
*/
|
238
166
|
public void translate(float x, float y, float z) {
|
@@ -241,11 +169,6 @@ public class PMatrix2D implements PMatrix {
|
|
241
169
|
|
242
170
|
|
243
171
|
// Implementation roughly based on AffineTransform.
|
244
|
-
|
245
|
-
/**
|
246
|
-
*
|
247
|
-
* @param angle
|
248
|
-
*/
|
249
172
|
public void rotate(float angle) {
|
250
173
|
float s = sin(angle);
|
251
174
|
float c = cos(angle);
|
@@ -263,7 +186,6 @@ public class PMatrix2D implements PMatrix {
|
|
263
186
|
|
264
187
|
/**
|
265
188
|
* Unavailable in 2D.
|
266
|
-
* @param angle
|
267
189
|
* @throws IllegalArgumentException
|
268
190
|
*/
|
269
191
|
public void rotateX(float angle) {
|
@@ -273,48 +195,33 @@ public class PMatrix2D implements PMatrix {
|
|
273
195
|
|
274
196
|
/**
|
275
197
|
* Unavailable in 2D.
|
276
|
-
* @param angle
|
277
198
|
* @throws IllegalArgumentException
|
278
199
|
*/
|
279
200
|
public void rotateY(float angle) {
|
280
201
|
throw new IllegalArgumentException("Cannot use rotateY() on a PMatrix2D.");
|
281
202
|
}
|
282
203
|
|
283
|
-
|
284
|
-
|
285
|
-
* @param angle
|
286
|
-
*/
|
287
|
-
public void rotateZ(float angle) {
|
204
|
+
|
205
|
+
public void rotateZ(float angle) {
|
288
206
|
rotate(angle);
|
289
207
|
}
|
290
208
|
|
291
209
|
|
292
210
|
/**
|
293
211
|
* Unavailable in 2D.
|
294
|
-
* @param angle
|
295
|
-
* @param v0
|
296
|
-
* @param v1
|
297
|
-
* @param v2
|
298
212
|
* @throws IllegalArgumentException
|
299
213
|
*/
|
300
214
|
public void rotate(float angle, float v0, float v1, float v2) {
|
301
215
|
throw new IllegalArgumentException("Cannot use this version of rotate() on a PMatrix2D.");
|
302
216
|
}
|
303
217
|
|
304
|
-
|
305
|
-
|
306
|
-
* @param s
|
307
|
-
*/
|
308
|
-
public void scale(float s) {
|
218
|
+
|
219
|
+
public void scale(float s) {
|
309
220
|
scale(s, s);
|
310
221
|
}
|
311
222
|
|
312
|
-
|
313
|
-
|
314
|
-
* @param sx
|
315
|
-
* @param sy
|
316
|
-
*/
|
317
|
-
public void scale(float sx, float sy) {
|
223
|
+
|
224
|
+
public void scale(float sx, float sy) {
|
318
225
|
m00 *= sx; m01 *= sy;
|
319
226
|
m10 *= sx; m11 *= sy;
|
320
227
|
}
|
@@ -322,28 +229,19 @@ public class PMatrix2D implements PMatrix {
|
|
322
229
|
|
323
230
|
/**
|
324
231
|
* Unavailable in 2D.
|
325
|
-
* @param x
|
326
|
-
* @param y
|
327
|
-
* @param z
|
328
232
|
* @throws IllegalArgumentException
|
329
233
|
*/
|
330
234
|
public void scale(float x, float y, float z) {
|
331
235
|
throw new IllegalArgumentException("Cannot use this version of scale() on a PMatrix2D.");
|
332
236
|
}
|
333
237
|
|
334
|
-
|
335
|
-
|
336
|
-
* @param angle
|
337
|
-
*/
|
338
|
-
public void shearX(float angle) {
|
238
|
+
|
239
|
+
public void shearX(float angle) {
|
339
240
|
apply(1, 0, 1, tan(angle), 0, 0);
|
340
241
|
}
|
341
242
|
|
342
|
-
|
343
|
-
|
344
|
-
* @param angle
|
345
|
-
*/
|
346
|
-
public void shearY(float angle) {
|
243
|
+
|
244
|
+
public void shearY(float angle) {
|
347
245
|
apply(1, 0, 1, 0, tan(angle), 0);
|
348
246
|
}
|
349
247
|
|
@@ -365,7 +263,6 @@ public class PMatrix2D implements PMatrix {
|
|
365
263
|
|
366
264
|
/**
|
367
265
|
* Unavailable in 2D.
|
368
|
-
* @param source
|
369
266
|
* @throws IllegalArgumentException
|
370
267
|
*/
|
371
268
|
public void apply(PMatrix3D source) {
|
@@ -391,22 +288,6 @@ public class PMatrix2D implements PMatrix {
|
|
391
288
|
|
392
289
|
/**
|
393
290
|
* Unavailable in 2D.
|
394
|
-
* @param n00
|
395
|
-
* @param n21
|
396
|
-
* @param n02
|
397
|
-
* @param n01
|
398
|
-
* @param n03
|
399
|
-
* @param n11
|
400
|
-
* @param n10
|
401
|
-
* @param n30
|
402
|
-
* @param n23
|
403
|
-
* @param n13
|
404
|
-
* @param n12
|
405
|
-
* @param n22
|
406
|
-
* @param n32
|
407
|
-
* @param n20
|
408
|
-
* @param n31
|
409
|
-
* @param n33
|
410
291
|
* @throws IllegalArgumentException
|
411
292
|
*/
|
412
293
|
public void apply(float n00, float n01, float n02, float n03,
|
@@ -419,7 +300,6 @@ public class PMatrix2D implements PMatrix {
|
|
419
300
|
|
420
301
|
/**
|
421
302
|
* Apply another matrix to the left of this one.
|
422
|
-
* @param source
|
423
303
|
*/
|
424
304
|
public void preApply(PMatrix source) {
|
425
305
|
if (source instanceof PMatrix2D) {
|
@@ -438,7 +318,6 @@ public class PMatrix2D implements PMatrix {
|
|
438
318
|
|
439
319
|
/**
|
440
320
|
* Unavailable in 2D.
|
441
|
-
* @param left
|
442
321
|
* @throws IllegalArgumentException
|
443
322
|
*/
|
444
323
|
public void preApply(PMatrix3D left) {
|
@@ -470,22 +349,6 @@ public class PMatrix2D implements PMatrix {
|
|
470
349
|
|
471
350
|
/**
|
472
351
|
* Unavailable in 2D.
|
473
|
-
* @param n00
|
474
|
-
* @param n01
|
475
|
-
* @param n03
|
476
|
-
* @param n02
|
477
|
-
* @param n10
|
478
|
-
* @param n12
|
479
|
-
* @param n21
|
480
|
-
* @param n13
|
481
|
-
* @param n11
|
482
|
-
* @param n30
|
483
|
-
* @param n23
|
484
|
-
* @param n20
|
485
|
-
* @param n32
|
486
|
-
* @param n22
|
487
|
-
* @param n31
|
488
|
-
* @param n33
|
489
352
|
* @throws IllegalArgumentException
|
490
353
|
*/
|
491
354
|
public void preApply(float n00, float n01, float n02, float n03,
|
@@ -517,9 +380,6 @@ public class PMatrix2D implements PMatrix {
|
|
517
380
|
* Multiply a two element vector against this matrix.
|
518
381
|
* If out is null or not length four, a new float array will be returned.
|
519
382
|
* The values for vec and out can be the same (though that's less efficient).
|
520
|
-
* @param vec
|
521
|
-
* @param out
|
522
|
-
* @return
|
523
383
|
*/
|
524
384
|
public float[] mult(float vec[], float out[]) {
|
525
385
|
if (out == null || out.length != 2) {
|
@@ -545,9 +405,6 @@ public class PMatrix2D implements PMatrix {
|
|
545
405
|
/**
|
546
406
|
* Returns the x-coordinate of the result of multiplying the point (x, y)
|
547
407
|
* by this matrix.
|
548
|
-
* @param x
|
549
|
-
* @param y
|
550
|
-
* @return
|
551
408
|
*/
|
552
409
|
public float multX(float x, float y) {
|
553
410
|
return m00*x + m01*y + m02;
|
@@ -557,9 +414,6 @@ public class PMatrix2D implements PMatrix {
|
|
557
414
|
/**
|
558
415
|
* Returns the y-coordinate of the result of multiplying the point (x, y)
|
559
416
|
* by this matrix.
|
560
|
-
* @param x
|
561
|
-
* @param y
|
562
|
-
* @return
|
563
417
|
*/
|
564
418
|
public float multY(float x, float y) {
|
565
419
|
return m10*x + m11*y + m12;
|
@@ -611,10 +465,6 @@ public class PMatrix2D implements PMatrix {
|
|
611
465
|
|
612
466
|
//////////////////////////////////////////////////////////////
|
613
467
|
|
614
|
-
/**
|
615
|
-
*
|
616
|
-
*/
|
617
|
-
|
618
468
|
|
619
469
|
public void print() {
|
620
470
|
int big = (int) abs(max(PApplet.max(abs(m00), abs(m01), abs(m02)),
|
@@ -645,11 +495,6 @@ public class PMatrix2D implements PMatrix {
|
|
645
495
|
// implementation needs to be improved first. (e.g. actually keeping track
|
646
496
|
// of whether the matrix is in fact identity internally.)
|
647
497
|
|
648
|
-
/**
|
649
|
-
*
|
650
|
-
* @return
|
651
|
-
*/
|
652
|
-
|
653
498
|
|
654
499
|
protected boolean isIdentity() {
|
655
500
|
return ((m00 == 1) && (m01 == 0) && (m02 == 0) &&
|
@@ -658,11 +503,6 @@ public class PMatrix2D implements PMatrix {
|
|
658
503
|
|
659
504
|
|
660
505
|
// TODO make this more efficient, or move into PMatrix2D
|
661
|
-
|
662
|
-
/**
|
663
|
-
*
|
664
|
-
* @return
|
665
|
-
*/
|
666
506
|
protected boolean isWarped() {
|
667
507
|
return ((m00 != 1) || (m01 != 0) &&
|
668
508
|
(m10 != 0) || (m11 != 1));
|