Module org.dyn4j

Class EdgeFeature


  • public final class EdgeFeature
    extends Feature
    Implementation of an edge Feature of a Shape.

    An EdgeFeature represents a linear edge of a Shape 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
    • 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 edge
        vertex2 - the second vertex of the edge
        max - the maximum point
        edge - the vector representing the edge
        index - the index of the edge
    • Method Detail

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getEdge

        public Vector2 getEdge()
        Returns the vector representing this edge in counter-clockwise winding.
        Returns:
        Vector2