propane 3.4.0-java → 3.7.0.pre-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/.mvn/extensions.xml +1 -2
- data/.mvn/wrapper/MavenWrapperDownloader.java +2 -2
- data/.mvn/wrapper/maven-wrapper.properties +2 -2
- data/.travis.yml +2 -2
- data/CHANGELOG.md +12 -0
- data/Gemfile +2 -0
- data/README.md +17 -8
- data/Rakefile +10 -11
- data/bin/propane +3 -1
- data/lib/propane.rb +6 -4
- data/lib/propane/app.rb +20 -10
- data/lib/propane/creators/sketch_class.rb +7 -1
- data/lib/propane/creators/sketch_factory.rb +4 -2
- data/lib/propane/creators/sketch_writer.rb +1 -0
- data/lib/propane/helper_methods.rb +23 -24
- data/lib/propane/helpers/numeric.rb +2 -0
- data/lib/propane/helpers/version_error.rb +1 -0
- data/lib/propane/library.rb +5 -1
- data/lib/propane/library_loader.rb +2 -0
- data/lib/propane/native_folder.rb +10 -9
- data/lib/propane/native_loader.rb +3 -0
- data/lib/propane/runner.rb +14 -6
- data/lib/propane/version.rb +2 -1
- data/library/boids/boids.rb +21 -11
- data/library/color_group/color_group.rb +28 -0
- data/library/control_panel/control_panel.rb +8 -5
- data/library/dxf/dxf.rb +6 -0
- data/library/file_chooser/chooser.rb +10 -9
- data/library/file_chooser/file_chooser.rb +10 -9
- data/library/library_proxy/library_proxy.rb +2 -0
- data/library/net/net.rb +7 -0
- data/library/simplex_noise/simplex_noise.rb +2 -0
- data/library/slider/slider.rb +23 -22
- data/library/vector_utils/vector_utils.rb +4 -0
- data/library/video_event/video_event.rb +4 -1
- data/pom.rb +37 -36
- data/pom.xml +7 -7
- data/propane.gemspec +16 -12
- data/src/main/java/monkstone/ColorUtil.java +13 -1
- data/src/main/java/monkstone/MathToolModule.java +253 -203
- data/src/main/java/monkstone/PropaneLibrary.java +2 -2
- data/src/main/java/monkstone/fastmath/Deglut.java +1 -1
- data/src/main/java/monkstone/filechooser/Chooser.java +2 -1
- data/src/main/java/monkstone/noise/SimplexNoise.java +2 -2
- data/src/main/java/monkstone/slider/CustomHorizontalSlider.java +1 -1
- data/src/main/java/monkstone/slider/CustomVerticalSlider.java +1 -1
- data/src/main/java/monkstone/slider/SimpleHorizontalSlider.java +1 -1
- data/src/main/java/monkstone/slider/SimpleVerticalSlider.java +1 -1
- data/src/main/java/monkstone/slider/SliderBar.java +1 -1
- data/src/main/java/monkstone/slider/SliderGroup.java +1 -1
- data/src/main/java/monkstone/slider/WheelHandler.java +7 -6
- data/src/main/java/monkstone/vecmath/package-info.java +1 -1
- data/src/main/java/monkstone/vecmath/vec2/Vec2.java +1 -1
- data/src/main/java/monkstone/vecmath/vec3/Vec3.java +3 -3
- data/src/main/java/monkstone/videoevent/CaptureEvent.java +27 -0
- data/src/main/java/monkstone/videoevent/{VideoInterface.java → MovieEvent.java} +11 -27
- data/src/main/java/monkstone/videoevent/package-info.java +1 -1
- data/src/main/java/processing/awt/PGraphicsJava2D.java +781 -285
- data/src/main/java/processing/awt/PImageAWT.java +377 -0
- data/src/main/java/processing/awt/PShapeJava2D.java +56 -52
- data/src/main/java/processing/awt/PSurfaceAWT.java +309 -209
- data/src/main/java/processing/awt/ShimAWT.java +581 -0
- data/src/main/java/processing/core/PApplet.java +4510 -4503
- data/src/main/java/processing/core/PConstants.java +477 -447
- data/src/main/java/processing/core/PFont.java +914 -880
- data/src/main/java/processing/core/PGraphics.java +193 -177
- data/src/main/java/processing/core/PImage.java +611 -309
- data/src/main/java/processing/core/PMatrix.java +172 -159
- data/src/main/java/processing/core/PMatrix2D.java +478 -415
- data/src/main/java/processing/core/PMatrix3D.java +762 -735
- data/src/main/java/processing/core/PShape.java +2888 -2652
- data/src/main/java/processing/core/PShapeOBJ.java +97 -92
- data/src/main/java/processing/core/PShapeSVG.java +1705 -1490
- data/src/main/java/processing/core/PStyle.java +40 -37
- data/src/main/java/processing/core/PSurface.java +139 -97
- data/src/main/java/processing/core/PSurfaceNone.java +296 -218
- data/src/main/java/processing/core/PVector.java +997 -965
- data/src/main/java/processing/core/ThinkDifferent.java +15 -13
- data/src/main/java/processing/data/DoubleDict.java +756 -710
- data/src/main/java/processing/data/DoubleList.java +749 -696
- data/src/main/java/processing/data/FloatDict.java +748 -702
- data/src/main/java/processing/data/FloatList.java +751 -697
- data/src/main/java/processing/data/IntDict.java +720 -673
- data/src/main/java/processing/data/IntList.java +699 -633
- data/src/main/java/processing/data/JSONArray.java +931 -873
- data/src/main/java/processing/data/JSONObject.java +1262 -1165
- data/src/main/java/processing/data/JSONTokener.java +351 -341
- data/src/main/java/processing/data/LongDict.java +710 -663
- data/src/main/java/processing/data/LongList.java +701 -635
- data/src/main/java/processing/data/Sort.java +37 -41
- data/src/main/java/processing/data/StringDict.java +525 -486
- data/src/main/java/processing/data/StringList.java +626 -580
- data/src/main/java/processing/data/Table.java +3690 -3510
- data/src/main/java/processing/data/TableRow.java +182 -183
- data/src/main/java/processing/data/XML.java +957 -883
- data/src/main/java/processing/dxf/RawDXF.java +404 -0
- data/src/main/java/processing/event/Event.java +87 -67
- data/src/main/java/processing/event/KeyEvent.java +48 -41
- data/src/main/java/processing/event/MouseEvent.java +88 -113
- data/src/main/java/processing/event/TouchEvent.java +10 -6
- data/src/main/java/processing/javafx/PGraphicsFX2D.java +20 -345
- data/src/main/java/processing/javafx/PSurfaceFX.java +149 -121
- data/src/main/java/processing/net/Client.java +744 -0
- data/src/main/java/processing/net/Server.java +388 -0
- data/src/main/java/processing/opengl/FontTexture.java +289 -270
- data/src/main/java/processing/opengl/FrameBuffer.java +386 -364
- data/src/main/java/processing/opengl/LinePath.java +547 -500
- data/src/main/java/processing/opengl/LineStroker.java +588 -581
- data/src/main/java/processing/opengl/PGL.java +3047 -2914
- data/src/main/java/processing/opengl/PGraphics2D.java +408 -315
- data/src/main/java/processing/opengl/PGraphics3D.java +107 -72
- data/src/main/java/processing/opengl/PGraphicsOpenGL.java +12378 -12075
- data/src/main/java/processing/opengl/PJOGL.java +1753 -1670
- data/src/main/java/processing/opengl/PShader.java +1266 -1257
- data/src/main/java/processing/opengl/PShapeOpenGL.java +4678 -4580
- data/src/main/java/processing/opengl/PSurfaceJOGL.java +1114 -1027
- data/src/main/java/processing/opengl/Texture.java +1492 -1401
- data/src/main/java/processing/opengl/VertexBuffer.java +57 -55
- data/test/create_test.rb +21 -20
- data/test/deglut_spec_test.rb +4 -2
- data/test/helper_methods_test.rb +49 -20
- data/test/math_tool_test.rb +39 -32
- data/test/native_folder.rb +47 -0
- data/test/respond_to_test.rb +3 -2
- data/test/sketches/key_event.rb +2 -2
- data/test/sketches/library/my_library/my_library.rb +3 -0
- data/test/test_helper.rb +2 -0
- data/test/vecmath_spec_test.rb +35 -22
- data/vendors/Rakefile +33 -62
- metadata +56 -48
- data/src/main/java/processing/core/util/image/ImageLoadFacade.java +0 -161
- data/src/main/java/processing/core/util/image/ImageSaveFacade.java +0 -169
- data/src/main/java/processing/core/util/image/constants/TifConstants.java +0 -45
- data/src/main/java/processing/core/util/image/load/AwtImageLoadStrategy.java +0 -80
- data/src/main/java/processing/core/util/image/load/Base64StringImageLoadStrategy.java +0 -73
- data/src/main/java/processing/core/util/image/load/FallbackImageLoadStrategy.java +0 -70
- data/src/main/java/processing/core/util/image/load/ImageIoImageLoadStrategy.java +0 -132
- data/src/main/java/processing/core/util/image/load/ImageLoadStrategy.java +0 -48
- data/src/main/java/processing/core/util/image/load/ImageLoadUtil.java +0 -45
- data/src/main/java/processing/core/util/image/load/TgaImageLoadStrategy.java +0 -255
- data/src/main/java/processing/core/util/image/load/TiffImageLoadStrategy.java +0 -98
- data/src/main/java/processing/core/util/image/save/ImageSaveStrategy.java +0 -49
- data/src/main/java/processing/core/util/image/save/ImageSaveUtil.java +0 -48
- data/src/main/java/processing/core/util/image/save/ImageWriterImageSaveStrategy.java +0 -179
- data/src/main/java/processing/core/util/image/save/SaveImageException.java +0 -41
- data/src/main/java/processing/core/util/image/save/TgaImageSaveStrategy.java +0 -198
- data/src/main/java/processing/core/util/image/save/TiffImageSaveStrategy.java +0 -91
- data/src/main/java/processing/core/util/image/save/TiffNakedFilenameImageSaveStrategy.java +0 -57
- data/src/main/java/processing/core/util/io/InputFactory.java +0 -285
- data/src/main/java/processing/core/util/io/PathUtil.java +0 -109
- data/src/main/java/processing/opengl/shaders/LightVert-brcm.glsl +0 -154
- data/src/main/java/processing/opengl/shaders/LightVert-vc4.glsl +0 -154
- data/src/main/java/processing/opengl/shaders/TexLightVert-brcm.glsl +0 -160
- data/src/main/java/processing/opengl/shaders/TexLightVert-vc4.glsl +0 -160
@@ -1,3 +1,5 @@
|
|
1
|
+
/* -*- mode: java; c-basic-offset: 2; indent-tabs-mode: nil -*- */
|
2
|
+
|
1
3
|
/*
|
2
4
|
Part of the Processing project - http://processing.org
|
3
5
|
|
@@ -18,7 +20,8 @@
|
|
18
20
|
Public License along with this library; if not, write to the
|
19
21
|
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
20
22
|
Boston, MA 02111-1307 USA
|
21
|
-
|
23
|
+
*/
|
24
|
+
|
22
25
|
package processing.opengl;
|
23
26
|
|
24
27
|
import processing.core.PGraphics;
|
@@ -26,202 +29,259 @@ import processing.core.PMatrix3D;
|
|
26
29
|
import processing.core.PShape;
|
27
30
|
import processing.core.PShapeSVG;
|
28
31
|
|
32
|
+
|
29
33
|
public class PGraphics2D extends PGraphicsOpenGL {
|
30
34
|
|
31
|
-
|
32
|
-
|
33
|
-
|
35
|
+
public PGraphics2D() {
|
36
|
+
super();
|
37
|
+
}
|
34
38
|
|
35
|
-
//////////////////////////////////////////////////////////////
|
36
|
-
// RENDERER SUPPORT QUERIES
|
37
|
-
@Override
|
38
|
-
public boolean is2D() {
|
39
|
-
return true;
|
40
|
-
}
|
41
39
|
|
42
|
-
|
43
|
-
public boolean is3D() {
|
44
|
-
return false;
|
45
|
-
}
|
40
|
+
//////////////////////////////////////////////////////////////
|
46
41
|
|
47
|
-
|
48
|
-
// HINTS
|
49
|
-
@Override
|
50
|
-
public void hint(int which) {
|
51
|
-
if (which == ENABLE_STROKE_PERSPECTIVE) {
|
52
|
-
showWarning("Strokes cannot be perspective-corrected in 2D.");
|
53
|
-
return;
|
54
|
-
}
|
55
|
-
super.hint(which);
|
56
|
-
}
|
42
|
+
// RENDERER SUPPORT QUERIES
|
57
43
|
|
58
|
-
//////////////////////////////////////////////////////////////
|
59
|
-
// PROJECTION
|
60
|
-
@Override
|
61
|
-
public void ortho() {
|
62
|
-
showMethodWarning("ortho");
|
63
|
-
}
|
64
44
|
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
}
|
45
|
+
@Override
|
46
|
+
public boolean is2D() {
|
47
|
+
return true;
|
48
|
+
}
|
70
49
|
|
71
|
-
@Override
|
72
|
-
public void ortho(float left, float right,
|
73
|
-
float bottom, float top,
|
74
|
-
float near, float far) {
|
75
|
-
showMethodWarning("ortho");
|
76
|
-
}
|
77
50
|
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
51
|
+
@Override
|
52
|
+
public boolean is3D() {
|
53
|
+
return false;
|
54
|
+
}
|
82
55
|
|
83
|
-
@Override
|
84
|
-
public void perspective(float fov, float aspect, float zNear, float zFar) {
|
85
|
-
showMethodWarning("perspective");
|
86
|
-
}
|
87
56
|
|
88
|
-
|
89
|
-
public void frustum(float left, float right, float bottom, float top,
|
90
|
-
float znear, float zfar) {
|
91
|
-
showMethodWarning("frustum");
|
92
|
-
}
|
57
|
+
//////////////////////////////////////////////////////////////
|
93
58
|
|
94
|
-
|
95
|
-
protected void defaultPerspective() {
|
96
|
-
super.ortho(0, width, -height, 0, -1, +1);
|
97
|
-
}
|
59
|
+
// HINTS
|
98
60
|
|
99
|
-
//////////////////////////////////////////////////////////////
|
100
|
-
// CAMERA
|
101
|
-
@Override
|
102
|
-
public void beginCamera() {
|
103
|
-
showMethodWarning("beginCamera");
|
104
|
-
}
|
105
61
|
|
106
|
-
|
107
|
-
|
108
|
-
|
62
|
+
@Override
|
63
|
+
public void hint(int which) {
|
64
|
+
if (which == ENABLE_STROKE_PERSPECTIVE) {
|
65
|
+
showWarning("Strokes cannot be perspective-corrected in 2D.");
|
66
|
+
return;
|
109
67
|
}
|
68
|
+
super.hint(which);
|
69
|
+
}
|
110
70
|
|
111
|
-
@Override
|
112
|
-
public void camera() {
|
113
|
-
showMethodWarning("camera");
|
114
|
-
}
|
115
71
|
|
116
|
-
|
117
|
-
public void camera(float eyeX, float eyeY, float eyeZ,
|
118
|
-
float centerX, float centerY, float centerZ,
|
119
|
-
float upX, float upY, float upZ) {
|
120
|
-
showMethodWarning("camera");
|
121
|
-
}
|
72
|
+
//////////////////////////////////////////////////////////////
|
122
73
|
|
123
|
-
|
124
|
-
protected void defaultCamera() {
|
125
|
-
eyeDist = 1;
|
126
|
-
resetMatrix();
|
127
|
-
}
|
74
|
+
// PROJECTION
|
128
75
|
|
129
|
-
//////////////////////////////////////////////////////////////
|
130
|
-
// MATRIX MORE!
|
131
|
-
@Override
|
132
|
-
protected void begin2D() {
|
133
|
-
pushProjection();
|
134
|
-
defaultPerspective();
|
135
|
-
pushMatrix();
|
136
|
-
defaultCamera();
|
137
|
-
}
|
138
76
|
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
}
|
77
|
+
@Override
|
78
|
+
public void ortho() {
|
79
|
+
showMethodWarning("ortho");
|
80
|
+
}
|
144
81
|
|
145
|
-
//////////////////////////////////////////////////////////////
|
146
|
-
// SHAPE
|
147
|
-
@Override
|
148
|
-
public void shape(PShape shape) {
|
149
|
-
if (shape.is2D()) {
|
150
|
-
super.shape(shape);
|
151
|
-
} else {
|
152
|
-
showWarning("The shape object is not 2D, cannot be displayed with "
|
153
|
-
+ "this renderer");
|
154
|
-
}
|
155
|
-
}
|
156
82
|
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
showWarning("The shape object is not 2D, cannot be displayed with "
|
163
|
-
+ "this renderer");
|
164
|
-
}
|
165
|
-
}
|
83
|
+
@Override
|
84
|
+
public void ortho(float left, float right,
|
85
|
+
float bottom, float top) {
|
86
|
+
showMethodWarning("ortho");
|
87
|
+
}
|
166
88
|
|
167
|
-
@Override
|
168
|
-
public void shape(PShape shape, float a, float b, float c, float d) {
|
169
|
-
if (shape.is2D()) {
|
170
|
-
super.shape(shape, a, b, c, d);
|
171
|
-
} else {
|
172
|
-
showWarning("The shape object is not 2D, cannot be displayed with "
|
173
|
-
+ "this renderer");
|
174
|
-
}
|
175
|
-
}
|
176
89
|
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
90
|
+
@Override
|
91
|
+
public void ortho(float left, float right,
|
92
|
+
float bottom, float top,
|
93
|
+
float near, float far) {
|
94
|
+
showMethodWarning("ortho");
|
95
|
+
}
|
181
96
|
|
182
|
-
@Override
|
183
|
-
public void shape(PShape shape, float x, float y, float z,
|
184
|
-
float c, float d, float e) {
|
185
|
-
showDepthWarningXYZ("shape");
|
186
|
-
}
|
187
97
|
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
}
|
98
|
+
@Override
|
99
|
+
public void perspective() {
|
100
|
+
showMethodWarning("perspective");
|
101
|
+
}
|
193
102
|
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
103
|
+
|
104
|
+
@Override
|
105
|
+
public void perspective(float fov, float aspect, float zNear, float zFar) {
|
106
|
+
showMethodWarning("perspective");
|
107
|
+
}
|
108
|
+
|
109
|
+
|
110
|
+
@Override
|
111
|
+
public void frustum(float left, float right, float bottom, float top,
|
112
|
+
float znear, float zfar) {
|
113
|
+
showMethodWarning("frustum");
|
114
|
+
}
|
115
|
+
|
116
|
+
|
117
|
+
@Override
|
118
|
+
protected void defaultPerspective() {
|
119
|
+
super.ortho(0, width, -height, 0, -1, +1);
|
120
|
+
}
|
121
|
+
|
122
|
+
|
123
|
+
//////////////////////////////////////////////////////////////
|
124
|
+
|
125
|
+
// CAMERA
|
126
|
+
|
127
|
+
|
128
|
+
@Override
|
129
|
+
public void beginCamera() {
|
130
|
+
showMethodWarning("beginCamera");
|
131
|
+
}
|
132
|
+
|
133
|
+
|
134
|
+
@Override
|
135
|
+
public void endCamera() {
|
136
|
+
showMethodWarning("endCamera");
|
137
|
+
}
|
138
|
+
|
139
|
+
|
140
|
+
@Override
|
141
|
+
public void camera() {
|
142
|
+
showMethodWarning("camera");
|
143
|
+
}
|
144
|
+
|
145
|
+
|
146
|
+
@Override
|
147
|
+
public void camera(float eyeX, float eyeY, float eyeZ,
|
148
|
+
float centerX, float centerY, float centerZ,
|
149
|
+
float upX, float upY, float upZ) {
|
150
|
+
showMethodWarning("camera");
|
151
|
+
}
|
152
|
+
|
153
|
+
|
154
|
+
@Override
|
155
|
+
protected void defaultCamera() {
|
156
|
+
eyeDist = 1;
|
157
|
+
resetMatrix();
|
158
|
+
}
|
159
|
+
|
160
|
+
|
161
|
+
//////////////////////////////////////////////////////////////
|
162
|
+
|
163
|
+
// MATRIX MORE!
|
164
|
+
|
165
|
+
|
166
|
+
@Override
|
167
|
+
protected void begin2D() {
|
168
|
+
pushProjection();
|
169
|
+
defaultPerspective();
|
170
|
+
pushMatrix();
|
171
|
+
defaultCamera();
|
172
|
+
}
|
173
|
+
|
174
|
+
|
175
|
+
@Override
|
176
|
+
protected void end2D() {
|
177
|
+
popMatrix();
|
178
|
+
popProjection();
|
179
|
+
}
|
180
|
+
|
181
|
+
|
182
|
+
//////////////////////////////////////////////////////////////
|
183
|
+
|
184
|
+
// SHAPE
|
185
|
+
|
186
|
+
|
187
|
+
@Override
|
188
|
+
public void shape(PShape shape) {
|
189
|
+
if (shape.is2D()) {
|
190
|
+
super.shape(shape);
|
191
|
+
} else {
|
192
|
+
showWarning("The shape object is not 2D, cannot be displayed with " +
|
193
|
+
"this renderer");
|
201
194
|
}
|
195
|
+
}
|
196
|
+
|
202
197
|
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
198
|
+
@Override
|
199
|
+
public void shape(PShape shape, float x, float y) {
|
200
|
+
if (shape.is2D()) {
|
201
|
+
super.shape(shape, x, y);
|
202
|
+
} else {
|
203
|
+
showWarning("The shape object is not 2D, cannot be displayed with " +
|
204
|
+
"this renderer");
|
209
205
|
}
|
206
|
+
}
|
207
|
+
|
210
208
|
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
209
|
+
@Override
|
210
|
+
public void shape(PShape shape, float a, float b, float c, float d) {
|
211
|
+
if (shape.is2D()) {
|
212
|
+
super.shape(shape, a, b, c, d);
|
213
|
+
} else {
|
214
|
+
showWarning("The shape object is not 2D, cannot be displayed with " +
|
215
|
+
"this renderer");
|
215
216
|
}
|
217
|
+
}
|
218
|
+
|
219
|
+
|
220
|
+
@Override
|
221
|
+
public void shape(PShape shape, float x, float y, float z) {
|
222
|
+
showDepthWarningXYZ("shape");
|
223
|
+
}
|
224
|
+
|
225
|
+
|
226
|
+
@Override
|
227
|
+
public void shape(PShape shape, float x, float y, float z,
|
228
|
+
float c, float d, float e) {
|
229
|
+
showDepthWarningXYZ("shape");
|
230
|
+
}
|
231
|
+
|
232
|
+
|
233
|
+
|
234
|
+
//////////////////////////////////////////////////////////////
|
216
235
|
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
236
|
+
// SHAPE I/O
|
237
|
+
|
238
|
+
|
239
|
+
static protected boolean isSupportedExtension(String extension) {
|
240
|
+
return extension.equals("svg") || extension.equals("svgz");
|
241
|
+
}
|
242
|
+
|
243
|
+
|
244
|
+
static protected PShape loadShapeImpl(PGraphics pg,
|
245
|
+
String filename, String extension) {
|
246
|
+
if (extension.equals("svg") || extension.equals("svgz")) {
|
247
|
+
PShapeSVG svg = new PShapeSVG(pg.parent.loadXML(filename));
|
248
|
+
return PShapeOpenGL.createShape((PGraphicsOpenGL) pg, svg);
|
221
249
|
}
|
250
|
+
return null;
|
251
|
+
}
|
252
|
+
|
253
|
+
|
254
|
+
//////////////////////////////////////////////////////////////
|
255
|
+
|
256
|
+
// SCREEN TRANSFORMS
|
257
|
+
|
258
|
+
|
259
|
+
@Override
|
260
|
+
public float modelX(float x, float y, float z) {
|
261
|
+
showDepthWarning("modelX");
|
262
|
+
return 0;
|
263
|
+
}
|
264
|
+
|
265
|
+
|
266
|
+
@Override
|
267
|
+
public float modelY(float x, float y, float z) {
|
268
|
+
showDepthWarning("modelY");
|
269
|
+
return 0;
|
270
|
+
}
|
271
|
+
|
272
|
+
|
273
|
+
@Override
|
274
|
+
public float modelZ(float x, float y, float z) {
|
275
|
+
showDepthWarning("modelZ");
|
276
|
+
return 0;
|
277
|
+
}
|
278
|
+
|
279
|
+
|
280
|
+
//////////////////////////////////////////////////////////////
|
281
|
+
|
282
|
+
// SHAPE CREATION
|
283
|
+
|
222
284
|
|
223
|
-
//////////////////////////////////////////////////////////////
|
224
|
-
// SHAPE CREATION
|
225
285
|
// @Override
|
226
286
|
// protected PShape createShapeFamily(int type) {
|
227
287
|
// return new PShapeOpenGL(this, type);
|
@@ -232,7 +292,9 @@ public class PGraphics2D extends PGraphicsOpenGL {
|
|
232
292
|
// protected PShape createShapePrimitive(int kind, float... p) {
|
233
293
|
// return new PShapeOpenGL(this, kind, p);
|
234
294
|
// }
|
235
|
-
|
295
|
+
|
296
|
+
|
297
|
+
/*
|
236
298
|
@Override
|
237
299
|
public PShape createShape(PShape source) {
|
238
300
|
return PShapeOpenGL.createShape2D(this, source);
|
@@ -340,183 +402,214 @@ public class PGraphics2D extends PGraphicsOpenGL {
|
|
340
402
|
shape.set3D(false);
|
341
403
|
return shape;
|
342
404
|
}
|
343
|
-
|
344
|
-
//////////////////////////////////////////////////////////////
|
345
|
-
// BEZIER VERTICES
|
346
|
-
@Override
|
347
|
-
public void bezierVertex(float x2, float y2, float z2,
|
348
|
-
float x3, float y3, float z3,
|
349
|
-
float x4, float y4, float z4) {
|
350
|
-
showDepthWarningXYZ("bezierVertex");
|
351
|
-
}
|
405
|
+
*/
|
352
406
|
|
353
|
-
//////////////////////////////////////////////////////////////
|
354
|
-
// QUADRATIC BEZIER VERTICES
|
355
|
-
@Override
|
356
|
-
public void quadraticVertex(float x2, float y2, float z2,
|
357
|
-
float x4, float y4, float z4) {
|
358
|
-
showDepthWarningXYZ("quadVertex");
|
359
|
-
}
|
360
407
|
|
361
|
-
|
362
|
-
// CURVE VERTICES
|
363
|
-
@Override
|
364
|
-
public void curveVertex(float x, float y, float z) {
|
365
|
-
showDepthWarningXYZ("curveVertex");
|
366
|
-
}
|
408
|
+
//////////////////////////////////////////////////////////////
|
367
409
|
|
368
|
-
|
369
|
-
// BOX
|
370
|
-
@Override
|
371
|
-
public void box(float w, float h, float d) {
|
372
|
-
showMethodWarning("box");
|
373
|
-
}
|
410
|
+
// BEZIER VERTICES
|
374
411
|
|
375
|
-
//////////////////////////////////////////////////////////////
|
376
|
-
// SPHERE
|
377
|
-
@Override
|
378
|
-
public void sphere(float r) {
|
379
|
-
showMethodWarning("sphere");
|
380
|
-
}
|
381
412
|
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
413
|
+
@Override
|
414
|
+
public void bezierVertex(float x2, float y2, float z2,
|
415
|
+
float x3, float y3, float z3,
|
416
|
+
float x4, float y4, float z4) {
|
417
|
+
showDepthWarningXYZ("bezierVertex");
|
418
|
+
}
|
388
419
|
|
389
|
-
@Override
|
390
|
-
public void vertex(float x, float y, float z, float u, float v) {
|
391
|
-
showDepthWarningXYZ("vertex");
|
392
|
-
}
|
393
420
|
|
394
|
-
|
395
|
-
// MATRIX TRANSFORMATIONS
|
396
|
-
@Override
|
397
|
-
public void translate(float tx, float ty, float tz) {
|
398
|
-
showDepthWarningXYZ("translate");
|
399
|
-
}
|
421
|
+
//////////////////////////////////////////////////////////////
|
400
422
|
|
401
|
-
|
402
|
-
public void rotateX(float angle) {
|
403
|
-
showDepthWarning("rotateX");
|
404
|
-
}
|
423
|
+
// QUADRATIC BEZIER VERTICES
|
405
424
|
|
406
|
-
@Override
|
407
|
-
public void rotateY(float angle) {
|
408
|
-
showDepthWarning("rotateY");
|
409
|
-
}
|
410
425
|
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
426
|
+
@Override
|
427
|
+
public void quadraticVertex(float x2, float y2, float z2,
|
428
|
+
float x4, float y4, float z4) {
|
429
|
+
showDepthWarningXYZ("quadVertex");
|
430
|
+
}
|
415
431
|
|
416
|
-
@Override
|
417
|
-
public void rotate(float angle, float vx, float vy, float vz) {
|
418
|
-
showVariationWarning("rotate");
|
419
|
-
}
|
420
432
|
|
421
|
-
|
422
|
-
public void applyMatrix(PMatrix3D source) {
|
423
|
-
showVariationWarning("applyMatrix");
|
424
|
-
}
|
433
|
+
//////////////////////////////////////////////////////////////
|
425
434
|
|
426
|
-
|
427
|
-
public void applyMatrix(float n00, float n01, float n02, float n03,
|
428
|
-
float n10, float n11, float n12, float n13,
|
429
|
-
float n20, float n21, float n22, float n23,
|
430
|
-
float n30, float n31, float n32, float n33) {
|
431
|
-
showVariationWarning("applyMatrix");
|
432
|
-
}
|
435
|
+
// CURVE VERTICES
|
433
436
|
|
434
|
-
@Override
|
435
|
-
public void scale(float sx, float sy, float sz) {
|
436
|
-
showDepthWarningXYZ("scale");
|
437
|
-
}
|
438
437
|
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
showDepthWarningXYZ("screenX");
|
444
|
-
return 0;
|
445
|
-
}
|
438
|
+
@Override
|
439
|
+
public void curveVertex(float x, float y, float z) {
|
440
|
+
showDepthWarningXYZ("curveVertex");
|
441
|
+
}
|
446
442
|
|
447
|
-
@Override
|
448
|
-
public float screenY(float x, float y, float z) {
|
449
|
-
showDepthWarningXYZ("screenY");
|
450
|
-
return 0;
|
451
|
-
}
|
452
443
|
|
453
|
-
|
454
|
-
public float screenZ(float x, float y, float z) {
|
455
|
-
showDepthWarningXYZ("screenZ");
|
456
|
-
return 0;
|
457
|
-
}
|
444
|
+
//////////////////////////////////////////////////////////////
|
458
445
|
|
459
|
-
|
460
|
-
public PMatrix3D getMatrix(PMatrix3D target) {
|
461
|
-
showVariationWarning("getMatrix");
|
462
|
-
return target;
|
463
|
-
}
|
446
|
+
// BOX
|
464
447
|
|
465
|
-
@Override
|
466
|
-
public void setMatrix(PMatrix3D source) {
|
467
|
-
showVariationWarning("setMatrix");
|
468
|
-
}
|
469
448
|
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
showMethodWarning("lights");
|
475
|
-
}
|
449
|
+
@Override
|
450
|
+
public void box(float w, float h, float d) {
|
451
|
+
showMethodWarning("box");
|
452
|
+
}
|
476
453
|
|
477
|
-
@Override
|
478
|
-
public void noLights() {
|
479
|
-
showMethodWarning("noLights");
|
480
|
-
}
|
481
454
|
|
482
|
-
|
483
|
-
public void ambientLight(float red, float green, float blue) {
|
484
|
-
showMethodWarning("ambientLight");
|
485
|
-
}
|
455
|
+
//////////////////////////////////////////////////////////////
|
486
456
|
|
487
|
-
|
488
|
-
public void ambientLight(float red, float green, float blue,
|
489
|
-
float x, float y, float z) {
|
490
|
-
showMethodWarning("ambientLight");
|
491
|
-
}
|
457
|
+
// SPHERE
|
492
458
|
|
493
|
-
@Override
|
494
|
-
public void directionalLight(float red, float green, float blue,
|
495
|
-
float nx, float ny, float nz) {
|
496
|
-
showMethodWarning("directionalLight");
|
497
|
-
}
|
498
459
|
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
}
|
460
|
+
@Override
|
461
|
+
public void sphere(float r) {
|
462
|
+
showMethodWarning("sphere");
|
463
|
+
}
|
504
464
|
|
505
|
-
@Override
|
506
|
-
public void spotLight(float red, float green, float blue,
|
507
|
-
float x, float y, float z,
|
508
|
-
float nx, float ny, float nz,
|
509
|
-
float angle, float concentration) {
|
510
|
-
showMethodWarning("spotLight");
|
511
|
-
}
|
512
465
|
|
513
|
-
|
514
|
-
public void lightFalloff(float constant, float linear, float quadratic) {
|
515
|
-
showMethodWarning("lightFalloff");
|
516
|
-
}
|
466
|
+
//////////////////////////////////////////////////////////////
|
517
467
|
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
468
|
+
// VERTEX SHAPES
|
469
|
+
|
470
|
+
|
471
|
+
@Override
|
472
|
+
public void vertex(float x, float y, float z) {
|
473
|
+
showDepthWarningXYZ("vertex");
|
474
|
+
}
|
475
|
+
|
476
|
+
@Override
|
477
|
+
public void vertex(float x, float y, float z, float u, float v) {
|
478
|
+
showDepthWarningXYZ("vertex");
|
479
|
+
}
|
480
|
+
|
481
|
+
//////////////////////////////////////////////////////////////
|
482
|
+
|
483
|
+
// MATRIX TRANSFORMATIONS
|
484
|
+
|
485
|
+
@Override
|
486
|
+
public void translate(float tx, float ty, float tz) {
|
487
|
+
showDepthWarningXYZ("translate");
|
488
|
+
}
|
489
|
+
|
490
|
+
@Override
|
491
|
+
public void rotateX(float angle) {
|
492
|
+
showDepthWarning("rotateX");
|
493
|
+
}
|
494
|
+
|
495
|
+
@Override
|
496
|
+
public void rotateY(float angle) {
|
497
|
+
showDepthWarning("rotateY");
|
498
|
+
}
|
499
|
+
|
500
|
+
@Override
|
501
|
+
public void rotateZ(float angle) {
|
502
|
+
showDepthWarning("rotateZ");
|
503
|
+
}
|
504
|
+
|
505
|
+
@Override
|
506
|
+
public void rotate(float angle, float vx, float vy, float vz) {
|
507
|
+
showVariationWarning("rotate");
|
508
|
+
}
|
509
|
+
|
510
|
+
@Override
|
511
|
+
public void applyMatrix(PMatrix3D source) {
|
512
|
+
showVariationWarning("applyMatrix");
|
513
|
+
}
|
514
|
+
|
515
|
+
@Override
|
516
|
+
public void applyMatrix(float n00, float n01, float n02, float n03,
|
517
|
+
float n10, float n11, float n12, float n13,
|
518
|
+
float n20, float n21, float n22, float n23,
|
519
|
+
float n30, float n31, float n32, float n33) {
|
520
|
+
showVariationWarning("applyMatrix");
|
521
|
+
}
|
522
|
+
|
523
|
+
@Override
|
524
|
+
public void scale(float sx, float sy, float sz) {
|
525
|
+
showDepthWarningXYZ("scale");
|
526
|
+
}
|
527
|
+
|
528
|
+
//////////////////////////////////////////////////////////////
|
529
|
+
|
530
|
+
// SCREEN AND MODEL COORDS
|
531
|
+
|
532
|
+
@Override
|
533
|
+
public float screenX(float x, float y, float z) {
|
534
|
+
showDepthWarningXYZ("screenX");
|
535
|
+
return 0;
|
536
|
+
}
|
537
|
+
|
538
|
+
@Override
|
539
|
+
public float screenY(float x, float y, float z) {
|
540
|
+
showDepthWarningXYZ("screenY");
|
541
|
+
return 0;
|
542
|
+
}
|
543
|
+
|
544
|
+
@Override
|
545
|
+
public float screenZ(float x, float y, float z) {
|
546
|
+
showDepthWarningXYZ("screenZ");
|
547
|
+
return 0;
|
548
|
+
}
|
549
|
+
|
550
|
+
@Override
|
551
|
+
public PMatrix3D getMatrix(PMatrix3D target) {
|
552
|
+
showVariationWarning("getMatrix");
|
553
|
+
return target;
|
554
|
+
}
|
555
|
+
|
556
|
+
@Override
|
557
|
+
public void setMatrix(PMatrix3D source) {
|
558
|
+
showVariationWarning("setMatrix");
|
559
|
+
}
|
560
|
+
|
561
|
+
//////////////////////////////////////////////////////////////
|
562
|
+
|
563
|
+
// LIGHTS
|
564
|
+
|
565
|
+
@Override
|
566
|
+
public void lights() {
|
567
|
+
showMethodWarning("lights");
|
568
|
+
}
|
569
|
+
|
570
|
+
@Override
|
571
|
+
public void noLights() {
|
572
|
+
showMethodWarning("noLights");
|
573
|
+
}
|
574
|
+
|
575
|
+
@Override
|
576
|
+
public void ambientLight(float red, float green, float blue) {
|
577
|
+
showMethodWarning("ambientLight");
|
578
|
+
}
|
579
|
+
|
580
|
+
@Override
|
581
|
+
public void ambientLight(float red, float green, float blue,
|
582
|
+
float x, float y, float z) {
|
583
|
+
showMethodWarning("ambientLight");
|
584
|
+
}
|
585
|
+
|
586
|
+
@Override
|
587
|
+
public void directionalLight(float red, float green, float blue,
|
588
|
+
float nx, float ny, float nz) {
|
589
|
+
showMethodWarning("directionalLight");
|
590
|
+
}
|
591
|
+
|
592
|
+
@Override
|
593
|
+
public void pointLight(float red, float green, float blue,
|
594
|
+
float x, float y, float z) {
|
595
|
+
showMethodWarning("pointLight");
|
596
|
+
}
|
597
|
+
|
598
|
+
@Override
|
599
|
+
public void spotLight(float red, float green, float blue,
|
600
|
+
float x, float y, float z,
|
601
|
+
float nx, float ny, float nz,
|
602
|
+
float angle, float concentration) {
|
603
|
+
showMethodWarning("spotLight");
|
604
|
+
}
|
605
|
+
|
606
|
+
@Override
|
607
|
+
public void lightFalloff(float constant, float linear, float quadratic) {
|
608
|
+
showMethodWarning("lightFalloff");
|
609
|
+
}
|
610
|
+
|
611
|
+
@Override
|
612
|
+
public void lightSpecular(float v1, float v2, float v3) {
|
613
|
+
showMethodWarning("lightSpecular");
|
614
|
+
}
|
615
|
+
}
|