public abstract class WaveTransformationBase<T extends XSeriesRenderPassData> extends BaseRenderPassDataTransformation<T>
Note: This base class and inheritors are used for animations purposes. You can use it to just transform render pass data, it's not recommended though.
renderPassData
Modifier | Constructor and Description |
---|---|
protected |
WaveTransformationBase(java.lang.Class<T> rpdType,
double zeroLine,
float durationOfStepData)
Create new instance of
WaveTransformationBase class. |
Modifier and Type | Method and Description |
---|---|
protected void |
applyTransformation()
Applies this transformation to associated series.
|
protected abstract void |
applyTransformationInternal(float currentDelta)
Applies transformation using
ScaleTransformationBase.transformValues(float, FloatValues, FloatValues) method. |
protected void |
applyTransformationOnRenderPassDataChanged(com.scichart.core.model.FloatValues valuesToTransform)
Transforms valuesToTransform based on updated render pass data, according to current state of transformation.
|
float |
getZeroLineCoordinate()
Gets the value which determines the zero line in Y direction, from which wave will be performed.
|
void |
onAnimationStart(float initialValue)
Notifies the start of the associated animation.
|
protected abstract void |
prepareDataToTransformation()
Prepares associated render pass data to transformation.
|
protected void |
saveOriginalData()
Saves original data from render pass data, which supposed to be changed during
BaseRenderPassDataTransformation.applyTransformation() call. |
protected void |
transformValues(float currentDelta,
com.scichart.core.model.FloatValues valuesToTransform,
com.scichart.core.model.FloatValues originalCoordinates)
Transforms valuesToTransform based on original coordinates and currentDelta, to achieve scale transform.
|
attachTo, detach, discardTransformation, getCurrentDelta, getCurrentTransformationValue, isAttached, onAnimationEnd, onInternalRenderPassDataChanged, onRenderPassDataChanged, setCurrentProgress, transform
protected WaveTransformationBase(java.lang.Class<T> rpdType, double zeroLine, float durationOfStepData)
WaveTransformationBase
class.rpdType
- Type of associated render pass data.zeroLine
- Data value which determines the zero line in Y direction, from which scaling will be performed.durationOfStepData
- Wave duration before next point is started to animate. Default is 0.5.public final float getZeroLineCoordinate()
protected void saveOriginalData()
BaseRenderPassDataTransformation.applyTransformation()
call.saveOriginalData
in class BaseRenderPassDataTransformation<T extends XSeriesRenderPassData>
protected void applyTransformationOnRenderPassDataChanged(com.scichart.core.model.FloatValues valuesToTransform)
valuesToTransform
- Values to transform.public void onAnimationStart(float initialValue)
onAnimationStart
in interface IRenderPassDataTransformation
onAnimationStart
in class BaseRenderPassDataTransformation<T extends XSeriesRenderPassData>
initialValue
- The initial value of the associated animation.protected abstract void prepareDataToTransformation()
protected final void applyTransformation()
Note: This is used for animations purposes, so you need to take into account BaseRenderPassDataTransformation.getCurrentTransformationValue()
as well as BaseRenderPassDataTransformation.getCurrentDelta()
during implementing this.
applyTransformation
in class BaseRenderPassDataTransformation<T extends XSeriesRenderPassData>
protected abstract void applyTransformationInternal(float currentDelta)
ScaleTransformationBase.transformValues(float, FloatValues, FloatValues)
method. FloatValues to be supplied from inheritors.
First arg is values to transform. Second is to get original coordinates from.currentDelta
- The current delta value, due to which values will be transformed.protected void transformValues(float currentDelta, com.scichart.core.model.FloatValues valuesToTransform, com.scichart.core.model.FloatValues originalCoordinates)
currentDelta
- The current delta value, due to which values will be transformed.valuesToTransform
- Values to transform.originalCoordinates
- Original coordinates, which stored on last change of render pass data.