net.sourceforge.arbaro.mesh
Class Mesh

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.Vector
              extended by net.sourceforge.arbaro.mesh.Mesh
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable, java.util.Collection, java.util.List, java.util.RandomAccess

public class Mesh
extends java.util.Vector

A class for creation, handling and output of a mesh object. A Mesh consists of MeshParts which are tube like objects, made from MeshSections. See the this diagram:

Author:
Wolfram Diestel
See Also:
Serialized Form

Field Summary
 int[] firstMeshPart
           
 
Fields inherited from class java.util.Vector
capacityIncrement, elementCount, elementData
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
Mesh(int levels)
           
 
Method Summary
 void addMeshpart(MeshPart meshpart)
          Adds a mesh part (i.e. a stem) to the mesh.
 java.util.Enumeration allFaces(int startIndex, boolean UVFaces, int stemLevel)
           
 java.util.Enumeration allParts(int stemLevel)
           
 java.util.Enumeration allVertices(boolean UVVertices)
           
 int faceCount()
          Returns the total number of faces, that has to be created for the mesh.
 int firstUVIndex(int level)
          Returns the index of the first uv-vector, of the given level
 int uvCount()
          Returns the total number of uv-vectors, that has to be created for the mesh.
 int vertexCount()
          Returns the total number of vertices in the mesh.
 
Methods inherited from class java.util.Vector
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize
 
Methods inherited from class java.util.AbstractList
iterator, listIterator, listIterator
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
iterator, listIterator, listIterator
 

Field Detail

firstMeshPart

public int[] firstMeshPart
Constructor Detail

Mesh

public Mesh(int levels)
Method Detail

addMeshpart

public void addMeshpart(MeshPart meshpart)
Adds a mesh part (i.e. a stem) to the mesh.

Parameters:
meshpart -

allVertices

public java.util.Enumeration allVertices(boolean UVVertices)

allFaces

public java.util.Enumeration allFaces(int startIndex,
                                      boolean UVFaces,
                                      int stemLevel)

allParts

public java.util.Enumeration allParts(int stemLevel)

vertexCount

public int vertexCount()
Returns the total number of vertices in the mesh.

Returns:
total number of vertices in the mesh

faceCount

public int faceCount()
Returns the total number of faces, that has to be created for the mesh. Povray wants to know this before the faces itself.

Returns:
total number of faces, that has to be created for the mesh

uvCount

public int uvCount()
Returns the total number of uv-vectors, that has to be created for the mesh. Povray wants to know this before the uv vectors itself.

Returns:
total number of uv-vectors, that has to be created for the mesh

firstUVIndex

public int firstUVIndex(int level)
Returns the index of the first uv-vector, of the given level

Parameters:
level - level
Returns:
index of the first uv-vector, of the given level