net.sourceforge.arbaro.mesh
Class MeshPart

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.MeshPart
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable, java.util.Collection, java.util.List, java.util.RandomAccess

public class MeshPart
extends java.util.Vector

A class for creation, handling and output of a piece of a mesh object. A mesh part represents a stem of the tree.

Author:
wdiestel
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.Vector
capacityIncrement, elementCount, elementData
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
MeshPart(Stem stem, boolean useNormals, boolean useQuads)
           
 
Method Summary
 void addSection(MeshSection section)
          Adds a mesh section to the mesh part.
 java.util.Enumeration allFaces(Mesh mesh, int startIndex, boolean UVFaces)
           
 java.util.Enumeration allVertices(boolean UVVertices)
           
 int faceCount()
           
 java.util.Vector faces(long inx, MeshSection section)
           
 int getLevel()
           
 Stem getStem()
           
 java.lang.String getTreePosition()
           
 void setNormals(boolean checkNull)
          Sets the normals in all mesh sections
 int uvCount()
           
 java.util.Vector uvFaces(long inx, MeshSection section, Mesh mesh)
           
 int vertexCount()
           
 java.util.Vector vFaces(MeshSection section)
           
 
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
 

Constructor Detail

MeshPart

public MeshPart(Stem stem,
                boolean useNormals,
                boolean useQuads)
Method Detail

getStem

public Stem getStem()

getTreePosition

public java.lang.String getTreePosition()

getLevel

public int getLevel()

addSection

public void addSection(MeshSection section)
Adds a mesh section to the mesh part.

Parameters:
section -

allVertices

public java.util.Enumeration allVertices(boolean UVVertices)

allFaces

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

setNormals

public void setNormals(boolean checkNull)
Sets the normals in all mesh sections


vertexCount

public int vertexCount()
Returns:
the number of all meshpoints of all sections

uvCount

public int uvCount()
Returns:
the number of uv vectors for the mesh part

faceCount

public int faceCount()
Returns:
the number of faces, that have to be created - povray wants to know this before the faces itself

faces

public java.util.Vector faces(long inx,
                              MeshSection section)
                       throws MeshException
Parameters:
inx -
section -
Returns:
the triangles between a section and the next section.
Throws:
MeshException

vFaces

public java.util.Vector vFaces(MeshSection section)
                        throws MeshException
Parameters:
section -
Returns:
the triangles between a section and the next section.
Throws:
MeshException

uvFaces

public java.util.Vector uvFaces(long inx,
                                MeshSection section,
                                Mesh mesh)
                         throws MeshException
Parameters:
inx -
section -
Returns:
the texture's uv-coordinates of the triangles between a section and the next section.
Throws:
MeshException