package decorators
- Alphabetic
- Public
- All
Type Members
-
case class
PersistentCaching
[TParams <: TechniqueParameters, TData] extends TechniqueDecorator[TParams, TData] with Product with Serializable
This decorator forms a persistent caching layer above any given PRT technique.
This decorator forms a persistent caching layer above any given PRT technique. It handles the caching of precomputable data completely autonomously. It stores occlusion information, auxiliary data and transfer data. The resulting data files will be stored in "./prtcache/" by default. The caching path can be changed using the method withCachingPath().
The implementations maintains a correspondence between the cached data sets and the technique parameters that the cached data has been generated with. The system will only load a cached data set if it matches the specified technique parameters. If there is no data set that fulfills this property new data will be precomputed and stored with respect to the new parameters.
Occlusion, auxiliary and transfer data are cached individually and thus stored in separate files. Transfer and auxiliary data files are accompanied by a corresponding text file that summarizes the used parameters in a human-readable format.
The change detection system is based on the ParameterSummary class which provides a parameterSignature method that, in turn, makes use of the hash codes of the individual parameters. In other words, cached data is tied to a set of parameters via their combined hashes. Therefore parameters are required to provide a hashCode implementation that is stable over multiple program executions. Fortunately, this is the case for scala's case classes and case objects and the TriangleMesh3D class in particular. However, there are some parameters that allow values which might not have stable hashes in certain situations (e.g. when assigned a anonymous class or function). Although not recommended, these parameters can be excluded from the parameter signature hash using the allowAmbiguousCaching method. This way, the non-stable hashes will not affect the caching functionality and the user needs to trigger recalculation manually whenever one of the non-stable-hash parameters is altered.
Please note that auxiliary data caching is disabled by default. It can be enabled with the method cacheAuxiliaryData which requires a suitable implementation of the AuxiliaryDataIO interface.
-
case class
ProfiledTechnique
[TParams <: TechniqueParameters, TData](technique: ParametricPrtTechnique[TParams, TData]) extends TechniqueDecorator[TParams, TData] with Product with Serializable
This decorator logs the precomputation duration to the console.
This decorator logs the precomputation duration to the console. The times of occlusion, auxiliary and transfer precomputation are logged idividually.
-
abstract
class
TechniqueDecorator
[TParams <: TechniqueParameters, TData] extends ParametricPrtTechnique[TParams, TData]
An abstract helper class that provides the basis for any concrete technique decorator.
Value Members
- object PersistentCaching extends Product with Serializable