Class FileSurfaceRefXML_WM


public class FileSurfaceRefXML_WM 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_WM

      public FileSurfaceRefXML_WM(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_WM 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_WM readSurfaceXML(String headerFileName, String headerDir)
      Reads and parses a SurfaceRef.XML header.
      Parameters:
      headerFileName - file name of xml header
      headerDir - directory
      Returns:
      FileInfoSurfaceRefXML
      Throws:
      IOException - file exception
    • writeXMLsurface_WM

      public boolean writeXMLsurface_WM(String fileName, WildMagic.LibGraphics.Rendering.MaterialState kMaterial, float opacity, int levelDetail) throws IOException
      Writes the XML file information, including the 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 encountered while writing the header