com.seisw.util.geom
Class ClipTest

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended bycom.seisw.util.geom.ClipTest
All Implemented Interfaces:
junit.framework.Test

public class ClipTest
extends junit.framework.TestCase

ClipTest is a suite of unit tests for testing Clip. Clip is a Java conversion of the General Poly Clipper algorithm developed by Alan Murta (gpc@cs.man.ac.uk).

Author:
Dan Bridenbecker, Solution Engineering, Inc.

Constructor Summary
ClipTest(java.lang.String name)
           
 
Method Summary
static void main(java.lang.String[] args)
          Provides the ability to run the tests contained here in.
protected  void setUp()
          Construct and initialize any objects that will be used in multiple tests.
static junit.framework.TestSuite suite()
          Return the suite of tests
protected  void tearDown()
           
 void testIntersectionEmptySet()
          Test the intersection of two polygons that are completely separate - result should be empty set.
 void testIntersectionOneContainsTwo()
          Test the intersection of two polygons where the second is contained in the first.
 void testIntersectionPolyFourSides()
          Test the intersection of two complex, non-convex, non-self-intersecting polygons - cross four sides
 void testIntersectionPolyOneOnTopOfTwo()
          Test the intersection of two complex, non-convex, non-self-intersecting polygons - 1 on top of two = empty
 void testIntersectionPolyTwoSides()
          Test the intersection of two complex, non-convex, non-self-intersecting polygons - two sides
 void testIntersectionPolyTwoSidesAndLowerVertex()
          Test the intersection of two complex, non-convex, non-self-intersecting polygons - two sides and one vertex - the lower one
 void testIntersectionPolyTwoSidesOneVertex()
          Test the intersection of two complex, non-convex, non-self-intersecting polygons - two sides and one vertex - two triangles
 void testIntersectionPolyVOverlaps()
          Test the intersection of two complex, non-convex, non-self-intersecting polygons - V overlap
 void testIntersectionRectangleHole()
          Test the intersection of a rectangle with a hole and solid rectangle
 void testIntersectionRectCorner1()
          Test the intersection of two rectangles that share one corner and two partial sides.
 void testIntersectionRectCorner2()
          Test the intersection of two rectangles that share one corner and two partial sides.
 void testIntersectionRectCorner3()
          Test the intersection of two rectangles that share one corner and two partial sides.
 void testIntersectionRectCorner4()
          Test the intersection of two rectangles that share one corner and two partial sides.
 void testIntersectionRectInterCorner1()
          Test the intersection of two rectangles that intersect on corner
 void testIntersectionRectInterCorner2()
          Test the intersection of two rectangles that intersect on corner
 void testIntersectionRectInterCorner3()
          Test the intersection of two rectangles that intersect on corner
 void testIntersectionRectInterCorner4()
          Test the intersection of two rectangles that intersect on corner
 void testIntersectionRectInterSide1()
          Test the intersection of two rectangles where half of one is contained in the other and two sides of the inner cross one side of the outer.
 void testIntersectionRectInterSide2()
          Test the intersection of two rectangles where half of one is contained in the other and two sides of the inner cross one side of the outer.
 void testIntersectionRectInterSide3()
          Test the intersection of two rectangles where half of one is contained in the other and two sides of the inner cross one side of the outer.
 void testIntersectionRectInterSide4()
          Test the intersection of two rectangles where half of one is contained in the other and two sides of the inner cross one side of the outer.
 void testIntersectionTwoContainsOne()
          Test the intersection of two polygons where the first is contained in the second.
 void testIntersectionTwoEqual()
          Test the intersection of two polygons that are equal.
 void testUnionOneContainsTwo()
          Test the union of two polygons where the second is contained in the first.
 void testUnionPolyFourSides()
          Test the union of two complex, non-convex, non-self-intersecting polygons - cross four sides
 void testUnionPolyOneOnTopOfTwo()
          Test the union of two complex, non-convex, non-self-intersecting polygons - 1 on top of two
 void testUnionPolyTwoSides()
          Test the union of two complex, non-convex, non-self-intersecting polygons - two sides
 void testUnionPolyTwoSidesAndLowerVertex()
          Test the union of two complex, non-convex, non-self-intersecting polygons - two sides and one vertex - the lower one
 void testUnionPolyTwoSidesOneVertex()
          Test the union of two complex, non-convex, non-self-intersecting polygons - two sides and one vertex - two triangles
 void testUnionPolyVOverlaps()
          Test the union of two complex, non-convex, non-self-intersecting polygons - V overlap
 void testUnionRectangleHole()
          Test the UNION of a rectangle with a hole and solid rectangle
 void testUnionRectCorner1()
          Test the union of two rectangles that share one corner and two partial sides.
 void testUnionRectCorner2()
          Test the UNION of two rectangles that share one corner and two partial sides.
 void testUnionRectCorner3()
          Test the union of two rectangles that share one corner and two partial sides.
 void testUnionRectCorner4()
          Test the union of two rectangles that share one corner and two partial sides.
 void testUnionRectInterCorner1()
          Test the union of two rectangles that intersect on corner
 void testUnionRectInterCorner2()
          Test the union of two rectangles that intersect on corner
 void testUnionRectInterCorner3()
          Test the union of two rectangles that intersect on corner
 void testUnionRectInterCorner4()
          Test the union of two rectangles that intersect on corner
 void testUnionRectInterSide1()
          Test the union of two rectangles where half of one is contained in the other and two sides of the inner cross one side of the outer.
 void testUnionRectInterSide2()
          Test the union of two rectangles where half of one is contained in the other and two sides of the inner cross one side of the outer.
 void testUnionRectInterSide3()
          Test the union of two rectangles where half of one is contained in the other and two sides of the inner cross one side of the outer.
 void testUnionRectInterSide4()
          Test the union of two rectangles where half of one is contained in the other and two sides of the inner cross one side of the outer.
 void testUnionSeparate()
          Test the UNION of two polygons that are completely separate - result should be poly that contains these two polys
 void testUnionTwoContainsOne()
          Test the union of two polygons where the first is contained in the second.
 void testUnionTwoEqual()
          Test the union of two polygons that are equal.
 void testXornRectInterSide2()
          Test the xor of two rectangles where half of one is contained in the other and two sides of the inner cross one side of the outer.
 void testXorOneContainsTwo()
          Test the xor of two polygons where the second is contained in the first.
 void testXorPolyFourSides()
          Test the xor of two complex, non-convex, non-self-intersecting polygons - cross four sides
 void testXorPolyOneOnTopOfTwo()
          Test the xor of two complex, non-convex, non-self-intersecting polygons - 1 on top of two
 void testXorPolyTwoSides()
          Test the xor of two complex, non-convex, non-self-intersecting polygons - two sides
 void testXorPolyTwoSidesAndLowerVertex()
          Test the xor of two complex, non-convex, non-self-intersecting polygons - two sides and one vertex - the lower one
 void testXorPolyTwoSidesOneVertex()
          Test the xor of two complex, non-convex, non-self-intersecting polygons - two sides and one vertex - two triangles
 void testXorPolyVOverlaps()
          Test the xor of two complex, non-convex, non-self-intersecting polygons - V overlap
 void testXorRectangleHole()
          Test the xor of a rectangle with a hole and solid rectangle
 void testXorRectCorner1()
          Test the xor of two rectangles that share one corner and two partial sides.
 void testXorRectCorner2()
          Test the xor of two rectangles that share one corner and two partial sides.
 void testXorRectCorner3()
          Test the xor of two rectangles that share one corner and two partial sides.
 void testXorRectCorner4()
          Test the xor of two rectangles that share one corner and two partial sides.
 void testXorRectInterCorner1()
          Test the xor of two rectangles that intersect on corner
 void testXorRectInterCorner2()
          Test the xor of two rectangles that intersect on corner
 void testXorRectInterCorner4()
          Test the xor of two rectangles that intersect on corner
 void testXorRectInterSide1()
          Test the xor of two rectangles where half of one is contained in the other and two sides of the inner cross one side of the outer.
 void testXorRectInterSide3()
          Test the xor of two rectangles where half of one is contained in the other and two sides of the inner cross one side of the outer.
 void testXorRectInterSide4()
          Test the xor of two rectangles where half of one is contained in the other and two sides of the inner cross one side of the outer.
 void testXorSeparate()
          Test the XOR of two polygons that are completely separate - result should be poly that contains these two polys
 void testXortRectInterCorner3()
          Test the xor of two rectangles that intersect on corner
 void testXorTwoContainsOne()
          Test the xor of two polygons where the first is contained in the second.
 void testXorTwoEqual()
          Test the xor of two polygons that are equal.
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ClipTest

