@@ -6317,6 +6317,7 @@ private Frame selectFrame() {
63176317 * to the function, so that the program is not waiting for additional input.
63186318 * The callback is necessary because of how threading works.
63196319 *
6320+ * <h3>Advanced</h3>
63206321 * <pre>
63216322 * void setup() {
63226323 * selectInput("Select a file to process:", "fileSelected");
@@ -11179,44 +11180,44 @@ public void beginShape() {
1117911180 }
1118011181
1118111182
11182- /**
11183- *
11184- * Using the <b>beginShape()</b> and <b>endShape()</b> functions allow creating
11185- * more complex forms. <b>beginShape()</b> begins recording vertices for a shape
11186- * and <b>endShape()</b> stops recording. The value of the <b>kind</b> parameter
11187- * tells it which types of shapes to create from the provided vertices. With no
11188- * mode specified, the shape can be any irregular polygon. The parameters
11189- * available for beginShape() are POINTS, LINES, TRIANGLES, TRIANGLE_FAN,
11190- * TRIANGLE_STRIP, QUADS, and QUAD_STRIP. After calling the <b>beginShape()</b>
11191- * function, a series of <b>vertex()</b> commands must follow. To stop drawing
11192- * the shape, call <b>endShape()</b>. The <b>vertex()</b> function with two
11193- * parameters specifies a position in 2D and the <b>vertex()</b> function with
11194- * three parameters specifies a position in 3D. Each shape will be outlined with
11195- * the current stroke color and filled with the fill color. <br />
11196- * <br />
11197- * Transformations such as <b>translate()</b>, <b>rotate()</b>, and
11198- * <b>scale()</b> do not work within <b>beginShape()</b>. It is also not
11199- * possible to use other shapes, such as <b>ellipse()</b> or <b>rect()</b>
11200- * within <b>beginShape()</b>. <br />
11201- * <br />
11202- * The P2D and P3D renderers allow <b>stroke()</b> and <b>fill()</b> to be
11203- * altered on a per-vertex basis, but the default renderer does not. Settings
11204- * such as <b>strokeWeight()</b>, <b>strokeCap()</b>, and <b>strokeJoin()</b>
11205- * cannot be changed while inside a <b>beginShape()</b>/<b>endShape()</b> block
11206- * with any renderer.
11207- *
11208- * @webref shape:vertex
11209- * @webBrief Using the <b>beginShape()</b> and <b>endShape()</b> functions allow
11210- * creating more complex forms.
11211- * @param kind Either POINTS, LINES, TRIANGLES, TRIANGLE_FAN, TRIANGLE_STRIP,
11212- * QUADS, or QUAD_STRIP
11213- * @see PShape
11214- * @see PGraphics#endShape()
11215- * @see PGraphics#vertex(float, float, float, float, float)
11216- * @see PGraphics#curveVertex(float, float, float)
11217- * @see PGraphics#bezierVertex(float, float, float, float, float, float, float,
11218- * float, float)
11219- */
11183+ /**
11184+ *
11185+ * Using the <b>beginShape()</b> and <b>endShape()</b> functions allow creating
11186+ * more complex forms. <b>beginShape()</b> begins recording vertices for a shape
11187+ * and <b>endShape()</b> stops recording. The value of the <b>kind</b> parameter
11188+ * tells it which types of shapes to create from the provided vertices. With no
11189+ * mode specified, the shape can be any irregular polygon. The parameters
11190+ * available for beginShape() are POINTS, LINES, TRIANGLES, TRIANGLE_FAN,
11191+ * TRIANGLE_STRIP, QUADS, and QUAD_STRIP. After calling the <b>beginShape()</b>
11192+ * function, a series of <b>vertex()</b> commands must follow. To stop drawing
11193+ * the shape, call <b>endShape()</b>. The <b>vertex()</b> function with two
11194+ * parameters specifies a position in 2D and the <b>vertex()</b> function with
11195+ * three parameters specifies a position in 3D. Each shape will be outlined with
11196+ * the current stroke color and filled with the fill color. <br />
11197+ * <br />
11198+ * Transformations such as <b>translate()</b>, <b>rotate()</b>, and
11199+ * <b>scale()</b> do not work within <b>beginShape()</b>. It is also not
11200+ * possible to use other shapes, such as <b>ellipse()</b> or <b>rect()</b>
11201+ * within <b>beginShape()</b>. <br />
11202+ * <br />
11203+ * The P2D and P3D renderers allow <b>stroke()</b> and <b>fill()</b> to be
11204+ * altered on a per-vertex basis, but the default renderer does not. Settings
11205+ * such as <b>strokeWeight()</b>, <b>strokeCap()</b>, and <b>strokeJoin()</b>
11206+ * cannot be changed while inside a <b>beginShape()</b>/<b>endShape()</b> block
11207+ * with any renderer.
11208+ *
11209+ * @webref shape:vertex
11210+ * @webBrief Using the <b>beginShape()</b> and <b>endShape()</b> functions allow
11211+ * creating more complex forms.
11212+ * @param kind Either POINTS, LINES, TRIANGLES, TRIANGLE_FAN, TRIANGLE_STRIP,
11213+ * QUADS, or QUAD_STRIP
11214+ * @see PShape
11215+ * @see PGraphics#endShape()
11216+ * @see PGraphics#vertex(float, float, float, float, float)
11217+ * @see PGraphics#curveVertex(float, float, float)
11218+ * @see PGraphics#bezierVertex(float, float, float, float, float, float, float,
11219+ * float, float)
11220+ */
1122011221 public void beginShape(int kind) {
1122111222 if (recorder != null) recorder.beginShape(kind);
1122211223 g.beginShape(kind);
@@ -11233,24 +11234,24 @@ public void edge(boolean edge) {
1123311234 }
1123411235
1123511236
11236- /**
11237- *
11238- * Sets the current normal vector. Used for drawing three dimensional shapes and
11239- * surfaces, <b>normal()</b> specifies a vector perpendicular to a shape's
11240- * surface which, in turn, determines how lighting affects it. Processing
11241- * attempts to automatically assign normals to shapes, but since that's
11242- * imperfect, this is a better option when you want more control. This function
11243- * is identical to <b>glNormal3f()</b> in OpenGL.
11244- *
11245- * @webref lights_camera:lights
11246- * @webBrief Sets the current normal vector.
11247- * @param nx x direction
11248- * @param ny y direction
11249- * @param nz z direction
11250- * @see PGraphics#beginShape(int)
11251- * @see PGraphics#endShape(int)
11252- * @see PGraphics#lights()
11253- */
11237+ /**
11238+ *
11239+ * Sets the current normal vector. Used for drawing three dimensional shapes and
11240+ * surfaces, <b>normal()</b> specifies a vector perpendicular to a shape's
11241+ * surface which, in turn, determines how lighting affects it. Processing
11242+ * attempts to automatically assign normals to shapes, but since that's
11243+ * imperfect, this is a better option when you want more control. This function
11244+ * is identical to <b>glNormal3f()</b> in OpenGL.
11245+ *
11246+ * @webref lights_camera:lights
11247+ * @webBrief Sets the current normal vector.
11248+ * @param nx x direction
11249+ * @param ny y direction
11250+ * @param nz z direction
11251+ * @see PGraphics#beginShape(int)
11252+ * @see PGraphics#endShape(int)
11253+ * @see PGraphics#lights()
11254+ */
1125411255 public void normal(float nx, float ny, float nz) {
1125511256 if (recorder != null) recorder.normal(nx, ny, nz);
1125611257 g.normal(nx, ny, nz);
@@ -11293,23 +11294,23 @@ public void attrib(String name, boolean... values) {
1129311294 }
1129411295
1129511296
11296- /**
11297- *
11298- * Sets the coordinate space for texture mapping. The default mode is
11299- * <b>IMAGE</b>, which refers to the actual coordinates of the image.
11300- * <b>NORMAL</b> refers to a normalized space of values ranging from 0 to 1.
11301- * This function only works with the P2D and P3D renderers.<br />
11302- * <br />
11303- * With <b>IMAGE</b>, if an image is 100 x 200 pixels, mapping the image onto
11304- * the entire size of a quad would require the points (0,0) (100, 0) (100,200)
11305- * (0,200). The same mapping in <b>NORMAL</b> is (0,0) (1,0) (1,1) (0,1).
11306- *
11307- * @webref image:textures
11308- * @webBrief Sets the coordinate space for texture mapping.
11309- * @param mode either IMAGE or NORMAL
11310- * @see PGraphics#texture(PImage)
11311- * @see PGraphics#textureWrap(int)
11312- */
11297+ /**
11298+ *
11299+ * Sets the coordinate space for texture mapping. The default mode is
11300+ * <b>IMAGE</b>, which refers to the actual coordinates of the image.
11301+ * <b>NORMAL</b> refers to a normalized space of values ranging from 0 to 1.
11302+ * This function only works with the P2D and P3D renderers.<br />
11303+ * <br />
11304+ * With <b>IMAGE</b>, if an image is 100 x 200 pixels, mapping the image onto
11305+ * the entire size of a quad would require the points (0,0) (100, 0) (100,200)
11306+ * (0,200). The same mapping in <b>NORMAL</b> is (0,0) (1,0) (1,1) (0,1).
11307+ *
11308+ * @webref image:textures
11309+ * @webBrief Sets the coordinate space for texture mapping.
11310+ * @param mode either IMAGE or NORMAL
11311+ * @see PGraphics#texture(PImage)
11312+ * @see PGraphics#textureWrap(int)
11313+ */
1131311314 public void textureMode(int mode) {
1131411315 if (recorder != null) recorder.textureMode(mode);
1131511316 g.textureMode(mode);
@@ -11335,26 +11336,26 @@ public void textureWrap(int wrap) {
1133511336 }
1133611337
1133711338
11338- /**
11339- *
11340- * Sets a texture to be applied to vertex points. The <b>texture()</b> function
11341- * must be called between <b>beginShape()</b> and <b>endShape()</b> and before
11342- * any calls to <b>vertex()</b>. This function only works with the P2D and P3D
11343- * renderers.<br />
11344- * <br />
11345- * When textures are in use, the fill color is ignored. Instead, use
11346- * <b>tint()</b> to specify the color of the texture as it is applied to the
11347- * shape.
11348- *
11349- * @webref image:textures
11350- * @webBrief Sets a texture to be applied to vertex points.
11351- * @param image reference to a PImage object
11352- * @see PGraphics#textureMode(int)
11353- * @see PGraphics#textureWrap(int)
11354- * @see PGraphics#beginShape(int)
11355- * @see PGraphics#endShape(int)
11356- * @see PGraphics#vertex(float, float, float, float, float)
11357- */
11339+ /**
11340+ *
11341+ * Sets a texture to be applied to vertex points. The <b>texture()</b> function
11342+ * must be called between <b>beginShape()</b> and <b>endShape()</b> and before
11343+ * any calls to <b>vertex()</b>. This function only works with the P2D and P3D
11344+ * renderers.<br />
11345+ * <br />
11346+ * When textures are in use, the fill color is ignored. Instead, use
11347+ * <b>tint()</b> to specify the color of the texture as it is applied to the
11348+ * shape.
11349+ *
11350+ * @webref image:textures
11351+ * @webBrief Sets a texture to be applied to vertex points.
11352+ * @param image reference to a PImage object
11353+ * @see PGraphics#textureMode(int)
11354+ * @see PGraphics#textureWrap(int)
11355+ * @see PGraphics#beginShape(int)
11356+ * @see PGraphics#endShape(int)
11357+ * @see PGraphics#vertex(float, float, float, float, float)
11358+ */
1135811359 public void texture(PImage image) {
1135911360 if (recorder != null) recorder.texture(image);
1136011361 g.texture(image);
0 commit comments