fileconvert
Class Info3d

java.lang.Object
  |
  +--fileconvert.Info3d

public class Info3d
extends java.lang.Object

A container class for storing all the 3d Information


Field Summary
 cern.colt.list.FloatArrayList[] gcoords
          The Array containing the vertex information
 int pos
          An integer added as a convenience for use as an index for gcoords
 int tpos
          An integer added as a convenience for use as an index for triangles
 cern.colt.list.IntArrayList triangles
          The array containing the face information.
static int x
          gcoords[x].get(int) gives the current x coordinate
static int y
          gcoords[x].get(int) gives the current x coordinate
static int z
          gcoords[x].get(int) gives the current x coordinate
 
Constructor Summary
Info3d()
          Creates new instance of Info3d
 
Method Summary
 void add(coord c)
          Adds a 3d coordinate to the to the vertex list gcoords
 void add(cern.colt.list.FloatArrayList[] temp)
          Adds an array of vertices to the current gcoords array
 void add(Info3d temp)
          Adds information from another Info3d to the current one
 void add(cern.colt.list.IntArrayList temp)
          Adds an IntArrayList of faces to the current one
 void reset()
          Resets pos and tpos to 0
 void writetriangles()
          If the face array is empty, this function writes triangular faces based on the current vertices
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

gcoords

public cern.colt.list.FloatArrayList[] gcoords
The Array containing the vertex information

triangles

public cern.colt.list.IntArrayList triangles
The array containing the face information. Currently fileconv requires triangulation and therefore the size of this Array must be a multiple of 3

pos

public int pos
An integer added as a convenience for use as an index for gcoords

tpos

public int tpos
An integer added as a convenience for use as an index for triangles

x

public static final int x
gcoords[x].get(int) gives the current x coordinate

y

public static final int y
gcoords[x].get(int) gives the current x coordinate

z

public static final int z
gcoords[x].get(int) gives the current x coordinate
Constructor Detail

Info3d

public Info3d()
Creates new instance of Info3d
Method Detail

reset

public void reset()
Resets pos and tpos to 0

add

public void add(Info3d temp)
Adds information from another Info3d to the current one
Parameters:
temp - The Info3d that needs to be added to this one

add

public void add(cern.colt.list.IntArrayList temp)
Adds an IntArrayList of faces to the current one
Parameters:
temp - The face array list that needs to be added

add

public void add(coord c)
Adds a 3d coordinate to the to the vertex list gcoords
Parameters:
c - The 3d coordinate that needs to be added to the vertex list

add

public void add(cern.colt.list.FloatArrayList[] temp)
Adds an array of vertices to the current gcoords array
Parameters:
temp - The vertex array to be added The array should be an array of 3 FloatArrayLists with x being in index 0, y in index 1 and z in index 2

writetriangles

public void writetriangles()
If the face array is empty, this function writes triangular faces based on the current vertices