Packages

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. 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.

Linear Supertypes
Serializable, Serializable, Product, Equals, TechniqueDecorator[TParams, TData], ParametricPrtTechnique[TParams, TData], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. PersistentCaching
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. TechniqueDecorator
  7. ParametricPrtTechnique
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def allowAmbiguousCaching: PersistentCaching[TParams, TData]

    Recalculation will not be triggered when parameters with non-stable hashes are changed.

    Recalculation will not be triggered when parameters with non-stable hashes are changed. Although not recommended, this option comes in handy when assigning non-stable hash values, i.e. anonymous types or functions, to parameters.

  5. val alwaysRecalculateAuxiliaryData: Boolean
  6. val alwaysRecalculateOcclusion: Boolean
  7. val alwaysRecalculateTransfer: Boolean
  8. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  9. def cacheAuxiliaryData(implicit dataIO: AuxiliaryDataIO[TParams, TData]): PersistentCaching[TParams, TData]

    Enables full caching functionality for auxiliary data.

    Enables full caching functionality for auxiliary data. (disabled by default) A suitable IO implementation is required.

    dataIO

    A suitable implementation of AuxiliaryDataIO.

  10. def cacheOcclusion: PersistentCaching[TParams, TData]

    Enables full caching functionality for occlusion information.

    Enables full caching functionality for occlusion information. (enabled by default)

  11. val cachePath: Path
  12. def cacheTransfer: PersistentCaching[TParams, TData]

    Enables full caching functionality for transfer data.

    Enables full caching functionality for transfer data. (enabled by default)

  13. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  14. def disableLoggingToConsole: PersistentCaching[TParams, TData]

    Logging to standard out will be disabled.

  15. def enableLoggingToConsole: PersistentCaching[TParams, TData]

    Logs recalculation, loading and storing operations to standard out.

  16. def enforceUnambiguousCaching: PersistentCaching[TParams, TData]

    Recalculation of cached data will be triggered whenever the hash of a parameter changes.

    Recalculation of cached data will be triggered whenever the hash of a parameter changes. This includes the parameters for which hash stability cannot be guaranteed in certain situations.

  17. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  19. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
  20. final def getDefaultParameters(mesh: TriangleMesh3D): TParams

    Returns the default parameters for this technique with respect to the mesh to render.

    Returns the default parameters for this technique with respect to the mesh to render.

    Definition Classes
    TechniqueDecoratorParametricPrtTechnique
  21. final def getParametricShader(parameters: TParams, transfer: GreyOrRGB[Transfer], data: TData): ParametricPrtShader
  22. final def getRenderer(parameters: TParams): ParametricPrtImageRender

    Returns a ParametricPrtImageRenderer for the set of PRT parameters.

    Returns a ParametricPrtImageRenderer for the set of PRT parameters. Transfer, auxiliary data and occlusion information will be computed when this method is called.

    Definition Classes
    ParametricPrtTechnique
  23. final def getRenderer(parameters: TParams, transfer: GreyOrRGB[Transfer]): ParametricPrtImageRender

    Returns a ParametricPrtImageRenderer for the specified transfer and the set of PRT parameters.

    Returns a ParametricPrtImageRenderer for the specified transfer and the set of PRT parameters. If necessary, auxiliary data will be computed when this method is called.

    Definition Classes
    ParametricPrtTechnique
  24. final def getRenderer(parameters: TParams, transfer: GreyOrRGB[Transfer], data: TData): ParametricPrtImageRender

    Returns a ParametricPrtImageRenderer for the specified transfer and auxiliary data as well as the set of PRT parameters.

    Returns a ParametricPrtImageRenderer for the specified transfer and auxiliary data as well as the set of PRT parameters.

    Definition Classes
    ParametricPrtTechnique
  25. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  26. val loggingEnabled: Boolean
  27. final def name: String

    The name of the implemented PRT rendering technique.

    The name of the implemented PRT rendering technique.

    Definition Classes
    TechniqueDecoratorParametricPrtTechnique
  28. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  29. final def notify(): Unit
    Definition Classes
    AnyRef
  30. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  31. val optionalAuxDataIO: Option[AuxiliaryDataIO[_, _]]
  32. def precomputeAuxiliaryData(parameters: TParams): TData

    Tries to load auxiliary data from the persistent cache.

    Tries to load auxiliary data from the persistent cache. When a matching data set cannot be found, it will compute auxiliary information in the same way ParametricPrtTechnique.precomputeAuxiliaryData. The result will be stored persistently for later reuse.

    parameters

    The parameters customizing the employed technique.

    Definition Classes
    PersistentCachingTechniqueDecoratorParametricPrtTechnique
  33. def precomputeOcclusion(parameters: TParams): OcclusionInformation

    Tries to load occlusion data from the persistent cache.

    Tries to load occlusion data from the persistent cache. When a matching data set cannot be found, it will compute occlusion information in the same way ParametricPrtTechnique.precomputeOcclusion. The result will be stored persistently for later reuse.

    parameters

    The parameters specifying the mesh and the raycast directions.

    returns

    An instance of OcclusionInformation.

    Definition Classes
    PersistentCachingTechniqueDecoratorParametricPrtTechnique
  34. def recalculateAuxiliaryData: PersistentCaching[TParams, TData]

    Auxiliary data will always be recalculated.

    Auxiliary data will always be recalculated. The results will be stored in the cache, if a suitable implementation of AuxiliaryDataIO has been provided via cacheAuxiliaryData.

    Hence, in order to disable loading of auxiliary data while storing it after recalculation one needs to call cacheAuxiliaryData and recalculateAuxiliaryData on this decorator instance.

  35. def recalculateOcclusion: PersistentCaching[TParams, TData]

    Occlusion information will always be recalculated.

    Occlusion information will always be recalculated. The result will be stored in the cache, nevertheless.

  36. def recalculateTransfer: PersistentCaching[TParams, TData]

    Transfer data will always be recalculated.

    Transfer data will always be recalculated. The result will be stored in the cache, nevertheless.

  37. def simulateTransfer(parameters: TParams, occlusion: OcclusionInformation, data: TData): GreyOrRGB[Transfer]

    Tries to load transfer data from the persistent cache.

    Tries to load transfer data from the persistent cache. When a matching data set cannot be found, it will compute transfer information in the same way ParametricPrtTechnique.simulateTransfer. The result will be stored persistently for later reuse.

    parameters

    The parameters customizing the employed technique.

    occlusion

    The occlusion information for the mesh specified via the parameters.

    data

    Auxiliary, precomputed data that is required by some parametric techniques.

    returns

    Simulated light transfer (monochromatic or RGB, based on parameters).

    Definition Classes
    PersistentCachingTechniqueDecoratorParametricPrtTechnique
  38. final def simulateTransfer(parameters: TParams, data: TData): GreyOrRGB[Transfer]

    Simulates light transport with respect to the given parameters and precomputed auxiliary data.

    Simulates light transport with respect to the given parameters and precomputed auxiliary data. Occlusion information will be computed on demand, that is, it will not be cached.

    Definition Classes
    ParametricPrtTechnique
  39. final def simulateTransfer(parameters: TParams): GreyOrRGB[Transfer]

    Simulates light transport with respect to the given parameters.

    Simulates light transport with respect to the given parameters. Occlusion information will be computed on demand, that is, it will not be cached. This also applies to the optional, precomputable, auxiliary data.

    Definition Classes
    ParametricPrtTechnique
  40. val strict: Boolean
  41. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  42. val technique: ParametricPrtTechnique[TParams, TData]
    Definition Classes
    PersistentCachingTechniqueDecorator
  43. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  44. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  45. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  46. def withCachingPath(path: String): PersistentCaching[TParams, TData]

    Specifies the path where data files will be stored.

  47. def withDecorator[T <: TechniqueDecorator[TParams, TData]](wrapper: (PersistentCaching.this.type) ⇒ T): T

    Wraps this technique in a TechniqueDecorator that adds advanced functionality that can be used in combination with any particular PRT technique.

    Wraps this technique in a TechniqueDecorator that adds advanced functionality that can be used in combination with any particular PRT technique. (e.g. PersistentCaching)

    wrapper

    A function that wraps this instance into a TechniqueDecorator. E.g. PersistentCaching(_)

    returns

    A TechniqueDecorator of type T that is based on this instance of ParametricPrtTechnique.

    Definition Classes
    ParametricPrtTechnique

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from TechniqueDecorator[TParams, TData]

Inherited from ParametricPrtTechnique[TParams, TData]

Inherited from AnyRef

Inherited from Any

Ungrouped