-
public final class EdgeFeature extends Feature
Implementation of an edgeFeature
of aShape
.An
EdgeFeature
represents a linear edge of aShape
connecting two vertices. It's not the intent of this class to represent curved edges.The index is the index of the edge in the
Shape
.- Since:
- 1.0.0
- Version:
- 3.2.0
- Author:
- William Bittle
-
-
Field Summary
-
Fields inherited from class Feature
NOT_INDEXED
-
-
Constructor Summary
Constructors Constructor Description EdgeFeature(PointFeature vertex1, PointFeature vertex2, PointFeature max, Vector2 edge, int index)
Creates an edge feature.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Vector2
getEdge()
Returns the vector representing this edge in counter-clockwise winding.PointFeature
getMaximum()
Returns the maximum point.PointFeature
getVertex1()
Returns the first vertex of the edge.PointFeature
getVertex2()
Returns the second vertex of the edge.String
toString()
-
-
-
Constructor Detail
-
EdgeFeature
public EdgeFeature(PointFeature vertex1, PointFeature vertex2, PointFeature max, Vector2 edge, int index)
Creates an edge feature.- Parameters:
vertex1
- the first vertex of the edgevertex2
- the second vertex of the edgemax
- the maximum pointedge
- the vector representing the edgeindex
- the index of the edge
-
-
Method Detail
-
getVertex1
public PointFeature getVertex1()
Returns the first vertex of the edge.- Returns:
PointFeature
-
getVertex2
public PointFeature getVertex2()
Returns the second vertex of the edge.- Returns:
PointFeature
-
getEdge
public Vector2 getEdge()
Returns the vector representing this edge in counter-clockwise winding.- Returns:
Vector2
-
getMaximum
public PointFeature getMaximum()
Returns the maximum point.- Returns:
PointFeature
-
-