|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdemo.helicopter.CollisionDetectionTerrainReader
Field Summary | |
java.util.Vector |
data
|
java.util.Vector |
index
|
int[] |
xCoordIndexArray
|
double[] |
xFacetNormal
|
double[] |
xValsArray
|
int[] |
yCoordIndexArray
|
double[] |
yFacetNormal
|
double[] |
yValsArray
|
int[] |
zCoordIndexArray
|
double[] |
zFacetNormal
|
double[] |
zValsArray
|
Constructor Summary | |
CollisionDetectionTerrainReader()
|
Method Summary | |
void |
calcNormals()
calcNormals() - calculates the normals from the information from the terrain file |
void |
createArrayData(java.io.StreamTokenizer st)
createArrayData() - creates the array data from the data from the input terrain file |
void |
createFullArray()
createFullArray() - create complete array of all coordinate data using index information |
boolean |
extractArrayValues()
extractArrayValues() - processes each token and puts in vector if its a vertex |
void |
getNormalHeight(double xCoord,
double yCoord,
double[] normalHeight)
getNormalHeight - return normal vector of current location in array indices 0-2 and height in position 3 |
static void |
main(java.lang.String[] args)
Main routine for CollisionDetectionTerrainReader clss |
void |
parseFile()
parseFile() - the parsfile for reading the terrain |
void |
transform()
transform ()- rotate and translate coordinates into VRML; for rotate about axis v vector where u = normal(v) S = Matrix[(0,-u3,u2) (u3,0,-u1) (-u2,u1,0)] R (rotation matrix) = u*u + cos(alpha)*(Identity -u*u) + sin(alpha)*S then translate VRML into PDU coordinates |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public double[] xValsArray
public double[] yValsArray
public double[] zValsArray
public int[] xCoordIndexArray
public int[] yCoordIndexArray
public int[] zCoordIndexArray
public double[] xFacetNormal
public double[] yFacetNormal
public double[] zFacetNormal
public java.util.Vector data
public java.util.Vector index
Constructor Detail |
public CollisionDetectionTerrainReader()
Method Detail |
public void parseFile()
public void createArrayData(java.io.StreamTokenizer st)
public boolean extractArrayValues()
public void transform()
public void createFullArray()
public void calcNormals()
being used.
public void getNormalHeight(double xCoord, double yCoord, double[] normalHeight)
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |