Interface DistanceUpdateLimiter

All Known Implementing Classes:
BandedPrimeLimiter, NonLimiter

public interface DistanceUpdateLimiter
Interface for rate-limiting updates based on an object's distance from the camera.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    shouldUpdate(int dX, int dY, int dZ)
    Check to see if an object at the given position relative to the camera should be updated.
    void
    Call this before every update.
  • Method Details

    • tick

      void tick()
      Call this before every update.
    • shouldUpdate

      boolean shouldUpdate(int dX, int dY, int dZ)
      Check to see if an object at the given position relative to the camera should be updated.
      Parameters:
      dX - The X distance from the camera.
      dY - The Y distance from the camera.
      dZ - The Z distance from the camera.
      Returns:
      true if the object should be updated, false otherwise.