Class TLcdTransformingModelFactory
Class containing factory methods to create ALcdTransformingModel
instances.
- Since:
- 2016.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic ALcdTransformingModel
createTransformingModel
(ILcdModel aOriginalModel, TLcdClusteringTransformer aModelTransformer) Creates a newALcdTransformingModel
instance which will contain the transformed data ofaOriginalModel
.static ALcdTransformingModel
createTransformingModel
(ILcdModel aOriginalModel, TLcdClusteringTransformer aModelTransformer, ALcdPaintExecutorService aPaintExecutorService) Creates a newALcdTransformingModel
instance which will contain the transformed data ofaOriginalModel
.
-
Method Details
-
createTransformingModel
public static ALcdTransformingModel createTransformingModel(ILcdModel aOriginalModel, TLcdClusteringTransformer aModelTransformer) Creates a new
ALcdTransformingModel
instance which will contain the transformed data ofaOriginalModel
. The data is transformed by usingaModelTransformer
.As the data transformations can be time-consuming, it will happen on a dedicated thread. Once the transformations have been calculated, the resulting
ALcdTransformingModel
will be updated on the EDT. This means that the resulting model of this method call should only be used to visualize data which is shown in a view that it painted on the EDT (the majority of the views in LuciadLightspeed). However, when the view does not allow asynchronous operations, the transformations and the model updates are executed on the calling thread.If you want to show the data on another type of view (for example an offscreen view), you need to use the
createTransformingModel(ILcdModel, TLcdClusteringTransformer, ALcdPaintExecutorService)
method.Note that the transforming model will loop over all elements contained in
aOriginalModel
to calculate the transformed elements. This means that you should only call this method with in-memory models, and not with models which load their data in a lazy manner.- Parameters:
aOriginalModel
- The original modelaModelTransformer
- The model transformer- Returns:
- a new
ALcdTransformingModel
-
createTransformingModel
public static ALcdTransformingModel createTransformingModel(ILcdModel aOriginalModel, TLcdClusteringTransformer aModelTransformer, ALcdPaintExecutorService aPaintExecutorService) Creates a new
ALcdTransformingModel
instance which will contain the transformed data ofaOriginalModel
. The data is transformed by usingaModelTransformer
.As the data transformations can be time-consuming, it will happen on a dedicated thread. Once the transformations have been calculated, the resulting
ALcdTransformingModel
will be updated on a thread created by theaPaintExecutorService
. This means that the resulting model of this method call should only be used to visualize data which is shown in a view that it painted on the same thread as on which theALcdPaintExecutorService
executes its runnables (for example an offscreen view). However, when the view does not allow asynchronous operations, the transformations and the model updates are executed on the calling thread.Note that the transforming model will loop over all elements contained in
aOriginalModel
to calculate the transformed elements. This means that you should only call this method with in-memory models, and not with models which load their data in a lazy manner.- Parameters:
aOriginalModel
- The original modelaModelTransformer
- The model transformeraPaintExecutorService
- Executor service on which the runnables to update theALcdTransformingModel
will be scheduled- Returns:
- a new
ALcdTransformingModel
-