Package xj3d.filter.filters
Class ForsythCacheOptimizer
java.lang.Object
xj3d.filter.filters.ForsythCacheOptimizer
Vertex cache optimization. Order vertices in the best order to
optimize usage of the post transform vertex cache.
Uses Forsyth method. See this posting about it:
http://home.comcast.net/~tom_forsyth/papers/fast_vert_cache_opt.html
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
optimizeFaces
(int[] indexList, int indexCount, int vertexCount, int[] newIndexList, int lruCacheSize) Optimize faces.
-
Constructor Details
-
ForsythCacheOptimizer
public ForsythCacheOptimizer()
-
-
Method Details
-
optimizeFaces
public void optimizeFaces(int[] indexList, int indexCount, int vertexCount, int[] newIndexList, int lruCacheSize) Optimize faces.- Parameters:
indexList
- input index listindexCount
- the number of indices in the listvertexCount
- the largest index value in indexListnewIndexList
- preallocated buffer the same size as indexList to hold the optimized index listlruCacheSize
- the size of the simulated post-transform cache (max:64)
-