20 lines
551 B
Plaintext
20 lines
551 B
Plaintext
class Cover {
|
|
PVector p1, p2, p3, p4;
|
|
PShape coverRect;
|
|
Cover(PVector p1_, PVector p2_, PVector p3_, PVector p4_) {
|
|
p1 = new PVector(p1_.x, p1_.y);
|
|
p2 = new PVector(p2_.x, p2_.y);
|
|
p3 = new PVector(p3_.x, p3_.y);
|
|
p4 = new PVector(p4_.x, p4_.y);
|
|
coverRect = createShape();
|
|
coverRect.beginShape();
|
|
coverRect.fill(0,200);
|
|
coverRect.noStroke();
|
|
coverRect.vertex(p1.x, p1.y);
|
|
coverRect.vertex(p2.x, p2.y);
|
|
coverRect.vertex(p3.x, p3.y);
|
|
coverRect.vertex(p4.x, p4.y);
|
|
coverRect.endShape(CLOSE);
|
|
}
|
|
}
|