Click or drag to resize
DigitalRuneSkeletonKeyFrameAnimationCompress Method
Compresses the animation using a simple lossy compression algorithm.

Namespace: DigitalRune.Animation.Character
Assembly: DigitalRune.Animation (in DigitalRune.Animation.dll) Version: 1.4.0.0 (1.4.1.14427)
Syntax
public float Compress(
	float scaleThreshold,
	float rotationThreshold,
	float translationThreshold
)

Parameters

scaleThreshold
Type: SystemSingle
The scale threshold.
rotationThreshold
Type: SystemSingle
The rotation threshold in degrees.
translationThreshold
Type: SystemSingle
The translation threshold.

Return Value

Type: Single
The amount of removed key frames in the range [0, 1]. 0 means that no key frames have been removed. 0.5 means that 50% of the key frames have been removed. Etc.
Remarks

This method compresses the animation by removing key frames that can be computed by interpolation of nearby key frames. The threshold parameters define the allowed errors. If the thresholds are 0, this compression is lossless. If the thresholds are greater than 0 (recommended), the compression is lossy. The best way to determine optimal thresholds is to compare the compressed animation with the uncompressed animation visually.

This method does nothing if any threshold is negative.

See Also