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 Detail

      • FileSurfaceRefXML_WM

        public FileSurfaceRefXML_WM​(java.lang.String fName,
                                    java.lang.String fDir)
        Constructs new file object.
        Parameters:
        fName - File name.
        fDir - File directory.
    • Method Detail

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

        public boolean writeXMLsurface_WM​(java.lang.String fileName,
                                          WildMagic.LibGraphics.Rendering.MaterialState kMaterial,
                                          float opacity,
                                          int levelDetail)
                                   throws java.io.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:
        java.io.IOException - if a file I/O problem is encountered while writing the header