mirror of
https://bitbucket.org/mfeemster/fractorium.git
synced 2025-07-12 03:04:51 -04:00
Numerous fixes
0.4.0.5 Beta 07/18/2014 --User Changes Allow for vibrancy values > 1. Add flatten and unflatten menu items. Automatically flatten like Apophysis does. Add plugin and new_linear tags to Xml to be compatible with Apophysis. --Bug Fixes Fix blur, blur3d, bubble, cropn, cross, curl, curl3d, epispiral, ho, julia3d, julia3dz, loonie, mirror_x, mirror_y, mirror_z, rotate_x, sinusoidal, spherical, spherical3d, stripes. Unique filename on final render was completely broken. Two severe OpenCL bugs. Random seeds were biased and fusing was being reset too often leading to results that differ from the CPU. Subtle, but sometimes severe bug in the setup of the xaos weights. Use properly defined epsilon by getting the value from std::numeric_limits, rather than hard coding 1e-6 or 1e-10. Omit incorrect usage of epsilon everywhere. It should not be automatically added to denominators. Rather, it should only be used if the denominator is zero. Force final render progress bars to 100 on completion. Sometimes they didn't seem to make it there. Make variation name and params comparisons be case insensitive. --Code Changes Make ForEach and FindIf wrappers around std::for_each and std::find_if.
This commit is contained in:
@ -8,6 +8,31 @@
|
||||
/// </summary>
|
||||
namespace EmberNs
|
||||
{
|
||||
/// <summary>
|
||||
/// Thin wrapper around std::find_if() to relieve the caller of having to
|
||||
/// pass the implicitly obvious .begin() and .end(), and then compare the results to .end().
|
||||
/// </summary>
|
||||
/// <param name="container">The container to call find_if() on</param>
|
||||
/// <param name="pred">The lambda to call on each element</param>
|
||||
/// <returns>True if pred returned true once, else false.</returns>
|
||||
template<class c, class pr>
|
||||
bool inline FindIf(c& container, pr pred)
|
||||
{
|
||||
return std::find_if(container.begin(), container.end(), pred) != container.end();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Thin wrapper around std::for_each() to relieve the caller of having to
|
||||
/// pass the implicitly obvious .begin() and .end().
|
||||
/// </summary>
|
||||
/// <param name="container">The container to call for_each() on</param>
|
||||
/// <param name="pred">The lambda to call on each element</param>
|
||||
template<class c, class fn>
|
||||
void inline ForEach(c& container, fn func)
|
||||
{
|
||||
std::for_each(container.begin(), container.end(), func);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// After a run completes, information about what was run can be saved as strings to the comments
|
||||
/// section of a jpg or png file. This class is just a container for those values.
|
||||
@ -100,7 +125,7 @@ public:
|
||||
{
|
||||
stringstream ss;
|
||||
|
||||
std::for_each(errorReport.begin() , errorReport.end() , [&](string s) { ss << s << endl; });
|
||||
ForEach(errorReport, [&](string s) { ss << s << endl; });
|
||||
|
||||
return ss.str();
|
||||
}
|
||||
@ -515,15 +540,15 @@ static inline T Powq4c(T x, T y)
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Return EPS6 if the passed in value was zero, else return the value.
|
||||
/// Return EPS if the passed in value was zero, else return the value.
|
||||
/// </summary>
|
||||
/// <param name="x">The value</param>
|
||||
/// <param name="y">The y distance</param>
|
||||
/// <returns>EPS6 or the value if it was non-zero</returns>
|
||||
/// <returns>EPS or the value if it was non-zero</returns>
|
||||
template <typename T>
|
||||
static inline T Zeps(T x)
|
||||
{
|
||||
return x == 0 ? EPS6 : x;
|
||||
return x == 0 ? EPS : x;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
Reference in New Issue
Block a user