checkpoint
[anneal.git] / src / edu / berkeley / qfat / geom / Vec.java
index 56b357e..0072911 100644 (file)
@@ -1,4 +1,5 @@
 package edu.berkeley.qfat.geom;
 package edu.berkeley.qfat.geom;
+import javax.media.opengl.*;
 
 /** vector in 3-space; immutable */
 public final class Vec {
 
 /** vector in 3-space; immutable */
 public final class Vec {
@@ -15,6 +16,7 @@ public final class Vec {
     public Vec times(float mag) { return new Vec(x*mag, y*mag, z*mag); }
     public Vec div(float mag) { return new Vec(x/mag, y/mag, z/mag); }
     public String toString() { return "<"+x+","+y+","+z+">"; }
     public Vec times(float mag) { return new Vec(x*mag, y*mag, z*mag); }
     public Vec div(float mag) { return new Vec(x/mag, y/mag, z/mag); }
     public String toString() { return "<"+x+","+y+","+z+">"; }
+    public void glNormal(GL gl) { gl.glNormal3f(x, y, z); }
 
     /** fundamental error quadric for the plane with this normal passing through p */
     public Matrix fundamentalQuadric(Point p) {
 
     /** fundamental error quadric for the plane with this normal passing through p */
     public Matrix fundamentalQuadric(Point p) {