Class FileSurfaceXML_J3D


public class FileSurfaceXML_J3D extends FileSurfaceXML
Inherits from FileXML, reads Surface.XML files based on the "surface.xsd" file. Defines specific variables for reading and writing surface.xml files:
  • Constructor Details

    • FileSurfaceXML_J3D

      public FileSurfaceXML_J3D(String fName, String fDir)
      Constructs new file object.
      Parameters:
      fName - File name.
      fDir - File directory.
  • Method Details

    • finalize

      public void finalize()
      Prepares class for cleanup.
      Overrides:
      finalize in class FileSurfaceXML
    • getFileInfo

      public FileInfoSurfaceXML_J3D getFileInfo()
      Returns the FileInfoSurfaceXML read from the file.
      Overrides:
      getFileInfo in class FileSurfaceXML
      Returns:
      File info read from file, or null if it has not been read.
    • readSurfaceXML

      public FileInfoSurfaceXML_J3D readSurfaceXML(String headerFileName, String headerDir) throws IOException
      Reads and parses a Surface.XML header.
      Parameters:
      headerFileName - file name of xml header
      headerDir - directory
      Returns:
      FileInfoSurfaceXML
      Throws:
      IOException - file exception
    • writeHeader

      public boolean writeHeader(String headerName, String headerDir, ModelTriangleMesh[] kMesh, javax.media.j3d.Material kMaterial, float opacity, int levelDetail) throws IOException
      Writes the XML header information, including the ModelTriangleMesh surface out to the given filename and path:
      Parameters:
      headerName - file name to write to
      headerDir - name of directory to write to
      kMesh - ModelTriangleMesh representing the surface
      kMaterial - surface material
      opacity - DOCUMENT ME!
      levelDetail - DOCUMENT ME!
      Returns:
      if header write was successful
      Throws:
      IOException - if a file I/O problem is encoutered while writing the header
    • writeXMLsurface

      public boolean writeXMLsurface(String fileName, ModelTriangleMesh kMesh, javax.media.j3d.Material kMaterial, float opacity, int levelDetail) throws IOException
      Writes the XML file information, including the ModelTriangleMesh surface out to the given filename and path:
      Parameters:
      fileName - file name to write to
      kMesh - ModelTriangleMesh representing the surface
      kMaterial - surface material
      opacity - DOCUMENT ME!
      levelDetail - DOCUMENT ME!
      Returns:
      if header write was successful
      Throws:
      IOException - if a file I/O problem is encoutered while writing the header