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 boolean
equals(Object t)
processing.core.PShape
getBoundaryPolygon()
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.PShape
getFace()
Gets the mapped polygonal face that this trapezoid is a part of.processing.core.PVector
getLeftBound()
Get the left bounding pointSegment
getLowerBound()
Get the lower bounding segmentTrapezoid
getLowerLeftNeighbor()
Get the trapezoid which lies to the left of this trapezoid below the left boundary vertexTrapezoid
getLowerRightNeighbor()
processing.core.PVector
getRightBound()
Get the right bounding pointSegment
getUpperBound()
Get the upper bounding segment for the trapezoidTrapezoid
getUpperLeftNeighbor()
Get the trapezoid which lies to the left of this one, above the left boundary vertexTrapezoid
getUpperRightNeighbor()
int
hashCode()
String
toString()
-
-
-
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:
-
-