home *** CD-ROM | disk | FTP | other *** search
/ Late Night VRML 2.0 with Java CD-ROM / code.zip / Ch13 / quake / Trivertex.java < prev    next >
Text File  |  1996-11-19  |  851b  |  30 lines

  1. // A triangle vertex from a Quake MDL file
  2.  
  3. // Written by Bernie Roehl, November 1996
  4.  
  5. package quake;
  6.  
  7. import java.io.*;
  8.  
  9. public class Trivertex {
  10.         protected int x, y, z;
  11.         protected int lightNormalIndex;
  12.  
  13.         public int getX() { return x; }
  14.         public int getY() { return y; }
  15.         public int getZ() { return z; }
  16.         public int getLightNormalIndex() { return lightNormalIndex; }
  17.  
  18.         public String toString() {
  19.                 return x + " " + y + " " + z + " (normal " + lightNormalIndex + ")";
  20.         }
  21.  
  22.         public Trivertex(DataInputStream input) throws IOException {
  23.                 x = input.readUnsignedByte();
  24.                 y = input.readUnsignedByte();
  25.                 z = input.readUnsignedByte();
  26.                 lightNormalIndex = input.readUnsignedByte();
  27.         }
  28. }
  29.  
  30.