Module org.dyn4j

Class ExpandingSimplexEdge

  • All Implemented Interfaces:
    java.lang.Comparable<ExpandingSimplexEdge>

    final class ExpandingSimplexEdge
    extends java.lang.Object
    implements java.lang.Comparable<ExpandingSimplexEdge>
    Represents an edge of an ExpandingSimplex.

    An ExpandingSimplexEdge tracks its vertices, the edge normal, and the distance to the origin.

    Note: this class has a natural ordering that is inconsistent with equals.

    Since:
    3.2.0
    Version:
    3.2.0
    Author:
    William Bittle
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) double distance
      The perpendicular distance from the edge to the origin
      (package private) Vector2 normal
      The normal of the edge
      (package private) Vector2 point1
      The first point of the edge
      (package private) Vector2 point2
      The second point of the edge
    • Field Detail

      • point1

        final Vector2 point1
        The first point of the edge
      • point2

        final Vector2 point2
        The second point of the edge
      • normal

        final Vector2 normal
        The normal of the edge
      • distance

        final double distance
        The perpendicular distance from the edge to the origin
    • Constructor Detail

      • ExpandingSimplexEdge

        public ExpandingSimplexEdge​(Vector2 point1,
                                    Vector2 point2,
                                    int winding)
        Minimal constructor.
        Parameters:
        point1 - the first point
        point2 - the second point
        winding - the winding
    • Method Detail

      • toString

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