Class ModelCollapseRecord

java.lang.Object
gov.nih.mipav.view.renderer.J3D.model.structures.ModelCollapseRecord

public class ModelCollapseRecord extends Object
A simple triangle mesh that represents a level surface. The mesh only stores vertex positions and vertex normals. The surface viewer creates a Shape3D object whose geometry is an object from ModelTriangleMesh. The surface color is provided by attaching to the Shape3D object an appearance that contains a material. The vertex normals in ModelTriangleMesh are used by the lighting system in conjunction with the surface material to produce the surface color.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    int[]
    DOCUMENT ME!
    int
    connectivity array indices in [0..TQ-1] that contain VThrow.
    int
    number of triangles after edge collapse.
    int
    edge invalid input: '<'VKeep,VThrow> collapses so that VThrow is replaced by VKeep.
    int
    number of vertices after edge collapse.
    int
    DOCUMENT ME!
  • Constructor Summary

    Constructors
    Constructor
    Description
    The default constructor is used by ModelClodMesh for creating a record before loading its data from disk.
    ModelCollapseRecord(int iVKeep, int iVThrow, int iVQuantity, int iTQuantity)
    This constructor is only used by the class ModelSurfaceDecimator for creating records from edge collapse data during the edge collapse process.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Support for loading the collapse records from a binary file.
    void
    Support for saving the collapse records to a text file.
    void
    Support for saving the collapse records to a binary file.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • m_aiIndex

      public int[] m_aiIndex
      DOCUMENT ME!
    • m_iIQuantity

      public int m_iIQuantity
      connectivity array indices in [0..TQ-1] that contain VThrow.
    • m_iTQuantity

      public int m_iTQuantity
      number of triangles after edge collapse.
    • m_iVKeep

      public int m_iVKeep
      edge invalid input: '<'VKeep,VThrow> collapses so that VThrow is replaced by VKeep.
    • m_iVQuantity

      public int m_iVQuantity
      number of vertices after edge collapse.
    • m_iVThrow

      public int m_iVThrow
      DOCUMENT ME!
  • Constructor Details

    • ModelCollapseRecord

      public ModelCollapseRecord()
      The default constructor is used by ModelClodMesh for creating a record before loading its data from disk. It is also used by the class ModelSurfaceDecimator for creating records that need to be initialized from other records already created during the edge collapse process.
    • ModelCollapseRecord

      public ModelCollapseRecord(int iVKeep, int iVThrow, int iVQuantity, int iTQuantity)
      This constructor is only used by the class ModelSurfaceDecimator for creating records from edge collapse data during the edge collapse process.
      Parameters:
      iVKeep - the index for the vertex to be kept during an edge collapse
      iVThrow - the index for the vertex to be thrown away during an edge collapse
      iVQuantity - the number of vertices that are deleted from the mesh because of the collapse of edge invalid input: '<'VKeep,VThrow>
      iTQuantity - the number of triangles that are deleted from the mesh because of the collapse of edge invalid input: '<'VKeep,VThrow>
  • Method Details

    • load

      public void load(RandomAccessFile kIn) throws IOException
      Support for loading the collapse records from a binary file. This function is called by ModelClodMesh.load(RandomAccessFile).
      Parameters:
      kIn - the file from which the records are loaded
      Throws:
      IOException - if the there is an error reading from the file
    • print

      public void print(PrintWriter kOut) throws IOException
      Support for saving the collapse records to a text file. This function is called by ModelClodMesh.print(PrintWriter).
      Parameters:
      kOut - the file to which the records are saved
      Throws:
      IOException - if the there is an error writing to the file
    • save

      public void save(RandomAccessFile kOut) throws IOException
      Support for saving the collapse records to a binary file. This function is called by ModelClodMesh.save(RandomAccessFile).
      Parameters:
      kOut - the file to which the records are saved
      Throws:
      IOException - if the there is an error writing to the file