flaw-visual-0.1.0.0

LicenseMIT
Safe HaskellNone
LanguageHaskell2010

Flaw.Visual.Geometry.CacheOptimization

Description

Two cache optimization algorithms are implemented so far. In preferred order of application:

Synopsis

Documentation

optimizeGeometryIndicesLocality :: (Vector v i, Integral i) => v i -> v i Source #

Optimize usage of vertex post-transform cache by manipulating order of triangles. "Linear-Speed Vertex Cache Optimisation" by Tom Forsyth https://tomforsyth1000.github.io/papers/fast_vert_cache_opt.html

optimizeGeometryVerticesLocality :: (Vector va a, Vector vi i, Integral i) => va a -> vi i -> (va a, vi i) Source #

Optimize usage of vertex pre-transform cache by manipulating order of vertices.

optimizeGeometryLocality :: (Vector va a, Vector vi i, Integral i) => va a -> vi i -> (va a, vi i) Source #

Perform both optimization of vertices and indices.