All Known Implementing Classes:
VClamp, VDeadZone, VDerivative, VFilterGroup, VHighPassFilter, VLowPassFilter, VMotionProfile, VRateLimit, VTimedMovingAverage, XYFilter

public interface VFilter
This is the VFilter interface class that gives a definition for how to implement a filter.

All that a VFilter does is take in the next vector in a stream and gives you the filtered value.

  • Method Summary

    Modifier and Type
    Method
    Description
    default VFilter
    add(VFilter other)
    Combine two VFilters by adding their results together
    static VFilter
    Create a VFilter by using an IFilter on the x and y components.
    static VFilter
    create(VFilter... filters)
    Create a VFilter from a list of VFilters.
    get(Vector2D next)
    Get next value in Filter based on the next value given
    default VFilter
    sub(VFilter other)
    Combine two VFilters by subtracting their results together
    default VFilter
    then(VFilter next)
    Combine an VFilter with another VFilter
  • Method Details

    • create

      static VFilter create(VFilter... filters)
      Create a VFilter from a list of VFilters. This will create a VFilter with the least possible overhead for the number of filters provided.
      Parameters:
      filters - list of VFilters to apply
      Returns:
      an VFilter that uses every filter given
    • create

      static VFilter create(IFilter x, IFilter y)
      Create a VFilter by using an IFilter on the x and y components.
      Parameters:
      x - IFilter used on x component
      y - IFilter used on y component
      Returns:
      resulting VFilters
    • get

      Vector2D get(Vector2D next)
      Get next value in Filter based on the next value given
      Parameters:
      next - next input value in the stream
      Returns:
      the output value of the filter
    • then

      default VFilter then(VFilter next)
      Combine an VFilter with another VFilter
      Parameters:
      next - filter to be evaluated after this one
      Returns:
      the combined filter
    • add

      default VFilter add(VFilter other)
      Combine two VFilters by adding their results together
      Parameters:
      other - other VFilter to and with this one
      Returns:
      the resulting VFilter after the and
    • sub

      default VFilter sub(VFilter other)
      Combine two VFilters by subtracting their results together
      Parameters:
      other - other VFilter to or with this one
      Returns:
      the resulting VFilter after the or