public ClipTest(java.lang.String name)
Parameters:
name - Name of test case
Method Detail

main

public static void main(java.lang.String[] args)
Provides the ability to run the tests contained here in.

Parameters:
args - Command line arguements.

suite

public static junit.framework.TestSuite suite()
Return the suite of tests


setUp

protected void setUp()
Construct and initialize any objects that will be used in multiple tests. tests. Currently Empty.


tearDown

protected void tearDown()

testIntersectionEmptySet

public void testIntersectionEmptySet()
Test the intersection of two polygons that are completely separate - result should be empty set.


testIntersectionOneContainsTwo

public void testIntersectionOneContainsTwo()
Test the intersection of two polygons where the second is contained in the first.


testIntersectionTwoContainsOne

public void testIntersectionTwoContainsOne()
Test the intersection of two polygons where the first is contained in the second.


testIntersectionTwoEqual

public void testIntersectionTwoEqual()
Test the intersection of two polygons that are equal.


testIntersectionRectCorner1

public void testIntersectionRectCorner1()
Test the intersection of two rectangles that share one corner and two partial sides.


testIntersectionRectCorner2

public void testIntersectionRectCorner2()
Test the intersection of two rectangles that share one corner and two partial sides.


testIntersectionRectCorner3

public void testIntersectionRectCorner3()
Test the intersection of two rectangles that share one corner and two partial sides.


