Class FileSurfaceRefXML_J3D


public class FileSurfaceRefXML_J3D extends FileSurfaceRefXML
Inherits from FileXML, reads SurfaceRef.XML files based on the "surfaceref.xsd" file. Defines specific variables for reading and writing surfaceref.xml files:
  • Constructor Details

    • FileSurfaceRefXML_J3D

      public FileSurfaceRefXML_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 FileSurfaceRefXML
    • getFileInfo

      public FileInfoSurfaceRefXML_J3D getFileInfo()
      Returns the FileInfoSurfaceRefXML read from the file.
      Returns:
      File info read from file, or null if it has not been read.
    • readSurfaceXML

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

      public boolean writeHeader(String headerName, String headerDir, 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
      kMaterial - surface material
      opacity - surface opacity
      levelDetail - surface level of detail
      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, 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
      kMaterial - surface material
      opacity - surface opacity
      levelDetail - surface level of detail
      Returns:
      if header write was successful
      Throws:
      IOException - if a file I/O problem is encoutered while writing the header