Class ModelCollapseRecord


  • public class ModelCollapseRecord
    extends java.lang.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[] m_aiIndex
      DOCUMENT ME!
      int m_iIQuantity
      connectivity array indices in [0..TQ-1] that contain VThrow.
      int m_iTQuantity
      number of triangles after edge collapse.
      int m_iVKeep
      edge collapses so that VThrow is replaced by VKeep.
      int m_iVQuantity
      number of vertices after edge collapse.
      int m_iVThrow
      DOCUMENT ME!
    • Constructor Summary

      Constructors 
      Constructor Description
      ModelCollapseRecord()
      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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void load​(java.io.RandomAccessFile kIn)
      Support for loading the collapse records from a binary file.
      void print​(java.io.PrintWriter kOut)
      Support for saving the collapse records to a text file.
      void save​(java.io.RandomAccessFile kOut)
      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 Detail

      • 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 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 Detail

      • 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
        iTQuantity - the number of triangles that are deleted from the mesh because of the collapse of edge
    • Method Detail

      • load

        public void load​(java.io.RandomAccessFile kIn)
                  throws java.io.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:
        java.io.IOException - if the there is an error reading from the file
      • print

        public void print​(java.io.PrintWriter kOut)
                   throws java.io.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:
        java.io.IOException - if the there is an error writing to the file
      • save

        public void save​(java.io.RandomAccessFile kOut)
                  throws java.io.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:
        java.io.IOException - if the there is an error writing to the file