testIntersectionRectCorner4

public void testIntersectionRectCorner4()
Test the intersection of two rectangles that share one corner and two partial sides.


testIntersectionRectInterCorner1

public void testIntersectionRectInterCorner1()
Test the intersection of two rectangles that intersect on corner


testIntersectionRectInterCorner2

public void testIntersectionRectInterCorner2()
Test the intersection of two rectangles that intersect on corner


testIntersectionRectInterCorner3

public void testIntersectionRectInterCorner3()
Test the intersection of two rectangles that intersect on corner


testIntersectionRectInterCorner4

public void testIntersectionRectInterCorner4()
Test the intersection of two rectangles that intersect on corner


testIntersectionRectInterSide1

public void testIntersectionRectInterSide1()
Test the intersection of two rectangles where half of one is contained in the other and two sides of the inner cross one side of the outer.


testIntersectionRectInterSide2

public void testIntersectionRectInterSide2()
Test the intersection of two rectangles where half of one is contained in the other and two sides of the inner cross one side of the outer.


testIntersectionRectInterSide3

public void testIntersectionRectInterSide3()
Test the intersection of two rectangles where half of one is contained in the other and two sides of the inner cross one side of the outer.


testIntersectionRectInterSide4

public void testIntersectionRectInterSide4()
Test the intersection of two rectangles where half of one is contained in the other and two sides of the inner cross one side of the outer.


testIntersectionPolyOneOnTopOfTwo

