Package micycle.trapmap
Class Trapezoid
- java.lang.Object
-
- micycle.trapmap.Trapezoid
-
public final class Trapezoid extends Object
Represents a trapezoid object in the trapezoidal map or search structure.Each trapezoid ∆ is determined by:
- A bottom segment bottom(∆)
- A top segment top(∆)
- A left vertex leftp(∆)
- A right vertex rightp(∆)
- Author:
- Tyler Chenhall, Michael Carleton
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object t)processing.core.PShapegetBoundaryPolygon()Return the boundary polygon for this trapezoidList<processing.core.PVector>getBoundaryVertices()Gets the four coordinates that make up this trapezoid (from top left clockwise).processing.core.PShapegetFace()Gets the mapped polygonal face that this trapezoid is a part of.processing.core.PVectorgetLeftBound()Get the left bounding pointSegmentgetLowerBound()Get the lower bounding segmentTrapezoidgetLowerLeftNeighbor()Get the trapezoid which lies to the left of this trapezoid below the left boundary vertexTrapezoidgetLowerRightNeighbor()processing.core.PVectorgetRightBound()Get the right bounding pointSegmentgetUpperBound()Get the upper bounding segment for the trapezoidTrapezoidgetUpperLeftNeighbor()Get the trapezoid which lies to the left of this one, above the left boundary vertexTrapezoidgetUpperRightNeighbor()inthashCode()StringtoString()
-
-
-
Method Detail
-
getLeftBound
public processing.core.PVector getLeftBound()
Get the left bounding point- Returns:
- The left vertex
-
getRightBound
public processing.core.PVector getRightBound()
Get the right bounding point- Returns:
- The right bounding vertex
-
getLowerBound
public Segment getLowerBound()
Get the lower bounding segment- Returns:
- The lower segment
-
getUpperBound
public Segment getUpperBound()
Get the upper bounding segment for the trapezoid- Returns:
- The upper segment
-
getLowerLeftNeighbor
public Trapezoid getLowerLeftNeighbor()
Get the trapezoid which lies to the left of this trapezoid below the left boundary vertex- Returns:
- The lower left neighbor (possibly null)
-
getUpperLeftNeighbor
public Trapezoid getUpperLeftNeighbor()
Get the trapezoid which lies to the left of this one, above the left boundary vertex- Returns:
- the upper left neighbor trapezoid (possibly null)
-
getLowerRightNeighbor
public Trapezoid getLowerRightNeighbor()
-
getUpperRightNeighbor
public Trapezoid getUpperRightNeighbor()
-
getFace
public processing.core.PShape getFace()
Gets the mapped polygonal face that this trapezoid is a part of.- Returns:
- Null if trapezoid lies outside polygons, or no polygons were set up.
-
getBoundaryPolygon
public processing.core.PShape getBoundaryPolygon()
Return the boundary polygon for this trapezoid- Returns:
- The boundary Polygon
-
getBoundaryVertices
public List<processing.core.PVector> getBoundaryVertices()
Gets the four coordinates that make up this trapezoid (from top left clockwise).- Returns:
-
-