You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/api_en/PShape_getVertex.xml
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -37,7 +37,7 @@ void draw() {
37
37
</example>
38
38
39
39
<description><![CDATA[
40
-
The <b>getVertex()</b> method returns a PVector with the coordinates of the vertex point located at the position defined by the <b>index</b> parameter.
40
+
The <b>getVertex()</b> method returns a PVector with the coordinates of the vertex point located at the position defined by the <b>index</b> parameter. This method works when shapes are created as shown in the example above, but won't work properly when a shape is defined explicitly (e.g. createShape(RECT, 20, 20, 80, 80).
Copy file name to clipboardExpand all lines: content/api_en/PShape_setVertex.xml
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -37,7 +37,7 @@ void draw() {
37
37
</example>
38
38
39
39
<description><![CDATA[
40
-
The <b>setVertex()</b> method defines the coordinates of the vertex point located at the position defined by the <b>index</b> parameter.
40
+
The <b>setVertex()</b> method defines the coordinates of the vertex point located at the position defined by the <b>index</b> parameter. This method works when shapes are created as shown in the example above, but won't work properly when a shape is defined explicitly (e.g. createShape(RECT, 20, 20, 80, 80).
Copy file name to clipboardExpand all lines: content/static/tutorials/pshape/index.html
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -503,14 +503,14 @@ <h3>Manipulating the Vertices of a PShape in Real-Time</h3>
503
503
504
504
<p>After about five minutes of working with PShape, the question inevitably arises: "What do I do if I want to wiggle all of my vertices?" PShape allows you to dynamically access and alter the vertices through the methods <ahref="http://processing.org/reference/PShape_getVertex_.html">getVertex()</a> and <ahref="http://processing.org/reference/PShape_setVertex_.html">setVertex()</a>.</p>
505
505
506
-
<p>To iterate over the vertices of a PShape, you can loop from 0 to the total number of vertices (<ahref="http://processing.org/reference/PShape_vertexCount_.html">vertexCount()</a>). Assuming a PShape "s", this would look something like:</p>
506
+
<p>To iterate over the vertices of a PShape, you can loop from 0 to the total number of vertices (<ahref="http://processing.org/reference/PShape_getVertexCount_.html">getVertexCount()</a>). Assuming a PShape "s", this would look something like:</p>
507
507
508
508
<pre>
509
509
for (int i = 0; i <s.getVertexCount();i++){
510
510
}
511
511
</pre>
512
512
513
-
<p>The vertices can be retrieved as <ahref="http://processing.org/reference/PVector.html">PVector</a> objects with getVertex().</p>
513
+
<p>The vertices can be retrieved as <ahref="http://processing.org/reference/PVector.html">PVector</a> objects with getVertexCount().</p>
@@ -54,33 +52,17 @@ loadXXX with second parameter for file type:
54
52
- loadTable("somethingorother", "csv");
55
53
- loadTable("somethingorother.csv", "tsv"); // override the .csv extension since the contents are tab delimited
56
54
57
-
- hide the "source" parameter from the Reference for createShape()
58
-
59
55
- add clear() in place of background(0, 0, 0, 0), this clears the background, only applicable to off-screen buffers
60
56
61
-
- change "shape" parameter in shape() to "shp" to match "img" in image()
62
-
63
-
- clarify in reference that getVertex() and setVertex() only work on shapes made manually with the long form of createShape() and not the versions these createShape(RECT, 10, 10, 60, 60)
64
-
65
-
- clip()/noClip()
66
-
if (mousePressed) {
67
-
noClip();
68
-
} else {
69
-
clip(mouseX, mouseY, 50, 50);
70
-
}
71
-
72
57
- arc() with different options
73
58
74
-
- blendMode() for default renderer
75
-
76
-
77
59
- write reference for getChild() re: OBJ
78
60
79
61
OPEN QUESTIONS
80
62
- need to add addChild() to PShape reference, how does it work. On both OBJ and SVG?
- rewrite documentation about pdf fonts (errors with non-native fonts) -- CR
86
68
- figure out why font naming not working correctly -- CR
@@ -126,6 +108,11 @@ Anyhow… something to dream about for the future. Andres had brought it up sinc
126
108
127
109
DONE FOR 2.0 REFERENCE
128
110
111
+
o change "shape" parameter in shape() to "shp" to match "img" in image()
112
+
x hide the "source" parameter from the Reference for createShape()
113
+
x 835 Improve mouseX, mouseY, pmouseX, pmouseY documentation --BF
114
+
x clarify in reference that getVertex() and setVertex() only work on shapes made manually with the long form of createShape() and not the versions these createShape(RECT, 10, 10, 60, 60)
0 commit comments