-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTest methods.txt
More file actions
44 lines (40 loc) · 1.09 KB
/
Copy pathTest methods.txt
File metadata and controls
44 lines (40 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
vertices = new ArrayList<PVector>();
int children = shape.getChildCount();
println(children);
for (int i = 0; i < children; i++) {
PShape child = shape.getChild(i);
int total = child.getVertexCount();
for (int j = 0; j < total; j++) {
PVector v = child.getVertex(0);
vertices.add(v);
}
}
void points() {
beginShape(POINTS);
stroke(0,255,0);
int children = shape.getChildCount();
for (int i = 0; i < children; i++) {
PShape child = shape.getChild(i);
int total = child.getVertexCount();
for (int j = 0; j < total; j++) {
PVector v = child.getVertex(j);
point(v.x, v.y, v.z);
//vertex(v.x, v.y, v.z);
}
}
endShape();
}
ArrayList getObjVertex(){
vertices = new ArrayList<PVector>();
int children = shape.getChildCount();
println(children);
for (int i = 0; i < children; i++) {
PShape child = shape.getChild(i);
int total = child.getVertexCount();
for (int j = 0; j < total; j++) {
PVector v = child.getVertex(0);
vertices.add(v);
}
}
return vertices;
}