Fix bug where xform fields that were not specified for motion interpolation were still getting interpolated.

Carry logic from this fix to writing Xform Xmls as well.

Motion was not supported on some Xform fields as it was originally copied from flam3. Allow it on all but xaos now.

Fix clamping range for m_ColorSpeed at the end of ApplyMotion() to match the values we accept elsewhere.
This commit is contained in:
mfeemster
2015-03-25 20:47:57 -07:00
parent 53db8907ff
commit 3d206c1d22
7 changed files with 107 additions and 50 deletions

View File

@ -157,6 +157,21 @@ bool Affine2D<T>::IsZero() const
(IsClose<T>(F(), 0));
}
/// <summary>
/// Determine whether this affine transform was deliberately set to all empty values.
/// </summary>
/// <returns>True if all 6 elements equal zero, else false.</returns>
template <typename T>
bool Affine2D<T>::IsEmpty() const
{
return (IsClose<T>(A(), EMPTYFIELD)) &&
(IsClose<T>(B(), EMPTYFIELD)) &&
(IsClose<T>(C(), EMPTYFIELD)) &&
(IsClose<T>(D(), EMPTYFIELD)) &&
(IsClose<T>(E(), EMPTYFIELD)) &&
(IsClose<T>(F(), EMPTYFIELD));
}
/// <summary>
/// Rotate this affine transform around its origin by the specified angle in degrees.
/// </summary>