mirror of
https://bitbucket.org/mfeemster/fractorium.git
synced 2025-06-30 13:26:02 -04:00
--User changes
-No longer constrain pitch, yaw or depth spinners to -180 - 180. --Bug fixes -Properly set color index on padded xforms. -Adding a padding final xform included a linear variation with a weight of zero to not appear empty. Made it have a weight of 1. -Always write animate tag on final xform when saving to Xml. -Motion was being applied to the wrong flame in SheepTools::Edge(), so apply it to the correct one. -Prevent divide by zero when normalizing variation weights. -Was accidentally adding the placeholder value of -9999 for motion_offset to varation weights and parameters when applying motion. Set to zero if no value present. -Clamp flame rotation values to -180 - 180 when reading a flame from Xml. -Events were not properly wired for user changes in the random rotations per blend controls in the sequencer. -Fix major UI bugs with sequencer min/max random controls which made it nearly impossible to hand type values. -Values from rotations per blend and rotations per blend max were not being saved to file between program runs. -Checking animate for an xform was not applied to all flames even if Apply All was checked. -Changing interpolation type, temporal filter width, temporal type, and affine interpolation type were not actually saving to the flame when changed. -Grid on the main window was not being drawn at the right scale initially due to some OpenGL initialization occurring in the wrong order. -Severe bugs in sequence generation code: --Improperly detected padding xforms. --When looking for specific variations during xform aligning, only presence was detected, when it should have been presence plus a weight greater than zero. --When adding specific variations during xform aligning, must first remove any variations of that type. --Two variables were unsigned when they should have been signed. This prevented large blocks of code from ever executing. --When interpolating affines, an EPS that was too small was used, causing affine values to interpolate incorrectly. Instead use 1e-10 to ensure results equal to flam3. --Code changes -Modify FractoriumEmberController::UpdateXform() to pass the selected xform index as well as the absolute index to func().
This commit is contained in:
@ -248,7 +248,7 @@ void Fractorium::OnPostAffineColDoubleClicked(int logicalIndex)
|
||||
template <typename T>
|
||||
void FractoriumEmberController<T>::AffineSetHelper(double d, int index, bool pre)
|
||||
{
|
||||
UpdateXform([&] (Xform<T>* xform)
|
||||
UpdateXform([&] (Xform<T>* xform, size_t xfindex, size_t selIndex)
|
||||
{
|
||||
auto& affine = pre ? xform->m_Affine : xform->m_Post;
|
||||
AffineDoubleSpinBox** spinners = pre ? m_Fractorium->m_PreSpins : m_Fractorium->m_PostSpins;
|
||||
@ -330,7 +330,7 @@ void Fractorium::OnO2Changed(double d) { m_Controller->AffineSetHelper(d, 5, sen
|
||||
template <typename T>
|
||||
void FractoriumEmberController<T>::FlipXforms(bool horizontal, bool vertical, bool pre)
|
||||
{
|
||||
UpdateXform([&] (Xform<T>* xform)
|
||||
UpdateXform([&] (Xform<T>* xform, size_t xfindex, size_t selIndex)
|
||||
{
|
||||
auto& affine = pre ? xform->m_Affine : xform->m_Post;
|
||||
|
||||
@ -367,7 +367,7 @@ void Fractorium::OnFlipVerticalButtonClicked(bool checked) { m_Controller->FlipX
|
||||
template <typename T>
|
||||
void FractoriumEmberController<T>::RotateXformsByAngle(double angle, bool pre)
|
||||
{
|
||||
UpdateXform([&] (Xform<T>* xform)
|
||||
UpdateXform([&] (Xform<T>* xform, size_t xfindex, size_t selIndex)
|
||||
{
|
||||
auto& affine = pre ? xform->m_Affine : xform->m_Post;
|
||||
affine.Rotate(angle * DEG_2_RAD_T);
|
||||
@ -428,7 +428,7 @@ void Fractorium::OnRotateCcButtonClicked(bool checked)
|
||||
template <typename T>
|
||||
void FractoriumEmberController<T>::MoveXforms(double x, double y, bool pre)
|
||||
{
|
||||
UpdateXform([&] (Xform<T>* xform)
|
||||
UpdateXform([&] (Xform<T>* xform, size_t xfindex, size_t selIndex)
|
||||
{
|
||||
auto& affine = pre ? xform->m_Affine : xform->m_Post;
|
||||
affine.C(affine.C() + x);
|
||||
@ -514,7 +514,7 @@ void Fractorium::OnMoveRightButtonClicked(bool checked)
|
||||
template <typename T>
|
||||
void FractoriumEmberController<T>::ScaleXforms(double scale, bool pre)
|
||||
{
|
||||
UpdateXform([&] (Xform<T>* xform)
|
||||
UpdateXform([&] (Xform<T>* xform, size_t xfindex, size_t selIndex)
|
||||
{
|
||||
auto& affine = pre ? xform->m_Affine : xform->m_Post;
|
||||
affine.A(affine.A() * scale);
|
||||
@ -567,7 +567,7 @@ void Fractorium::OnScaleUpButtonClicked(bool checked)
|
||||
template <typename T>
|
||||
void FractoriumEmberController<T>::ResetXformsAffine(bool pre)
|
||||
{
|
||||
UpdateXform([&] (Xform<T>* xform)
|
||||
UpdateXform([&] (Xform<T>* xform, size_t xfindex, size_t selIndex)
|
||||
{
|
||||
auto& affine = pre ? xform->m_Affine : xform->m_Post;
|
||||
affine.MakeID();
|
||||
@ -585,7 +585,7 @@ void Fractorium::OnResetAffineButtonClicked(bool checked) { m_Controller->ResetX
|
||||
template <typename T>
|
||||
void FractoriumEmberController<T>::RandomXformsAffine(bool pre)
|
||||
{
|
||||
UpdateXform([&](Xform<T>* xform)
|
||||
UpdateXform([&](Xform<T>* xform, size_t xfindex, size_t selIndex)
|
||||
{
|
||||
auto& affine = pre ? xform->m_Affine : xform->m_Post;
|
||||
affine.A(m_Rand.Frand11<T>());
|
||||
|
Reference in New Issue
Block a user