Class Surface

java.lang.Object
jaba.Hull.Surface
Direct Known Subclasses:
DSurface

public class Surface extends Object
A class representing a surface.
Version:
1.1
Author:
Chris Pudney cpudney@alphapharm.pharm.uwa.edu.au
  • Constructor Details

    • Surface

      public Surface()
      Construct a surface containing no faces.
    • Surface

      public Surface(Vector<Polygon> f)
      Construct a surface given a list of faces.
      Parameters:
      f - the list of faces
  • Method Details

    • getFaces

      public Vector<Polygon> getFaces()
      Get the faces of a surfaces.
      Returns:
      The vector of polygons that make up the surface.
    • setFaces

      public void setFaces(Vector<Polygon> f)
      Set the faces of a surfaces.
    • getVertices

      public Vector<Vertex> getVertices()
      Get the vertices of a surface.
      Returns:
      The vector of vertices that make up a surface.
    • writeOFF

      public void writeOFF(PrintWriter pw) throws IOException
      Write an OFF file that describes a surface. OFF files can be viewed using Geomview http://www.geom.umn.edu/software/download/geomview.html
      Parameters:
      pw - A PrintWriter for the file
      Throws:
      IOException - if the operation cannot be completed
    • toString

      public String toString()
      Returns a string describing a surface.
      Overrides:
      toString in class Object