com.jme.scene.lod
Class CollapseRecord

java.lang.Object
  extended bycom.jme.scene.lod.CollapseRecord

public class CollapseRecord
extends java.lang.Object

CollapseRecord originally ported from David Eberly's c++, modifications and enhancements made from there.

This class keeps an array of vertex index positions that are to be collapsed. It is used to modify ClodMesh objects so that they contain less information.

Version:
$Id: CollapseRecord.java,v 1.5 2004/08/21 00:33:04 cep21 Exp $
Author:
Joshua Slack, Jack Lindamood (javadoc only)

Field Summary
 int[] indices
          An integer value in the Mesh's indices array referencing a vertex to keep or throw.
 int numbIndices
          Lenght of this indices array.
 int numbTriangles
          The number of triangles in the Mesh after edge collapse.
 int numbVerts
           
 int vertToKeep
          An int index in the Mesh's vertex array.
 int vertToThrow
          An int index in the Mesh's vertex array.
 
Constructor Summary
CollapseRecord()
          Creates a new collapse record with all values at their default.
CollapseRecord(int toKeep, int toThrow, int vertQuantity, int triQuantity)
          Creates a new CollapseRecord.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

vertToKeep

public int vertToKeep
An int index in the Mesh's vertex array. It is the vertex assigned from the indices array. Used in collapsing the mesh.


vertToThrow

public int vertToThrow
An int index in the Mesh's vertex array. It is the vertex assigned from the indices array. Used in expanding the mesh.


numbVerts

public int numbVerts

numbTriangles

public int numbTriangles
The number of triangles in the Mesh after edge collapse.


numbIndices

public int numbIndices
Lenght of this indices array.


indices

public int[] indices
An integer value in the Mesh's indices array referencing a vertex to keep or throw.

Constructor Detail

CollapseRecord

public CollapseRecord(int toKeep,
                      int toThrow,
                      int vertQuantity,
                      int triQuantity)
Creates a new CollapseRecord.

Parameters:
toKeep - The vertex index that is kept.
toThrow - The vertex index that is thrown.
vertQuantity - The new vertex quantity of the mesh using this record.
triQuantity - The new triangle quantity of the mesh using this record.

CollapseRecord

public CollapseRecord()
Creates a new collapse record with all values at their default.