public void testIntersectionPolyOneOnTopOfTwo()
Test the intersection of two complex, non-convex, non-self-intersecting polygons - 1 on top of two = empty


testIntersectionPolyTwoSidesOneVertex

public void testIntersectionPolyTwoSidesOneVertex()
Test the intersection of two complex, non-convex, non-self-intersecting polygons - two sides and one vertex - two triangles


testIntersectionPolyTwoSides

public void testIntersectionPolyTwoSides()
Test the intersection of two complex, non-convex, non-self-intersecting polygons - two sides


testIntersectionPolyTwoSidesAndLowerVertex

public void testIntersectionPolyTwoSidesAndLowerVertex()
Test the intersection of two complex, non-convex, non-self-intersecting polygons - two sides and one vertex - the lower one


testIntersectionPolyFourSides

public void testIntersectionPolyFourSides()
Test the intersection of two complex, non-convex, non-self-intersecting polygons - cross four sides


testIntersectionPolyVOverlaps

public void testIntersectionPolyVOverlaps()
Test the intersection of two complex, non-convex, non-self-intersecting polygons - V overlap


testIntersectionRectangleHole

public void testIntersectionRectangleHole()
Test the intersection of a rectangle with a hole and solid rectangle


testUnionSeparate

public void testUnionSeparate()
Test the UNION of two polygons that are completely separate - result should be poly that contains these two polys


testUnionOneContainsTwo

public void testUnionOneContainsTwo()
Test the union of two polygons where the second is contained in the first.


testUnionTwoContainsOne

public void testUnionTwoContainsOne()
Test the union of two polygons where the first is contained in the second.


testUnionTwoEqual

public void testUnionTwoEqual()
Test the union of two polygons that are equal.


testUnionRectCorner1

public void testUnionRectCorner1()
Test the union of two rectangles that share one corner and two partial sides.


testUnionRectCorner2

public void testUnionRectCorner2()
Test the UNION of two rectangles that share one corner and two partial sides.


testUnionRectCorner3

public void testUnionRectCorner3()
Test the union of two rectangles that share one corner and two partial sides.


testUnionRectCorner4

public void testUnionRectCorner4()
Test the union of two rectangles that share one corner and two partial sides.


testUnionRectInterCorner1

public void testUnionRectInterCorner1()
Test the union of two rectangles that intersect on corner


testUnionRectInterCorner2

public void testUnionRectInterCorner2()
Test the union of two rectangles that intersect on corner


testUnionRectInterCorner3

public void testUnionRectInterCorner3()
Test the union of two rectangles that intersect on corner


testUnionRectInterCorner4

public void testUnionRectInterCorner4()
Test the union of two rectangles that intersect on corner


testUnionRectInterSide1

public void testUnionRectInterSide1()
Test the union of two rectangles where half of one is contained in the other and two sides of the inner cross one side of the outer.


testUnionRectInterSide2

public void testUnionRectInterSide2()
Test the union of two rectangles where half of one is contained in the other and two sides of the inner cross one side of the outer.


testUnionRectInterSide3

public void testUnionRectInterSide3()
Test the union of two rectangles where half of one is contained in the other and two sides of the inner cross one side of the outer.


testUnionRectInterSide4

public void testUnionRectInterSide4()
Test the union of two rectangles where half of one is contained in the other and two sides of the inner cross one side of the outer.


testUnionPolyOneOnTopOfTwo

public void testUnionPolyOneOnTopOfTwo()
Test the union of two complex, non-convex, non-self-intersecting polygons - 1 on top of two


testUnionPolyTwoSidesOneVertex

public void testUnionPolyTwoSidesOneVertex()
Test the union of two complex, non-convex, non-self-intersecting polygons - two sides and one vertex - two triangles


testUnionPolyTwoSides

public void testUnionPolyTwoSides()
Test the union of two complex, non-convex, non-self-intersecting polygons - two sides


testUnionPolyTwoSidesAndLowerVertex

