--User changes

-Add post_smartcrop.

--Bug fixes
 -Fix bug in crackle.
 -Wrong point assignment in hexaplay3D, hexnix3D.
 -Improper Z assignment in rblur.
 -Fix inconsistency with original in circlecrop.
 -Put EMBER_ROOT bakc to ./../../../ in default.pri. This is TBD.

--Code changes
 -Convert all enums to class enum to be consistent with C++11 style.
 -Convert some if/else statements in filter classes to case statements.
 -Add overloaded stream operators to print various enums.
 -Optimize crob, nBlur.
 -Fix weird assignment statement in falloff3.
 -Cleanup in VarFuncs::SimplexNoise3D().
 -Replace fabs() with std::abs().
 -General cleanup.
This commit is contained in:
mfeemster
2016-01-12 20:42:12 -08:00
parent a8688e87b5
commit a3ecbbf690
22 changed files with 1402 additions and 1546 deletions

View File

@ -224,8 +224,8 @@ void GLEmberController<T>::QueryMatrices(bool print)
if (renderer)
{
double unitX = fabs(renderer->UpperRightX(false) - renderer->LowerLeftX(false)) / 2.0;
double unitY = fabs(renderer->UpperRightY(false) - renderer->LowerLeftY(false)) / 2.0;
double unitX = std::abs(renderer->UpperRightX(false) - renderer->LowerLeftX(false)) / 2.0;
double unitY = std::abs(renderer->UpperRightY(false) - renderer->LowerLeftY(false)) / 2.0;
m_GL->glMatrixMode(GL_PROJECTION);
m_GL->glPushMatrix();
m_GL->glLoadIdentity();

View File

@ -222,8 +222,8 @@ void GLWidget::paintGL()
//Affine drawing.
bool pre = m_Fractorium->ui.PreAffineGroupBox->isChecked();
bool post = m_Fractorium->ui.PostAffineGroupBox->isChecked();
float unitX = fabs(renderer->UpperRightX(false) - renderer->LowerLeftX(false)) / 2.0f;
float unitY = fabs(renderer->UpperRightY(false) - renderer->LowerLeftY(false)) / 2.0f;
float unitX = std::abs(renderer->UpperRightX(false) - renderer->LowerLeftX(false)) / 2.0f;
float unitY = std::abs(renderer->UpperRightY(false) - renderer->LowerLeftY(false)) / 2.0f;
glEnable(GL_DEPTH_TEST);
glEnable(GL_BLEND);
glEnable(GL_LINE_SMOOTH);
@ -840,8 +840,8 @@ bool GLEmberController<T>::SizesMatch()
void GLWidget::DrawGrid()
{
RendererBase* renderer = m_Fractorium->m_Controller->Renderer();
float unitX = fabs(renderer->UpperRightX(false) - renderer->LowerLeftX(false)) / 2.0f;
float unitY = fabs(renderer->UpperRightY(false) - renderer->LowerLeftY(false)) / 2.0f;
float unitX = std::abs(renderer->UpperRightX(false) - renderer->LowerLeftX(false)) / 2.0f;
float unitY = std::abs(renderer->UpperRightY(false) - renderer->LowerLeftY(false)) / 2.0f;
float rad = std::max(unitX, unitY);
float xLow = floor(-unitX);
float xHigh = ceil(unitX);

View File

@ -57,13 +57,12 @@ private:
double weight1 = 0, weight2 = 0;
VariationTreeWidgetItem* varItemWidget;
VariationTreeDoubleSpinBox* spinBox1, *spinBox2;
auto itemWidget1 = treeWidget()->itemWidget(const_cast<VariationTreeWidgetItem*>(this), 1);//Get the widget for the second column.
if ((spinBox1 = dynamic_cast<VariationTreeDoubleSpinBox*>(itemWidget1)))//Cast the widget to the VariationTreeDoubleSpinBox type.
{
auto itemWidget2 = treeWidget()->itemWidget(const_cast<QTreeWidgetItem*>(&other), 1);//Get the widget for the second column of the widget item passed in.
if ((spinBox2 = dynamic_cast<VariationTreeDoubleSpinBox*>(itemWidget2)))//Cast the widget to the VariationTreeDoubleSpinBox type.
{
if (spinBox1->IsParam() || spinBox2->IsParam())//Do not sort params, their order will always remain the same.
@ -83,11 +82,11 @@ private:
if (IsNearZero(weight1) && IsNearZero(weight2))
return index1 > index2;
else
return fabs(weight1) < fabs(weight2);
return std::abs(weight1) < fabs(weight2);
}
}
}
return false;
}