Interface PerceivedObject.Kinematics.Overlap

All Known Implementing Classes:
PerceivedObject.Kinematics.Overlap.Record
Enclosing interface:
PerceivedObject.Kinematics

public static interface PerceivedObject.Kinematics.Overlap
Description of overlap information. If the object is fully ahead or behind, overlap values are null.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final record 
    Record storing overlap information.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    Overlap information for objects ahead.
    Overlap information for objects behind.
  • Method Summary

    Modifier and Type
    Method
    Description
    Optional<org.djunits.value.vdouble.scalar.Length>
    Return the (perceived) overlap with the other object.
    Optional<org.djunits.value.vdouble.scalar.Length>
    Return the (perceived) front overlap to the other object.
    Optional<org.djunits.value.vdouble.scalar.Length>
    Return the (perceived) rear overlap to the other object.
    boolean
    Returns whether the object is fully ahead.
    boolean
    Returns whether the object is fully behind.
    default boolean
    Returns whether the object is parallel, partially or fully.
  • Field Details

  • Method Details

    • getOverlap

      Optional<org.djunits.value.vdouble.scalar.Length> getOverlap()
      Return the (perceived) overlap with the other object. This value should be null if there is no overlap. In the figure below for two GTUs, it is distance b, positive for GTU1 and GTU2.
       ----------
       |  GTU 1 |          ----->
       ----------
            ---------------
            |    GTU 2    |          ----->
            ---------------
       | a  | b |     c   |
       
      Returns:
      the (perceived) overlap with the other object or empty if there is no overlap
    • getOverlapFront

      Optional<org.djunits.value.vdouble.scalar.Length> getOverlapFront()
      Return the (perceived) front overlap to the other object. This value should be null if there is no overlap. In the figure for two GTUs below, it is distance c, positive for GTU1, negative for GTU2.
       ----------
       |  GTU 1 |          ----->
       ----------
            ---------------
            |    GTU 2    |          ----->
            ---------------
       | a  | b |     c   |
       
      Returns:
      the (perceived) front overlap to the other object or empty if there is no overlap
    • getOverlapRear

      Optional<org.djunits.value.vdouble.scalar.Length> getOverlapRear()
      Return the (perceived) rear overlap to the other object. This value should be null if there is no overlap.In the figure below for two GTUs, it is distance a, positive for GTU1, negative for GTU2.
       ----------
       |  GTU 1 |          ----->
       ----------
            ---------------
            |    GTU 2    |          ----->
            ---------------
       | a  | b |     c   |
       
      Returns:
      the (perceived) rear overlap to the other object or empty if there is no overlap
    • isAhead

      boolean isAhead()
      Returns whether the object is fully ahead.
      Returns:
      whether the other object is in front of the reference object
    • isBehind

      boolean isBehind()
      Returns whether the object is fully behind.
      Returns:
      whether the other object is behind the reference object
    • isParallel

      default boolean isParallel()
      Returns whether the object is parallel, partially or fully.
      Returns:
      whether the other object is parallel the reference object