Documentation of 'com.seisw.util.geom.Clip' Java class
Clip
com.seisw.util.geom

Class Clip



  • public class Clip
    extends java.lang.Object
    Clip is a Java version of the General Poly Clipper algorithm developed by Alan Murta (gpc@cs.man.ac.uk). The home page for the original source can be found at http://www.cs.man.ac.uk/aig/staff/alan/software/.

    polyClass: Some of the public methods below take a polyClass argument. This java.lang.Class object is assumed to implement the Poly interface and have a no argument constructor. This was done so that the user of the algorithm could create their own classes that implement the Poly interface and still uses this algorithm.

    Implementation Note: The converted algorithm does support the difference operation, but a public method has not been provided and it has not been tested. To do so, simply follow what has been done for intersection.

    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static Poly diff(Poly p1, Poly p2)
      Return the difference of p2 from p1 where the return type is of PolyDefault.
      static Poly diff(Poly p1, Poly p2, java.lang.Class class1) 
      static Poly intersection(Poly p1, Poly p2)
      Return the intersection of p1 and p2 where the return type is of PolyDefault.
      static Poly intersection(Poly p1, Poly p2, java.lang.Class polyClass)
      e return type is of polyClass.
      static Poly union(Poly p1, Poly p2)
      Return the union of p1 and p2 where the return type is of PolyDefault.
      static Poly union(Poly p1, Poly p2, java.lang.Class polyClass)
      Return the union of p1 and p2 where the return type is of polyClass.
      static Poly xor(Poly p1, Poly p2)
      Return the xor of p1 and p2 where the return type is of PolyDefault.
      static Poly xor(Poly p1, Poly p2, java.lang.Class polyClass)
      Return the xor of p1 and p2 where the return type is of polyClass.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • intersection

        public static Poly intersection(Poly p1,
                                        Poly p2,
                                        java.lang.Class polyClass)
        e return type is of polyClass. See the note in the class description for more on polyClass.
        Parameters:
        p1 - One of the polygons to performt he intersection with
        p2 - One of the polygons to performt he intersection with
        polyClass - The type of Poly to return
      • union

        public static Poly union(Poly p1,
                                 Poly p2,
                                 java.lang.Class polyClass)
        Return the union of p1 and p2 where the return type is of polyClass. See the note in the class description for more on polyClass.
        Parameters:
        p1 - One of the polygons to performt he union with
        p2 - One of the polygons to performt he union with
        polyClass - The type of Poly to return
      • xor

        public static Poly xor(Poly p1,
                               Poly p2,
                               java.lang.Class polyClass)
        Return the xor of p1 and p2 where the return type is of polyClass. See the note in the class description for more on polyClass.
        Parameters:
        p1 - One of the polygons to performt he xor with
        p2 - One of the polygons to performt he xor with
        polyClass - The type of Poly to return
      • intersection

        public static Poly intersection(Poly p1,
                                        Poly p2)
        Return the intersection of p1 and p2 where the return type is of PolyDefault.
        Parameters:
        p1 - One of the polygons to performt he intersection with
        p2 - One of the polygons to performt he intersection with
      • union

        public static Poly union(Poly p1,
                                 Poly p2)
        Return the union of p1 and p2 where the return type is of PolyDefault.
        Parameters:
        p1 - One of the polygons to performt he union with
        p2 - One of the polygons to performt he union with
      • xor

        public static Poly xor(Poly p1,
                               Poly p2)
        Return the xor of p1 and p2 where the return type is of PolyDefault.
        Parameters:
        p1 - One of the polygons to performt he xor with
        p2 - One of the polygons to performt he xor with
      • diff

        public static Poly diff(Poly p1,
                                Poly p2)
        Return the difference of p2 from p1 where the return type is of PolyDefault.
        Parameters:
        p1 - The polygon to subtract from.
        p2 - The polygon to subtract.
      • diff

        public static Poly diff(Poly p1,
                                Poly p2,
                                java.lang.Class class1)

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.