Removed getCenter method in PShape

This commit is contained in:
codeanticode
2012-05-23 23:42:13 +00:00
parent a5a572fb8d
commit 8a56dafe12
3 changed files with 3 additions and 23 deletions
@@ -34,9 +34,9 @@ class Particle {
float speed = random(0.5,4);
velocity = new PVector(cos(a), sin(a));
velocity.mult(speed);
lifespan = 255;
PVector center = part.getCenter();
part.translate(x - center.x, y - center.y);
lifespan = 255;
part.resetMatrix();
part.translate(x, y);
}
boolean isDead() {
@@ -532,21 +532,6 @@ public class PShapeOpenGL extends PShape {
depth = max.z - min.z;
return depth;
}
public PVector getCenter() {
PVector center = new PVector();
int count = 0;
if (shapeEnded) {
count = getVertexSum(center, count);
if (0 < count) {
center.x /= count;
center.y /= count;
center.z /= count;
}
}
return center;
}
protected void getVertexMin(PVector min) {