- public boolean has(Vert v) { return p1()==v || p2()==v || p3()==v; }
-
- public float area() {
- return (float)Math.abs(0.5 * e1().length() * new Vec(p1().p, p2().p).norm().dot(new Vec(p2().p, p3().p)));
- }
-
- public void glVertices(GL gl) {
- p1().p.glVertex(gl);
- p2().p.glVertex(gl);
- p3().p.glVertex(gl);
- }
-
- public Point centroid() { return new Point((p1().p.x+p2().p.x+p3().p.x)/3,
- (p1().p.y+p2().p.y+p3().p.y)/3,
- (p1().p.z+p2().p.z+p3().p.z)/3); }
- public float diameter() {
- // FIXME: what is this supposed to be?
- return Math.max(Math.max(e1().length(), e2().length()), e3().length()) / 2;
- }
-
-