Class ModelCollapseRecord
java.lang.Object
gov.nih.mipav.view.renderer.J3D.model.structures.ModelCollapseRecord
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
FieldsModifier and TypeFieldDescriptionint[]DOCUMENT ME!intconnectivity array indices in [0..TQ-1] that contain VThrow.intnumber of triangles after edge collapse.intedge invalid input: '<'VKeep,VThrow> collapses so that VThrow is replaced by VKeep.intnumber of vertices after edge collapse.intDOCUMENT ME! -
Constructor Summary
ConstructorsConstructorDescriptionThe 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 TypeMethodDescriptionvoidload(RandomAccessFile kIn) Support for loading the collapse records from a binary file.voidprint(PrintWriter kOut) Support for saving the collapse records to a text file.voidsave(RandomAccessFile kOut) Support for saving the collapse records to a binary file.
-
Field Details
-
m_aiIndex
public int[] m_aiIndexDOCUMENT ME! -
m_iIQuantity
public int m_iIQuantityconnectivity array indices in [0..TQ-1] that contain VThrow. -
m_iTQuantity
public int m_iTQuantitynumber of triangles after edge collapse. -
m_iVKeep
public int m_iVKeepedge invalid input: '<'VKeep,VThrow> collapses so that VThrow is replaced by VKeep. -
m_iVQuantity
public int m_iVQuantitynumber of vertices after edge collapse. -
m_iVThrow
public int m_iVThrowDOCUMENT 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 collapseiVThrow- the index for the vertex to be thrown away during an edge collapseiVQuantity- 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
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
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
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
-