home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Late Night VRML 2.0 with Java CD-ROM
/
code.zip
/
Ch13
/
quake
/
Trivertex.java
< prev
next >
Wrap
Text File
|
1996-11-19
|
851b
|
30 lines
// A triangle vertex from a Quake MDL file
// Written by Bernie Roehl, November 1996
package quake;
import java.io.*;
public class Trivertex {
protected int x, y, z;
protected int lightNormalIndex;
public int getX() { return x; }
public int getY() { return y; }
public int getZ() { return z; }
public int getLightNormalIndex() { return lightNormalIndex; }
public String toString() {
return x + " " + y + " " + z + " (normal " + lightNormalIndex + ")";
}
public Trivertex(DataInputStream input) throws IOException {
x = input.readUnsignedByte();
y = input.readUnsignedByte();
z = input.readUnsignedByte();
lightNormalIndex = input.readUnsignedByte();
}
}