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 Detail

      • FileSurfaceXML_J3D

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

      • readSurfaceXML

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

        public boolean writeHeader​(java.lang.String headerName,
                                   java.lang.String headerDir,
                                   ModelTriangleMesh[] kMesh,
                                   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
        kMesh - ModelTriangleMesh representing the surface
        kMaterial - surface material
        opacity - DOCUMENT ME!
        levelDetail - DOCUMENT ME!
        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,
                                       ModelTriangleMesh kMesh,
                                       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
        kMesh - ModelTriangleMesh representing the surface
        kMaterial - surface material
        opacity - DOCUMENT ME!
        levelDetail - DOCUMENT ME!
        Returns:
        if header write was successful
        Throws:
        java.io.IOException - if a file I/O problem is encoutered while writing the header