public void testUnionPolyTwoSidesAndLowerVertex()
Test the union of two complex, non-convex, non-self-intersecting polygons - two sides and one vertex - the lower one


testUnionPolyFourSides

public void testUnionPolyFourSides()
Test the union of two complex, non-convex, non-self-intersecting polygons - cross four sides


testUnionPolyVOverlaps

public void testUnionPolyVOverlaps()
Test the union of two complex, non-convex, non-self-intersecting polygons - V overlap


testUnionRectangleHole

public void testUnionRectangleHole()
Test the UNION of a rectangle with a hole and solid rectangle


testXorSeparate

public void testXorSeparate()
Test the XOR of two polygons that are completely separate - result should be poly that contains these two polys


testXorOneContainsTwo

public void testXorOneContainsTwo()
Test the xor of two polygons where the second is contained in the first.


testXorTwoContainsOne

public void testXorTwoContainsOne()
Test the xor of two polygons where the first is contained in the second.


testXorTwoEqual

public void testXorTwoEqual()
Test the xor of two polygons that are equal.


testXorRectCorner1

public void testXorRectCorner1()
Test the xor of two rectangles that share one corner and two partial sides.


testXorRectCorner2

public void testXorRectCorner2()
Test the xor of two rectangles that share one corner and two partial sides.


testXorRectCorner3

public void testXorRectCorner3()
Test the xor of two rectangles that share one corner and two partial sides.


testXorRectCorner4

public void testXorRectCorner4()
Test the xor of two rectangles that share one corner and two partial sides.


testXorRectInterCorner1

public void testXorRectInterCorner1()
Test the xor of two rectangles that intersect on corner


testXorRectInterCorner2

public void testXorRectInterCorner2()
Test the xor of two rectangles that intersect on corner


testXortRectInterCorner3

public void testXortRectInterCorner3()
Test the xor of two rectangles that intersect on corner


testXorRectInterCorner4

public void testXorRectInterCorner4()
Test the xor of two rectangles that intersect on corner


testXorRectInterSide1

public void testXorRectInterSide1()
Test the xor of two rectangles where half of one is contained in the other and two sides of the inner cross one side of the outer.


testXornRectInterSide2

public void testXornRectInterSide2()
Test the xor of two rectangles where half of one is contained in the other and two sides of the inner cross one side of the outer.


testXorRectInterSide3

public void testXorRectInterSide3()
Test the xor of two rectangles where half of one is contained in the other and two sides of the inner cross one side of the outer.


testXorRectInterSide4

public void testXorRectInterSide4()
Test the xor of two rectangles where half of one is contained in the other and two sides of the inner cross one side of the outer.


testXorPolyOneOnTopOfTwo

public void testXorPolyOneOnTopOfTwo()
Test the xor of two complex, non-convex, non-self-intersecting polygons - 1 on top of two


testXorPolyTwoSidesOneVertex

public void testXorPolyTwoSidesOneVertex()
Test the xor of two complex, non-convex, non-self-intersecting polygons - two sides and one vertex - two triangles


testXorPolyTwoSides

public void testXorPolyTwoSides()
Test the xor of two complex, non-convex, non-self-intersecting polygons - two sides


testXorPolyTwoSidesAndLowerVertex

public void testXorPolyTwoSidesAndLowerVertex()
Test the xor of two complex, non-convex, non-self-intersecting polygons - two sides and one vertex - the lower one


testXorPolyFourSides

public void testXorPolyFourSides()
Test the xor of two complex, non-convex, non-self-intersecting polygons - cross four sides


testXorPolyVOverlaps

public void testXorPolyVOverlaps()
Test the xor of two complex, non-convex, non-self-intersecting polygons - V overlap


testXorRectangleHole

public void testXorRectangleHole()
Test the xor of a rectangle with a hole and solid rectangle



Copyright © 2004 Solution Engineering, Inc. All Rights Reserved.