diff --git a/Data/Version History.txt b/Data/Version History.txt index 0fab215..6172a3f 100644 --- a/Data/Version History.txt +++ b/Data/Version History.txt @@ -1,4 +1,4 @@ -1.0.0.21 4/11/2020 +1.0.0.20 4/11/2020 --Bug fixes -ETA time was wrong with incremental final renders after waiting for a period of time. -Fix possible OpenCL bugs in cubic3D, cubicLattice_3D, dc_cube, falloff, falloff2, falloff3, waffle. diff --git a/Source/Ember/Ember.h b/Source/Ember/Ember.h index 4763fd0..28c82a8 100644 --- a/Source/Ember/Ember.h +++ b/Source/Ember/Ember.h @@ -922,7 +922,7 @@ public: vector cxTrn(size); thisXform->m_Affine.m_Mat = m23T(0); //Affine part. - Interpolater::ConvertLinearToPolar(embers, size, i, 0, cxAng, cxMag, cxTrn); + Interpolater::ConvertLinearToPolar(embers, size, i, false, cxAng, cxMag, cxTrn); Interpolater::InterpAndConvertBack(coefs, cxAng, cxMag, cxTrn, thisXform->m_Affine); //Post part. allID = true; @@ -945,7 +945,7 @@ public: } else { - Interpolater::ConvertLinearToPolar(embers, size, i, 1, cxAng, cxMag, cxTrn); + Interpolater::ConvertLinearToPolar(embers, size, i, true, cxAng, cxMag, cxTrn); Interpolater::InterpAndConvertBack(coefs, cxAng, cxMag, cxTrn, thisXform->m_Post); } } diff --git a/Source/Ember/Interpolate.h b/Source/Ember/Interpolate.h index 4ec90fd..f5619e8 100644 --- a/Source/Ember/Interpolate.h +++ b/Source/Ember/Interpolate.h @@ -667,13 +667,13 @@ public: /// /// The vector of embers whose affine transforms will be copied and converted /// The xform index in each ember to convert - /// If 0 convert pre affine, else post affine. + /// True to convert post affine, else convert pre affine. /// The vec2 vector to store the polar angular values /// The vec2 vector to store the polar magnitude values /// The vec2 vector to store the polar translation values - static void ConvertLinearToPolar(const vector>& embers, size_t xfi, size_t cflag, vector& cxAng, vector& cxMag, vector& cxTrn) + static void ConvertLinearToPolar(const vector>& embers, size_t xfi, bool post, vector& cxAng, vector& cxMag, vector& cxTrn) { - ConvertLinearToPolar(embers.data(), embers.size(), xfi, cflag, cxAng, cxMag, cxTrn); + ConvertLinearToPolar(embers.data(), embers.size(), xfi, post, cxAng, cxMag, cxTrn); } /// @@ -683,11 +683,11 @@ public: /// The array of embers whose affine transforms will be copied and converted /// The size of the embers array /// The xform index in each ember to convert - /// If 0 convert pre affine, else post affine. + /// True to convert post affine, else convert pre affine. /// The vec2 vector to store the polar angular values /// The vec2 vector to store the polar magnitude values /// The vec2 vector to store the polar translation values - static void ConvertLinearToPolar(const Ember* embers, size_t size, size_t xfi, size_t cflag, vector& cxAng, vector& cxMag, vector& cxTrn) + static void ConvertLinearToPolar(const Ember* embers, size_t size, size_t xfi, bool post, vector& cxAng, vector& cxMag, vector& cxTrn) { const auto LOCALEPS = T(1e-10);//Even though EPS is defined elsewhere, need this here for full compatibility with flam3. @@ -710,7 +710,7 @@ public: { for (col = 0; col < 2; col++) { - if (cflag == 0) + if (!post) { c1[0] = xform->m_Affine.m_Mat[0][col];//a or b. c1[1] = xform->m_Affine.m_Mat[1][col];//d or e. @@ -752,7 +752,7 @@ public: if (auto xform = embers[k].GetTotalXform(xfi)) { //Adjust angles differently if an asymmetric case. - if (xform->m_Wind[col] > 0 && cflag == 0) + if (xform->m_Wind[col] > 0 && !post) { //Adjust the angles to make sure that it's within wind : wind + 2pi. refang = xform->m_Wind[col] - M_2PI; @@ -880,7 +880,6 @@ public: else accmag[col] += coefs[i] * (cxMag[i][col]); - //Translation is ready to go. store.m_Mat[col][2] += coefs[i] * cxTrn[i][col]; } } diff --git a/Source/EmberCommon/EmberOptions.h b/Source/EmberCommon/EmberOptions.h index 278e3dc..53a81f4 100644 --- a/Source/EmberCommon/EmberOptions.h +++ b/Source/EmberCommon/EmberOptions.h @@ -419,8 +419,8 @@ public: INITDOUBLEOPTION(BlackThresh, Eod(eOptionUse::OPT_USE_GENOME, eOptionIDs::OPT_BLACK_THRESH, _T("--black"), 0.01, SO_REQ_SEP, " --black= Minimum number of allowed black pixels as a percentage from 0 - 1. Ignored if sequence, inter or rotate were specified [default: 0.01].\n")); INITDOUBLEOPTION(WhiteLimit, Eod(eOptionUse::OPT_USE_GENOME, eOptionIDs::OPT_WHITE_LIMIT, _T("--white"), 0.05, SO_REQ_SEP, " --white= Maximum number of allowed white pixels as a percentage from 0 - 1. Ignored if sequence, inter or rotate were specified [default: 0.05].\n")); INITDOUBLEOPTION(Speed, Eod(eOptionUse::OPT_USE_GENOME, eOptionIDs::OPT_SPEED, _T("--speed"), 0.1, SO_REQ_SEP, " --speed= Speed as a percentage from 0 - 1 that the affine transform of an existing flame mutates with the new flame. Ignored if sequence, inter or rotate were specified [default: 0.1].\n")); - INITDOUBLEOPTION(OffsetX, Eod(eOptionUse::OPT_USE_GENOME, eOptionIDs::OPT_OFFSETX, _T("--offsetx"), 0.0, SO_REQ_SEP, " --offsetx= Amount to jitter each flame horizontally when applying genome tools [default: 0].\n")); - INITDOUBLEOPTION(OffsetY, Eod(eOptionUse::OPT_USE_GENOME, eOptionIDs::OPT_OFFSETY, _T("--offsety"), 0.0, SO_REQ_SEP, " --offsety= Amount to jitter each flame vertically when applying genome tools [default: 0].\n")); + INITDOUBLEOPTION(OffsetX, Eod(eOptionUse::OPT_USE_GENOME, eOptionIDs::OPT_OFFSETX, _T("--offsetx"), 0.0, SO_REQ_SEP, " --offsetx= Amount to move each flame horizontally when applying genome tools [default: 0].\n")); + INITDOUBLEOPTION(OffsetY, Eod(eOptionUse::OPT_USE_GENOME, eOptionIDs::OPT_OFFSETY, _T("--offsety"), 0.0, SO_REQ_SEP, " --offsety= Amount to move each flame vertically when applying genome tools [default: 0].\n")); INITDOUBLEOPTION(UseMem, Eod(eOptionUse::OPT_USE_RENDER, eOptionIDs::OPT_USEMEM, _T("--use_mem"), 0.0, SO_REQ_SEP, " --use_mem= Number of bytes of memory to use [default: max system memory].\n")); INITDOUBLEOPTION(Loops, Eod(eOptionUse::OPT_USE_GENOME, eOptionIDs::OPT_LOOPS, _T("--loops"), 1.0, SO_REQ_SEP, " --loops= Number of times to rotate each control point in sequence [default: 1].\n")); //String. diff --git a/Source/Fractorium/Fractorium.cpp b/Source/Fractorium/Fractorium.cpp index cdd2ccd..5b1e27e 100644 --- a/Source/Fractorium/Fractorium.cpp +++ b/Source/Fractorium/Fractorium.cpp @@ -435,7 +435,7 @@ bool Fractorium::eventFilter(QObject* o, QEvent* e) !focusedctrlCombo && !QGuiApplication::keyboardModifiers().testFlag(Qt::AltModifier))//Must exclude these because otherwise, typing a minus key in any of the spinners will switch the xform. Also exclude alt. { - unsigned int index; + size_t index; double vdist = 0.01; double hdist = 0.01; double zoom = 1; @@ -1233,6 +1233,7 @@ void Fractorium::SetTabOrders() w = SetTabOrder(this, w, ui.SequenceRotationsPerBlendSpinBox); w = SetTabOrder(this, w, ui.SequenceRotationsPerBlendCWCheckBox); w = SetTabOrder(this, w, ui.SequenceRotationsPerBlendMaxSpinBox); + w = SetTabOrder(this, w, ui.SequenceLinearCheckBox); w = SetTabOrder(this, w, ui.SequenceGenerateButton); w = SetTabOrder(this, w, ui.SequenceRenderButton); w = SetTabOrder(this, w, ui.SequenceSaveButton); diff --git a/Source/Fractorium/Fractorium.ui b/Source/Fractorium/Fractorium.ui index 4c35769..87c3533 100644 --- a/Source/Fractorium/Fractorium.ui +++ b/Source/Fractorium/Fractorium.ui @@ -80,8 +80,8 @@ 0 0 - 1277 - 985 + 1279 + 980 @@ -173,7 +173,7 @@ 0 0 230 - 934 + 931 @@ -263,30 +263,30 @@ false + + 35 + 145 false - - 35 - true false + + 22 + 22 false - - 22 - false @@ -455,30 +455,30 @@ false + + 15 + 15 false - - 15 - true false + + 15 + 15 false - - 15 - Geometry @@ -536,30 +536,30 @@ false + + 15 + 15 false - - 15 - true false + + 15 + 15 false - - 15 - Iteration @@ -636,30 +636,30 @@ false + + 15 + 15 false - - 15 - true false + + 15 + 15 false - - 15 - Filter @@ -773,30 +773,30 @@ false + + 35 + 120 false - - 35 - true false + + 22 + 22 false - - 22 - false @@ -1123,30 +1123,30 @@ false + + 35 + 145 false - - 35 - true false + + 22 + 22 false - - 22 - false @@ -1299,30 +1299,30 @@ false + + 15 + 15 false - - 15 - true false + + 15 + 15 false - - 15 - Animation @@ -1408,30 +1408,30 @@ false + + 35 + 145 false - - 35 - true false + + 22 + 22 false - - 22 - Interpolation @@ -1463,7 +1463,7 @@ Interpolation - <html><head/><body><p>The method to use when interpolating flames during sequence generation. Linear uses basic linear interpolation when generating all of the steps between key frames, while Smooth uses log interpolation.</p><p>The first and last key frames in a sequence must use Linear.</p></body></html> + <html><head/><body><p>The method used when interpolating flame parameters between keyframes during sequence generation.</p><p>Linear: use basic linear interpolation. Requires two keyframes.</p><p>Smooth: use Catmull-Rom interpolation. Requires four keyframes.</p><p>The first and last keyframes in a sequence will automatically use Linear.</p></body></html> @@ -1471,7 +1471,7 @@ Affine Interpolation - <html><head/><body><p>The method to use when interpolating affine transforms during sequence generation.</p><p>Linear uses basic linear interpolation for each coefficient of affines, while Log converts to polar coordinates before interpolating.</p></body></html> + <html><head/><body><p>The method used when interpolating affine transforms between keyframes during sequence generation.</p><p>Linear: move each affine coordinate in a straight line from one keyframe to the next.</p><p>Log: rotate each affine coordinate from one keyframe to the next.</p></body></html> @@ -1572,30 +1572,30 @@ false + + 35 + 120 false - - 35 - true false + + 22 + 22 false - - 22 - false @@ -1821,30 +1821,30 @@ false + + 15 + 15 false - - 15 - true false + + 16 + 16 false - - 16 - Color @@ -1880,7 +1880,7 @@ 310 - 428 + 439 @@ -2173,27 +2173,27 @@ false + + 35 + 35 false - - 35 - false + + 22 + 22 false - - 22 - @@ -2296,10 +2296,10 @@ false - + 35 - + 35 @@ -2311,10 +2311,10 @@ false - + 22 - + 22 @@ -2370,14 +2370,17 @@ true + + 35 + 35 false - - 35 + + 22 22 @@ -2385,9 +2388,6 @@ false - - 22 - @@ -2554,10 +2554,10 @@ false - + 62 - + 62 @@ -2566,15 +2566,15 @@ false + + 22 + 22 false - - 22 - @@ -2793,10 +2793,10 @@ false - + 20 - + 20 @@ -2905,15 +2905,15 @@ false + + 16 + 16 false - - 16 - false @@ -3140,7 +3140,7 @@ 0 0 291 - 876 + 874 @@ -3489,30 +3489,30 @@ false + + 27 + 110 false - - 27 - true false + + 21 + 21 false - - 21 - @@ -3707,27 +3707,27 @@ false - - false - 27 + + false + true false + + 21 + 21 false - - 21 - false @@ -4043,30 +4043,30 @@ false + + 27 + 125 false - - 27 - true false + + 22 + 22 false - - 22 - false @@ -4310,15 +4310,15 @@ false + + 40 + 100 false - - 40 - true @@ -4328,15 +4328,15 @@ false + + 22 + 22 false - - 22 - false @@ -5115,15 +5115,15 @@ false + + 40 + 100 false - - 40 - true @@ -5133,15 +5133,15 @@ false + + 22 + 22 false - - 22 - false @@ -6035,15 +6035,15 @@ 3 + + 10 + 70 true - - 10 - true @@ -6268,7 +6268,7 @@ 0 0 267 - 670 + 656 @@ -6398,7 +6398,7 @@ 0 0 291 - 856 + 854 @@ -6528,10 +6528,10 @@ false - + 22 - + 22 @@ -6543,10 +6543,10 @@ false - + 21 - + 21 @@ -6669,12 +6669,12 @@ false - - 100 - 30 + + 100 + false @@ -6794,7 +6794,7 @@ true - Bounds + Bounds && Log <html><head/><body><p>Information that is only useful as an engineering interest, and a log output in the event something went wrong</p></body></html> @@ -7073,30 +7073,30 @@ false + + 27 + 110 false - - 27 - true false + + 22 + 22 false - - 22 - false @@ -7282,7 +7282,7 @@ 0 0 1712 - 20 + 21 @@ -7515,8 +7515,8 @@ 0 0 - 424 - 574 + 422 + 587 @@ -7546,255 +7546,6 @@ 4 - - - - 4 - - - - - - 0 - 0 - - - - - 95 - 0 - - - - <html><head/><body><p>The number of times the xforms will do a 360 degree rotation while interpolating from one keyframe to the next. Note that only xforms which have the animate flag set to true will be rotated.</p><p>Set to 0 to omit rotation while interpolating.</p></body></html> - - - QAbstractSpinBox::NoButtons - - - Rot per blend: - - - 100 - - - 1 - - - - - - - <html><head/><body><p>Direction of rotation during interpolation. Clockwise vs. counter clockwise.</p></body></html> - - - CW - - - - - - - - - - 0 - 0 - - - - - - - - - - - - 0 - 0 - - - - <html><head/><body><p>Check any checkbox to have the value corresponding to its row be randomly selected between the values of first and second controls on that row</p></body></html> - - - Qt::LeftToRight - - - Random - - - - - - - - 0 - 0 - - - - <html><head/><body><p>The number of frames used to interpolate from one keyframe to the next. Larger values give slower movement.</p></body></html> - - - QAbstractSpinBox::NoButtons - - - - - - Blend frames: - - - 10000 - - - 120 - - - - - - - - 0 - 0 - - - - - - - - - - - - 0 - 0 - - - - - 125 - 16777215 - - - - <html><head/><body><p>The 0-based index of the first flame in the file to start the sequence with</p></body></html> - - - QAbstractSpinBox::NoButtons - - - Start flame: - - - 999999999 - - - 0 - - - - - - - false - - - QAbstractSpinBox::NoButtons - - - Blend frames max: - - - 10000 - - - 120 - - - - - - - false - - - QAbstractSpinBox::NoButtons - - - Rotations max: - - - 10000.000000000000000 - - - 3.000000000000000 - - - - - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - <html><head/><body><p>The starting number to use as the name of the first flame in the sequence. This is useful when using an animation program that expects a certain number for the filename.</p></body></html> - - - true - - - QAbstractSpinBox::NoButtons - - - Start count: - - - 999999999 - - - - - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - <html><head/><body><p>The 0-based index of the last flame in the file to end the sequence on</p></body></html> - - - QAbstractSpinBox::NoButtons - - - Stop flame: - - - 999999999 - - - @@ -7820,19 +7571,6 @@ - - - - - 0 - 0 - - - - Start Previews - - - @@ -7855,6 +7593,19 @@ + + + + + 0 + 0 + + + + + + + @@ -7880,112 +7631,21 @@ - - - - - 0 - 0 - - - - Stop Previews - - - - - - - false - - - QAbstractSpinBox::NoButtons - - - Rot per blend max: - - - 0 - - - - - - - - 0 - 0 - - - - <html><head/><body><p>The number of frames for each rotation specified by Rotations. Larger values give slower movement.</p></body></html> - - - QAbstractSpinBox::NoButtons - - - Frames per rot: - - - 1 - - - 10000 - - - 30 - - - - - + + 0 0 - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - - - false - - - QAbstractSpinBox::NoButtons - - - Frames per rot max: - - - 1 - - - 10000 - - - 30 - - - - - + + 0 @@ -8042,6 +7702,356 @@ + + + + + 0 + 0 + + + + + 125 + 16777215 + + + + <html><head/><body><p>The 0-based index of the first flame in the file to start the sequence with</p></body></html> + + + QAbstractSpinBox::NoButtons + + + Start flame: + + + 999999999 + + + 0 + + + + + + + false + + + QAbstractSpinBox::NoButtons + + + Frames per rot max: + + + 1 + + + 10000 + + + 30 + + + + + + + false + + + QAbstractSpinBox::NoButtons + + + Rot per blend max: + + + 0 + + + + + + + 4 + + + + + + 0 + 0 + + + + + 95 + 0 + + + + <html><head/><body><p>The number of times the xforms will do a 360 degree rotation while interpolating from one keyframe to the next. Note that only xforms which have the animate flag set to true will be rotated.</p><p>Set to 0 to omit rotation while interpolating.</p></body></html> + + + QAbstractSpinBox::NoButtons + + + Rot per blend: + + + 100 + + + 1 + + + + + + + <html><head/><body><p>Direction of rotation during interpolation. Clockwise vs. counter clockwise.</p></body></html> + + + CW + + + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + + + + + + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + <html><head/><body><p>The 0-based index of the last flame in the file to end the sequence on</p></body></html> + + + QAbstractSpinBox::NoButtons + + + Stop flame: + + + 999999999 + + + + + + + false + + + QAbstractSpinBox::NoButtons + + + Rotations max: + + + 10000.000000000000000 + + + 3.000000000000000 + + + + + + + false + + + QAbstractSpinBox::NoButtons + + + Blend frames max: + + + 10000 + + + 120 + + + + + + + + 0 + 0 + + + + Stop Previews + + + + + + + + 0 + 0 + + + + <html><head/><body><p>The number of frames used to interpolate from one keyframe to the next. Larger values give slower movement.</p></body></html> + + + QAbstractSpinBox::NoButtons + + + + + + Blend frames: + + + 10000 + + + 120 + + + + + + + + 0 + 0 + + + + <html><head/><body><p>Check any checkbox to have the value corresponding to its row be randomly selected between the values of first and second controls on that row</p></body></html> + + + Qt::LeftToRight + + + Random + + + + + + + + 0 + 0 + + + + <html><head/><body><p>The number of frames for each rotation specified by Rotations. Larger values give slower movement.</p></body></html> + + + QAbstractSpinBox::NoButtons + + + Frames per rot: + + + 1 + + + 10000 + + + 30 + + + + + + + + 0 + 0 + + + + Start Previews + + + + + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + <html><head/><body><p>The starting number to use as the name of the first flame in the sequence. This is useful when using an animation program that expects a certain number for the filename.</p></body></html> + + + true + + + QAbstractSpinBox::NoButtons + + + Start count: + + + 999999999 + + + + + + + <html><head/><body><p>The method used to compute the blending distance for each step between keyframes.</p><p>Checked: Each step will be a linear interpolation.</p><p>Unchecked: Steps in the beginning and end of the interpolation between keyframes will be smaller and those in the middle will be larger. This has the effect of slowing down the beginning and end portions, and speeding up the middle.</p><p>This option is the equivalend of the --unsmoother flag in EmberGenome.</p></body></html> + + + Linear + + + diff --git a/Source/Fractorium/FractoriumLibrary.cpp b/Source/Fractorium/FractoriumLibrary.cpp index 704c295..7413110 100644 --- a/Source/Fractorium/FractoriumLibrary.cpp +++ b/Source/Fractorium/FractoriumLibrary.cpp @@ -61,6 +61,8 @@ void Fractorium::InitLibraryUI() ui.SequenceRotationsPerBlendSpinBox->setMaximum(std::numeric_limits::max());//Lower max = upper. ui.SequenceRotationsPerBlendMaxSpinBox->setValue(m_Settings->RotationsPerBlendMax());//Upper. ui.SequenceRotationsPerBlendMaxSpinBox->setMinimum(m_Settings->RotationsPerBlend());//Upper min = lower max. + //Linear. + ui.SequenceLinearCheckBox->setChecked(m_Settings->Linear()); } /// @@ -614,6 +616,7 @@ void FractoriumEmberController::SequenceGenerateButtonClicked() const size_t start = ui.SequenceStartFlameSpinBox->value(); const size_t stop = ui.SequenceStopFlameSpinBox->value(); const size_t startCount = ui.SequenceStartCountSpinBox->value(); + const bool linear = ui.SequenceLinearCheckBox->isChecked(); const size_t keyFrames = (stop - start) + 1; size_t frameCount = 0; double frames = 0; @@ -647,7 +650,7 @@ void FractoriumEmberController::SequenceGenerateButtonClicked() } SheepTools tools(palettePath, EmberCommon::CreateRenderer(eRendererType::CPU_RENDERER, devices, false, 0, emberReport)); - tools.SetSpinParams(true, + tools.SetSpinParams(!linear, stagger,//Will be set again below if random is used. 0, 0, @@ -918,6 +921,7 @@ void Fractorium::SyncSequenceSettings() m_Settings->BlendFramesMax(ui.SequenceRandomBlendMaxFramesSpinBox->value()); m_Settings->RotationsPerBlend(ui.SequenceRotationsPerBlendSpinBox->value()); m_Settings->RotationsPerBlendMax(ui.SequenceRotationsPerBlendMaxSpinBox->value()); + m_Settings->Linear(ui.SequenceLinearCheckBox->isChecked()); } template class FractoriumEmberController; diff --git a/Source/Fractorium/FractoriumSettings.cpp b/Source/Fractorium/FractoriumSettings.cpp index 75cd33b..d31e3c1 100644 --- a/Source/Fractorium/FractoriumSettings.cpp +++ b/Source/Fractorium/FractoriumSettings.cpp @@ -239,6 +239,9 @@ void FractoriumSettings::RotationsPerBlend(uint i) { setValue(ROTATIONSPERBLE uint FractoriumSettings::RotationsPerBlendMax() { return value(ROTATIONSPERBLENDMAX).toUInt(); } void FractoriumSettings::RotationsPerBlendMax(uint i) { setValue(ROTATIONSPERBLENDMAX, i); } +bool FractoriumSettings::Linear() { return value(LINEAR).toBool(); } +void FractoriumSettings::Linear(bool b) { setValue(LINEAR, b); } + /// /// Variations filter settings. /// diff --git a/Source/Fractorium/FractoriumSettings.h b/Source/Fractorium/FractoriumSettings.h index 85f9def..78d5600 100644 --- a/Source/Fractorium/FractoriumSettings.h +++ b/Source/Fractorium/FractoriumSettings.h @@ -42,6 +42,7 @@ #define BLENDFRAMESMAX "sequence/blendframesmax" #define ROTATIONSPERBLEND "sequence/rotationsperblend" #define ROTATIONSPERBLENDMAX "sequence/rotationsperblendmax" +#define LINEAR "sequence/linear" #define VARFILTERSUM "varfilter/sumcheckbox" #define VARFILTERASSIGN "varfilter/assigncheckbox" @@ -214,6 +215,9 @@ public: uint RotationsPerBlendMax(); void RotationsPerBlendMax(uint i); + bool Linear(); + void Linear(bool b); + int VarFilterSum(); void VarFilterSum(int i);