mirror of
https://bitbucket.org/mfeemster/fractorium.git
synced 2025-06-30 21:36:33 -04:00
--User changes
-Optimization and correction for hexaplay3D and hexnix3D. -Major optimization on the GPU for flames which only have one xform, by skipping all random xform selection code. -Changes to how xaos is "preserved" when adding new xforms, copying xforms and duplicating xforms. --Duplicating xforms when no xaos is present in the flame now maintains not using xaos, and keeps all values as one. --Duplicating xforms when xaos is present, will result in xaos rows and columns that are the same as the xforms being duplicated, with the new row and column area having values of 1. --Duplicating xforms when xaos is present, while Control is pressed, will result in xaos rows and columns that have values of 0, with the new row and column area having values of 1. ---Copying xforms has the same behavior as duplicating with Control pressed. --Bug fixes -hexaplay3D, hexnix3D and post_smartcrop were wrong on the GPU because they are the rare variations which preserve state between iterations. -Changing the sub batch size would improperly wrong the wrong number of iterations. --Code changes -Some functions in Affine2D made const. -Change in the index at which points and variation state are preserved between kernel calls. -Some arguments in some member functions of GLEmberController made const.
This commit is contained in:
@ -375,7 +375,7 @@ public:
|
||||
/// </summary>
|
||||
/// <param name="xform">A pointer to the xform to find</param>
|
||||
/// <returns>The index of the matched xform if found, else -1.</returns>
|
||||
intmax_t GetXformIndex(Xform<T>* xform) const
|
||||
intmax_t GetXformIndex(const Xform<T>* xform) const
|
||||
{
|
||||
intmax_t index = -1;
|
||||
|
||||
@ -392,7 +392,7 @@ public:
|
||||
/// <param name="xform">A pointer to the xform to find</param>
|
||||
/// <param name="forceFinal">If true, return the index of the final xform when its pointer is passed, even if a final is not present. Default: false.</param>
|
||||
/// <returns>The index of the matched xform if found, else -1.</returns>
|
||||
intmax_t GetTotalXformIndex(Xform<T>* xform, bool forceFinal = false) const
|
||||
intmax_t GetTotalXformIndex(const Xform<T>* xform, bool forceFinal = false) const
|
||||
{
|
||||
size_t totalXformCount = TotalXformCount(forceFinal);
|
||||
|
||||
@ -427,7 +427,7 @@ public:
|
||||
/// </summary>
|
||||
/// <param name="xform">A pointer to the xform to test</param>
|
||||
/// <returns>True if matched, else false.</returns>
|
||||
bool IsFinalXform(Xform<T>* xform) const
|
||||
bool IsFinalXform(const Xform<T>* xform) const
|
||||
{
|
||||
return &m_FinalXform == xform;
|
||||
}
|
||||
@ -640,6 +640,22 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Compute the total number of state fields within all variations of all xforms.
|
||||
/// </summary>
|
||||
/// <returns>The number of state fields</returns>
|
||||
size_t GetVariationStateParamCount() const
|
||||
{
|
||||
size_t count = 0, i = 0, j = 0;
|
||||
|
||||
while (auto xform = GetTotalXform(i++))
|
||||
for (j = 0; j < xform->TotalVariationCount(); j++)
|
||||
if (auto var = xform->GetVariation(j))
|
||||
count += var->StateParamCount();
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Flatten all xforms by adding a flatten variation if none is present, and if none of the
|
||||
/// variations or parameters in the vector are not present.
|
||||
|
Reference in New Issue
Block a user