mirror of
https://bitbucket.org/mfeemster/fractorium.git
synced 2025-06-30 13:26:02 -04:00
Affine2D: Remove * operator, it's unused.
RendererBase: Add ComputeCamera() as a virtual function. Add strips parameter to TotalIterCount(). Renderer: Implement ComputeCamera() as an override. SpatialFilter: Ensure filters that are too small are made large enough to create. FinalRenderDialog: Add estimated iters table row and populate on all UI updates. FractoriumParams: Zoom was not being saved, loaded. Fixed. GLWidget: Prevent mouse wheel event from being passed to the scroll bars. It should only affect the scale.
This commit is contained in:
@ -101,28 +101,6 @@ bool Affine2D<T>::operator == (const Affine2D<T>& affine)
|
||||
IsClose(F(), affine.F());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// * operator to multiply this affine transform by another and return the result.
|
||||
/// </summary>
|
||||
/// <param name="affine">The Affine2D to multiply by</param>
|
||||
/// <returns>A new Affine2D which is the product of the multiplication</returns>
|
||||
template <typename T>
|
||||
Affine2D<T>& Affine2D<T>::operator * (const Affine2D<T>& affine)
|
||||
{
|
||||
v2T x = affine.X();
|
||||
v2T y = affine.Y();
|
||||
v2T o = affine.O();
|
||||
v2T tx = TransformNormal(x);
|
||||
v2T ty = TransformNormal(y);
|
||||
v2T to = TransformNormal(o);
|
||||
|
||||
X(tx);
|
||||
Y(ty);
|
||||
O(to);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// * operator to multiply this affine transform by a vec2 and return the result as a vec2.
|
||||
/// </summary>
|
||||
@ -277,7 +255,7 @@ template <typename T>
|
||||
typename m2T Affine2D<T>::ToMat2ColMajor() const
|
||||
{
|
||||
return m2T(A(), B(),//Col0...
|
||||
D(), E());//1
|
||||
D(), E());//1
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -288,7 +266,7 @@ template <typename T>
|
||||
typename m2T Affine2D<T>::ToMat2RowMajor() const
|
||||
{
|
||||
return m2T(A(), D(),//Col0...
|
||||
B(), E());//1
|
||||
B(), E());//1
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -299,10 +277,10 @@ typename m2T Affine2D<T>::ToMat2RowMajor() const
|
||||
template <typename T>
|
||||
typename m4T Affine2D<T>::ToMat4ColMajor(bool center) const
|
||||
{
|
||||
m4T mat(A(), B(), 0, center ? 0 : C(),//Col0...
|
||||
D(), E(), 0, center ? 0 : F(),//1
|
||||
0, 0, 1, 0,//2
|
||||
0, 0, 0, 1);//3
|
||||
m4T mat(A(), B(), 0, center ? 0 : C(), //Col0...
|
||||
D(), E(), 0, center ? 0 : F(), //1
|
||||
0, 0, 1, 0, //2
|
||||
0, 0, 0, 1);//3
|
||||
|
||||
return mat;
|
||||
}
|
||||
@ -316,9 +294,9 @@ template <typename T>
|
||||
typename m4T Affine2D<T>::ToMat4RowMajor(bool center) const
|
||||
{
|
||||
m4T mat(A(), D(), 0, 0,
|
||||
B(), E(), 0, 0,
|
||||
0, 0, 1, 0,
|
||||
center ? 0 : C(), center ? 0 : F(), 0, 1);
|
||||
B(), E(), 0, 0,
|
||||
0, 0, 1, 0,
|
||||
center ? 0 : C(), center ? 0 : F(), 0, 1);
|
||||
|
||||
return mat;
|
||||
}
|
||||
|
Reference in New Issue
Block a user