Class BandedPrimeLimiter
java.lang.Object
dev.engine_room.flywheel.impl.visual.BandedPrimeLimiter
- All Implemented Interfaces:
DistanceUpdateLimiter,DistanceUpdateLimiterImpl
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected intgetUpdateDivisor(double distanceSquared) booleanshouldUpdate(double distanceSquared) Check to see if an object at the given position relative to the camera should be updated.voidtick()Call this before every update.
-
Constructor Details
-
BandedPrimeLimiter
public BandedPrimeLimiter()
-
-
Method Details
-
tick
public void tick()Description copied from interface:DistanceUpdateLimiterImplCall this before every update.- Specified by:
tickin interfaceDistanceUpdateLimiterImpl
-
shouldUpdate
public boolean shouldUpdate(double distanceSquared) Description copied from interface:DistanceUpdateLimiterCheck to see if an object at the given position relative to the camera should be updated.- Specified by:
shouldUpdatein interfaceDistanceUpdateLimiter- Parameters:
distanceSquared- The distance squared from the camera to the object.- Returns:
trueif the object should be updated,falseotherwise.
-
getUpdateDivisor
protected int getUpdateDivisor(double distanceSquared)
-