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 TypeMethodDescriptionbooleanshouldUpdate(int dX, int dY, int dZ) Check to see if an object at the given position relative to the camera should be updated.voidtick()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:
trueif the object should be updated,falseotherwise.
-