Module org.dyn4j

Class SapProxy<E extends Collidable<T>,​T extends Fixture>

  • Type Parameters:
    E - the Collidable type
    T - the Fixture type
    All Implemented Interfaces:
    java.lang.Comparable<SapProxy<E,​T>>

    final class SapProxy<E extends Collidable<T>,​T extends Fixture>
    extends java.lang.Object
    implements java.lang.Comparable<SapProxy<E,​T>>
    Represents a sortable proxy for a Collidable Fixture in the Sap BroadphaseDetector.

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

    Since:
    3.2.3
    Version:
    3.4.0
    Author:
    William Bittle
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) AABB aabb
      The collidable's aabb
      (package private) E collidable
      The collidable
      (package private) T fixture
      The fixture
      (package private) boolean tested
      Whether the proxy has been tested or not
    • Constructor Summary

      Constructors 
      Constructor Description
      SapProxy​(E collidable, T fixture, AABB aabb)
      Full constructor.
    • Field Detail

      • collidable

        final E extends Collidable<T> collidable
        The collidable
      • fixture

        final T extends Fixture fixture
        The fixture
      • aabb

        AABB aabb
        The collidable's aabb
      • tested

        boolean tested
        Whether the proxy has been tested or not
    • Constructor Detail

      • SapProxy

        public SapProxy​(E collidable,
                        T fixture,
                        AABB aabb)
        Full constructor.
        Parameters:
        collidable - the collidable
        fixture - the fixture
        aabb - the aabb
    • Method Detail

      • compareTo

        public int compareTo​(SapProxy<E,​T> o)
        Specified by:
        compareTo in interface java.lang.Comparable<E extends Collidable<T>>
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

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