mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
Removed getCenter method in PShape
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user