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 Detail

      • FileSurfaceRefXML_J3D

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

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

        public boolean writeHeader​(java.lang.String headerName,
                                   java.lang.String headerDir,
                                   javax.media.j3d.Material kMaterial,
                                   float opacity,
                                   int levelDetail)
                            throws java.io.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:
        java.io.IOException - if a file I/O problem is encoutered while writing the header
      • writeXMLsurface

        public boolean writeXMLsurface​(java.lang.String fileName,
                                       javax.media.j3d.Material kMaterial,
                                       float opacity,
                                       int levelDetail)
                                throws java.io.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:
        java.io.IOException - if a file I/O problem is encoutered while writing the header