Package com.ardor3d.bounding
Class UsageTreeController
java.lang.Object
com.ardor3d.bounding.UsageTreeController
- All Implemented Interfaces:
CollisionTreeController
UsageTreeController defines a CollisionTreeController implementation that removes cache elements based on the
frequency of usage. By default, and implementation in the CollisionTreeManager, the cache's key set will be ordered
with the first element being the oldest used. Therefore, UsageTreeController simply removes elements from the cache
starting at the first key and working up until the desired size is reached or we run out of elements.
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
UsageTreeController
public UsageTreeController()
-
-
Method Details
-
clean
removes elements from cache (that are not in the protectedList) until the desiredSize is reached. It removes elements from the keyset as they are ordered.- Specified by:
clean
in interfaceCollisionTreeController
- Parameters:
cache
- the cache to clean.protectedList
- the list of elements to not remove.desiredSize
- the final size of the cache to attempt to reach.
-