|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
The interface FileReader will be implemented by all object
classes that read and interpret 3d-object files.
| Method Summary | |
void |
dispose()
Deletes all data aquired from the file. |
int |
getNrOfPoints()
Returns the number of points in the object. |
int |
getNrOfTriangles()
Returns the number of triangles in the object. |
int[] |
getPoint(int index)
Returns the point with the specified index as an array. |
int[][] |
getTriangle(int nr)
Returns data to construct a 3D triangle from. |
boolean |
hasErrors()
Determines if an error occured in processing the object. |
| Method Detail |
public void dispose()
public int getNrOfPoints()
public int getNrOfTriangles()
public int[] getPoint(int index)
index - index of the pointpublic int[][] getTriangle(int nr)
The array is constructed as follows:
[0][0] = id of start point of edge 1
[0][1] = id of end point of edge 1
[1][0] = id of start point of edge 2
[1][1] = id of end point of edge 2
[2][0] = id of start point of edge 3
[2][1] = id of end point of edge 3
[3][0] = triangle color
nr - number of the triangle in the file
int containg the point array
indices of the start and end points of the three
edges of a triangle.public boolean hasErrors()
true if an error has occured, false
if everything is ok
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||