mirror of
https://bitbucket.org/mfeemster/fractorium.git
synced 2026-04-15 05:21:04 -04:00
--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.
This commit is contained in:
@ -17,7 +17,7 @@ namespace EmberNs
|
||||
/// Bit position specifying the presence of each type of 3D parameter.
|
||||
/// One, none, some or all of these can be present.
|
||||
/// </summary>
|
||||
enum class eProjBits : size_t
|
||||
enum class eProjBits : et
|
||||
{
|
||||
PROJBITS_ZPOS = 1,
|
||||
PROJBITS_PERSP = 2,
|
||||
@ -493,16 +493,16 @@ public:
|
||||
m_CamMat[1][2] = std::sin(m_CamPitch) * std::cos(-m_CamYaw);
|
||||
m_CamMat[2][2] = std::cos(m_CamPitch);
|
||||
|
||||
if (projBits & size_t(eProjBits::PROJBITS_BLUR))
|
||||
if (projBits & et(eProjBits::PROJBITS_BLUR))
|
||||
{
|
||||
if (projBits & size_t(eProjBits::PROJBITS_YAW))
|
||||
if (projBits & et(eProjBits::PROJBITS_YAW))
|
||||
m_ProjFunc = &EmberNs::Ember<T>::ProjectPitchYawDepthBlur;
|
||||
else
|
||||
m_ProjFunc = &EmberNs::Ember<T>::ProjectPitchDepthBlur;
|
||||
}
|
||||
else if ((projBits & size_t(eProjBits::PROJBITS_PITCH)) || (projBits & size_t(eProjBits::PROJBITS_YAW)))
|
||||
else if ((projBits & et(eProjBits::PROJBITS_PITCH)) || (projBits & et(eProjBits::PROJBITS_YAW)))
|
||||
{
|
||||
if (projBits & size_t(eProjBits::PROJBITS_YAW))
|
||||
if (projBits & et(eProjBits::PROJBITS_YAW))
|
||||
m_ProjFunc = &EmberNs::Ember<T>::ProjectPitchYaw;
|
||||
else
|
||||
m_ProjFunc = &EmberNs::Ember<T>::ProjectPitch;
|
||||
@ -677,9 +677,9 @@ public:
|
||||
|
||||
while (auto xform = GetTotalXform(xformIndex++))
|
||||
{
|
||||
unflattened |= xform->DeleteVariationById(VAR_PRE_FLATTEN);
|
||||
unflattened |= xform->DeleteVariationById(VAR_FLATTEN);
|
||||
unflattened |= xform->DeleteVariationById(VAR_POST_FLATTEN);
|
||||
unflattened |= xform->DeleteVariationById(eVariationId::VAR_PRE_FLATTEN);
|
||||
unflattened |= xform->DeleteVariationById(eVariationId::VAR_FLATTEN);
|
||||
unflattened |= xform->DeleteVariationById(eVariationId::VAR_POST_FLATTEN);
|
||||
}
|
||||
|
||||
return unflattened;
|
||||
@ -1136,15 +1136,15 @@ public:
|
||||
{
|
||||
size_t val = 0;
|
||||
|
||||
if (m_CamZPos != 0) val |= size_t(eProjBits::PROJBITS_ZPOS);
|
||||
if (m_CamZPos != 0) val |= et(eProjBits::PROJBITS_ZPOS);
|
||||
|
||||
if (m_CamPerspective != 0) val |= size_t(eProjBits::PROJBITS_PERSP);
|
||||
if (m_CamPerspective != 0) val |= et(eProjBits::PROJBITS_PERSP);
|
||||
|
||||
if (m_CamPitch != 0) val |= size_t(eProjBits::PROJBITS_PITCH);
|
||||
if (m_CamPitch != 0) val |= et(eProjBits::PROJBITS_PITCH);
|
||||
|
||||
if (m_CamYaw != 0) val |= size_t(eProjBits::PROJBITS_YAW);
|
||||
if (m_CamYaw != 0) val |= et(eProjBits::PROJBITS_YAW);
|
||||
|
||||
if (m_CamDepthBlur != 0) val |= size_t(eProjBits::PROJBITS_BLUR);
|
||||
if (m_CamDepthBlur != 0) val |= et(eProjBits::PROJBITS_BLUR);
|
||||
|
||||
return val;
|
||||
}
|
||||
|
||||
@ -74,6 +74,7 @@ namespace EmberNs
|
||||
#define FLOAT_MIN_TAN -FLOAT_MAX_TAN
|
||||
#define EMPTYFIELD -9999
|
||||
typedef std::chrono::high_resolution_clock Clock;
|
||||
typedef uint et;
|
||||
|
||||
/// <summary>
|
||||
/// Thin wrapper around getting the current time in milliseconds.
|
||||
@ -119,17 +120,17 @@ static inline size_t NowMs()
|
||||
#define m23T glm::detail::tmat2x3<T, glm::defaultp>
|
||||
#endif
|
||||
|
||||
enum class eInterp : uint { EMBER_INTERP_LINEAR = 0, EMBER_INTERP_SMOOTH = 1 };
|
||||
enum class eAffineInterp : uint { AFFINE_INTERP_LINEAR = 0, AFFINE_INTERP_LOG = 1, AFFINE_INTERP_COMPAT = 2, AFFINE_INTERP_OLDER = 3 };
|
||||
enum class ePaletteMode : uint { PALETTE_STEP = 0, PALETTE_LINEAR = 1 };
|
||||
enum class ePaletteInterp : uint { INTERP_HSV = 0, INTERP_SWEEP = 1 };
|
||||
enum class eMotion : uint { MOTION_SIN = 1, MOTION_TRIANGLE = 2, MOTION_HILL = 3, MOTION_SAW = 4 };
|
||||
enum class eProcessAction : uint { NOTHING = 0, ACCUM_ONLY = 1, FILTER_AND_ACCUM = 2, KEEP_ITERATING = 3, FULL_RENDER = 4 };
|
||||
enum class eProcessState : uint { NONE = 0, ITER_STARTED = 1, ITER_DONE = 2, FILTER_DONE = 3, ACCUM_DONE = 4 };
|
||||
enum class eInteractiveFilter : uint { FILTER_LOG = 0, FILTER_DE = 1 };
|
||||
enum class eScaleType : uint { SCALE_NONE = 0, SCALE_WIDTH = 1, SCALE_HEIGHT = 2 };
|
||||
enum class eRenderStatus : uint { RENDER_OK = 0, RENDER_ERROR = 1, RENDER_ABORT = 2 };
|
||||
enum class eEmberMotionParam : uint//These must remain in this order forever.
|
||||
enum class eInterp : et { EMBER_INTERP_LINEAR = 0, EMBER_INTERP_SMOOTH = 1 };
|
||||
enum class eAffineInterp : et { AFFINE_INTERP_LINEAR = 0, AFFINE_INTERP_LOG = 1, AFFINE_INTERP_COMPAT = 2, AFFINE_INTERP_OLDER = 3 };
|
||||
enum class ePaletteMode : et { PALETTE_STEP = 0, PALETTE_LINEAR = 1 };
|
||||
enum class ePaletteInterp : et { INTERP_HSV = 0, INTERP_SWEEP = 1 };
|
||||
enum class eMotion : et { MOTION_SIN = 1, MOTION_TRIANGLE = 2, MOTION_HILL = 3, MOTION_SAW = 4 };
|
||||
enum class eProcessAction : et { NOTHING = 0, ACCUM_ONLY = 1, FILTER_AND_ACCUM = 2, KEEP_ITERATING = 3, FULL_RENDER = 4 };
|
||||
enum class eProcessState : et { NONE = 0, ITER_STARTED = 1, ITER_DONE = 2, FILTER_DONE = 3, ACCUM_DONE = 4 };
|
||||
enum class eInteractiveFilter : et { FILTER_LOG = 0, FILTER_DE = 1 };
|
||||
enum class eScaleType : et { SCALE_NONE = 0, SCALE_WIDTH = 1, SCALE_HEIGHT = 2 };
|
||||
enum class eRenderStatus : et { RENDER_OK = 0, RENDER_ERROR = 1, RENDER_ABORT = 2 };
|
||||
enum class eEmberMotionParam : et//These must remain in this order forever.
|
||||
{
|
||||
FLAME_MOTION_NONE,
|
||||
FLAME_MOTION_ZOOM,
|
||||
|
||||
@ -53,6 +53,7 @@
|
||||
#include <sys/stat.h>
|
||||
#include <thread>
|
||||
#include <time.h>
|
||||
#include <type_traits>
|
||||
#include <vector>
|
||||
#include <unordered_map>
|
||||
|
||||
|
||||
@ -106,7 +106,7 @@ public:
|
||||
{
|
||||
size_t found = 0;
|
||||
//Remove linear.
|
||||
destXform->DeleteVariationById(VAR_LINEAR);
|
||||
destXform->DeleteVariationById(eVariationId::VAR_LINEAR);
|
||||
|
||||
//Only do the next substitution for log interpolation.
|
||||
if ((i == 0 && destEmbers[i].m_AffineInterp == eAffineInterp::AFFINE_INTERP_LOG) ||
|
||||
@ -128,13 +128,13 @@ public:
|
||||
//Interpolate these against a 180 degree rotated identity
|
||||
//with weight -1.
|
||||
//Added JULIAN/JULIASCOPE to get rid of black wedges.
|
||||
if (destOtherXform->GetVariationById(VAR_SPHERICAL) ||
|
||||
destOtherXform->GetVariationById(VAR_NGON) ||
|
||||
destOtherXform->GetVariationById(VAR_JULIAN) ||
|
||||
destOtherXform->GetVariationById(VAR_JULIASCOPE) ||
|
||||
destOtherXform->GetVariationById(VAR_POLAR) ||
|
||||
destOtherXform->GetVariationById(VAR_WEDGE_SPH) ||
|
||||
destOtherXform->GetVariationById(VAR_WEDGE_JULIA))
|
||||
if (destOtherXform->GetVariationById(eVariationId::VAR_SPHERICAL) ||
|
||||
destOtherXform->GetVariationById(eVariationId::VAR_NGON) ||
|
||||
destOtherXform->GetVariationById(eVariationId::VAR_JULIAN) ||
|
||||
destOtherXform->GetVariationById(eVariationId::VAR_JULIASCOPE) ||
|
||||
destOtherXform->GetVariationById(eVariationId::VAR_POLAR) ||
|
||||
destOtherXform->GetVariationById(eVariationId::VAR_WEDGE_SPH) ||
|
||||
destOtherXform->GetVariationById(eVariationId::VAR_WEDGE_JULIA))
|
||||
{
|
||||
destXform->AddVariation(new LinearVariation<T>(-1));
|
||||
//Set the coefs appropriately.
|
||||
@ -163,7 +163,7 @@ public:
|
||||
|
||||
destOtherXform = destEmbers[i + ii].GetTotalXform(xf);
|
||||
|
||||
if (destOtherXform->GetVariationById(VAR_RECTANGLES))
|
||||
if (destOtherXform->GetVariationById(eVariationId::VAR_RECTANGLES))
|
||||
{
|
||||
RectanglesVariation<T>* var = new RectanglesVariation<T>();
|
||||
var->SetParamVal("rectangles_x", 0);
|
||||
@ -172,7 +172,7 @@ public:
|
||||
found++;
|
||||
}
|
||||
|
||||
if (destOtherXform->GetVariationById(VAR_RINGS2))
|
||||
if (destOtherXform->GetVariationById(eVariationId::VAR_RINGS2))
|
||||
{
|
||||
Rings2Variation<T>* var = new Rings2Variation<T>();
|
||||
var->SetParamVal("rings2_val", 0);
|
||||
@ -180,14 +180,14 @@ public:
|
||||
found++;
|
||||
}
|
||||
|
||||
if (destOtherXform->GetVariationById(VAR_FAN2))
|
||||
if (destOtherXform->GetVariationById(eVariationId::VAR_FAN2))
|
||||
{
|
||||
Fan2Variation<T>* var = new Fan2Variation<T>();
|
||||
destXform->AddVariation(var);
|
||||
found++;
|
||||
}
|
||||
|
||||
if (destOtherXform->GetVariationById(VAR_BLOB))
|
||||
if (destOtherXform->GetVariationById(eVariationId::VAR_BLOB))
|
||||
{
|
||||
BlobVariation<T>* var = new BlobVariation<T>();
|
||||
var->SetParamVal("blob_low", 1);
|
||||
@ -195,14 +195,14 @@ public:
|
||||
found++;
|
||||
}
|
||||
|
||||
if (destOtherXform->GetVariationById(VAR_PERSPECTIVE))
|
||||
if (destOtherXform->GetVariationById(eVariationId::VAR_PERSPECTIVE))
|
||||
{
|
||||
PerspectiveVariation<T>* var = new PerspectiveVariation<T>();
|
||||
destXform->AddVariation(var);
|
||||
found++;
|
||||
}
|
||||
|
||||
if (destOtherXform->GetVariationById(VAR_CURL))
|
||||
if (destOtherXform->GetVariationById(eVariationId::VAR_CURL))
|
||||
{
|
||||
CurlVariation<T>* var = new CurlVariation<T>();
|
||||
var->SetParamVal("curl_c1", 0);
|
||||
@ -210,7 +210,7 @@ public:
|
||||
found++;
|
||||
}
|
||||
|
||||
if (destOtherXform->GetVariationById(VAR_SUPER_SHAPE))
|
||||
if (destOtherXform->GetVariationById(eVariationId::VAR_SUPER_SHAPE))
|
||||
{
|
||||
SuperShapeVariation<T>* var = new SuperShapeVariation<T>();
|
||||
var->SetParamVal("super_shape_n1", 2);
|
||||
@ -237,13 +237,13 @@ public:
|
||||
|
||||
destOtherXform = destEmbers[i + ii].GetTotalXform(xf);
|
||||
|
||||
if (destOtherXform->GetVariationById(VAR_FAN))
|
||||
if (destOtherXform->GetVariationById(eVariationId::VAR_FAN))
|
||||
{
|
||||
destXform->AddVariation(new FanVariation<T>());
|
||||
found++;
|
||||
}
|
||||
|
||||
if (destOtherXform->GetVariationById(VAR_RINGS))
|
||||
if (destOtherXform->GetVariationById(eVariationId::VAR_RINGS))
|
||||
{
|
||||
destXform->AddVariation(new RingsVariation<T>());
|
||||
found++;
|
||||
|
||||
@ -1262,7 +1262,7 @@ EmberStats Renderer<T, bucketT>::Iterate(size_t iterCount, size_t temporalSample
|
||||
{
|
||||
#endif
|
||||
#if defined(WIN32)
|
||||
SetThreadPriority(GetCurrentThread(), m_Priority);
|
||||
SetThreadPriority(GetCurrentThread(), int(m_Priority));
|
||||
#elif defined(__APPLE__)
|
||||
sched_param sp = {0};
|
||||
sp.sched_priority = m_Priority;
|
||||
|
||||
@ -587,10 +587,10 @@ size_t RendererBase::ThreadCount() const { return m_ThreadsToUse; }
|
||||
|
||||
/// <summary>
|
||||
/// Get the renderer type enum.
|
||||
/// CPU_RENDERER for this class, other values for derived classes.
|
||||
/// eRendererType::CPU_RENDERER for this class, other values for derived classes.
|
||||
/// </summary>
|
||||
/// <returns>CPU_RENDERER</returns>
|
||||
eRendererType RendererBase::RendererType() const { return CPU_RENDERER; }
|
||||
/// <returns>eRendererType::CPU_RENDERER</returns>
|
||||
eRendererType RendererBase::RendererType() const { return eRendererType::CPU_RENDERER; }
|
||||
|
||||
/// <summary>
|
||||
/// //Non-virtual threading control.
|
||||
|
||||
@ -82,7 +82,7 @@ public:
|
||||
/// Add more in the future as different rendering methods are experimented with.
|
||||
/// Possible values might be: CPU+OpenGL, Particle, Inverse.
|
||||
/// </summary>
|
||||
enum eRendererType { CPU_RENDERER, OPENCL_RENDERER };
|
||||
enum class eRendererType : et { CPU_RENDERER, OPENCL_RENDERER };
|
||||
|
||||
/// <summary>
|
||||
/// A base class with virtual functions to allow both templating and polymorphism to work together.
|
||||
|
||||
@ -14,7 +14,7 @@ namespace EmberNs
|
||||
/// <summary>
|
||||
/// Mutation mode enum.
|
||||
/// </summary>
|
||||
enum eMutateMode
|
||||
enum class eMutateMode : int
|
||||
{
|
||||
MUTATE_NOT_SPECIFIED = -1,
|
||||
MUTATE_ALL_VARIATIONS = 0,
|
||||
@ -29,7 +29,7 @@ enum eMutateMode
|
||||
/// <summary>
|
||||
/// Cross mode enum.
|
||||
/// </summary>
|
||||
enum eCrossMode
|
||||
enum class eCrossMode : int
|
||||
{
|
||||
CROSS_NOT_SPECIFIED = -1,
|
||||
CROSS_UNION = 0,
|
||||
@ -179,7 +179,7 @@ public:
|
||||
/// <param name="mode">The mutation mode</param>
|
||||
/// <param name="useVars">The variations to use if the mutation mode is random</param>
|
||||
/// <param name="sym">The type of symmetry to add if random specified. If 0, it will be added randomly.</param>
|
||||
/// <param name="speed">The speed to multiply the pre affine transforms by if the mutate mode is MUTATE_ALL_COEFS, else ignored.</param>
|
||||
/// <param name="speed">The speed to multiply the pre affine transforms by if the mutate mode is eMutateMode::MUTATE_ALL_COEFS, else ignored.</param>
|
||||
/// <param name="maxVars">The maximum number of variations to allow in any single xform in the ember.</param>
|
||||
/// <returns>A string describing what was done</returns>
|
||||
string Mutate(Ember<T>& ember, eMutateMode mode, vector<eVariationId>& useVars, intmax_t sym, T speed, size_t maxVars)
|
||||
@ -192,27 +192,27 @@ public:
|
||||
mutation.Clear();
|
||||
|
||||
//If mutate_mode = -1, choose a random mutation mode.
|
||||
if (mode == MUTATE_NOT_SPECIFIED)
|
||||
if (mode == eMutateMode::MUTATE_NOT_SPECIFIED)
|
||||
{
|
||||
randSelect = m_Rand.Frand01<T>();
|
||||
|
||||
if (randSelect < T(0.1))
|
||||
mode = MUTATE_ALL_VARIATIONS;
|
||||
mode = eMutateMode::MUTATE_ALL_VARIATIONS;
|
||||
else if (randSelect < T(0.3))
|
||||
mode = MUTATE_ONE_XFORM_COEFS;
|
||||
mode = eMutateMode::MUTATE_ONE_XFORM_COEFS;
|
||||
else if (randSelect < T(0.5))
|
||||
mode = MUTATE_ADD_SYMMETRY;
|
||||
mode = eMutateMode::MUTATE_ADD_SYMMETRY;
|
||||
else if (randSelect < T(0.6))
|
||||
mode = MUTATE_POST_XFORMS;
|
||||
mode = eMutateMode::MUTATE_POST_XFORMS;
|
||||
else if (randSelect < T(0.7))
|
||||
mode = MUTATE_COLOR_PALETTE;
|
||||
mode = eMutateMode::MUTATE_COLOR_PALETTE;
|
||||
else if (randSelect < T(0.8))
|
||||
mode = MUTATE_DELETE_XFORM;
|
||||
mode = eMutateMode::MUTATE_DELETE_XFORM;
|
||||
else
|
||||
mode = MUTATE_ALL_COEFS;
|
||||
mode = eMutateMode::MUTATE_ALL_COEFS;
|
||||
}
|
||||
|
||||
if (mode == MUTATE_ALL_VARIATIONS)
|
||||
if (mode == eMutateMode::MUTATE_ALL_VARIATIONS)
|
||||
{
|
||||
os << "mutate all variations";
|
||||
|
||||
@ -248,7 +248,7 @@ public:
|
||||
}
|
||||
while (!done);
|
||||
}
|
||||
else if (mode == MUTATE_ONE_XFORM_COEFS)
|
||||
else if (mode == eMutateMode::MUTATE_ONE_XFORM_COEFS)
|
||||
{
|
||||
//Generate a 2-xform random.
|
||||
Random(mutation, useVars, sym, 2, maxVars);
|
||||
@ -271,12 +271,12 @@ public:
|
||||
xform1->m_Affine.m_Mat[i][j] = xform2->m_Affine.m_Mat[i][j];
|
||||
}
|
||||
}
|
||||
else if (mode == MUTATE_ADD_SYMMETRY)
|
||||
else if (mode == eMutateMode::MUTATE_ADD_SYMMETRY)
|
||||
{
|
||||
os << "mutate symmetry";
|
||||
ember.AddSymmetry(0, m_Rand);
|
||||
}
|
||||
else if (mode == MUTATE_POST_XFORMS)
|
||||
else if (mode == eMutateMode::MUTATE_POST_XFORMS)
|
||||
{
|
||||
bool same = (m_Rand.Rand() & 3) > 0;//25% chance of using the same post for all of them.
|
||||
size_t b = 1 + m_Rand.Rand() % 6;
|
||||
@ -353,7 +353,7 @@ public:
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (mode == MUTATE_COLOR_PALETTE)
|
||||
else if (mode == eMutateMode::MUTATE_COLOR_PALETTE)
|
||||
{
|
||||
T s = m_Rand.Frand01<T>();
|
||||
|
||||
@ -384,7 +384,7 @@ public:
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (mode == MUTATE_DELETE_XFORM)
|
||||
else if (mode == eMutateMode::MUTATE_DELETE_XFORM)
|
||||
{
|
||||
size_t nx = m_Rand.Rand() % ember.TotalXformCount();
|
||||
os << "mutate delete xform " << nx;
|
||||
@ -392,7 +392,7 @@ public:
|
||||
if (ember.TotalXformCount() > 1)
|
||||
ember.DeleteTotalXform(nx);
|
||||
}
|
||||
else if (mode == MUTATE_ALL_COEFS)
|
||||
else if (mode == eMutateMode::MUTATE_ALL_COEFS)
|
||||
{
|
||||
os << "mutate all coefs";
|
||||
Random(mutation, useVars, sym, ember.TotalXformCount(), maxVars);
|
||||
@ -422,7 +422,7 @@ public:
|
||||
/// <param name="emberOut">The result ember</param>
|
||||
/// <param name="crossMode">The cross mode</param>
|
||||
/// <returns>A string describing what was done</returns>
|
||||
string Cross(Ember<T>& ember0, Ember<T>& ember1, Ember<T>& emberOut, int crossMode)
|
||||
string Cross(Ember<T>& ember0, Ember<T>& ember1, Ember<T>& emberOut, eCrossMode crossMode)
|
||||
{
|
||||
uint rb;
|
||||
size_t i;
|
||||
@ -430,19 +430,19 @@ public:
|
||||
ostringstream os;
|
||||
char ministr[32];
|
||||
|
||||
if (crossMode == CROSS_NOT_SPECIFIED)
|
||||
if (crossMode == eCrossMode::CROSS_NOT_SPECIFIED)
|
||||
{
|
||||
T s = m_Rand.Frand01<T>();
|
||||
|
||||
if (s < 0.1)
|
||||
crossMode = CROSS_UNION;
|
||||
crossMode = eCrossMode::CROSS_UNION;
|
||||
else if (s < 0.2)
|
||||
crossMode = CROSS_INTERPOLATE;
|
||||
crossMode = eCrossMode::CROSS_INTERPOLATE;
|
||||
else
|
||||
crossMode = CROSS_ALTERNATE;
|
||||
crossMode = eCrossMode::CROSS_ALTERNATE;
|
||||
}
|
||||
|
||||
if (crossMode == CROSS_UNION)
|
||||
if (crossMode == eCrossMode::CROSS_UNION)
|
||||
{
|
||||
//Make a copy of the first ember.
|
||||
emberOut = ember0;
|
||||
@ -453,7 +453,7 @@ public:
|
||||
|
||||
os << "cross union";
|
||||
}
|
||||
else if (crossMode == CROSS_INTERPOLATE)
|
||||
else if (crossMode == eCrossMode::CROSS_INTERPOLATE)
|
||||
{
|
||||
//Linearly interpolate somewhere between the two.
|
||||
Ember<T> parents[2];
|
||||
@ -640,8 +640,8 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
//If first input variation is -1 random choose one to use or decide to use multiple.
|
||||
if (useVars.empty() || useVars[0] == -1)
|
||||
//If useVars is empty, randomly choose one to use or decide to use multiple.
|
||||
if (useVars.empty())
|
||||
var = m_Rand.RandBit() ? m_Rand.Rand() % varCount : -1;
|
||||
else
|
||||
var = -2;
|
||||
|
||||
@ -11,7 +11,7 @@ namespace EmberNs
|
||||
/// <summary>
|
||||
/// The types of spatial filters available.
|
||||
/// </summary>
|
||||
enum class eSpatialFilterType : size_t
|
||||
enum class eSpatialFilterType : et
|
||||
{
|
||||
GAUSSIAN_SPATIAL_FILTER,
|
||||
HERMITE_SPATIAL_FILTER,
|
||||
|
||||
@ -11,7 +11,7 @@ namespace EmberNs
|
||||
/// <summary>
|
||||
/// The types of temporal filters available.
|
||||
/// </summary>
|
||||
enum class eTemporalFilterType : size_t
|
||||
enum class eTemporalFilterType : et
|
||||
{
|
||||
BOX_TEMPORAL_FILTER,
|
||||
GAUSSIAN_TEMPORAL_FILTER,
|
||||
|
||||
@ -19,7 +19,7 @@ namespace EmberNs
|
||||
/// <summary>
|
||||
/// Enum to encapsulate and add type safety to the thread priority defines.
|
||||
/// </summary>
|
||||
enum eThreadPriority
|
||||
enum class eThreadPriority : int
|
||||
{
|
||||
LOWEST = THREAD_PRIORITY_LOWEST,//-2
|
||||
BELOW_NORMAL = THREAD_PRIORITY_BELOW_NORMAL,//-1
|
||||
@ -227,7 +227,7 @@ public:
|
||||
\
|
||||
private: \
|
||||
x(const x& other) = delete; \
|
||||
const x& operator=(const x& other) = delete//Semicolon deliberately omitted to force it on the caller.
|
||||
const x& operator=(const x& other) = delete//Semicolon deliberately omitted to force it on the caller.
|
||||
|
||||
//Use this if the body of the destructor is empty and is will be implemented inline in the header file.
|
||||
#define SINGLETON_DERIVED_IMPL(x) \
|
||||
@ -237,7 +237,7 @@ public:
|
||||
\
|
||||
private: \
|
||||
x(const x& other) = delete; \
|
||||
const x& operator=(const x& other) = delete
|
||||
const x& operator=(const x& other) = delete
|
||||
|
||||
/// <summary>
|
||||
/// Open a file in binary mode and read its entire contents into a vector of bytes. Optionally null terminate.
|
||||
|
||||
@ -20,7 +20,7 @@ template <typename T> class Xform;
|
||||
/// <summary>
|
||||
/// The type of variation: regular, pre or post.
|
||||
/// </summary>
|
||||
enum eVariationType
|
||||
enum class eVariationType : et
|
||||
{
|
||||
VARTYPE_REG,
|
||||
VARTYPE_PRE,
|
||||
@ -33,7 +33,7 @@ enum eVariationType
|
||||
/// to the output. However, if they did not involve the input points, they should be added
|
||||
/// to the output.
|
||||
/// </summary>
|
||||
enum eVariationAssignType
|
||||
enum class eVariationAssignType : et
|
||||
{
|
||||
ASSIGNTYPE_SET,
|
||||
ASSIGNTYPE_SUM
|
||||
@ -42,7 +42,7 @@ enum eVariationAssignType
|
||||
/// <summary>
|
||||
/// Complete list of every variation class ID.
|
||||
/// </summary>
|
||||
enum eVariationId
|
||||
enum class eVariationId : et
|
||||
{
|
||||
VAR_ARCH ,
|
||||
VAR_AUGER ,
|
||||
@ -520,8 +520,8 @@ enum eVariationId
|
||||
VAR_PRE_LINEAR,
|
||||
VAR_PRE_LINEAR_T,
|
||||
VAR_PRE_LINEAR_T3D,
|
||||
//VAR_PRE_LINEAR_XZ,
|
||||
//VAR_PRE_LINEAR_YZ,
|
||||
//eVariationId::VAR_PRE_LINEAR_XZ,
|
||||
//eVariationId::VAR_PRE_LINEAR_YZ,
|
||||
VAR_PRE_LINEAR3D,
|
||||
VAR_PRE_LISSAJOUS,
|
||||
VAR_PRE_LOG,
|
||||
@ -1002,7 +1002,7 @@ enum eVariationId
|
||||
VAR_POST_DC_TRIANGLE,
|
||||
VAR_POST_DC_ZTRANSL,
|
||||
|
||||
LAST_VAR = VAR_POST_DC_ZTRANSL + 1
|
||||
LAST_VAR = eVariationId::VAR_POST_DC_ZTRANSL + 1
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
@ -1077,7 +1077,7 @@ public:
|
||||
m_NeedPrecalcSqrtSumSquares = true;
|
||||
}
|
||||
|
||||
m_AssignType = ASSIGNTYPE_SET;
|
||||
m_AssignType = eVariationAssignType::ASSIGNTYPE_SET;
|
||||
SetType();
|
||||
}
|
||||
|
||||
@ -1150,7 +1150,7 @@ public:
|
||||
/// <param name="point">The point to read values from in the case of post, ignored for pre.</param>
|
||||
void PrecalcHelper(IteratorHelper<T>& iteratorHelper, Point<T>* point)
|
||||
{
|
||||
if (m_VarType == VARTYPE_PRE)
|
||||
if (m_VarType == eVariationType::VARTYPE_PRE)
|
||||
{
|
||||
if (m_NeedPrecalcSumSquares)
|
||||
{
|
||||
@ -1174,7 +1174,7 @@ public:
|
||||
if (m_NeedPrecalcAtanYX)
|
||||
iteratorHelper.m_PrecalcAtanyx = atan2(iteratorHelper.m_TransY, iteratorHelper.m_TransX);
|
||||
}
|
||||
else if (m_VarType == VARTYPE_POST)
|
||||
else if (m_VarType == eVariationType::VARTYPE_POST)
|
||||
{
|
||||
if (m_NeedPrecalcSumSquares)
|
||||
{
|
||||
@ -1208,7 +1208,7 @@ public:
|
||||
{
|
||||
ostringstream ss;
|
||||
|
||||
if (m_VarType == VARTYPE_PRE)
|
||||
if (m_VarType == eVariationType::VARTYPE_PRE)
|
||||
{
|
||||
if (m_NeedPrecalcSumSquares)
|
||||
{
|
||||
@ -1232,7 +1232,7 @@ public:
|
||||
if (m_NeedPrecalcAtanYX)
|
||||
ss << "\tprecalcAtanyx = atan2(transY, transX);\n";
|
||||
}
|
||||
else if (m_VarType == VARTYPE_POST)
|
||||
else if (m_VarType == eVariationType::VARTYPE_POST)
|
||||
{
|
||||
if (m_NeedPrecalcSumSquares)
|
||||
{
|
||||
@ -1385,9 +1385,9 @@ public:
|
||||
/// <returns>pre_, post_ or the empty string</returns>
|
||||
string Prefix() const
|
||||
{
|
||||
if (m_VarType == VARTYPE_PRE)
|
||||
if (m_VarType == eVariationType::VARTYPE_PRE)
|
||||
return "pre_";
|
||||
else if (m_VarType == VARTYPE_POST)
|
||||
else if (m_VarType == eVariationType::VARTYPE_POST)
|
||||
return "post_";
|
||||
else
|
||||
return "";
|
||||
@ -1427,11 +1427,11 @@ protected:
|
||||
void SetType()
|
||||
{
|
||||
if (m_Name.find("pre_") == 0)
|
||||
m_VarType = VARTYPE_PRE;
|
||||
m_VarType = eVariationType::VARTYPE_PRE;
|
||||
else if (m_Name.find("post_") == 0)
|
||||
m_VarType = VARTYPE_POST;
|
||||
m_VarType = eVariationType::VARTYPE_POST;
|
||||
else
|
||||
m_VarType = VARTYPE_REG;
|
||||
m_VarType = eVariationType::VARTYPE_REG;
|
||||
}
|
||||
|
||||
Xform<T>* m_Xform;//The parent Xform that this variation is a child of.
|
||||
@ -1452,7 +1452,7 @@ private:
|
||||
/// The type of parameter represented by ParamWithName<T>.
|
||||
/// This allows restricting of certain parameters to sensible values.
|
||||
/// </summary>
|
||||
enum eParamType
|
||||
enum class eParamType : et
|
||||
{
|
||||
REAL,
|
||||
REAL_CYCLIC,
|
||||
@ -1461,6 +1461,44 @@ enum eParamType
|
||||
INTEGER_NONZERO
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// Thin wrapper to allow << operator on param type.
|
||||
/// </summary>
|
||||
/// <param name="stream">The stream to insert into</param>
|
||||
/// <param name="t">The type whose string representation will be inserted into the stream</param>
|
||||
/// <returns></returns>
|
||||
static std::ostream& operator<<(std::ostream& stream, const eParamType& t)
|
||||
{
|
||||
switch (t)
|
||||
{
|
||||
case eParamType::REAL:
|
||||
stream << "real";
|
||||
break;
|
||||
|
||||
case eParamType::REAL_CYCLIC:
|
||||
stream << "cyclic";
|
||||
break;
|
||||
|
||||
case eParamType::REAL_NONZERO:
|
||||
stream << "non-zero";
|
||||
break;
|
||||
|
||||
case eParamType::INTEGER:
|
||||
stream << "integer";
|
||||
break;
|
||||
|
||||
case eParamType::INTEGER_NONZERO:
|
||||
stream << "integer non-zero";
|
||||
break;
|
||||
|
||||
default:
|
||||
stream << "error";
|
||||
break;
|
||||
}
|
||||
|
||||
return stream;
|
||||
}
|
||||
|
||||
template <typename T> class ParametricVariation;
|
||||
|
||||
/// <summary>
|
||||
@ -1487,7 +1525,7 @@ public:
|
||||
/// </summary>
|
||||
ParamWithName()
|
||||
{
|
||||
Init(nullptr, "", 0, REAL, TLOW, TMAX);
|
||||
Init(nullptr, "", 0, eParamType::REAL, TLOW, TMAX);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1502,7 +1540,7 @@ public:
|
||||
string name,
|
||||
size_t size = sizeof(T))
|
||||
{
|
||||
Init(param, name, 0, REAL, TLOW, TMAX, true, false, size);
|
||||
Init(param, name, 0, eParamType::REAL, TLOW, TMAX, true, false, size);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1517,7 +1555,7 @@ public:
|
||||
T* param,
|
||||
string name)
|
||||
{
|
||||
Init(param, name, 0, REAL, TLOW, TMAX, true, true);
|
||||
Init(param, name, 0, eParamType::REAL, TLOW, TMAX, true, true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1529,7 +1567,7 @@ public:
|
||||
/// <param name="type">The type of the parameter</param>
|
||||
/// <param name="min">The minimum value the parameter can be</param>
|
||||
/// <param name="max">The maximum value the parameter can be</param>
|
||||
ParamWithName(T* param, const string& name, T def = 0, eParamType type = REAL, T min = TLOW, T max = TMAX)
|
||||
ParamWithName(T* param, const string& name, T def = 0, eParamType type = eParamType::REAL, T min = TLOW, T max = TMAX)
|
||||
{
|
||||
Init(param, name, def, type, min, max);
|
||||
}
|
||||
@ -1586,7 +1624,7 @@ public:
|
||||
/// <param name="isPrecalc">Whether the parameter is actually a precalculated value. Default: false.</param>
|
||||
/// <param name="isState">Whether the parameter changes state between iterations. Default: false.</param>
|
||||
/// <param name="size">The length of the underlying memory in bytes. Needed for array types. Default: sizeof(T).</param>
|
||||
void Init(T* param, const string& name, T def = 0, eParamType type = REAL, T min = TLOW, T max = TMAX, bool isPrecalc = false, bool isState = false, size_t size = sizeof(T))
|
||||
void Init(T* param, const string& name, T def = 0, eParamType type = eParamType::REAL, T min = TLOW, T max = TMAX, bool isPrecalc = false, bool isState = false, size_t size = sizeof(T))
|
||||
{
|
||||
m_Param = param;
|
||||
m_Def = def;
|
||||
@ -1610,13 +1648,13 @@ public:
|
||||
{
|
||||
switch (m_Type)
|
||||
{
|
||||
case REAL :
|
||||
case eParamType::REAL:
|
||||
{
|
||||
*m_Param = std::max(std::min(val, m_Max), m_Min);
|
||||
break;
|
||||
}
|
||||
|
||||
case REAL_CYCLIC :
|
||||
case eParamType::REAL_CYCLIC :
|
||||
{
|
||||
if (val > m_Max)
|
||||
*m_Param = m_Min + fmod(val - m_Min, m_Max - m_Min);
|
||||
@ -1628,7 +1666,7 @@ public:
|
||||
break;
|
||||
}
|
||||
|
||||
case REAL_NONZERO :
|
||||
case eParamType::REAL_NONZERO :
|
||||
{
|
||||
T vd = std::max(std::min(val, m_Max), m_Min);
|
||||
|
||||
@ -1640,13 +1678,13 @@ public:
|
||||
break;
|
||||
}
|
||||
|
||||
case INTEGER :
|
||||
case eParamType::INTEGER :
|
||||
{
|
||||
*m_Param = T(int(std::max(std::min<T>(T(Floor<T>(val + T(0.5))), m_Max), m_Min)));
|
||||
break;
|
||||
}
|
||||
|
||||
case INTEGER_NONZERO :
|
||||
case eParamType::INTEGER_NONZERO :
|
||||
default:
|
||||
{
|
||||
int vi = int(std::max(std::min<T>(T(Floor<T>(val + T(0.5))), m_Max), m_Min));
|
||||
@ -2098,7 +2136,7 @@ protected:
|
||||
/// Assign type defaults to set.
|
||||
/// </summary>
|
||||
|
||||
#define MAKEPREPOSTVAR(varName, stringName, enumName) MAKEPREPOSTVARASSIGN(varName, stringName, enumName, ASSIGNTYPE_SET)
|
||||
#define MAKEPREPOSTVAR(varName, stringName, enumName) MAKEPREPOSTVARASSIGN(varName, stringName, enumName, eVariationAssignType::ASSIGNTYPE_SET)
|
||||
#define MAKEPREPOSTVARASSIGN(varName, stringName, enumName, assignType) \
|
||||
template <typename T> \
|
||||
class EMBER_API Pre##varName##Variation : public varName##Variation<T> \
|
||||
@ -2107,7 +2145,7 @@ protected:
|
||||
public: \
|
||||
Pre##varName##Variation(T weight = 1.0) : varName##Variation<T>(weight) \
|
||||
{ \
|
||||
m_VariationId = VAR_PRE_##enumName; \
|
||||
m_VariationId = eVariationId::VAR_PRE_##enumName; \
|
||||
m_Name = "pre_"#stringName; \
|
||||
m_AssignType = assignType; \
|
||||
SetType(); \
|
||||
@ -2123,7 +2161,7 @@ protected:
|
||||
public:\
|
||||
Post##varName##Variation(T weight = 1.0) : varName##Variation<T>(weight) \
|
||||
{ \
|
||||
m_VariationId = VAR_POST_##enumName; \
|
||||
m_VariationId = eVariationId::VAR_POST_##enumName; \
|
||||
m_Name = "post_"#stringName; \
|
||||
m_AssignType = assignType; \
|
||||
SetType(); \
|
||||
@ -2217,7 +2255,7 @@ protected:
|
||||
/// avoid having to change the constructor arguments for about 300 variations.
|
||||
/// </summary>
|
||||
|
||||
#define MAKEPREPOSTPARVAR(varName, stringName, enumName) MAKEPREPOSTPARVARASSIGN(varName, stringName, enumName, ASSIGNTYPE_SET)
|
||||
#define MAKEPREPOSTPARVAR(varName, stringName, enumName) MAKEPREPOSTPARVARASSIGN(varName, stringName, enumName, eVariationAssignType::ASSIGNTYPE_SET)
|
||||
#define MAKEPREPOSTPARVARASSIGN(varName, stringName, enumName, assignType) \
|
||||
template <typename T> \
|
||||
class EMBER_API Pre##varName##Variation : public varName##Variation <T> \
|
||||
@ -2228,7 +2266,7 @@ protected:
|
||||
public:\
|
||||
Pre##varName##Variation(T weight = 1.0) : varName##Variation<T>(weight) \
|
||||
{ \
|
||||
m_VariationId = VAR_PRE_##enumName; \
|
||||
m_VariationId = eVariationId::VAR_PRE_##enumName; \
|
||||
m_Name = "pre_"#stringName; \
|
||||
m_AssignType = assignType; \
|
||||
SetType(); \
|
||||
@ -2247,7 +2285,7 @@ protected:
|
||||
public:\
|
||||
Post##varName##Variation(T weight = 1.0) : varName##Variation<T>(weight) \
|
||||
{ \
|
||||
m_VariationId = VAR_POST_##enumName; \
|
||||
m_VariationId = eVariationId::VAR_POST_##enumName; \
|
||||
m_Name = "post_"#stringName; \
|
||||
m_AssignType = assignType; \
|
||||
SetType(); \
|
||||
|
||||
@ -36,7 +36,7 @@ public:
|
||||
/// </summary>
|
||||
VariationList()
|
||||
{
|
||||
m_Variations.reserve(eVariationId::LAST_VAR);
|
||||
m_Variations.reserve(size_t(eVariationId::LAST_VAR));
|
||||
ADDPREPOSTREGVAR(Linear)
|
||||
ADDPREPOSTREGVAR(Sinusoidal)
|
||||
ADDPREPOSTREGVAR(Spherical)
|
||||
@ -363,17 +363,19 @@ public:
|
||||
m_PostVariations.reserve(m_Variations.size() / 3);
|
||||
m_ParametricVariations.reserve(size_t(m_Variations.size() * .90));//This is a rough guess at how many are parametric.
|
||||
|
||||
for (auto var : m_Variations) if (var->VarType() == VARTYPE_REG) m_RegVariations.push_back(var);
|
||||
|
||||
for (auto var : m_Variations) if (var->VarType() == VARTYPE_PRE) m_PreVariations.push_back(var);
|
||||
|
||||
for (auto var : m_Variations) if (var->VarType() == VARTYPE_POST) m_PostVariations.push_back(var);
|
||||
|
||||
//Keep a list of which variations derive from ParametricVariation.
|
||||
//Place pointers to variations in vectors specific to their type.
|
||||
//Many of the elements in m_ParametricVariations will be present in the reg, pre and post vectors.
|
||||
//Note that these are not new copies, rather just pointers to the original instances in m_Variations.
|
||||
for (size_t i = 0; i < m_Variations.size(); i++)
|
||||
for (auto var : m_Variations)
|
||||
{
|
||||
if (ParametricVariation<T>* parVar = dynamic_cast<ParametricVariation<T>*>(m_Variations[i]))
|
||||
if (var->VarType() == eVariationType::VARTYPE_REG)
|
||||
m_RegVariations.push_back(var);
|
||||
else if (var->VarType() == eVariationType::VARTYPE_PRE)
|
||||
m_PreVariations.push_back(var);
|
||||
else if (var->VarType() == eVariationType::VARTYPE_POST)
|
||||
m_PostVariations.push_back(var);
|
||||
|
||||
if (auto parVar = dynamic_cast<ParametricVariation<T>*>(var))
|
||||
m_ParametricVariations.push_back(parVar);
|
||||
}
|
||||
}
|
||||
@ -401,14 +403,24 @@ public:
|
||||
/// <returns>A pointer to the variation of the specified type at the index if in range, else nullptr.</returns>
|
||||
const Variation<T>* GetVariation(size_t index, eVariationType varType) const
|
||||
{
|
||||
if (varType == VARTYPE_REG)
|
||||
return index < m_RegVariations.size() ? m_RegVariations[index] : nullptr;
|
||||
else if (varType == VARTYPE_PRE)
|
||||
return index < m_PreVariations.size() ? m_PreVariations[index] : nullptr;
|
||||
else if (varType == VARTYPE_POST)
|
||||
return index < m_PostVariations.size() ? m_PostVariations[index] : nullptr;
|
||||
else
|
||||
return nullptr;
|
||||
switch (varType)
|
||||
{
|
||||
case eVariationType::VARTYPE_REG:
|
||||
return index < m_RegVariations.size() ? m_RegVariations[index] : nullptr;
|
||||
break;
|
||||
|
||||
case eVariationType::VARTYPE_PRE:
|
||||
return index < m_PreVariations.size() ? m_PreVariations[index] : nullptr;
|
||||
break;
|
||||
|
||||
case eVariationType::VARTYPE_POST:
|
||||
return index < m_PostVariations.size() ? m_PostVariations[index] : nullptr;
|
||||
break;
|
||||
|
||||
default:
|
||||
return nullptr;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -428,9 +440,9 @@ public:
|
||||
/// <returns>A pointer to the variation if found, else nullptr.</returns>
|
||||
const Variation<T>* GetVariation(eVariationId id) const
|
||||
{
|
||||
for (size_t i = 0; i < m_Variations.size() && m_Variations[i]; i++)
|
||||
if (id == m_Variations[i]->VariationId())
|
||||
return m_Variations[i];
|
||||
for (auto var : m_Variations)
|
||||
if (var && id == var->VariationId())
|
||||
return var;
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
@ -451,9 +463,9 @@ public:
|
||||
/// <returns>A pointer to the variation if found, else nullptr.</returns>
|
||||
const Variation<T>* GetVariation(const string& name) const
|
||||
{
|
||||
for (size_t i = 0; i < m_Variations.size() && m_Variations[i]; i++)
|
||||
if (!_stricmp(name.c_str(), m_Variations[i]->Name().c_str()))
|
||||
return m_Variations[i];
|
||||
for (auto var : m_Variations)
|
||||
if (var && !_stricmp(name.c_str(), var->Name().c_str()))
|
||||
return var;
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
@ -482,9 +494,9 @@ public:
|
||||
/// <returns>The parametric variation with a matching name, else nullptr.</returns>
|
||||
const ParametricVariation<T>* GetParametricVariation(const string& name) const
|
||||
{
|
||||
for (size_t i = 0; i < m_ParametricVariations.size() && m_ParametricVariations[i]; i++)
|
||||
if (!_stricmp(name.c_str(), m_ParametricVariations[i]->Name().c_str()))
|
||||
return m_ParametricVariations[i];
|
||||
for (auto var : m_ParametricVariations)
|
||||
if (var && !_stricmp(name.c_str(), var->Name().c_str()))
|
||||
return var;
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
@ -524,7 +536,7 @@ private:
|
||||
{
|
||||
if (var)
|
||||
{
|
||||
Variation<T>* var2 = var->Copy();
|
||||
auto var2 = var->Copy();
|
||||
var2->m_Weight = weight;
|
||||
return var2;
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -11,7 +11,7 @@ template <typename T>
|
||||
class EMBER_API HemisphereVariation : public Variation<T>
|
||||
{
|
||||
public:
|
||||
HemisphereVariation(T weight = 1.0) : Variation<T>("hemisphere", VAR_HEMISPHERE, weight, true) { }
|
||||
HemisphereVariation(T weight = 1.0) : Variation<T>("hemisphere", eVariationId::VAR_HEMISPHERE, weight, true) { }
|
||||
|
||||
VARCOPY(HemisphereVariation)
|
||||
|
||||
@ -48,7 +48,7 @@ template <typename T>
|
||||
class EMBER_API EpispiralVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
EpispiralVariation(T weight = 1.0) : ParametricVariation<T>("epispiral", VAR_EPISPIRAL, weight, false, false, false, false, true)
|
||||
EpispiralVariation(T weight = 1.0) : ParametricVariation<T>("epispiral", eVariationId::VAR_EPISPIRAL, weight, false, false, false, false, true)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -130,7 +130,7 @@ template <typename T>
|
||||
class EMBER_API BwrapsVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
BwrapsVariation(T weight = 1.0) : ParametricVariation<T>("bwraps", VAR_BWRAPS, weight)
|
||||
BwrapsVariation(T weight = 1.0) : ParametricVariation<T>("bwraps", eVariationId::VAR_BWRAPS, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -297,7 +297,7 @@ template <typename T>
|
||||
class EMBER_API BlurCircleVariation : public Variation<T>
|
||||
{
|
||||
public:
|
||||
BlurCircleVariation(T weight = 1.0) : Variation<T>("blur_circle", VAR_BLUR_CIRCLE, weight) { }
|
||||
BlurCircleVariation(T weight = 1.0) : Variation<T>("blur_circle", eVariationId::VAR_BLUR_CIRCLE, weight) { }
|
||||
|
||||
VARCOPY(BlurCircleVariation)
|
||||
|
||||
@ -404,7 +404,7 @@ template <typename T>
|
||||
class EMBER_API BlurZoomVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
BlurZoomVariation(T weight = 1.0) : ParametricVariation<T>("blur_zoom", VAR_BLUR_ZOOM, weight)
|
||||
BlurZoomVariation(T weight = 1.0) : ParametricVariation<T>("blur_zoom", eVariationId::VAR_BLUR_ZOOM, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -465,7 +465,7 @@ template <typename T>
|
||||
class EMBER_API BlurPixelizeVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
BlurPixelizeVariation(T weight = 1.0) : ParametricVariation<T>("blur_pixelize", VAR_BLUR_PIXELIZE, weight)
|
||||
BlurPixelizeVariation(T weight = 1.0) : ParametricVariation<T>("blur_pixelize", eVariationId::VAR_BLUR_PIXELIZE, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -517,7 +517,7 @@ protected:
|
||||
string prefix = Prefix();
|
||||
|
||||
m_Params.clear();
|
||||
m_Params.push_back(ParamWithName<T>(&m_BlurPixelizeSize, prefix + "blur_pixelize_size", T(0.1), REAL, EPS));
|
||||
m_Params.push_back(ParamWithName<T>(&m_BlurPixelizeSize, prefix + "blur_pixelize_size", T(0.1), eParamType::REAL, EPS));
|
||||
m_Params.push_back(ParamWithName<T>(&m_BlurPixelizeScale, prefix + "blur_pixelize_scale", 1));
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_V, prefix + "blur_pixelize_v"));//Precalc.
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_InvSize, prefix + "blur_pixelize_inv_size"));
|
||||
@ -537,7 +537,7 @@ template <typename T>
|
||||
class EMBER_API CropVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
CropVariation(T weight = 1.0) : ParametricVariation<T>("crop", VAR_CROP, weight)
|
||||
CropVariation(T weight = 1.0) : ParametricVariation<T>("crop", eVariationId::VAR_CROP, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -659,8 +659,8 @@ protected:
|
||||
m_Params.push_back(ParamWithName<T>(&m_Y0, prefix + "crop_top", -1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_X1, prefix + "crop_right", 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Y1, prefix + "crop_bottom", 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_S, prefix + "crop_scatter_area", 0, REAL, -1, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Z, prefix + "crop_zero", 0, INTEGER, 0, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_S, prefix + "crop_scatter_area", 0, eParamType::REAL, -1, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Z, prefix + "crop_zero", 0, eParamType::INTEGER, 0, 1));
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_X0_, prefix + "crop_x0_"));//Precalc.
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_Y0_, prefix + "crop_y0_"));
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_X1_, prefix + "crop_x1_"));
|
||||
@ -691,7 +691,7 @@ template <typename T>
|
||||
class EMBER_API BCircleVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
BCircleVariation(T weight = 1.0) : ParametricVariation<T>("bcircle", VAR_BCIRCLE, weight)
|
||||
BCircleVariation(T weight = 1.0) : ParametricVariation<T>("bcircle", eVariationId::VAR_BCIRCLE, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -800,7 +800,7 @@ template <typename T>
|
||||
class EMBER_API BlurLinearVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
BlurLinearVariation(T weight = 1.0) : ParametricVariation<T>("blur_linear", VAR_BLUR_LINEAR, weight)
|
||||
BlurLinearVariation(T weight = 1.0) : ParametricVariation<T>("blur_linear", eVariationId::VAR_BLUR_LINEAR, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -850,7 +850,7 @@ protected:
|
||||
|
||||
m_Params.clear();
|
||||
m_Params.push_back(ParamWithName<T>(&m_BlurLinearLength, prefix + "blur_linear_length"));
|
||||
m_Params.push_back(ParamWithName<T>(&m_BlurLinearAngle, prefix + "blur_linear_angle", 0, REAL_CYCLIC, 0, T(M_2PI)));
|
||||
m_Params.push_back(ParamWithName<T>(&m_BlurLinearAngle, prefix + "blur_linear_angle", 0, eParamType::REAL_CYCLIC, 0, T(M_2PI)));
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_S, prefix + "blur_linear_s"));//Precalc.
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_C, prefix + "blur_linear_c"));
|
||||
}
|
||||
@ -869,7 +869,7 @@ template <typename T>
|
||||
class EMBER_API BlurSquareVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
BlurSquareVariation(T weight = 1.0) : ParametricVariation<T>("blur_square", VAR_BLUR_SQUARE, weight)
|
||||
BlurSquareVariation(T weight = 1.0) : ParametricVariation<T>("blur_square", eVariationId::VAR_BLUR_SQUARE, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -926,13 +926,13 @@ template <typename T>
|
||||
class EMBER_API FlattenVariation : public Variation<T>
|
||||
{
|
||||
public:
|
||||
FlattenVariation(T weight = 1.0) : Variation<T>("flatten", VAR_FLATTEN, weight) { }
|
||||
FlattenVariation(T weight = 1.0) : Variation<T>("flatten", eVariationId::VAR_FLATTEN, weight) { }
|
||||
|
||||
VARCOPY(FlattenVariation)
|
||||
|
||||
virtual void Func(IteratorHelper<T>& helper, Point<T>& outPoint, QTIsaac<ISAAC_SIZE, ISAAC_INT>& rand) override
|
||||
{
|
||||
if (m_VarType == VARTYPE_REG)//Rare and different usage of in/out.
|
||||
if (m_VarType == eVariationType::VARTYPE_REG)//Rare and different usage of in/out.
|
||||
{
|
||||
helper.Out.x = helper.Out.y = helper.Out.z = 0;
|
||||
outPoint.m_Z = 0;
|
||||
@ -949,7 +949,7 @@ public:
|
||||
{
|
||||
ostringstream ss;
|
||||
|
||||
if (m_VarType == VARTYPE_REG)
|
||||
if (m_VarType == eVariationType::VARTYPE_REG)
|
||||
{
|
||||
ss << "\t{\n"
|
||||
<< "\t\tvOut.x = 0;\n"
|
||||
@ -979,7 +979,7 @@ template <typename T>
|
||||
class EMBER_API ZblurVariation : public Variation<T>
|
||||
{
|
||||
public:
|
||||
ZblurVariation(T weight = 1.0) : Variation<T>("zblur", VAR_ZBLUR, weight) { }
|
||||
ZblurVariation(T weight = 1.0) : Variation<T>("zblur", eVariationId::VAR_ZBLUR, weight) { }
|
||||
|
||||
VARCOPY(ZblurVariation)
|
||||
|
||||
@ -1011,7 +1011,7 @@ template <typename T>
|
||||
class EMBER_API ZScaleVariation : public Variation<T>
|
||||
{
|
||||
public:
|
||||
ZScaleVariation(T weight = 1.0) : Variation<T>("zscale", VAR_ZSCALE, weight) { }
|
||||
ZScaleVariation(T weight = 1.0) : Variation<T>("zscale", eVariationId::VAR_ZSCALE, weight) { }
|
||||
|
||||
VARCOPY(ZScaleVariation)
|
||||
|
||||
@ -1043,7 +1043,7 @@ template <typename T>
|
||||
class EMBER_API ZTranslateVariation : public Variation<T>
|
||||
{
|
||||
public:
|
||||
ZTranslateVariation(T weight = 1.0) : Variation<T>("ztranslate", VAR_ZTRANSLATE, weight) { }
|
||||
ZTranslateVariation(T weight = 1.0) : Variation<T>("ztranslate", eVariationId::VAR_ZTRANSLATE, weight) { }
|
||||
|
||||
VARCOPY(ZTranslateVariation)
|
||||
|
||||
@ -1075,13 +1075,13 @@ template <typename T>
|
||||
class EMBER_API ZConeVariation : public Variation<T>
|
||||
{
|
||||
public:
|
||||
ZConeVariation(T weight = 1.0) : Variation<T>("zcone", VAR_ZCONE, weight, true, true) { }
|
||||
ZConeVariation(T weight = 1.0) : Variation<T>("zcone", eVariationId::VAR_ZCONE, weight, true, true) { }
|
||||
|
||||
VARCOPY(ZConeVariation)
|
||||
|
||||
virtual void Func(IteratorHelper<T>& helper, Point<T>& outPoint, QTIsaac<ISAAC_SIZE, ISAAC_INT>& rand) override
|
||||
{
|
||||
if (m_VarType == VARTYPE_REG)//Rare and different usage of in/out.
|
||||
if (m_VarType == eVariationType::VARTYPE_REG)//Rare and different usage of in/out.
|
||||
{
|
||||
helper.Out.x = helper.Out.y = 0;
|
||||
}
|
||||
@ -1101,7 +1101,7 @@ public:
|
||||
|
||||
ss << "\t{\n";
|
||||
|
||||
if (m_VarType == VARTYPE_REG)
|
||||
if (m_VarType == eVariationType::VARTYPE_REG)
|
||||
{
|
||||
ss << "\t\tvOut.x = vOut.y = 0;\n";
|
||||
}
|
||||
@ -1125,7 +1125,7 @@ template <typename T>
|
||||
class EMBER_API Blur3DVariation : public Variation<T>
|
||||
{
|
||||
public:
|
||||
Blur3DVariation(T weight = 1.0) : Variation<T>("blur3D", VAR_BLUR3D, weight) { }
|
||||
Blur3DVariation(T weight = 1.0) : Variation<T>("blur3D", eVariationId::VAR_BLUR3D, weight) { }
|
||||
|
||||
VARCOPY(Blur3DVariation)
|
||||
|
||||
@ -1174,7 +1174,7 @@ template <typename T>
|
||||
class EMBER_API Spherical3DVariation : public Variation<T>
|
||||
{
|
||||
public:
|
||||
Spherical3DVariation(T weight = 1.0) : Variation<T>("Spherical3D", VAR_SPHERICAL3D, weight, true) { }
|
||||
Spherical3DVariation(T weight = 1.0) : Variation<T>("Spherical3D", eVariationId::VAR_SPHERICAL3D, weight, true) { }
|
||||
|
||||
VARCOPY(Spherical3DVariation)
|
||||
|
||||
@ -1216,7 +1216,7 @@ template <typename T>
|
||||
class EMBER_API Curl3DVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
Curl3DVariation(T weight = 1.0) : ParametricVariation<T>("curl3D", VAR_CURL3D, weight, true)
|
||||
Curl3DVariation(T weight = 1.0) : ParametricVariation<T>("curl3D", eVariationId::VAR_CURL3D, weight, true)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -1304,7 +1304,7 @@ template <typename T>
|
||||
class EMBER_API Disc3DVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
Disc3DVariation(T weight = 1.0) : ParametricVariation<T>("disc3d", VAR_DISC3D, weight, true, true, false, true, false)
|
||||
Disc3DVariation(T weight = 1.0) : ParametricVariation<T>("disc3d", eVariationId::VAR_DISC3D, weight, true, true, false, true, false)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -1372,7 +1372,7 @@ template <typename T>
|
||||
class EMBER_API Boarders2Variation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
Boarders2Variation(T weight = 1.0) : ParametricVariation<T>("boarders2", VAR_BOARDERS2, weight)
|
||||
Boarders2Variation(T weight = 1.0) : ParametricVariation<T>("boarders2", eVariationId::VAR_BOARDERS2, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -1525,7 +1525,7 @@ template <typename T>
|
||||
class EMBER_API CardioidVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
CardioidVariation(T weight = 1.0) : ParametricVariation<T>("cardioid", VAR_CARDIOID, weight, true, true, true, false, true)
|
||||
CardioidVariation(T weight = 1.0) : ParametricVariation<T>("cardioid", eVariationId::VAR_CARDIOID, weight, true, true, true, false, true)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -1580,7 +1580,7 @@ template <typename T>
|
||||
class EMBER_API ChecksVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
ChecksVariation(T weight = 1.0) : ParametricVariation<T>("checks", VAR_CHECKS, weight)
|
||||
ChecksVariation(T weight = 1.0) : ParametricVariation<T>("checks", eVariationId::VAR_CHECKS, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -1703,7 +1703,7 @@ template <typename T>
|
||||
class EMBER_API CirclizeVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
CirclizeVariation(T weight = 1.0) : ParametricVariation<T>("circlize", VAR_CIRCLIZE, weight)
|
||||
CirclizeVariation(T weight = 1.0) : ParametricVariation<T>("circlize", eVariationId::VAR_CIRCLIZE, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -1816,7 +1816,7 @@ template <typename T>
|
||||
class EMBER_API Circlize2Variation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
Circlize2Variation(T weight = 1.0) : ParametricVariation<T>("circlize2", VAR_CIRCLIZE2, weight)
|
||||
Circlize2Variation(T weight = 1.0) : ParametricVariation<T>("circlize2", eVariationId::VAR_CIRCLIZE2, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -1921,7 +1921,7 @@ template <typename T>
|
||||
class EMBER_API CosWrapVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
CosWrapVariation(T weight = 1.0) : ParametricVariation<T>("coswrap", VAR_COS_WRAP, weight)
|
||||
CosWrapVariation(T weight = 1.0) : ParametricVariation<T>("coswrap", eVariationId::VAR_COS_WRAP, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -1939,7 +1939,7 @@ public:
|
||||
|
||||
helper.Out.x = -1 + m_Vv2 * Lerp<T>(Lerp(x, Fosc(x, T(4), m_Px), oscnapx), Fosc(bx, T(4), m_Px), oscnapx);//Original did a direct assignment to outPoint, which is incompatible with Ember's design.
|
||||
helper.Out.y = -1 + m_Vv2 * Lerp<T>(Lerp(y, Fosc(y, T(4), m_Py), oscnapy), Fosc(by, T(4), m_Py), oscnapy);
|
||||
helper.Out.z = (m_VarType == VARTYPE_REG) ? 0 : helper.In.z;
|
||||
helper.Out.z = (m_VarType == eVariationType::VARTYPE_REG) ? 0 : helper.In.z;
|
||||
}
|
||||
|
||||
virtual string OpenCLString() const override
|
||||
@ -1970,7 +1970,7 @@ public:
|
||||
<< "\n"
|
||||
<< "\t\tvOut.x = -1 + " << vv2 << " * Lerp(Lerp(x, Fosc(x, 4, " << px << "), oscnapx), Fosc(bx, 4, " << px << "), oscnapx);\n"
|
||||
<< "\t\tvOut.y = -1 + " << vv2 << " * Lerp(Lerp(y, Fosc(y, 4, " << py << "), oscnapy), Fosc(by, 4, " << py << "), oscnapy);\n"
|
||||
<< "\t\tvOut.z = " << ((m_VarType == VARTYPE_REG) ? "0" : "vIn.z") << ";\n"
|
||||
<< "\t\tvOut.z = " << ((m_VarType == eVariationType::VARTYPE_REG) ? "0" : "vIn.z") << ";\n"
|
||||
<< "\t}\n";
|
||||
|
||||
return ss.str();
|
||||
@ -1997,11 +1997,11 @@ protected:
|
||||
string prefix = Prefix();
|
||||
|
||||
m_Params.clear();
|
||||
m_Params.push_back(ParamWithName<T>(&m_Repeat, prefix + "coswrap_repeat", 1, INTEGER_NONZERO));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Repeat, prefix + "coswrap_repeat", 1, eParamType::INTEGER_NONZERO));
|
||||
m_Params.push_back(ParamWithName<T>(&m_AmountX, prefix + "coswrap_amount_x"));
|
||||
m_Params.push_back(ParamWithName<T>(&m_AmountY, prefix + "coswrap_amount_y"));
|
||||
m_Params.push_back(ParamWithName<T>(&m_PhaseX, prefix + "coswrap_phase_x", 0, REAL_CYCLIC, -1, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_PhaseY, prefix + "coswrap_phase_y", 0, REAL_CYCLIC, -1, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_PhaseX, prefix + "coswrap_phase_x", 0, eParamType::REAL_CYCLIC, -1, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_PhaseY, prefix + "coswrap_phase_y", 0, eParamType::REAL_CYCLIC, -1, 1));
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_Ax, prefix + "coswrap_ax"));//Precalc.
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_Ay, prefix + "coswrap_ay"));
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_Px, prefix + "coswrap_px"));
|
||||
@ -2034,7 +2034,7 @@ template <typename T>
|
||||
class EMBER_API DeltaAVariation : public Variation<T>
|
||||
{
|
||||
public:
|
||||
DeltaAVariation(T weight = 1.0) : Variation<T>("deltaa", VAR_DELTA_A, weight) { }
|
||||
DeltaAVariation(T weight = 1.0) : Variation<T>("deltaa", eVariationId::VAR_DELTA_A, weight) { }
|
||||
|
||||
VARCOPY(DeltaAVariation)
|
||||
|
||||
@ -2077,7 +2077,7 @@ template <typename T>
|
||||
class EMBER_API ExpoVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
ExpoVariation(T weight = 1.0) : ParametricVariation<T>("expo", VAR_EXPO, weight)
|
||||
ExpoVariation(T weight = 1.0) : ParametricVariation<T>("expo", eVariationId::VAR_EXPO, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -2153,7 +2153,7 @@ template <typename T>
|
||||
class EMBER_API ExtrudeVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
ExtrudeVariation(T weight = 1.0) : ParametricVariation<T>("extrude", VAR_EXTRUDE, weight)
|
||||
ExtrudeVariation(T weight = 1.0) : ParametricVariation<T>("extrude", eVariationId::VAR_EXTRUDE, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -2162,7 +2162,7 @@ public:
|
||||
|
||||
virtual void Func(IteratorHelper<T>& helper, Point<T>& outPoint, QTIsaac<ISAAC_SIZE, ISAAC_INT>& rand) override
|
||||
{
|
||||
if (m_VarType == VARTYPE_REG)
|
||||
if (m_VarType == eVariationType::VARTYPE_REG)
|
||||
{
|
||||
helper.Out.x = helper.Out.y = helper.Out.z = 0;
|
||||
|
||||
@ -2191,7 +2191,7 @@ public:
|
||||
string index = ss2.str();
|
||||
string rootFace = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
|
||||
|
||||
if (m_VarType == VARTYPE_REG)
|
||||
if (m_VarType == eVariationType::VARTYPE_REG)
|
||||
{
|
||||
ss << "\t{\n"
|
||||
<< "\t\tvOut.x = vOut.y = vOut.z = 0;\n"
|
||||
@ -2238,7 +2238,7 @@ template <typename T>
|
||||
class EMBER_API FDiscVariation : public Variation<T>
|
||||
{
|
||||
public:
|
||||
FDiscVariation(T weight = 1.0) : Variation<T>("fdisc", VAR_FDISC, weight, true, true, false, false, true) { }
|
||||
FDiscVariation(T weight = 1.0) : Variation<T>("fdisc", eVariationId::VAR_FDISC, weight, true, true, false, false, true) { }
|
||||
|
||||
VARCOPY(FDiscVariation)
|
||||
|
||||
@ -2281,7 +2281,7 @@ template <typename T>
|
||||
class EMBER_API FibonacciVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
FibonacciVariation(T weight = 1.0) : ParametricVariation<T>("fibonacci", VAR_FIBONACCI, weight)
|
||||
FibonacciVariation(T weight = 1.0) : ParametricVariation<T>("fibonacci", eVariationId::VAR_FIBONACCI, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -2360,7 +2360,7 @@ template <typename T>
|
||||
class EMBER_API Fibonacci2Variation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
Fibonacci2Variation(T weight = 1.0) : ParametricVariation<T>("fibonacci2", VAR_FIBONACCI2, weight)
|
||||
Fibonacci2Variation(T weight = 1.0) : ParametricVariation<T>("fibonacci2", eVariationId::VAR_FIBONACCI2, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -2445,7 +2445,7 @@ template <typename T>
|
||||
class EMBER_API GlynniaVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
GlynniaVariation(T weight = 1.0) : ParametricVariation<T>("glynnia", VAR_GLYNNIA, weight, true, true)
|
||||
GlynniaVariation(T weight = 1.0) : ParametricVariation<T>("glynnia", eVariationId::VAR_GLYNNIA, weight, true, true)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -2567,7 +2567,7 @@ template <typename T>
|
||||
class EMBER_API GridOutVariation : public Variation<T>
|
||||
{
|
||||
public:
|
||||
GridOutVariation(T weight = 1.0) : Variation<T>("gridout", VAR_GRIDOUT, weight) { }
|
||||
GridOutVariation(T weight = 1.0) : Variation<T>("gridout", eVariationId::VAR_GRIDOUT, weight) { }
|
||||
|
||||
VARCOPY(GridOutVariation)
|
||||
|
||||
@ -2725,7 +2725,7 @@ template <typename T>
|
||||
class EMBER_API HoleVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
HoleVariation(T weight = 1.0) : ParametricVariation<T>("hole", VAR_HOLE, weight, true, true, true, false, true)
|
||||
HoleVariation(T weight = 1.0) : ParametricVariation<T>("hole", eVariationId::VAR_HOLE, weight, true, true, true, false, true)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -2778,7 +2778,7 @@ protected:
|
||||
|
||||
m_Params.clear();
|
||||
m_Params.push_back(ParamWithName<T>(&m_A, prefix + "hole_a", 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Inside, prefix + "hole_inside", 0, INTEGER, 0, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Inside, prefix + "hole_inside", 0, eParamType::INTEGER, 0, 1));
|
||||
}
|
||||
|
||||
private:
|
||||
@ -2793,7 +2793,7 @@ template <typename T>
|
||||
class EMBER_API HypertileVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
HypertileVariation(T weight = 1.0) : ParametricVariation<T>("hypertile", VAR_HYPERTILE, weight)
|
||||
HypertileVariation(T weight = 1.0) : ParametricVariation<T>("hypertile", eVariationId::VAR_HYPERTILE, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -2810,7 +2810,7 @@ public:
|
||||
|
||||
helper.Out.x = vr * (a * c + b * d);
|
||||
helper.Out.y = vr * (b * c - a * d);
|
||||
helper.Out.z = (m_VarType == VARTYPE_REG) ? 0 : helper.In.z;
|
||||
helper.Out.z = (m_VarType == eVariationType::VARTYPE_REG) ? 0 : helper.In.z;
|
||||
}
|
||||
|
||||
virtual string OpenCLString() const override
|
||||
@ -2834,7 +2834,7 @@ public:
|
||||
<< "\n"
|
||||
<< "\t\tvOut.x = vr * (a * c + b * d);\n"
|
||||
<< "\t\tvOut.y = vr * (b * c - a * d);\n"
|
||||
<< "\t\tvOut.z = " << ((m_VarType == VARTYPE_REG) ? "0" : "vIn.z") << ";\n"
|
||||
<< "\t\tvOut.z = " << ((m_VarType == eVariationType::VARTYPE_REG) ? "0" : "vIn.z") << ";\n"
|
||||
<< "\t}\n";
|
||||
|
||||
return ss.str();
|
||||
@ -2862,9 +2862,9 @@ protected:
|
||||
string prefix = Prefix();
|
||||
|
||||
m_Params.clear();
|
||||
m_Params.push_back(ParamWithName<T>(&m_P, prefix + "hypertile_p", 3, INTEGER, 3, T(0x7fffffff)));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Q, prefix + "hypertile_q", 7, INTEGER, 3, T(0x7fffffff)));
|
||||
m_Params.push_back(ParamWithName<T>(&m_N, prefix + "hypertile_n", 0, INTEGER));
|
||||
m_Params.push_back(ParamWithName<T>(&m_P, prefix + "hypertile_p", 3, eParamType::INTEGER, 3, T(0x7fffffff)));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Q, prefix + "hypertile_q", 7, eParamType::INTEGER, 3, T(0x7fffffff)));
|
||||
m_Params.push_back(ParamWithName<T>(&m_N, prefix + "hypertile_n", 0, eParamType::INTEGER));
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_Real, prefix + "hypertile_real"));//Precalc.
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_Imag, prefix + "hypertile_imag"));
|
||||
}
|
||||
@ -2884,7 +2884,7 @@ template <typename T>
|
||||
class EMBER_API Hypertile1Variation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
Hypertile1Variation(T weight = 1.0) : ParametricVariation<T>("hypertile1", VAR_HYPERTILE1, weight)
|
||||
Hypertile1Variation(T weight = 1.0) : ParametricVariation<T>("hypertile1", eVariationId::VAR_HYPERTILE1, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -2906,7 +2906,7 @@ public:
|
||||
|
||||
helper.Out.x = vr * (a * c + b * d);
|
||||
helper.Out.y = vr * (b * c - a * d);
|
||||
helper.Out.z = (m_VarType == VARTYPE_REG) ? 0 : helper.In.z;
|
||||
helper.Out.z = (m_VarType == eVariationType::VARTYPE_REG) ? 0 : helper.In.z;
|
||||
}
|
||||
|
||||
virtual string OpenCLString() const override
|
||||
@ -2934,7 +2934,7 @@ public:
|
||||
<< "\n"
|
||||
<< "\t\tvOut.x = vr * (a * c + b * d);\n"
|
||||
<< "\t\tvOut.y = vr * (b * c - a * d);\n"
|
||||
<< "\t\tvOut.z = " << ((m_VarType == VARTYPE_REG) ? "0" : "vIn.z") << ";\n"
|
||||
<< "\t\tvOut.z = " << ((m_VarType == eVariationType::VARTYPE_REG) ? "0" : "vIn.z") << ";\n"
|
||||
<< "\t}\n";
|
||||
|
||||
return ss.str();
|
||||
@ -2959,8 +2959,8 @@ protected:
|
||||
string prefix = Prefix();
|
||||
|
||||
m_Params.clear();
|
||||
m_Params.push_back(ParamWithName<T>(&m_P, prefix + "hypertile1_p", 3, INTEGER, 3, T(0x7fffffff)));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Q, prefix + "hypertile1_q", 7, INTEGER, 3, T(0x7fffffff)));
|
||||
m_Params.push_back(ParamWithName<T>(&m_P, prefix + "hypertile1_p", 3, eParamType::INTEGER, 3, T(0x7fffffff)));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Q, prefix + "hypertile1_q", 7, eParamType::INTEGER, 3, T(0x7fffffff)));
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_Pa, prefix + "hypertile1_pa"));//Precalc.
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_R, prefix + "hypertile1_r"));
|
||||
}
|
||||
@ -2979,7 +2979,7 @@ template <typename T>
|
||||
class EMBER_API Hypertile2Variation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
Hypertile2Variation(T weight = 1.0) : ParametricVariation<T>("hypertile2", VAR_HYPERTILE2, weight)
|
||||
Hypertile2Variation(T weight = 1.0) : ParametricVariation<T>("hypertile2", eVariationId::VAR_HYPERTILE2, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -3001,7 +3001,7 @@ public:
|
||||
|
||||
helper.Out.x = vr * (x * cosa + y * sina);
|
||||
helper.Out.y = vr * (y * cosa - x * sina);
|
||||
helper.Out.z = (m_VarType == VARTYPE_REG) ? 0 : helper.In.z;
|
||||
helper.Out.z = (m_VarType == eVariationType::VARTYPE_REG) ? 0 : helper.In.z;
|
||||
}
|
||||
|
||||
virtual string OpenCLString() const override
|
||||
@ -3029,7 +3029,7 @@ public:
|
||||
<< "\n"
|
||||
<< "\t\tvOut.x = vr * (x * cosa + y * sina);\n"
|
||||
<< "\t\tvOut.y = vr * (y * cosa - x * sina);\n"
|
||||
<< "\t\tvOut.z = " << ((m_VarType == VARTYPE_REG) ? "0" : "vIn.z") << ";\n"
|
||||
<< "\t\tvOut.z = " << ((m_VarType == eVariationType::VARTYPE_REG) ? "0" : "vIn.z") << ";\n"
|
||||
<< "\t}\n";
|
||||
|
||||
return ss.str();
|
||||
@ -3054,8 +3054,8 @@ protected:
|
||||
string prefix = Prefix();
|
||||
|
||||
m_Params.clear();
|
||||
m_Params.push_back(ParamWithName<T>(&m_P, prefix + "hypertile2_p", 3, INTEGER, 3, T(0x7fffffff)));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Q, prefix + "hypertile2_q", 7, INTEGER, 3, T(0x7fffffff)));
|
||||
m_Params.push_back(ParamWithName<T>(&m_P, prefix + "hypertile2_p", 3, eParamType::INTEGER, 3, T(0x7fffffff)));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Q, prefix + "hypertile2_q", 7, eParamType::INTEGER, 3, T(0x7fffffff)));
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_Pa, prefix + "hypertile2_pa"));//Precalc.
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_R, prefix + "hypertile2_r"));
|
||||
}
|
||||
@ -3074,7 +3074,7 @@ template <typename T>
|
||||
class EMBER_API Hypertile3DVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
Hypertile3DVariation(T weight = 1.0) : ParametricVariation<T>("hypertile3D", VAR_HYPERTILE3D, weight, true)
|
||||
Hypertile3DVariation(T weight = 1.0) : ParametricVariation<T>("hypertile3D", eVariationId::VAR_HYPERTILE3D, weight, true)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -3155,9 +3155,9 @@ protected:
|
||||
string prefix = Prefix();
|
||||
|
||||
m_Params.clear();
|
||||
m_Params.push_back(ParamWithName<T>(&m_P, prefix + "hypertile3D_p", 3, INTEGER, 3, T(0x7fffffff)));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Q, prefix + "hypertile3D_q", 7, INTEGER, 3, T(0x7fffffff)));
|
||||
m_Params.push_back(ParamWithName<T>(&m_N, prefix + "hypertile3D_n", 0, INTEGER));
|
||||
m_Params.push_back(ParamWithName<T>(&m_P, prefix + "hypertile3D_p", 3, eParamType::INTEGER, 3, T(0x7fffffff)));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Q, prefix + "hypertile3D_q", 7, eParamType::INTEGER, 3, T(0x7fffffff)));
|
||||
m_Params.push_back(ParamWithName<T>(&m_N, prefix + "hypertile3D_n", 0, eParamType::INTEGER));
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_Cx, prefix + "hypertile3D_cx"));//Precalc.
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_Cy, prefix + "hypertile3D_cy"));
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_Cz, prefix + "hypertile3D_cz"));
|
||||
@ -3193,7 +3193,7 @@ template <typename T>
|
||||
class EMBER_API Hypertile3D1Variation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
Hypertile3D1Variation(T weight = 1.0) : ParametricVariation<T>("hypertile3D1", VAR_HYPERTILE3D1, weight, true)
|
||||
Hypertile3D1Variation(T weight = 1.0) : ParametricVariation<T>("hypertile3D1", eVariationId::VAR_HYPERTILE3D1, weight, true)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -3272,8 +3272,8 @@ protected:
|
||||
string prefix = Prefix();
|
||||
|
||||
m_Params.clear();
|
||||
m_Params.push_back(ParamWithName<T>(&m_P, prefix + "hypertile3D1_p", 3, INTEGER, 3, T(0x7fffffff)));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Q, prefix + "hypertile3D1_q", 7, INTEGER, 3, T(0x7fffffff)));
|
||||
m_Params.push_back(ParamWithName<T>(&m_P, prefix + "hypertile3D1_p", 3, eParamType::INTEGER, 3, T(0x7fffffff)));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Q, prefix + "hypertile3D1_q", 7, eParamType::INTEGER, 3, T(0x7fffffff)));
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_Pa, prefix + "hypertile3D1_pa"));//Precalc.
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_R, prefix + "hypertile3D1_r"));
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_C2, prefix + "hypertile3D1_c2"));
|
||||
@ -3296,7 +3296,7 @@ template <typename T>
|
||||
class EMBER_API Hypertile3D2Variation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
Hypertile3D2Variation(T weight = 1.0) : ParametricVariation<T>("hypertile3D2", VAR_HYPERTILE3D2, weight, true)
|
||||
Hypertile3D2Variation(T weight = 1.0) : ParametricVariation<T>("hypertile3D2", eVariationId::VAR_HYPERTILE3D2, weight, true)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -3379,8 +3379,8 @@ protected:
|
||||
string prefix = Prefix();
|
||||
|
||||
m_Params.clear();
|
||||
m_Params.push_back(ParamWithName<T>(&m_P, prefix + "hypertile3D2_p", 3, INTEGER, 3, T(0x7fffffff)));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Q, prefix + "hypertile3D2_q", 7, INTEGER, 3, T(0x7fffffff)));
|
||||
m_Params.push_back(ParamWithName<T>(&m_P, prefix + "hypertile3D2_p", 3, eParamType::INTEGER, 3, T(0x7fffffff)));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Q, prefix + "hypertile3D2_q", 7, eParamType::INTEGER, 3, T(0x7fffffff)));
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_Pa, prefix + "hypertile3D2_pa"));//Precalc.
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_Cx, prefix + "hypertile3D2_cx"));
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_C2, prefix + "hypertile3D2_c2"));
|
||||
@ -3409,7 +3409,7 @@ template <typename T>
|
||||
class EMBER_API IDiscVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
IDiscVariation(T weight = 1.0) : ParametricVariation<T>("idisc", VAR_IDISC, weight, true, true, false, false, true)
|
||||
IDiscVariation(T weight = 1.0) : ParametricVariation<T>("idisc", eVariationId::VAR_IDISC, weight, true, true, false, false, true)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -3475,7 +3475,7 @@ template <typename T>
|
||||
class EMBER_API Julian2Variation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
Julian2Variation(T weight = 1.0) : ParametricVariation<T>("julian2", VAR_JULIAN2, weight)
|
||||
Julian2Variation(T weight = 1.0) : ParametricVariation<T>("julian2", eVariationId::VAR_JULIAN2, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -3550,7 +3550,7 @@ protected:
|
||||
m_Params.push_back(ParamWithName<T>(&m_D, prefix + "julian2_d", 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_E, prefix + "julian2_e"));
|
||||
m_Params.push_back(ParamWithName<T>(&m_F, prefix + "julian2_f"));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Power, prefix + "julian2_power", 2, INTEGER_NONZERO));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Power, prefix + "julian2_power", 2, eParamType::INTEGER_NONZERO));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Dist, prefix + "julian2_dist", 1));
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_AbsN, prefix + "julian2_absn"));//Precalc.
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_Cn, prefix + "julian2_cn"));
|
||||
@ -3576,7 +3576,7 @@ template <typename T>
|
||||
class EMBER_API JuliaQVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
JuliaQVariation(T weight = 1.0) : ParametricVariation<T>("juliaq", VAR_JULIAQ, weight, true, false, false, false, true)
|
||||
JuliaQVariation(T weight = 1.0) : ParametricVariation<T>("juliaq", eVariationId::VAR_JULIAQ, weight, true, false, false, false, true)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -3592,7 +3592,7 @@ public:
|
||||
|
||||
helper.Out.x = r * cosa;
|
||||
helper.Out.y = r * sina;
|
||||
helper.Out.z = (m_VarType == VARTYPE_REG) ? 0 : helper.In.z;
|
||||
helper.Out.z = (m_VarType == eVariationType::VARTYPE_REG) ? 0 : helper.In.z;
|
||||
}
|
||||
|
||||
virtual string OpenCLString() const override
|
||||
@ -3615,7 +3615,7 @@ public:
|
||||
<< "\n"
|
||||
<< "\t\tvOut.x = r * cosa;\n"
|
||||
<< "\t\tvOut.y = r * sina;\n"
|
||||
<< "\t\tvOut.z = " << ((m_VarType == VARTYPE_REG) ? "0" : "vIn.z") << ";\n"
|
||||
<< "\t\tvOut.z = " << ((m_VarType == eVariationType::VARTYPE_REG) ? "0" : "vIn.z") << ";\n"
|
||||
<< "\t}\n";
|
||||
|
||||
return ss.str();
|
||||
@ -3634,8 +3634,8 @@ protected:
|
||||
string prefix = Prefix();
|
||||
|
||||
m_Params.clear();
|
||||
m_Params.push_back(ParamWithName<T>(&m_Power, prefix + "juliaq_power", 3, INTEGER_NONZERO));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Divisor, prefix + "juliaq_divisor", 2, INTEGER_NONZERO));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Power, prefix + "juliaq_power", 3, eParamType::INTEGER_NONZERO));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Divisor, prefix + "juliaq_divisor", 2, eParamType::INTEGER_NONZERO));
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_HalfInvPower, prefix + "juliaq_half_inv_power"));//Precalc.
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_InvPower, prefix + "juliaq_inv_power"));
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_InvPower2pi, prefix + "juliaq_inv_power_2pi"));
|
||||
@ -3656,7 +3656,7 @@ template <typename T>
|
||||
class EMBER_API MurlVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
MurlVariation(T weight = 1.0) : ParametricVariation<T>("murl", VAR_MURL, weight, true, false, false, false, true)
|
||||
MurlVariation(T weight = 1.0) : ParametricVariation<T>("murl", eVariationId::VAR_MURL, weight, true, false, false, false, true)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -3725,7 +3725,7 @@ protected:
|
||||
|
||||
m_Params.clear();
|
||||
m_Params.push_back(ParamWithName<T>(&m_C, prefix + "murl_c"));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Power, prefix + "murl_power", 2, INTEGER, 2, T(0x7fffffff)));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Power, prefix + "murl_power", 2, eParamType::INTEGER, 2, T(0x7fffffff)));
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_Cp, prefix + "murl_cp"));//Precalc.
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_P2, prefix + "murl_p2"));
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_Vp, prefix + "murl_vp"));
|
||||
@ -3746,7 +3746,7 @@ template <typename T>
|
||||
class EMBER_API Murl2Variation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
Murl2Variation(T weight = 1.0) : ParametricVariation<T>("murl2", VAR_MURL2, weight, true, false, false, false, true)
|
||||
Murl2Variation(T weight = 1.0) : ParametricVariation<T>("murl2", eVariationId::VAR_MURL2, weight, true, false, false, false, true)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -3832,8 +3832,8 @@ protected:
|
||||
string prefix = Prefix();
|
||||
|
||||
m_Params.clear();
|
||||
m_Params.push_back(ParamWithName<T>(&m_C, prefix + "murl2_c", 0, REAL, -1, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Power, prefix + "murl2_power", 1, INTEGER_NONZERO));
|
||||
m_Params.push_back(ParamWithName<T>(&m_C, prefix + "murl2_c", 0, eParamType::REAL, -1, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Power, prefix + "murl2_power", 1, eParamType::INTEGER_NONZERO));
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_P2, prefix + "murl2_p2"));//Precalc.
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_InvP, prefix + "murl2_invp"));
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_InvP2, prefix + "murl2_invp2"));
|
||||
@ -3856,7 +3856,7 @@ template <typename T>
|
||||
class EMBER_API NPolarVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
NPolarVariation(T weight = 1.0) : ParametricVariation<T>("npolar", VAR_NPOLAR, weight, true, false, false, true, false)
|
||||
NPolarVariation(T weight = 1.0) : ParametricVariation<T>("npolar", eVariationId::VAR_NPOLAR, weight, true, false, false, true, false)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -3928,8 +3928,8 @@ protected:
|
||||
string prefix = Prefix();
|
||||
|
||||
m_Params.clear();
|
||||
m_Params.push_back(ParamWithName<T>(&m_Parity, prefix + "npolar_parity", 0, INTEGER));
|
||||
m_Params.push_back(ParamWithName<T>(&m_N, prefix + "npolar_n", 1, INTEGER));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Parity, prefix + "npolar_parity", 0, eParamType::INTEGER));
|
||||
m_Params.push_back(ParamWithName<T>(&m_N, prefix + "npolar_n", 1, eParamType::INTEGER));
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_Nnz, prefix + "npolar_nnz"));//Precalc.
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_Vvar, prefix + "npolar_vvar"));
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_Vvar2, prefix + "npolar_vvar_2"));
|
||||
@ -3956,7 +3956,7 @@ template <typename T>
|
||||
class EMBER_API OrthoVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
OrthoVariation(T weight = 1.0) : ParametricVariation<T>("ortho", VAR_ORTHO, weight, true, false, false, false, true)
|
||||
OrthoVariation(T weight = 1.0) : ParametricVariation<T>("ortho", eVariationId::VAR_ORTHO, weight, true, false, false, false, true)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -4152,8 +4152,8 @@ protected:
|
||||
string prefix = Prefix();
|
||||
|
||||
m_Params.clear();
|
||||
m_Params.push_back(ParamWithName<T>(&m_In, prefix + "ortho_in", 0, REAL_CYCLIC, T(-M_PI), T(M_PI)));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Out, prefix + "ortho_out", 0, REAL_CYCLIC, T(-M_PI), T(M_PI)));
|
||||
m_Params.push_back(ParamWithName<T>(&m_In, prefix + "ortho_in", 0, eParamType::REAL_CYCLIC, T(-M_PI), T(M_PI)));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Out, prefix + "ortho_out", 0, eParamType::REAL_CYCLIC, T(-M_PI), T(M_PI)));
|
||||
}
|
||||
|
||||
private:
|
||||
@ -4168,7 +4168,7 @@ template <typename T>
|
||||
class EMBER_API PoincareVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
PoincareVariation(T weight = 1.0) : ParametricVariation<T>("poincare", VAR_POINCARE, weight)
|
||||
PoincareVariation(T weight = 1.0) : ParametricVariation<T>("poincare", eVariationId::VAR_POINCARE, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -4232,9 +4232,9 @@ protected:
|
||||
|
||||
m_Params.clear();
|
||||
m_Params.push_back(ParamWithName<T>(&m_C1r, prefix + "poincare_c1r", 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_C1a, prefix + "poincare_c1a", -1, REAL_CYCLIC, T(-M_PI), T(M_PI)));
|
||||
m_Params.push_back(ParamWithName<T>(&m_C1a, prefix + "poincare_c1a", -1, eParamType::REAL_CYCLIC, T(-M_PI), T(M_PI)));
|
||||
m_Params.push_back(ParamWithName<T>(&m_C2r, prefix + "poincare_c2r", 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_C2a, prefix + "poincare_c2a", 1, REAL_CYCLIC, T(-M_PI), T(M_PI)));
|
||||
m_Params.push_back(ParamWithName<T>(&m_C2a, prefix + "poincare_c2a", 1, eParamType::REAL_CYCLIC, T(-M_PI), T(M_PI)));
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_C1x, prefix + "poincare_c1x"));//Precalc.
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_C1y, prefix + "poincare_c1y"));
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_C2x, prefix + "poincare_c2x"));
|
||||
@ -4263,7 +4263,7 @@ template <typename T>
|
||||
class EMBER_API Poincare3DVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
Poincare3DVariation(T weight = 1.0) : ParametricVariation<T>("poincare3D", VAR_POINCARE3D, weight, true)
|
||||
Poincare3DVariation(T weight = 1.0) : ParametricVariation<T>("poincare3D", eVariationId::VAR_POINCARE3D, weight, true)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -4386,7 +4386,7 @@ template <typename T>
|
||||
class EMBER_API PolynomialVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
PolynomialVariation(T weight = 1.0) : ParametricVariation<T>("polynomial", VAR_POLYNOMIAL, weight)
|
||||
PolynomialVariation(T weight = 1.0) : ParametricVariation<T>("polynomial", eVariationId::VAR_POLYNOMIAL, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -4464,7 +4464,7 @@ template <typename T>
|
||||
class EMBER_API PSphereVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
PSphereVariation(T weight = 1.0) : ParametricVariation<T>("psphere", VAR_PSPHERE, weight)
|
||||
PSphereVariation(T weight = 1.0) : ParametricVariation<T>("psphere", eVariationId::VAR_PSPHERE, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -4538,7 +4538,7 @@ template <typename T>
|
||||
class EMBER_API Rational3Variation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
Rational3Variation(T weight = 1.0) : ParametricVariation<T>("rational3", VAR_RATIONAL3, weight)
|
||||
Rational3Variation(T weight = 1.0) : ParametricVariation<T>("rational3", eVariationId::VAR_RATIONAL3, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -4636,7 +4636,7 @@ template <typename T>
|
||||
class EMBER_API RippleVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
RippleVariation(T weight = 1.0) : ParametricVariation<T>("ripple", VAR_RIPPLE, weight)
|
||||
RippleVariation(T weight = 1.0) : ParametricVariation<T>("ripple", eVariationId::VAR_RIPPLE, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -4674,7 +4674,7 @@ public:
|
||||
//invert the multiplication with scale from before.
|
||||
helper.Out.x = m_Weight * Lerp<T>(u1, u2, m_P) * m_Is;//Original did a direct assignment to outPoint, which is incompatible with Ember's design.
|
||||
helper.Out.y = m_Weight * Lerp<T>(v1, v2, m_P) * m_Is;
|
||||
helper.Out.z = (m_VarType == VARTYPE_REG) ? 0 : helper.In.z;
|
||||
helper.Out.z = (m_VarType == eVariationType::VARTYPE_REG) ? 0 : helper.In.z;
|
||||
}
|
||||
|
||||
virtual string OpenCLString() const override
|
||||
@ -4720,7 +4720,7 @@ public:
|
||||
<< "\n"
|
||||
<< "\t\tvOut.x = xform->m_VariationWeights[" << varIndex << "] * Lerp(u1, u2, " << p << ") * " << is << ";\n"
|
||||
<< "\t\tvOut.y = xform->m_VariationWeights[" << varIndex << "] * Lerp(v1, v2, " << p << ") * " << is << ";\n"
|
||||
<< "\t\tvOut.z = " << ((m_VarType == VARTYPE_REG) ? "0" : "vIn.z") << ";\n"
|
||||
<< "\t\tvOut.z = " << ((m_VarType == eVariationType::VARTYPE_REG) ? "0" : "vIn.z") << ";\n"
|
||||
<< "\t}\n";
|
||||
|
||||
return ss.str();
|
||||
@ -4793,7 +4793,7 @@ template <typename T>
|
||||
class EMBER_API SigmoidVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
SigmoidVariation(T weight = 1.0) : ParametricVariation<T>("sigmoid", VAR_SIGMOID, weight)
|
||||
SigmoidVariation(T weight = 1.0) : ParametricVariation<T>("sigmoid", eVariationId::VAR_SIGMOID, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -4913,7 +4913,7 @@ template <typename T>
|
||||
class EMBER_API SinusGridVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
SinusGridVariation(T weight = 1.0) : ParametricVariation<T>("sinusgrid", VAR_SINUS_GRID, weight)
|
||||
SinusGridVariation(T weight = 1.0) : ParametricVariation<T>("sinusgrid", eVariationId::VAR_SINUS_GRID, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -5013,7 +5013,7 @@ template <typename T>
|
||||
class EMBER_API StwinVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
StwinVariation(T weight = 1.0) : ParametricVariation<T>("stwin", VAR_STWIN, weight)
|
||||
StwinVariation(T weight = 1.0) : ParametricVariation<T>("stwin", eVariationId::VAR_STWIN, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -5095,7 +5095,7 @@ template <typename T>
|
||||
class EMBER_API TwoFaceVariation : public Variation<T>
|
||||
{
|
||||
public:
|
||||
TwoFaceVariation(T weight = 1.0) : Variation<T>("twoface", VAR_TWO_FACE, weight, true) { }
|
||||
TwoFaceVariation(T weight = 1.0) : Variation<T>("twoface", eVariationId::VAR_TWO_FACE, weight, true) { }
|
||||
|
||||
VARCOPY(TwoFaceVariation)
|
||||
|
||||
@ -5138,7 +5138,7 @@ template <typename T>
|
||||
class EMBER_API UnpolarVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
UnpolarVariation(T weight = 1.0) : ParametricVariation<T>("unpolar", VAR_UNPOLAR, weight)
|
||||
UnpolarVariation(T weight = 1.0) : ParametricVariation<T>("unpolar", eVariationId::VAR_UNPOLAR, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -5202,7 +5202,7 @@ template <typename T>
|
||||
class EMBER_API WavesNVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
WavesNVariation(T weight = 1.0) : ParametricVariation<T>("wavesn", VAR_WAVESN, weight, true, false, false, false, true)
|
||||
WavesNVariation(T weight = 1.0) : ParametricVariation<T>("wavesn", eVariationId::VAR_WAVESN, weight, true, false, false, false, true)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -5285,7 +5285,7 @@ protected:
|
||||
m_Params.push_back(ParamWithName<T>(&m_ScaleY, prefix + "wavesn_scaley", 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_IncX, prefix + "wavesn_incx"));
|
||||
m_Params.push_back(ParamWithName<T>(&m_IncY, prefix + "wavesn_incy"));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Power, prefix + "wavesn_power", 1, INTEGER_NONZERO));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Power, prefix + "wavesn_power", 1, eParamType::INTEGER_NONZERO));
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_AbsN, prefix + "wavesn_absn"));//Precalc.
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_Cn, prefix + "wavesn_cn"));
|
||||
}
|
||||
@ -5309,7 +5309,7 @@ template <typename T>
|
||||
class EMBER_API XHeartVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
XHeartVariation(T weight = 1.0) : ParametricVariation<T>("xheart", VAR_XHEART, weight, true)
|
||||
XHeartVariation(T weight = 1.0) : ParametricVariation<T>("xheart", eVariationId::VAR_XHEART, weight, true)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -5418,7 +5418,7 @@ template <typename T>
|
||||
class EMBER_API BarycentroidVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
BarycentroidVariation(T weight = 1.0) : ParametricVariation<T>("barycentroid", VAR_BARYCENTROID, weight)
|
||||
BarycentroidVariation(T weight = 1.0) : ParametricVariation<T>("barycentroid", eVariationId::VAR_BARYCENTROID, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -5513,7 +5513,7 @@ template <typename T>
|
||||
class EMBER_API BiSplitVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
BiSplitVariation(T weight = 1.0) : ParametricVariation<T>("bisplit", VAR_BISPLIT, weight)
|
||||
BiSplitVariation(T weight = 1.0) : ParametricVariation<T>("bisplit", eVariationId::VAR_BISPLIT, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -5569,7 +5569,7 @@ template <typename T>
|
||||
class EMBER_API CrescentsVariation : public Variation<T>
|
||||
{
|
||||
public:
|
||||
CrescentsVariation(T weight = 1.0) : Variation<T>("crescents", VAR_CRESCENTS, weight) { }
|
||||
CrescentsVariation(T weight = 1.0) : Variation<T>("crescents", eVariationId::VAR_CRESCENTS, weight) { }
|
||||
|
||||
VARCOPY(CrescentsVariation)
|
||||
|
||||
@ -5617,7 +5617,7 @@ template <typename T>
|
||||
class EMBER_API MaskVariation : public Variation<T>
|
||||
{
|
||||
public:
|
||||
MaskVariation(T weight = 1.0) : Variation<T>("mask", VAR_MASK, weight, true) { }
|
||||
MaskVariation(T weight = 1.0) : Variation<T>("mask", eVariationId::VAR_MASK, weight, true) { }
|
||||
|
||||
VARCOPY(MaskVariation)
|
||||
|
||||
@ -5667,7 +5667,7 @@ template <typename T>
|
||||
class EMBER_API Cpow2Variation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
Cpow2Variation(T weight = 1.0) : ParametricVariation<T>("cpow2", VAR_CPOW2, weight, true, false, false, false, true)
|
||||
Cpow2Variation(T weight = 1.0) : ParametricVariation<T>("cpow2", eVariationId::VAR_CPOW2, weight, true, false, false, false, true)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -5757,8 +5757,8 @@ protected:
|
||||
m_Params.clear();
|
||||
m_Params.push_back(ParamWithName<T>(&m_R, prefix + "cpow2_r", 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_A, prefix + "cpow2_a"));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Divisor, prefix + "cpow2_divisor", 1, INTEGER_NONZERO));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Spread, prefix + "cpow2_spread", 1, INTEGER, 1, T(0x7FFFFFFF)));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Divisor, prefix + "cpow2_divisor", 1, eParamType::INTEGER_NONZERO));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Spread, prefix + "cpow2_spread", 1, eParamType::INTEGER, 1, T(0x7FFFFFFF)));
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_C, prefix + "cpow2_c"));//Precalc.
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_HalfC, prefix + "cpow2_halfc"));
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_D, prefix + "cpow2_d"));
|
||||
@ -5785,18 +5785,18 @@ private:
|
||||
MAKEPREPOSTVAR(Hemisphere, hemisphere, HEMISPHERE)
|
||||
MAKEPREPOSTPARVAR(Epispiral, epispiral, EPISPIRAL)
|
||||
MAKEPREPOSTPARVAR(Bwraps, bwraps, BWRAPS)
|
||||
MAKEPREPOSTVARASSIGN(BlurCircle, blur_circle, BLUR_CIRCLE, ASSIGNTYPE_SUM)
|
||||
MAKEPREPOSTVARASSIGN(BlurCircle, blur_circle, BLUR_CIRCLE, eVariationAssignType::ASSIGNTYPE_SUM)
|
||||
MAKEPREPOSTPARVAR(BlurZoom, blur_zoom, BLUR_ZOOM)
|
||||
MAKEPREPOSTPARVAR(BlurPixelize, blur_pixelize, BLUR_PIXELIZE)
|
||||
MAKEPREPOSTPARVAR(Crop, crop, CROP)
|
||||
MAKEPREPOSTPARVAR(BCircle, bcircle, BCIRCLE)
|
||||
MAKEPREPOSTPARVAR(BlurLinear, blur_linear, BLUR_LINEAR)
|
||||
MAKEPREPOSTPARVARASSIGN(BlurSquare, blur_square, BLUR_SQUARE, ASSIGNTYPE_SUM)
|
||||
MAKEPREPOSTPARVARASSIGN(BlurSquare, blur_square, BLUR_SQUARE, eVariationAssignType::ASSIGNTYPE_SUM)
|
||||
MAKEPREPOSTVAR(Flatten, flatten, FLATTEN)
|
||||
MAKEPREPOSTVARASSIGN(Zblur, zblur, ZBLUR, ASSIGNTYPE_SUM)
|
||||
MAKEPREPOSTVARASSIGN(Blur3D, blur3D, BLUR3D, ASSIGNTYPE_SUM)
|
||||
MAKEPREPOSTVARASSIGN(ZScale, zscale, ZSCALE, ASSIGNTYPE_SUM)
|
||||
MAKEPREPOSTVARASSIGN(ZTranslate, ztranslate, ZTRANSLATE, ASSIGNTYPE_SUM)
|
||||
MAKEPREPOSTVARASSIGN(Zblur, zblur, ZBLUR, eVariationAssignType::ASSIGNTYPE_SUM)
|
||||
MAKEPREPOSTVARASSIGN(Blur3D, blur3D, BLUR3D, eVariationAssignType::ASSIGNTYPE_SUM)
|
||||
MAKEPREPOSTVARASSIGN(ZScale, zscale, ZSCALE, eVariationAssignType::ASSIGNTYPE_SUM)
|
||||
MAKEPREPOSTVARASSIGN(ZTranslate, ztranslate, ZTRANSLATE, eVariationAssignType::ASSIGNTYPE_SUM)
|
||||
MAKEPREPOSTVAR(ZCone, zcone, ZCONE)
|
||||
MAKEPREPOSTVAR(Spherical3D, Spherical3D, SPHERICAL3D)
|
||||
MAKEPREPOSTPARVAR(Curl3D, curl3D, CURL3D)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -11,7 +11,7 @@ template <typename T>
|
||||
class EMBER_API ESwirlVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
ESwirlVariation(T weight = 1.0) : ParametricVariation<T>("eSwirl", VAR_ESWIRL, weight, true)
|
||||
ESwirlVariation(T weight = 1.0) : ParametricVariation<T>("eSwirl", eVariationId::VAR_ESWIRL, weight, true)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -99,7 +99,7 @@ template <typename T>
|
||||
class EMBER_API LazyTravisVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
LazyTravisVariation(T weight = 1.0) : ParametricVariation<T>("lazyTravis", VAR_LAZY_TRAVIS, weight)
|
||||
LazyTravisVariation(T weight = 1.0) : ParametricVariation<T>("lazyTravis", eVariationId::VAR_LAZY_TRAVIS, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -346,8 +346,8 @@ protected:
|
||||
string prefix = Prefix();
|
||||
|
||||
m_Params.clear();
|
||||
m_Params.push_back(ParamWithName<T>(&m_SpinIn, prefix + "lazyTravis_spin_in", 1, REAL_CYCLIC, 0, 2));
|
||||
m_Params.push_back(ParamWithName<T>(&m_SpinOut, prefix + "lazyTravis_spin_out", 0, REAL_CYCLIC, 0, 2));
|
||||
m_Params.push_back(ParamWithName<T>(&m_SpinIn, prefix + "lazyTravis_spin_in", 1, eParamType::REAL_CYCLIC, 0, 2));
|
||||
m_Params.push_back(ParamWithName<T>(&m_SpinOut, prefix + "lazyTravis_spin_out", 0, eParamType::REAL_CYCLIC, 0, 2));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Space, prefix + "lazyTravis_space"));
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_In4, prefix + "lazyTravis_in4"));//Precalc.
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_Out4, prefix + "lazyTravis_out4"));
|
||||
@ -368,7 +368,7 @@ template <typename T>
|
||||
class EMBER_API SquishVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
SquishVariation(T weight = 1.0) : ParametricVariation<T>("squish", VAR_SQUISH, weight)
|
||||
SquishVariation(T weight = 1.0) : ParametricVariation<T>("squish", eVariationId::VAR_SQUISH, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -511,7 +511,7 @@ protected:
|
||||
string prefix = Prefix();
|
||||
|
||||
m_Params.clear();
|
||||
m_Params.push_back(ParamWithName<T>(&m_Power, prefix + "squish_power", 2, INTEGER, 2, T(INT_MAX)));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Power, prefix + "squish_power", 2, eParamType::INTEGER, 2, T(INT_MAX)));
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_InvPower, prefix + "squish_inv_power"));//Precalc.
|
||||
}
|
||||
|
||||
@ -527,7 +527,7 @@ template <typename T>
|
||||
class EMBER_API CircusVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
CircusVariation(T weight = 1.0) : ParametricVariation<T>("circus", VAR_CIRCUS, weight, true, true, true)
|
||||
CircusVariation(T weight = 1.0) : ParametricVariation<T>("circus", eVariationId::VAR_CIRCUS, weight, true, true, true)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -600,7 +600,7 @@ template <typename T>
|
||||
class EMBER_API TancosVariation : public Variation<T>
|
||||
{
|
||||
public:
|
||||
TancosVariation(T weight = 1.0) : Variation<T>("tancos", VAR_TANCOS, weight, true) { }
|
||||
TancosVariation(T weight = 1.0) : Variation<T>("tancos", eVariationId::VAR_TANCOS, weight, true) { }
|
||||
|
||||
VARCOPY(TancosVariation)
|
||||
|
||||
@ -642,7 +642,7 @@ template <typename T>
|
||||
class EMBER_API RippledVariation : public Variation<T>
|
||||
{
|
||||
public:
|
||||
RippledVariation(T weight = 1.0) : Variation<T>("rippled", VAR_RIPPLED, weight, true) { }
|
||||
RippledVariation(T weight = 1.0) : Variation<T>("rippled", eVariationId::VAR_RIPPLED, weight, true) { }
|
||||
|
||||
VARCOPY(RippledVariation)
|
||||
|
||||
@ -685,7 +685,7 @@ template <typename T>
|
||||
class EMBER_API RotateXVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
RotateXVariation(T weight = 1.0) : ParametricVariation<T>("rotate_x", VAR_ROTATE_X, weight)
|
||||
RotateXVariation(T weight = 1.0) : ParametricVariation<T>("rotate_x", eVariationId::VAR_ROTATE_X, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -696,7 +696,7 @@ public:
|
||||
{
|
||||
T z = m_RxCos * helper.In.z - m_RxSin * helper.In.y;
|
||||
|
||||
if (m_VarType == VARTYPE_REG)
|
||||
if (m_VarType == eVariationType::VARTYPE_REG)
|
||||
{
|
||||
helper.Out.x = helper.In.x;
|
||||
outPoint.m_X = 0;
|
||||
@ -723,7 +723,7 @@ public:
|
||||
<< "\t\treal_t z = " << rxCos << " * vIn.z - " << rxSin << " * vIn.y;\n"
|
||||
<< "\n";
|
||||
|
||||
if (m_VarType == VARTYPE_REG)
|
||||
if (m_VarType == eVariationType::VARTYPE_REG)
|
||||
{
|
||||
ss <<
|
||||
"\t\tvOut.x = 0;\n"
|
||||
@ -771,7 +771,7 @@ template <typename T>
|
||||
class EMBER_API RotateYVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
RotateYVariation(T weight = 1.0) : ParametricVariation<T>("rotate_y", VAR_ROTATE_Y, weight)
|
||||
RotateYVariation(T weight = 1.0) : ParametricVariation<T>("rotate_y", eVariationId::VAR_ROTATE_Y, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -782,7 +782,7 @@ public:
|
||||
{
|
||||
helper.Out.x = m_RyCos * helper.In.x - m_RySin * helper.In.z;
|
||||
|
||||
if (m_VarType == VARTYPE_REG)
|
||||
if (m_VarType == eVariationType::VARTYPE_REG)
|
||||
{
|
||||
helper.Out.y = 0;
|
||||
outPoint.m_Y = helper.In.y;
|
||||
@ -807,7 +807,7 @@ public:
|
||||
ss << "\t{\n"
|
||||
<< "\t\tvOut.x = " << ryCos << " * vIn.x - " << rySin << " * vIn.z;\n";
|
||||
|
||||
if (m_VarType == VARTYPE_REG)
|
||||
if (m_VarType == eVariationType::VARTYPE_REG)
|
||||
{
|
||||
ss <<
|
||||
"\t\tvOut.y = 0;\n"
|
||||
@ -854,7 +854,7 @@ template <typename T>
|
||||
class EMBER_API RotateZVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
RotateZVariation(T weight = 1.0) : ParametricVariation<T>("rotate_z", VAR_ROTATE_Z, weight)
|
||||
RotateZVariation(T weight = 1.0) : ParametricVariation<T>("rotate_z", eVariationId::VAR_ROTATE_Z, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -866,7 +866,7 @@ public:
|
||||
helper.Out.x = m_RzSin * helper.In.y + m_RzCos * helper.In.x;
|
||||
helper.Out.y = m_RzCos * helper.In.y - m_RzSin * helper.In.x;
|
||||
|
||||
if (m_VarType == VARTYPE_REG)
|
||||
if (m_VarType == eVariationType::VARTYPE_REG)
|
||||
{
|
||||
helper.Out.z = helper.In.z;
|
||||
outPoint.m_Z = 0;
|
||||
@ -890,7 +890,7 @@ public:
|
||||
<< "\t\tvOut.x = " << rzSin << " * vIn.y + " << rzCos << " * vIn.x;\n"
|
||||
<< "\t\tvOut.y = " << rzCos << " * vIn.y - " << rzSin << " * vIn.x;\n";
|
||||
|
||||
if (m_VarType == VARTYPE_REG)
|
||||
if (m_VarType == eVariationType::VARTYPE_REG)
|
||||
{
|
||||
ss <<
|
||||
"\t\tvOut.z = 0;\n"
|
||||
@ -936,13 +936,13 @@ template <typename T>
|
||||
class EMBER_API MirrorXVariation : public Variation<T>
|
||||
{
|
||||
public:
|
||||
MirrorXVariation(T weight = 1.0) : Variation<T>("mirror_x", VAR_MIRROR_X, weight) { }
|
||||
MirrorXVariation(T weight = 1.0) : Variation<T>("mirror_x", eVariationId::VAR_MIRROR_X, weight) { }
|
||||
|
||||
VARCOPY(MirrorXVariation)
|
||||
|
||||
virtual void Func(IteratorHelper<T>& helper, Point<T>& outPoint, QTIsaac<ISAAC_SIZE, ISAAC_INT>& rand) override
|
||||
{
|
||||
if (m_VarType == VARTYPE_REG)
|
||||
if (m_VarType == eVariationType::VARTYPE_REG)
|
||||
{
|
||||
helper.Out.x = fabs(outPoint.m_X);
|
||||
|
||||
@ -971,7 +971,7 @@ public:
|
||||
|
||||
ss << "\t{\n";
|
||||
|
||||
if (m_VarType == VARTYPE_REG)
|
||||
if (m_VarType == eVariationType::VARTYPE_REG)
|
||||
{
|
||||
ss <<
|
||||
"\t\tvOut.x = fabs(outPoint->m_X);\n"
|
||||
@ -1009,13 +1009,13 @@ template <typename T>
|
||||
class EMBER_API MirrorYVariation : public Variation<T>
|
||||
{
|
||||
public:
|
||||
MirrorYVariation(T weight = 1.0) : Variation<T>("mirror_y", VAR_MIRROR_Y, weight) { }
|
||||
MirrorYVariation(T weight = 1.0) : Variation<T>("mirror_y", eVariationId::VAR_MIRROR_Y, weight) { }
|
||||
|
||||
VARCOPY(MirrorYVariation)
|
||||
|
||||
virtual void Func(IteratorHelper<T>& helper, Point<T>& outPoint, QTIsaac<ISAAC_SIZE, ISAAC_INT>& rand) override
|
||||
{
|
||||
if (m_VarType == VARTYPE_REG)
|
||||
if (m_VarType == eVariationType::VARTYPE_REG)
|
||||
{
|
||||
helper.Out.y = fabs(outPoint.m_Y);
|
||||
|
||||
@ -1044,7 +1044,7 @@ public:
|
||||
|
||||
ss << "\t{\n";
|
||||
|
||||
if (m_VarType == VARTYPE_REG)
|
||||
if (m_VarType == eVariationType::VARTYPE_REG)
|
||||
{
|
||||
ss <<
|
||||
"\t\tvOut.y = fabs(outPoint->m_Y);\n"
|
||||
@ -1082,13 +1082,13 @@ template <typename T>
|
||||
class EMBER_API MirrorZVariation : public Variation<T>
|
||||
{
|
||||
public:
|
||||
MirrorZVariation(T weight = 1.0) : Variation<T>("mirror_z", VAR_MIRROR_Z, weight) { }
|
||||
MirrorZVariation(T weight = 1.0) : Variation<T>("mirror_z", eVariationId::VAR_MIRROR_Z, weight) { }
|
||||
|
||||
VARCOPY(MirrorZVariation)
|
||||
|
||||
virtual void Func(IteratorHelper<T>& helper, Point<T>& outPoint, QTIsaac<ISAAC_SIZE, ISAAC_INT>& rand) override
|
||||
{
|
||||
if (m_VarType == VARTYPE_REG)
|
||||
if (m_VarType == eVariationType::VARTYPE_REG)
|
||||
{
|
||||
helper.Out.z = fabs(outPoint.m_Z);
|
||||
|
||||
@ -1117,7 +1117,7 @@ public:
|
||||
|
||||
ss << "\t{\n";
|
||||
|
||||
if (m_VarType == VARTYPE_REG)
|
||||
if (m_VarType == eVariationType::VARTYPE_REG)
|
||||
{
|
||||
ss <<
|
||||
"\t\tvOut.z = fabs(outPoint->m_Z);\n"
|
||||
@ -1154,7 +1154,7 @@ template <typename T>
|
||||
class EMBER_API RBlurVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
RBlurVariation(T weight = 1.0) : ParametricVariation<T>("rblur", VAR_RBLUR, weight)
|
||||
RBlurVariation(T weight = 1.0) : ParametricVariation<T>("rblur", eVariationId::VAR_RBLUR, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -1235,7 +1235,7 @@ template <typename T>
|
||||
class EMBER_API JuliaNabVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
JuliaNabVariation(T weight = 1.0) : ParametricVariation<T>("juliaNab", VAR_JULIANAB, weight, true)
|
||||
JuliaNabVariation(T weight = 1.0) : ParametricVariation<T>("juliaNab", eVariationId::VAR_JULIANAB, weight, true)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -1324,7 +1324,7 @@ template <typename T>
|
||||
class EMBER_API SintrangeVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
SintrangeVariation(T weight = 1.0) : ParametricVariation<T>("sintrange", VAR_SINTRANGE, weight)
|
||||
SintrangeVariation(T weight = 1.0) : ParametricVariation<T>("sintrange", eVariationId::VAR_SINTRANGE, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -1339,7 +1339,7 @@ public:
|
||||
|
||||
helper.Out.x = m_Weight * std::sin(helper.In.x) * (sqX + m_W - v);
|
||||
helper.Out.y = m_Weight * std::sin(helper.In.y) * (sqY + m_W - v);
|
||||
helper.Out.z = (m_VarType == VARTYPE_REG) ? 0 : helper.In.z;
|
||||
helper.Out.z = (m_VarType == eVariationType::VARTYPE_REG) ? 0 : helper.In.z;
|
||||
}
|
||||
|
||||
virtual string OpenCLString() const override
|
||||
@ -1357,7 +1357,7 @@ public:
|
||||
<< "\n"
|
||||
<< "\t\tvOut.x = xform->m_VariationWeights[" << varIndex << "] * sin(vIn.x) * (sqX + " << w << " - v);\n"
|
||||
<< "\t\tvOut.y = xform->m_VariationWeights[" << varIndex << "] * sin(vIn.y) * (sqY + " << w << " - v);\n"
|
||||
<< "\t\tvOut.z = " << ((m_VarType == VARTYPE_REG) ? "0" : "vIn.z") << ";\n"
|
||||
<< "\t\tvOut.z = " << ((m_VarType == eVariationType::VARTYPE_REG) ? "0" : "vIn.z") << ";\n"
|
||||
<< "\t}\n";
|
||||
|
||||
return ss.str();
|
||||
@ -1383,7 +1383,7 @@ template <typename T>
|
||||
class EMBER_API VoronVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
VoronVariation(T weight = 1.0) : ParametricVariation<T>("Voron", VAR_VORON, weight)
|
||||
VoronVariation(T weight = 1.0) : ParametricVariation<T>("Voron", eVariationId::VAR_VORON, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -1429,7 +1429,7 @@ public:
|
||||
|
||||
helper.Out.x = m_Weight * (m_K * (helper.In.x - x0) + x0);
|
||||
helper.Out.y = m_Weight * (m_K * (helper.In.y - y0) + y0);
|
||||
helper.Out.z = (m_VarType == VARTYPE_REG) ? 0 : helper.In.z;
|
||||
helper.Out.z = (m_VarType == eVariationType::VARTYPE_REG) ? 0 : helper.In.z;
|
||||
}
|
||||
|
||||
virtual string OpenCLString() const override
|
||||
@ -1481,7 +1481,7 @@ public:
|
||||
<< "\n"
|
||||
<< "\t\tvOut.x = xform->m_VariationWeights[" << varIndex << "] * (" << m_k << " * (vIn.x - x0) + x0);\n"
|
||||
<< "\t\tvOut.y = xform->m_VariationWeights[" << varIndex << "] * (" << m_k << " * (vIn.y - y0) + y0);\n"
|
||||
<< "\t\tvOut.z = " << ((m_VarType == VARTYPE_REG) ? "0" : "vIn.z") << ";\n"
|
||||
<< "\t\tvOut.z = " << ((m_VarType == eVariationType::VARTYPE_REG) ? "0" : "vIn.z") << ";\n"
|
||||
<< "\t}\n";
|
||||
|
||||
return ss.str();
|
||||
@ -1509,10 +1509,10 @@ protected:
|
||||
|
||||
m_Params.clear();
|
||||
m_Params.push_back(ParamWithName<T>(&m_K, prefix + "Voron_K", T(0.99)));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Step, prefix + "Voron_Step", T(0.25), REAL_NONZERO));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Num, prefix + "Voron_Num", 1, INTEGER, 1, 25));
|
||||
m_Params.push_back(ParamWithName<T>(&m_XSeed, prefix + "Voron_XSeed", 3, INTEGER));
|
||||
m_Params.push_back(ParamWithName<T>(&m_YSeed, prefix + "Voron_YSeed", 7, INTEGER));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Step, prefix + "Voron_Step", T(0.25), eParamType::REAL_NONZERO));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Num, prefix + "Voron_Num", 1, eParamType::INTEGER, 1, 25));
|
||||
m_Params.push_back(ParamWithName<T>(&m_XSeed, prefix + "Voron_XSeed", 3, eParamType::INTEGER));
|
||||
m_Params.push_back(ParamWithName<T>(&m_YSeed, prefix + "Voron_YSeed", 7, eParamType::INTEGER));
|
||||
}
|
||||
|
||||
private:
|
||||
@ -1540,7 +1540,7 @@ template <typename T>
|
||||
class EMBER_API WaffleVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
WaffleVariation(T weight = 1.0) : ParametricVariation<T>("waffle", VAR_WAFFLE, weight)
|
||||
WaffleVariation(T weight = 1.0) : ParametricVariation<T>("waffle", eVariationId::VAR_WAFFLE, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -1578,7 +1578,7 @@ public:
|
||||
|
||||
helper.Out.x = m_CosR * a + m_SinR * r;
|
||||
helper.Out.y = -m_SinR * a + m_CosR * r;
|
||||
helper.Out.z = (m_VarType == VARTYPE_REG) ? 0 : helper.In.z;
|
||||
helper.Out.z = (m_VarType == eVariationType::VARTYPE_REG) ? 0 : helper.In.z;
|
||||
}
|
||||
|
||||
virtual string OpenCLString() const override
|
||||
@ -1623,7 +1623,7 @@ public:
|
||||
<< "\n"
|
||||
<< "\t\tvOut.x = " << cosr << " * a + " << sinr << " * r;\n"
|
||||
<< "\t\tvOut.y = -" << sinr << " * a + " << cosr << " * r;\n"
|
||||
<< "\t\tvOut.z = " << ((m_VarType == VARTYPE_REG) ? "0" : "vIn.z") << ";\n"
|
||||
<< "\t\tvOut.z = " << ((m_VarType == eVariationType::VARTYPE_REG) ? "0" : "vIn.z") << ";\n"
|
||||
<< "\t}\n";
|
||||
|
||||
return ss.str();
|
||||
@ -1641,7 +1641,7 @@ protected:
|
||||
string prefix = Prefix();
|
||||
|
||||
m_Params.clear();
|
||||
m_Params.push_back(ParamWithName<T>(&m_Slices, prefix + "waffle_slices", 6, INTEGER_NONZERO));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Slices, prefix + "waffle_slices", 6, eParamType::INTEGER_NONZERO));
|
||||
m_Params.push_back(ParamWithName<T>(&m_XThickness, prefix + "waffle_xthickness", T(0.5)));
|
||||
m_Params.push_back(ParamWithName<T>(&m_YThickness, prefix + "waffle_ythickness", T(0.5)));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Rotation, prefix + "waffle_rotation"));
|
||||
@ -1665,7 +1665,7 @@ template <typename T>
|
||||
class EMBER_API Square3DVariation : public Variation<T>
|
||||
{
|
||||
public:
|
||||
Square3DVariation(T weight = 1.0) : Variation<T>("square3D", VAR_SQUARE3D, weight) { }
|
||||
Square3DVariation(T weight = 1.0) : Variation<T>("square3D", eVariationId::VAR_SQUARE3D, weight) { }
|
||||
|
||||
VARCOPY(Square3DVariation)
|
||||
|
||||
@ -1698,7 +1698,7 @@ template <typename T>
|
||||
class EMBER_API SuperShape3DVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
SuperShape3DVariation(T weight = 1.0) : ParametricVariation<T>("SuperShape3D", VAR_SUPER_SHAPE3D, weight)
|
||||
SuperShape3DVariation(T weight = 1.0) : ParametricVariation<T>("SuperShape3D", eVariationId::VAR_SUPER_SHAPE3D, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -1861,7 +1861,7 @@ protected:
|
||||
m_Params.push_back(ParamWithName<T>(&m_N3_1, prefix + "SuperShape3D_n3_1", 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_N3_2, prefix + "SuperShape3D_n3_2", 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Spiral, prefix + "SuperShape3D_spiral"));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Toroidmap, prefix + "SuperShape3D_toroidmap", 0, INTEGER, 0, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Toroidmap, prefix + "SuperShape3D_toroidmap", 0, eParamType::INTEGER, 0, 1));
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_N1n_1, prefix + "SuperShape3D_n1n1"));//Precalc.
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_N1n_2, prefix + "SuperShape3D_n1n2"));
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_An2_1, prefix + "SuperShape3D_an21"));
|
||||
@ -1910,7 +1910,7 @@ template <typename T>
|
||||
class EMBER_API Sphyp3DVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
Sphyp3DVariation(T weight = 1.0) : ParametricVariation<T>("sphyp3D", VAR_SPHYP3D, weight, true)
|
||||
Sphyp3DVariation(T weight = 1.0) : ParametricVariation<T>("sphyp3D", eVariationId::VAR_SPHYP3D, weight, true)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -1982,7 +1982,7 @@ protected:
|
||||
m_Params.push_back(ParamWithName<T>(&m_StretchX, prefix + "sphyp3D_stretchX", 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_StretchY, prefix + "sphyp3D_stretchY", 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_StretchZ, prefix + "sphyp3D_stretchZ", 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_ZOn, prefix + "sphyp3D_zOn", 1, INTEGER, 0, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_ZOn, prefix + "sphyp3D_zOn", 1, eParamType::INTEGER, 0, 1));
|
||||
}
|
||||
|
||||
private:
|
||||
@ -1999,7 +1999,7 @@ template <typename T>
|
||||
class EMBER_API CirclecropVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
CirclecropVariation(T weight = 1.0) : ParametricVariation<T>("circlecrop", VAR_CIRCLECROP, weight)
|
||||
CirclecropVariation(T weight = 1.0) : ParametricVariation<T>("circlecrop", eVariationId::VAR_CIRCLECROP, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -2022,7 +2022,7 @@ public:
|
||||
|
||||
if (cr0 && esc)
|
||||
{
|
||||
if (m_VarType == VARTYPE_PRE)
|
||||
if (m_VarType == eVariationType::VARTYPE_PRE)
|
||||
helper.m_TransX = helper.m_TransY = 0;
|
||||
else
|
||||
outPoint.m_X = outPoint.m_Y = 0;
|
||||
@ -2079,7 +2079,7 @@ public:
|
||||
<< "\t\tif (cr0 && esc)\n"
|
||||
<< "\t\t{\n";
|
||||
|
||||
if (m_VarType == VARTYPE_PRE)
|
||||
if (m_VarType == eVariationType::VARTYPE_PRE)
|
||||
ss << "\t\t transX = transY = 0;\n";
|
||||
else
|
||||
ss << "\t\t outPoint->m_X = outPoint->m_Y = 0;\n";
|
||||
@ -2126,7 +2126,7 @@ protected:
|
||||
m_Params.push_back(ParamWithName<T>(&m_X, prefix + "circlecrop_x"));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Y, prefix + "circlecrop_y"));
|
||||
m_Params.push_back(ParamWithName<T>(&m_ScatterArea, prefix + "circlecrop_scatter_area"));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Zero, prefix + "circlecrop_zero", 1, INTEGER, 0, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Zero, prefix + "circlecrop_zero", 1, eParamType::INTEGER, 0, 1));
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_Ca, prefix + "circlecrop_ca"));
|
||||
}
|
||||
|
||||
@ -2146,7 +2146,7 @@ template <typename T>
|
||||
class EMBER_API Julian3DxVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
Julian3DxVariation(T weight = 1.0) : ParametricVariation<T>("julian3Dx", VAR_JULIAN3DX, weight, true, true)
|
||||
Julian3DxVariation(T weight = 1.0) : ParametricVariation<T>("julian3Dx", eVariationId::VAR_JULIAN3DX, weight, true, true)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -2215,7 +2215,7 @@ protected:
|
||||
|
||||
m_Params.clear();
|
||||
m_Params.push_back(ParamWithName<T>(&m_Dist, prefix + "julian3Dx_dist", 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Power, prefix + "julian3Dx_power", 2, INTEGER_NONZERO));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Power, prefix + "julian3Dx_power", 2, eParamType::INTEGER_NONZERO));
|
||||
m_Params.push_back(ParamWithName<T>(&m_A, prefix + "julian3Dx_a", 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_B, prefix + "julian3Dx_b"));
|
||||
m_Params.push_back(ParamWithName<T>(&m_C, prefix + "julian3Dx_c"));
|
||||
@ -2246,7 +2246,7 @@ template <typename T>
|
||||
class EMBER_API FourthVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
FourthVariation(T weight = 1.0) : ParametricVariation<T>("fourth", VAR_FOURTH, weight, true, true, false, false, true)
|
||||
FourthVariation(T weight = 1.0) : ParametricVariation<T>("fourth", eVariationId::VAR_FOURTH, weight, true, true, false, false, true)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -2306,7 +2306,7 @@ public:
|
||||
helper.Out.y = m_Weight * helper.In.y;
|
||||
}
|
||||
|
||||
helper.Out.z = (m_VarType == VARTYPE_REG) ? 0 : helper.In.z;
|
||||
helper.Out.z = (m_VarType == eVariationType::VARTYPE_REG) ? 0 : helper.In.z;
|
||||
}
|
||||
|
||||
virtual string OpenCLString() const override
|
||||
@ -2374,7 +2374,7 @@ public:
|
||||
<< "\t\t vOut.y = xform->m_VariationWeights[" << varIndex << "] * vIn.y;\n"
|
||||
<< "\t\t}\n"
|
||||
<< "\n"
|
||||
<< "\t\tvOut.z = " << ((m_VarType == VARTYPE_REG) ? "0" : "vIn.z") << ";\n"
|
||||
<< "\t\tvOut.z = " << ((m_VarType == eVariationType::VARTYPE_REG) ? "0" : "vIn.z") << ";\n"
|
||||
<< "\t}\n";
|
||||
|
||||
return ss.str();
|
||||
@ -2396,7 +2396,7 @@ protected:
|
||||
string prefix = Prefix();
|
||||
|
||||
m_Params.clear();
|
||||
m_Params.push_back(ParamWithName<T>(&m_Spin, prefix + "fourth_spin", T(M_PI), REAL_CYCLIC, 0, M_2PI));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Spin, prefix + "fourth_spin", T(M_PI), eParamType::REAL_CYCLIC, 0, M_2PI));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Space, prefix + "fourth_space"));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Twist, prefix + "fourth_twist"));
|
||||
m_Params.push_back(ParamWithName<T>(&m_X, prefix + "fourth_x"));
|
||||
@ -2420,7 +2420,7 @@ template <typename T>
|
||||
class EMBER_API MobiqVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
MobiqVariation(T weight = 1.0) : ParametricVariation<T>("mobiq", VAR_MOBIQ, weight)
|
||||
MobiqVariation(T weight = 1.0) : ParametricVariation<T>("mobiq", eVariationId::VAR_MOBIQ, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -2576,7 +2576,7 @@ template <typename T>
|
||||
class EMBER_API SpherivoidVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
SpherivoidVariation(T weight = 1.0) : ParametricVariation<T>("spherivoid", VAR_SPHERIVOID, weight, true, true, false, false, true)
|
||||
SpherivoidVariation(T weight = 1.0) : ParametricVariation<T>("spherivoid", eVariationId::VAR_SPHERIVOID, weight, true, true, false, false, true)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -2642,7 +2642,7 @@ template <typename T>
|
||||
class EMBER_API FarblurVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
FarblurVariation(T weight = 1.0) : ParametricVariation<T>("farblur", VAR_FARBLUR, weight)
|
||||
FarblurVariation(T weight = 1.0) : ParametricVariation<T>("farblur", eVariationId::VAR_FARBLUR, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -2735,7 +2735,7 @@ template <typename T>
|
||||
class EMBER_API CurlSPVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
CurlSPVariation(T weight = 1.0) : ParametricVariation<T>("curl_sp", VAR_CURL_SP, weight)
|
||||
CurlSPVariation(T weight = 1.0) : ParametricVariation<T>("curl_sp", eVariationId::VAR_CURL_SP, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -2814,7 +2814,7 @@ protected:
|
||||
string prefix = Prefix();
|
||||
|
||||
m_Params.clear();
|
||||
m_Params.push_back(ParamWithName<T>(&m_Power, prefix + "curl_sp_pow", 1, REAL_NONZERO));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Power, prefix + "curl_sp_pow", 1, eParamType::REAL_NONZERO));
|
||||
m_Params.push_back(ParamWithName<T>(&m_C1, prefix + "curl_sp_c1"));
|
||||
m_Params.push_back(ParamWithName<T>(&m_C2, prefix + "curl_sp_c2"));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Sx, prefix + "curl_sp_sx"));
|
||||
@ -2844,7 +2844,7 @@ template <typename T>
|
||||
class EMBER_API HeatVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
HeatVariation(T weight = 1.0) : ParametricVariation<T>("heat", VAR_HEAT, weight, true, false, false, false, true)
|
||||
HeatVariation(T weight = 1.0) : ParametricVariation<T>("heat", eVariationId::VAR_HEAT, weight, true, false, false, false, true)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -2995,7 +2995,7 @@ template <typename T>
|
||||
class EMBER_API Interference2Variation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
Interference2Variation(T weight = 1.0) : ParametricVariation<T>("interference2", VAR_INTERFERENCE2, weight)
|
||||
Interference2Variation(T weight = 1.0) : ParametricVariation<T>("interference2", eVariationId::VAR_INTERFERENCE2, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -3051,7 +3051,7 @@ public:
|
||||
|
||||
helper.Out.x = m_Weight * (fp1x + fp2x);
|
||||
helper.Out.y = m_Weight * (fp1y + fp2y);
|
||||
helper.Out.z = (m_VarType == VARTYPE_REG) ? 0 : helper.In.z;
|
||||
helper.Out.z = (m_VarType == eVariationType::VARTYPE_REG) ? 0 : helper.In.z;
|
||||
}
|
||||
|
||||
virtual string OpenCLString() const override
|
||||
@ -3119,7 +3119,7 @@ public:
|
||||
<< "\n"
|
||||
<< "\t\tvOut.x = xform->m_VariationWeights[" << varIndex << "] * (fp1x + fp2x);\n"
|
||||
<< "\t\tvOut.y = xform->m_VariationWeights[" << varIndex << "] * (fp1y + fp2y);\n"
|
||||
<< "\t\tvOut.z = " << ((m_VarType == VARTYPE_REG) ? "0" : "vIn.z") << ";\n"
|
||||
<< "\t\tvOut.z = " << ((m_VarType == eVariationType::VARTYPE_REG) ? "0" : "vIn.z") << ";\n"
|
||||
<< "\t}\n";
|
||||
|
||||
return ss.str();
|
||||
@ -3155,12 +3155,12 @@ protected:
|
||||
m_Params.push_back(ParamWithName<T>(&m_B1, prefix + "interference2_b1", 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_C1, prefix + "interference2_c1"));
|
||||
m_Params.push_back(ParamWithName<T>(&m_P1, prefix + "interference2_p1", 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_T1, prefix + "interference2_t1", 0, INTEGER, 0, 2));
|
||||
m_Params.push_back(ParamWithName<T>(&m_T1, prefix + "interference2_t1", 0, eParamType::INTEGER, 0, 2));
|
||||
m_Params.push_back(ParamWithName<T>(&m_A2, prefix + "interference2_a2", 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_B2, prefix + "interference2_b2", 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_C2, prefix + "interference2_c2"));
|
||||
m_Params.push_back(ParamWithName<T>(&m_P2, prefix + "interference2_p2", 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_T2, prefix + "interference2_t2", 0, INTEGER, 0, 2));
|
||||
m_Params.push_back(ParamWithName<T>(&m_T2, prefix + "interference2_t2", 0, eParamType::INTEGER, 0, 2));
|
||||
}
|
||||
|
||||
private:
|
||||
@ -3198,7 +3198,7 @@ template <typename T>
|
||||
class EMBER_API SinqVariation : public Variation<T>
|
||||
{
|
||||
public:
|
||||
SinqVariation(T weight = 1.0) : Variation<T>("sinq", VAR_SINQ, weight) { }
|
||||
SinqVariation(T weight = 1.0) : Variation<T>("sinq", eVariationId::VAR_SINQ, weight) { }
|
||||
|
||||
VARCOPY(SinqVariation)
|
||||
|
||||
@ -3250,7 +3250,7 @@ template <typename T>
|
||||
class EMBER_API SinhqVariation : public Variation<T>
|
||||
{
|
||||
public:
|
||||
SinhqVariation(T weight = 1.0) : Variation<T>("sinhq", VAR_SINHQ, weight) { }
|
||||
SinhqVariation(T weight = 1.0) : Variation<T>("sinhq", eVariationId::VAR_SINHQ, weight) { }
|
||||
|
||||
VARCOPY(SinhqVariation)
|
||||
|
||||
@ -3302,7 +3302,7 @@ template <typename T>
|
||||
class EMBER_API SecqVariation : public Variation<T>
|
||||
{
|
||||
public:
|
||||
SecqVariation(T weight = 1.0) : Variation<T>("secq", VAR_SECQ, weight, true) { }
|
||||
SecqVariation(T weight = 1.0) : Variation<T>("secq", eVariationId::VAR_SECQ, weight, true) { }
|
||||
|
||||
VARCOPY(SecqVariation)
|
||||
|
||||
@ -3356,7 +3356,7 @@ template <typename T>
|
||||
class EMBER_API SechqVariation : public Variation<T>
|
||||
{
|
||||
public:
|
||||
SechqVariation(T weight = 1.0) : Variation<T>("sechq", VAR_SECHQ, weight, true) { }
|
||||
SechqVariation(T weight = 1.0) : Variation<T>("sechq", eVariationId::VAR_SECHQ, weight, true) { }
|
||||
|
||||
VARCOPY(SechqVariation)
|
||||
|
||||
@ -3410,7 +3410,7 @@ template <typename T>
|
||||
class EMBER_API TanqVariation : public Variation<T>
|
||||
{
|
||||
public:
|
||||
TanqVariation(T weight = 1.0) : Variation<T>("tanq", VAR_TANQ, weight) { }
|
||||
TanqVariation(T weight = 1.0) : Variation<T>("tanq", eVariationId::VAR_TANQ, weight) { }
|
||||
|
||||
VARCOPY(TanqVariation)
|
||||
|
||||
@ -3469,7 +3469,7 @@ template <typename T>
|
||||
class EMBER_API TanhqVariation : public Variation<T>
|
||||
{
|
||||
public:
|
||||
TanhqVariation(T weight = 1.0) : Variation<T>("tanhq", VAR_TANHQ, weight) { }
|
||||
TanhqVariation(T weight = 1.0) : Variation<T>("tanhq", eVariationId::VAR_TANHQ, weight) { }
|
||||
|
||||
VARCOPY(TanhqVariation)
|
||||
|
||||
@ -3528,7 +3528,7 @@ template <typename T>
|
||||
class EMBER_API CosqVariation : public Variation<T>
|
||||
{
|
||||
public:
|
||||
CosqVariation(T weight = 1.0) : Variation<T>("cosq", VAR_COSQ, weight) { }
|
||||
CosqVariation(T weight = 1.0) : Variation<T>("cosq", eVariationId::VAR_COSQ, weight) { }
|
||||
|
||||
VARCOPY(CosqVariation)
|
||||
|
||||
@ -3580,7 +3580,7 @@ template <typename T>
|
||||
class EMBER_API CoshqVariation : public Variation<T>
|
||||
{
|
||||
public:
|
||||
CoshqVariation(T weight = 1.0) : Variation<T>("coshq", VAR_COSHQ, weight) { }
|
||||
CoshqVariation(T weight = 1.0) : Variation<T>("coshq", eVariationId::VAR_COSHQ, weight) { }
|
||||
|
||||
VARCOPY(CoshqVariation)
|
||||
|
||||
@ -3632,7 +3632,7 @@ template <typename T>
|
||||
class EMBER_API CotqVariation : public Variation<T>
|
||||
{
|
||||
public:
|
||||
CotqVariation(T weight = 1.0) : Variation<T>("cotq", VAR_COTQ, weight) { }
|
||||
CotqVariation(T weight = 1.0) : Variation<T>("cotq", eVariationId::VAR_COTQ, weight) { }
|
||||
|
||||
VARCOPY(CotqVariation)
|
||||
|
||||
@ -3691,7 +3691,7 @@ template <typename T>
|
||||
class EMBER_API CothqVariation : public Variation<T>
|
||||
{
|
||||
public:
|
||||
CothqVariation(T weight = 1.0) : Variation<T>("cothq", VAR_COTHQ, weight) { }
|
||||
CothqVariation(T weight = 1.0) : Variation<T>("cothq", eVariationId::VAR_COTHQ, weight) { }
|
||||
|
||||
VARCOPY(CothqVariation)
|
||||
|
||||
@ -3750,7 +3750,7 @@ template <typename T>
|
||||
class EMBER_API CscqVariation : public Variation<T>
|
||||
{
|
||||
public:
|
||||
CscqVariation(T weight = 1.0) : Variation<T>("cscq", VAR_CSCQ, weight, true) { }
|
||||
CscqVariation(T weight = 1.0) : Variation<T>("cscq", eVariationId::VAR_CSCQ, weight, true) { }
|
||||
|
||||
VARCOPY(CscqVariation)
|
||||
|
||||
@ -3804,7 +3804,7 @@ template <typename T>
|
||||
class EMBER_API CschqVariation : public Variation<T>
|
||||
{
|
||||
public:
|
||||
CschqVariation(T weight = 1.0) : Variation<T>("cschq", VAR_CSCHQ, weight, true) { }
|
||||
CschqVariation(T weight = 1.0) : Variation<T>("cschq", eVariationId::VAR_CSCHQ, weight, true) { }
|
||||
|
||||
VARCOPY(CschqVariation)
|
||||
|
||||
@ -3858,7 +3858,7 @@ template <typename T>
|
||||
class EMBER_API EstiqVariation : public Variation<T>
|
||||
{
|
||||
public:
|
||||
EstiqVariation(T weight = 1.0) : Variation<T>("estiq", VAR_ESTIQ, weight) { }
|
||||
EstiqVariation(T weight = 1.0) : Variation<T>("estiq", eVariationId::VAR_ESTIQ, weight) { }
|
||||
|
||||
VARCOPY(EstiqVariation)
|
||||
|
||||
@ -3908,7 +3908,7 @@ template <typename T>
|
||||
class EMBER_API LoqVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
LoqVariation(T weight = 1.0) : ParametricVariation<T>("loq", VAR_LOQ, weight)
|
||||
LoqVariation(T weight = 1.0) : ParametricVariation<T>("loq", eVariationId::VAR_LOQ, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -3962,7 +3962,7 @@ protected:
|
||||
string prefix = Prefix();
|
||||
|
||||
m_Params.clear();
|
||||
m_Params.push_back(ParamWithName<T>(&m_Base, prefix + "loq_base", T(M_E), REAL, EPS, TMAX));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Base, prefix + "loq_base", T(M_E), eParamType::REAL, EPS, TMAX));
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_Denom, prefix + "loq_denom"));//Precalc.
|
||||
}
|
||||
|
||||
@ -3978,7 +3978,7 @@ template <typename T>
|
||||
class EMBER_API CurvatureVariation : public Variation<T>
|
||||
{
|
||||
public:
|
||||
CurvatureVariation(T weight = 1.0) : Variation<T>("curvature", VAR_CURVATURE, weight, true, true, false, false, true) { }
|
||||
CurvatureVariation(T weight = 1.0) : Variation<T>("curvature", eVariationId::VAR_CURVATURE, weight, true, true, false, false, true) { }
|
||||
|
||||
VARCOPY(CurvatureVariation)
|
||||
|
||||
@ -3986,7 +3986,7 @@ public:
|
||||
{
|
||||
helper.Out.x = m_Weight / Zeps(helper.m_PrecalcSqrtSumSquares);
|
||||
helper.Out.y = helper.m_PrecalcAtanyx;
|
||||
helper.Out.z = (m_VarType == VARTYPE_REG) ? 0 : helper.In.z;
|
||||
helper.Out.z = (m_VarType == eVariationType::VARTYPE_REG) ? 0 : helper.In.z;
|
||||
}
|
||||
|
||||
virtual string OpenCLString() const override
|
||||
@ -3997,7 +3997,7 @@ public:
|
||||
ss << "\t{\n"
|
||||
<< "\t\tvOut.x = xform->m_VariationWeights[" << varIndex << "] / Zeps(precalcSqrtSumSquares);\n"
|
||||
<< "\t\tvOut.y = precalcAtanyx;\n"
|
||||
<< "\t\tvOut.z = " << ((m_VarType == VARTYPE_REG) ? "0" : "vIn.z") << ";\n"
|
||||
<< "\t\tvOut.z = " << ((m_VarType == eVariationType::VARTYPE_REG) ? "0" : "vIn.z") << ";\n"
|
||||
<< "\t}\n";
|
||||
|
||||
return ss.str();
|
||||
@ -4016,7 +4016,7 @@ template <typename T>
|
||||
class EMBER_API QodeVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
QodeVariation(T weight = 1.0) : ParametricVariation<T>("q_ode", VAR_Q_ODE, weight)
|
||||
QodeVariation(T weight = 1.0) : ParametricVariation<T>("q_ode", eVariationId::VAR_Q_ODE, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -4033,7 +4033,7 @@ public:
|
||||
(m_Q04 * xy + m_Q05 * helper.In.y + m_Q06 * sqy);
|
||||
helper.Out.y = (m_Q07 + m_Q08 * helper.In.x + m_Q09 * sqx) +
|
||||
(m_Q10 * xy + m_Weight * m_Q11 * helper.In.y + m_Q12 * sqy);
|
||||
helper.Out.z = (m_VarType == VARTYPE_REG) ? 0 : helper.In.z;
|
||||
helper.Out.z = (m_VarType == eVariationType::VARTYPE_REG) ? 0 : helper.In.z;
|
||||
}
|
||||
|
||||
virtual string OpenCLString() const override
|
||||
@ -4064,7 +4064,7 @@ public:
|
||||
<< "\t\t (" << q04 << " * xy + " << q05 << " * vIn.y + " << q06 << " * sqy);\n"
|
||||
<< "\t\tvOut.y = (" << q07 << " + " << q08 << " * vIn.x + " << q09 << " * sqx) + \n"
|
||||
<< "\t\t (" << q10 << " * xy + xform->m_VariationWeights[" << varIndex << "] * " << q11 << " * vIn.y + " << q12 << " * sqy);\n"
|
||||
<< "\t\tvOut.z = " << ((m_VarType == VARTYPE_REG) ? "0" : "vIn.z") << ";\n"
|
||||
<< "\t\tvOut.z = " << ((m_VarType == eVariationType::VARTYPE_REG) ? "0" : "vIn.z") << ";\n"
|
||||
<< "\t}\n";
|
||||
|
||||
return ss.str();
|
||||
@ -4112,7 +4112,7 @@ template <typename T>
|
||||
class EMBER_API BlurHeartVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
BlurHeartVariation(T weight = 1.0) : ParametricVariation<T>("blur_heart", VAR_BLUR_HEART, weight)
|
||||
BlurHeartVariation(T weight = 1.0) : ParametricVariation<T>("blur_heart", eVariationId::VAR_BLUR_HEART, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -4143,7 +4143,7 @@ public:
|
||||
|
||||
helper.Out.x = xx * m_Weight;
|
||||
helper.Out.y = yy * m_Weight;
|
||||
helper.Out.z = (m_VarType == VARTYPE_REG) ? 0 : helper.In.z;
|
||||
helper.Out.z = (m_VarType == eVariationType::VARTYPE_REG) ? 0 : helper.In.z;
|
||||
}
|
||||
|
||||
virtual string OpenCLString() const override
|
||||
@ -4177,7 +4177,7 @@ public:
|
||||
<< "\n"
|
||||
<< "\t\tvOut.x = xx * xform->m_VariationWeights[" << varIndex << "];\n"
|
||||
<< "\t\tvOut.y = yy * xform->m_VariationWeights[" << varIndex << "];\n"
|
||||
<< "\t\tvOut.z = " << ((m_VarType == VARTYPE_REG) ? "0" : "vIn.z") << ";\n"
|
||||
<< "\t\tvOut.z = " << ((m_VarType == eVariationType::VARTYPE_REG) ? "0" : "vIn.z") << ";\n"
|
||||
<< "\t}\n";
|
||||
|
||||
return ss.str();
|
||||
@ -4212,7 +4212,7 @@ template <typename T>
|
||||
class EMBER_API TruchetVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
TruchetVariation(T weight = 1.0) : ParametricVariation<T>("Truchet", VAR_TRUCHET, weight)
|
||||
TruchetVariation(T weight = 1.0) : ParametricVariation<T>("Truchet", eVariationId::VAR_TRUCHET, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -4339,7 +4339,7 @@ public:
|
||||
helper.Out.y += m_Size * (y + Floor<T>(helper.In.y));
|
||||
}
|
||||
|
||||
helper.Out.z = (m_VarType == VARTYPE_REG) ? 0 : helper.In.z;
|
||||
helper.Out.z = (m_VarType == eVariationType::VARTYPE_REG) ? 0 : helper.In.z;
|
||||
}
|
||||
|
||||
virtual string OpenCLString() const override
|
||||
@ -4477,7 +4477,7 @@ public:
|
||||
<< "\t\t vOut.y += " << size << " * (y + floor(vIn.y));\n"
|
||||
<< "\t\t}\n"
|
||||
<< "\n"
|
||||
<< "\t\tvOut.z = " << ((m_VarType == VARTYPE_REG) ? "0" : "vIn.z") << ";\n"
|
||||
<< "\t\tvOut.z = " << ((m_VarType == eVariationType::VARTYPE_REG) ? "0" : "vIn.z") << ";\n"
|
||||
<< "\t}\n";
|
||||
|
||||
return ss.str();
|
||||
@ -4503,11 +4503,11 @@ protected:
|
||||
string prefix = Prefix();
|
||||
|
||||
m_Params.clear();
|
||||
m_Params.push_back(ParamWithName<T>(&m_Extended, prefix + "Truchet_extended", 0, INTEGER, 0, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Exponent, prefix + "Truchet_exponent", 2, REAL_CYCLIC, T(0.001), 2));
|
||||
m_Params.push_back(ParamWithName<T>(&m_ArcWidth, prefix + "Truchet_arc_width", T(0.5), REAL_CYCLIC, T(0.001), 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Extended, prefix + "Truchet_extended", 0, eParamType::INTEGER, 0, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Exponent, prefix + "Truchet_exponent", 2, eParamType::REAL_CYCLIC, T(0.001), 2));
|
||||
m_Params.push_back(ParamWithName<T>(&m_ArcWidth, prefix + "Truchet_arc_width", T(0.5), eParamType::REAL_CYCLIC, T(0.001), 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Rotation, prefix + "Truchet_rotation"));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Size, prefix + "Truchet_size", 1, REAL_CYCLIC, T(0.001), 10));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Size, prefix + "Truchet_size", 1, eParamType::REAL_CYCLIC, T(0.001), 10));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Seed, prefix + "Truchet_seed", 50));
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_OneOverEx, prefix + "Truchet_one_over_ex"));//Precalc.
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_AbsSeed, prefix + "Truchet_abs_seed"));
|
||||
@ -4537,7 +4537,7 @@ template <typename T>
|
||||
class EMBER_API GdoffsVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
GdoffsVariation(T weight = 1.0) : ParametricVariation<T>("gdoffs", VAR_GDOFFS, weight)
|
||||
GdoffsVariation(T weight = 1.0) : ParametricVariation<T>("gdoffs", eVariationId::VAR_GDOFFS, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -4650,14 +4650,14 @@ protected:
|
||||
string prefix = Prefix();
|
||||
|
||||
m_Params.clear();
|
||||
m_Params.push_back(ParamWithName<T>(&m_DeltaX, prefix + "gdoffs_delta_x", 0, REAL, 0, 16));
|
||||
m_Params.push_back(ParamWithName<T>(&m_DeltaY, prefix + "gdoffs_delta_y", 0, REAL, 0, 16));
|
||||
m_Params.push_back(ParamWithName<T>(&m_DeltaX, prefix + "gdoffs_delta_x", 0, eParamType::REAL, 0, 16));
|
||||
m_Params.push_back(ParamWithName<T>(&m_DeltaY, prefix + "gdoffs_delta_y", 0, eParamType::REAL, 0, 16));
|
||||
m_Params.push_back(ParamWithName<T>(&m_AreaX, prefix + "gdoffs_area_x", 2));
|
||||
m_Params.push_back(ParamWithName<T>(&m_AreaY, prefix + "gdoffs_area_y", 2));
|
||||
m_Params.push_back(ParamWithName<T>(&m_CenterX, prefix + "gdoffs_center_x"));
|
||||
m_Params.push_back(ParamWithName<T>(&m_CenterY, prefix + "gdoffs_center_y"));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Gamma, prefix + "gdoffs_gamma", 1, INTEGER, 1, 6));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Square, prefix + "gdoffs_square", 0, INTEGER, 0, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Gamma, prefix + "gdoffs_gamma", 1, eParamType::INTEGER, 1, 6));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Square, prefix + "gdoffs_square", 0, eParamType::INTEGER, 0, 1));
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_Dx, prefix + "gdoffs_dx"));
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_Ax, prefix + "gdoffs_ax"));
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_Cx, prefix + "gdoffs_cx"));
|
||||
@ -4698,7 +4698,7 @@ template <typename T>
|
||||
class EMBER_API OctagonVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
OctagonVariation(T weight = 1.0) : ParametricVariation<T>("octagon", VAR_OCTAGON, weight)
|
||||
OctagonVariation(T weight = 1.0) : ParametricVariation<T>("octagon", eVariationId::VAR_OCTAGON, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -4842,7 +4842,7 @@ template <typename T>
|
||||
class EMBER_API TradeVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
TradeVariation(T weight = 1.0) : ParametricVariation<T>("trade", VAR_TRADE, weight)
|
||||
TradeVariation(T weight = 1.0) : ParametricVariation<T>("trade", eVariationId::VAR_TRADE, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -4892,7 +4892,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
helper.Out.z = (m_VarType == VARTYPE_REG) ? 0 : helper.In.z;
|
||||
helper.Out.z = (m_VarType == eVariationType::VARTYPE_REG) ? 0 : helper.In.z;
|
||||
}
|
||||
|
||||
virtual string OpenCLString() const override
|
||||
@ -4950,7 +4950,7 @@ public:
|
||||
<< "\t\t }\n"
|
||||
<< "\t\t}\n"
|
||||
<< "\n"
|
||||
<< "\t\tvOut.z = " << ((m_VarType == VARTYPE_REG) ? "0" : "vIn.z") << ";\n"
|
||||
<< "\t\tvOut.z = " << ((m_VarType == eVariationType::VARTYPE_REG) ? "0" : "vIn.z") << ";\n"
|
||||
<< "\t}\n";
|
||||
|
||||
return ss.str();
|
||||
@ -4968,10 +4968,10 @@ protected:
|
||||
string prefix = Prefix();
|
||||
|
||||
m_Params.clear();
|
||||
m_Params.push_back(ParamWithName<T>(&m_R1, prefix + "trade_r1", 1, REAL, EPS, TMAX));
|
||||
m_Params.push_back(ParamWithName<T>(&m_D1, prefix + "trade_d1", 1, REAL, 0, TMAX));
|
||||
m_Params.push_back(ParamWithName<T>(&m_R2, prefix + "trade_r2", 1, REAL, EPS, TMAX));
|
||||
m_Params.push_back(ParamWithName<T>(&m_D2, prefix + "trade_d2", 1, REAL, 0, TMAX));
|
||||
m_Params.push_back(ParamWithName<T>(&m_R1, prefix + "trade_r1", 1, eParamType::REAL, EPS, TMAX));
|
||||
m_Params.push_back(ParamWithName<T>(&m_D1, prefix + "trade_d1", 1, eParamType::REAL, 0, TMAX));
|
||||
m_Params.push_back(ParamWithName<T>(&m_R2, prefix + "trade_r2", 1, eParamType::REAL, EPS, TMAX));
|
||||
m_Params.push_back(ParamWithName<T>(&m_D2, prefix + "trade_d2", 1, eParamType::REAL, 0, TMAX));
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_C1, prefix + "trade_c1"));
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_C2, prefix + "trade_c2"));
|
||||
}
|
||||
@ -4992,7 +4992,7 @@ template <typename T>
|
||||
class EMBER_API JuliacVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
JuliacVariation(T weight = 1.0) : ParametricVariation<T>("Juliac", VAR_JULIAC, weight, true, false, false, false, true)
|
||||
JuliacVariation(T weight = 1.0) : ParametricVariation<T>("Juliac", eVariationId::VAR_JULIAC, weight, true, false, false, false, true)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -5008,7 +5008,7 @@ public:
|
||||
|
||||
helper.Out.x = m_Weight * mod2 * std::cos(temp);
|
||||
helper.Out.y = m_Weight * mod2 * std::sin(temp);
|
||||
helper.Out.z = (m_VarType == VARTYPE_REG) ? 0 : helper.In.z;
|
||||
helper.Out.z = (m_VarType == eVariationType::VARTYPE_REG) ? 0 : helper.In.z;
|
||||
}
|
||||
|
||||
virtual string OpenCLString() const override
|
||||
@ -5031,7 +5031,7 @@ public:
|
||||
<< "\n"
|
||||
<< "\t\tvOut.x = xform->m_VariationWeights[" << varIndex << "] * mod2 * cos(temp);\n"
|
||||
<< "\t\tvOut.y = xform->m_VariationWeights[" << varIndex << "] * mod2 * sin(temp);\n"
|
||||
<< "\t\tvOut.z = " << ((m_VarType == VARTYPE_REG) ? "0" : "vIn.z") << ";\n"
|
||||
<< "\t\tvOut.z = " << ((m_VarType == eVariationType::VARTYPE_REG) ? "0" : "vIn.z") << ";\n"
|
||||
<< "\t}\n";
|
||||
|
||||
return ss.str();
|
||||
@ -5071,7 +5071,7 @@ template <typename T>
|
||||
class EMBER_API Blade3DVariation : public Variation<T>
|
||||
{
|
||||
public:
|
||||
Blade3DVariation(T weight = 1.0) : Variation<T>("blade3D", VAR_BLADE3D, weight, true, true) { }
|
||||
Blade3DVariation(T weight = 1.0) : Variation<T>("blade3D", eVariationId::VAR_BLADE3D, weight, true, true) { }
|
||||
|
||||
VARCOPY(Blade3DVariation)
|
||||
|
||||
@ -5112,7 +5112,7 @@ template <typename T>
|
||||
class EMBER_API Blob3DVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
Blob3DVariation(T weight = 1.0) : ParametricVariation<T>("blob3D", VAR_BLOB3D, weight, true, true, true, true)
|
||||
Blob3DVariation(T weight = 1.0) : ParametricVariation<T>("blob3D", eVariationId::VAR_BLOB3D, weight, true, true, true, true)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -5188,7 +5188,7 @@ template <typename T>
|
||||
class EMBER_API BlockyVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
BlockyVariation(T weight = 1.0) : ParametricVariation<T>("blocky", VAR_BLOCKY, weight, true)
|
||||
BlockyVariation(T weight = 1.0) : ParametricVariation<T>("blocky", eVariationId::VAR_BLOCKY, weight, true)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -5213,7 +5213,7 @@ public:
|
||||
b = SafeSqrt(1 - SQR(a));
|
||||
|
||||
helper.Out.y = m_Vy * atan2(a, b) * r;
|
||||
helper.Out.z = (m_VarType == VARTYPE_REG) ? 0 : helper.In.z;
|
||||
helper.Out.z = (m_VarType == eVariationType::VARTYPE_REG) ? 0 : helper.In.z;
|
||||
}
|
||||
|
||||
virtual string OpenCLString() const override
|
||||
@ -5246,7 +5246,7 @@ public:
|
||||
<< "\t\tb = SafeSqrt(1 - SQR(a));\n"
|
||||
<< "\n"
|
||||
<< "\t\tvOut.y = " << vy << " * atan2(a, b) * r;\n"
|
||||
<< "\t\tvOut.z = " << ((m_VarType == VARTYPE_REG) ? "0" : "vIn.z") << ";\n"
|
||||
<< "\t\tvOut.z = " << ((m_VarType == eVariationType::VARTYPE_REG) ? "0" : "vIn.z") << ";\n"
|
||||
<< "\t}\n";
|
||||
|
||||
return ss.str();
|
||||
@ -5272,7 +5272,7 @@ protected:
|
||||
m_Params.clear();
|
||||
m_Params.push_back(ParamWithName<T>(&m_X, prefix + "blocky_x", 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Y, prefix + "blocky_y", 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Mp, prefix + "blocky_mp", 4, REAL_NONZERO));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Mp, prefix + "blocky_mp", 4, eParamType::REAL_NONZERO));
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_V, prefix + "blocky_v"));//Precalc.
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_Vx, prefix + "blocky_vx"));
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_Vy, prefix + "blocky_vy"));
|
||||
@ -5303,9 +5303,9 @@ MAKEPREPOSTPARVAR(RBlur, rblur, RBLUR)
|
||||
MAKEPREPOSTPARVAR(JuliaNab, juliaNab, JULIANAB)
|
||||
MAKEPREPOSTPARVAR(Sintrange, sintrange, SINTRANGE)
|
||||
MAKEPREPOSTPARVAR(Voron, Voron, VORON)
|
||||
MAKEPREPOSTPARVARASSIGN(Waffle, waffle, WAFFLE, ASSIGNTYPE_SUM)
|
||||
MAKEPREPOSTVARASSIGN(Square3D, square3D, SQUARE3D, ASSIGNTYPE_SUM)
|
||||
MAKEPREPOSTPARVARASSIGN(SuperShape3D, SuperShape3D, SUPER_SHAPE3D, ASSIGNTYPE_SUM)
|
||||
MAKEPREPOSTPARVARASSIGN(Waffle, waffle, WAFFLE, eVariationAssignType::ASSIGNTYPE_SUM)
|
||||
MAKEPREPOSTVARASSIGN(Square3D, square3D, SQUARE3D, eVariationAssignType::ASSIGNTYPE_SUM)
|
||||
MAKEPREPOSTPARVARASSIGN(SuperShape3D, SuperShape3D, SUPER_SHAPE3D, eVariationAssignType::ASSIGNTYPE_SUM)
|
||||
MAKEPREPOSTPARVAR(Sphyp3D, sphyp3D, SPHYP3D)
|
||||
MAKEPREPOSTPARVAR(Circlecrop, circlecrop, CIRCLECROP)
|
||||
MAKEPREPOSTPARVAR(Julian3Dx, julian3Dx, JULIAN3DX)
|
||||
@ -5332,7 +5332,7 @@ MAKEPREPOSTVAR(Estiq, estiq, ESTIQ)
|
||||
MAKEPREPOSTPARVAR(Loq, loq, LOQ)
|
||||
MAKEPREPOSTVAR(Curvature, curvature, CURVATURE)
|
||||
MAKEPREPOSTPARVAR(Qode, q_ode, Q_ODE)
|
||||
MAKEPREPOSTPARVARASSIGN(BlurHeart, blur_heart, BLUR_HEART, ASSIGNTYPE_SUM)
|
||||
MAKEPREPOSTPARVARASSIGN(BlurHeart, blur_heart, BLUR_HEART, eVariationAssignType::ASSIGNTYPE_SUM)
|
||||
MAKEPREPOSTPARVAR(Truchet, Truchet, TRUCHET)
|
||||
MAKEPREPOSTPARVAR(Gdoffs, gdoffs, GDOFFS)
|
||||
MAKEPREPOSTPARVAR(Octagon, octagon, OCTAGON)
|
||||
@ -5350,7 +5350,7 @@ MAKEPREPOSTPARVAR(Blocky, blocky, BLOCKY)
|
||||
//class EMBER_API LinearXZVariation : public Variation<T>
|
||||
//{
|
||||
//public:
|
||||
// LinearXZVariation(T weight = 1.0) : Variation<T>("linearxz", VAR_LINEAR_XZ, weight) { }
|
||||
// LinearXZVariation(T weight = 1.0) : Variation<T>("linearxz", eVariationId::VAR_LINEAR_XZ, weight) { }
|
||||
//
|
||||
// VARCOPY(LinearXZVariation)
|
||||
//
|
||||
@ -5381,7 +5381,7 @@ MAKEPREPOSTPARVAR(Blocky, blocky, BLOCKY)
|
||||
//class EMBER_API LinearYZVariation : public Variation<T>
|
||||
//{
|
||||
//public:
|
||||
// LinearYZVariation(T weight = 1.0) : Variation<T>("linearyz", VAR_LINEAR_YZ, weight) { }
|
||||
// LinearYZVariation(T weight = 1.0) : Variation<T>("linearyz", eVariationId::VAR_LINEAR_YZ, weight) { }
|
||||
//
|
||||
// VARCOPY(LinearYZVariation)
|
||||
//
|
||||
|
||||
@ -11,7 +11,7 @@ template <typename T>
|
||||
class EMBER_API Bubble2Variation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
Bubble2Variation(T weight = 1.0) : ParametricVariation<T>("bubble2", VAR_BUBBLE2, weight, true)
|
||||
Bubble2Variation(T weight = 1.0) : ParametricVariation<T>("bubble2", eVariationId::VAR_BUBBLE2, weight, true)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -86,7 +86,7 @@ template <typename T>
|
||||
class EMBER_API CircleLinearVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
CircleLinearVariation(T weight = 1.0) : ParametricVariation<T>("CircleLinear", VAR_CIRCLELINEAR, weight)
|
||||
CircleLinearVariation(T weight = 1.0) : ParametricVariation<T>("CircleLinear", eVariationId::VAR_CIRCLELINEAR, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -139,7 +139,7 @@ public:
|
||||
|
||||
helper.Out.x = m_Weight * (x + (m * 2 + 1) * m_Sc);
|
||||
helper.Out.y = m_Weight * (y + (n * 2 + 1) * m_Sc);
|
||||
helper.Out.z = (m_VarType == VARTYPE_REG) ? 0 : helper.In.z;
|
||||
helper.Out.z = (m_VarType == eVariationType::VARTYPE_REG) ? 0 : helper.In.z;
|
||||
}
|
||||
|
||||
virtual string OpenCLString() const override
|
||||
@ -202,7 +202,7 @@ public:
|
||||
<< "\n"
|
||||
<< "\t\tvOut.x = xform->m_VariationWeights[" << varIndex << "] * (x + (m * 2 + 1) * " << sc << ");\n"
|
||||
<< "\t\tvOut.y = xform->m_VariationWeights[" << varIndex << "] * (y + (n * 2 + 1) * " << sc << ");\n"
|
||||
<< "\t\tvOut.z = " << ((m_VarType == VARTYPE_REG) ? "0" : "vIn.z") << ";\n"
|
||||
<< "\t\tvOut.z = " << ((m_VarType == eVariationType::VARTYPE_REG) ? "0" : "vIn.z") << ";\n"
|
||||
<< "\t}\n";
|
||||
|
||||
return ss.str();
|
||||
@ -234,14 +234,14 @@ protected:
|
||||
string prefix = Prefix();
|
||||
|
||||
m_Params.clear();
|
||||
m_Params.push_back(ParamWithName<T>(&m_Sc, prefix + "CircleLinear_Sc", 1, REAL_NONZERO));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Sc, prefix + "CircleLinear_Sc", 1, eParamType::REAL_NONZERO));
|
||||
m_Params.push_back(ParamWithName<T>(&m_K, prefix + "CircleLinear_K", T(0.5)));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Dens1, prefix + "CircleLinear_Dens1", T(0.5)));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Dens2, prefix + "CircleLinear_Dens2", T(0.5)));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Reverse, prefix + "CircleLinear_Reverse", 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_X, prefix + "CircleLinear_X", 10));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Y, prefix + "CircleLinear_Y", 10));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Seed, prefix + "CircleLinear_Seed", 0, INTEGER));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Seed, prefix + "CircleLinear_Seed", 0, eParamType::INTEGER));
|
||||
}
|
||||
|
||||
private:
|
||||
@ -273,7 +273,7 @@ template <typename T>
|
||||
class EMBER_API CircleRandVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
CircleRandVariation(T weight = 1.0) : ParametricVariation<T>("CircleRand", VAR_CIRCLERAND, weight)
|
||||
CircleRandVariation(T weight = 1.0) : ParametricVariation<T>("CircleRand", eVariationId::VAR_CIRCLERAND, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -302,7 +302,7 @@ public:
|
||||
|
||||
helper.Out.x = m_Weight * (x + (m * 2 + 1) * m_Sc);
|
||||
helper.Out.y = m_Weight * (y + (n * 2 + 1) * m_Sc);
|
||||
helper.Out.z = (m_VarType == VARTYPE_REG) ? 0 : helper.In.z;
|
||||
helper.Out.z = (m_VarType == eVariationType::VARTYPE_REG) ? 0 : helper.In.z;
|
||||
}
|
||||
|
||||
virtual string OpenCLString() const override
|
||||
@ -338,7 +338,7 @@ public:
|
||||
<< "\n"
|
||||
<< "\t\tvOut.x = xform->m_VariationWeights[" << varIndex << "] * (x + (m * 2 + 1) * " << sc << ");\n"
|
||||
<< "\t\tvOut.y = xform->m_VariationWeights[" << varIndex << "] * (y + (n * 2 + 1) * " << sc << ");\n"
|
||||
<< "\t\tvOut.z = " << ((m_VarType == VARTYPE_REG) ? "0" : "vIn.z") << ";\n"
|
||||
<< "\t\tvOut.z = " << ((m_VarType == eVariationType::VARTYPE_REG) ? "0" : "vIn.z") << ";\n"
|
||||
<< "\t}\n";
|
||||
|
||||
return ss.str();
|
||||
@ -370,11 +370,11 @@ protected:
|
||||
string prefix = Prefix();
|
||||
|
||||
m_Params.clear();
|
||||
m_Params.push_back(ParamWithName<T>(&m_Sc, prefix + "CircleRand_Sc", 1, REAL_NONZERO));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Sc, prefix + "CircleRand_Sc", 1, eParamType::REAL_NONZERO));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Dens, prefix + "CircleRand_Dens", T(0.5)));
|
||||
m_Params.push_back(ParamWithName<T>(&m_X, prefix + "CircleRand_X", 10));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Y, prefix + "CircleRand_Y", 10));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Seed, prefix + "CircleRand_Seed", 0, INTEGER));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Seed, prefix + "CircleRand_Seed", 0, eParamType::INTEGER));
|
||||
}
|
||||
|
||||
private:
|
||||
@ -403,7 +403,7 @@ template <typename T>
|
||||
class EMBER_API CircleTrans1Variation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
CircleTrans1Variation(T weight = 1.0) : ParametricVariation<T>("CircleTrans1", VAR_CIRCLETRANS1, weight)
|
||||
CircleTrans1Variation(T weight = 1.0) : ParametricVariation<T>("CircleTrans1", eVariationId::VAR_CIRCLETRANS1, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -435,7 +435,7 @@ public:
|
||||
|
||||
helper.Out.x = m_Weight * ux;
|
||||
helper.Out.y = m_Weight * uy;
|
||||
helper.Out.z = (m_VarType == VARTYPE_REG) ? 0 : helper.In.z;
|
||||
helper.Out.z = (m_VarType == eVariationType::VARTYPE_REG) ? 0 : helper.In.z;
|
||||
}
|
||||
|
||||
virtual string OpenCLString() const override
|
||||
@ -474,7 +474,7 @@ public:
|
||||
<< "\n"
|
||||
<< "\t\tvOut.x = xform->m_VariationWeights[" << varIndex << "] * ux;\n"
|
||||
<< "\t\tvOut.y = xform->m_VariationWeights[" << varIndex << "] * uy;\n"
|
||||
<< "\t\tvOut.z = " << ((m_VarType == VARTYPE_REG) ? "0" : "vIn.z") << ";\n"
|
||||
<< "\t\tvOut.z = " << ((m_VarType == eVariationType::VARTYPE_REG) ? "0" : "vIn.z") << ";\n"
|
||||
<< "\t}\n";
|
||||
|
||||
return ss.str();
|
||||
@ -537,11 +537,11 @@ protected:
|
||||
string prefix = Prefix();
|
||||
|
||||
m_Params.clear();
|
||||
m_Params.push_back(ParamWithName<T>(&m_Sc, prefix + "CircleTrans1_Sc", 1, REAL_NONZERO));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Sc, prefix + "CircleTrans1_Sc", 1, eParamType::REAL_NONZERO));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Dens, prefix + "CircleTrans1_Dens", T(0.5)));
|
||||
m_Params.push_back(ParamWithName<T>(&m_X, prefix + "CircleTrans1_X", 10));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Y, prefix + "CircleTrans1_Y", 10));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Seed, prefix + "CircleTrans1_Seed", 0, INTEGER));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Seed, prefix + "CircleTrans1_Seed", 0, eParamType::INTEGER));
|
||||
}
|
||||
|
||||
private:
|
||||
@ -600,7 +600,7 @@ template <typename T>
|
||||
class EMBER_API Cubic3DVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
Cubic3DVariation(T weight = 1.0) : ParametricVariation<T>("cubic3D", VAR_CUBIC3D, weight)
|
||||
Cubic3DVariation(T weight = 1.0) : ParametricVariation<T>("cubic3D", eVariationId::VAR_CUBIC3D, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -622,7 +622,7 @@ public:
|
||||
else
|
||||
znxy = 1 - (m_SmoothStyle * (1 - ((exnze + wynze) * T(0.5))));
|
||||
|
||||
if (m_VarType == VARTYPE_PRE)
|
||||
if (m_VarType == eVariationType::VARTYPE_PRE)
|
||||
{
|
||||
px = helper.In.x;
|
||||
py = helper.In.y;
|
||||
@ -707,7 +707,7 @@ public:
|
||||
<< "\t\telse\n"
|
||||
<< "\t\t znxy = 1 - (" << smoothStyle << " * (1 - ((exnze + wynze) * (real_t)(0.5))));\n";
|
||||
|
||||
if (m_VarType == VARTYPE_PRE)
|
||||
if (m_VarType == eVariationType::VARTYPE_PRE)
|
||||
{
|
||||
ss <<
|
||||
"\t\tpx = vIn.x;\n"
|
||||
@ -824,7 +824,7 @@ template <typename T>
|
||||
class EMBER_API CubicLattice3DVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
CubicLattice3DVariation(T weight = 1.0) : ParametricVariation<T>("cubicLattice_3D", VAR_CUBIC_LATTICE3D, weight)
|
||||
CubicLattice3DVariation(T weight = 1.0) : ParametricVariation<T>("cubicLattice_3D", eVariationId::VAR_CUBIC_LATTICE3D, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -849,7 +849,7 @@ public:
|
||||
znxy = 1;
|
||||
}
|
||||
|
||||
if (m_VarType == VARTYPE_PRE)
|
||||
if (m_VarType == eVariationType::VARTYPE_PRE)
|
||||
{
|
||||
px = helper.In.x;
|
||||
py = helper.In.y;
|
||||
@ -939,7 +939,7 @@ public:
|
||||
<< "\t\t znxy = 1;\n"
|
||||
<< "\t\t}\n";
|
||||
|
||||
if (m_VarType == VARTYPE_PRE)
|
||||
if (m_VarType == eVariationType::VARTYPE_PRE)
|
||||
{
|
||||
ss <<
|
||||
"\t\tpx = vIn.x;\n"
|
||||
@ -1021,7 +1021,7 @@ protected:
|
||||
|
||||
m_Params.clear();
|
||||
m_Params.push_back(ParamWithName<T>(&m_Xpand, prefix + "cubicLattice_3D_xpand", T(0.2)));//Original used a prefix of cubic3D_, which is incompatible with Ember's design.
|
||||
m_Params.push_back(ParamWithName<T>(&m_Style, prefix + "cubicLattice_3D_style", 1, INTEGER, 1, 2));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Style, prefix + "cubicLattice_3D_style", 1, eParamType::INTEGER, 1, 2));
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_Fill, prefix + "cubicLattice_3D_fill"));//Precalc.
|
||||
}
|
||||
|
||||
@ -1038,7 +1038,7 @@ template <typename T>
|
||||
class EMBER_API Foci3DVariation : public Variation<T>
|
||||
{
|
||||
public:
|
||||
Foci3DVariation(T weight = 1.0) : Variation<T>("foci_3D", VAR_FOCI3D, weight, false, false, false, false, true) { }
|
||||
Foci3DVariation(T weight = 1.0) : Variation<T>("foci_3D", eVariationId::VAR_FOCI3D, weight, false, false, false, false, true) { }
|
||||
|
||||
VARCOPY(Foci3DVariation)
|
||||
|
||||
@ -1081,7 +1081,7 @@ template <typename T>
|
||||
class EMBER_API HoVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
HoVariation(T weight = 1.0) : ParametricVariation<T>("ho", VAR_HO, weight)
|
||||
HoVariation(T weight = 1.0) : ParametricVariation<T>("ho", eVariationId::VAR_HO, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -1168,7 +1168,7 @@ template <typename T>
|
||||
class EMBER_API Julia3DqVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
Julia3DqVariation(T weight = 1.0) : ParametricVariation<T>("julia3Dq", VAR_JULIA3DQ, weight, true, true, false, false, true)
|
||||
Julia3DqVariation(T weight = 1.0) : ParametricVariation<T>("julia3Dq", eVariationId::VAR_JULIA3DQ, weight, true, true, false, false, true)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -1234,8 +1234,8 @@ protected:
|
||||
string prefix = Prefix();
|
||||
|
||||
m_Params.clear();
|
||||
m_Params.push_back(ParamWithName<T>(&m_Power, prefix + "julia3Dq_power", 3, INTEGER_NONZERO));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Divisor, prefix + "julia3Dq_divisor", 2, INTEGER_NONZERO));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Power, prefix + "julia3Dq_power", 3, eParamType::INTEGER_NONZERO));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Divisor, prefix + "julia3Dq_divisor", 2, eParamType::INTEGER_NONZERO));
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_InvPower, prefix + "julia3Dq_inv_power"));//Precalc.
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_AbsInvPower, prefix + "julia3Dq_abs_inv_power"));
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_HalfInvPower, prefix + "julia3Dq_half_inv_power"));
|
||||
@ -1258,7 +1258,7 @@ template <typename T>
|
||||
class EMBER_API LineVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
LineVariation(T weight = 1.0) : ParametricVariation<T>("line", VAR_LINE, weight)
|
||||
LineVariation(T weight = 1.0) : ParametricVariation<T>("line", eVariationId::VAR_LINE, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -1340,7 +1340,7 @@ template <typename T>
|
||||
class EMBER_API Loonie2Variation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
Loonie2Variation(T weight = 1.0) : ParametricVariation<T>("loonie2", VAR_LOONIE2, weight, true, true)
|
||||
Loonie2Variation(T weight = 1.0) : ParametricVariation<T>("loonie2", eVariationId::VAR_LOONIE2, weight, true, true)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -1390,7 +1390,7 @@ public:
|
||||
helper.Out.y = m_Weight * helper.In.y;
|
||||
}
|
||||
|
||||
helper.Out.z = (m_VarType == VARTYPE_REG) ? 0 : helper.In.z;
|
||||
helper.Out.z = (m_VarType == eVariationType::VARTYPE_REG) ? 0 : helper.In.z;
|
||||
}
|
||||
|
||||
virtual string OpenCLString() const override
|
||||
@ -1452,7 +1452,7 @@ public:
|
||||
<< "\t\t vOut.y = xform->m_VariationWeights[" << varIndex << "] * vIn.y;\n"
|
||||
<< "\t\t}\n"
|
||||
<< "\n"
|
||||
<< "\t\tvOut.z = " << ((m_VarType == VARTYPE_REG) ? "0" : "vIn.z") << ";\n"
|
||||
<< "\t\tvOut.z = " << ((m_VarType == eVariationType::VARTYPE_REG) ? "0" : "vIn.z") << ";\n"
|
||||
<< "\t}\n";
|
||||
|
||||
return ss.str();
|
||||
@ -1476,9 +1476,9 @@ protected:
|
||||
string prefix = Prefix();
|
||||
|
||||
m_Params.clear();
|
||||
m_Params.push_back(ParamWithName<T>(&m_Sides, prefix + "loonie2_sides", 4, INTEGER, 1, 50));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Star, prefix + "loonie2_star", 0, REAL, -1, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Circle, prefix + "loonie2_circle", 0, REAL, -1, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Sides, prefix + "loonie2_sides", 4, eParamType::INTEGER, 1, 50));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Star, prefix + "loonie2_star", 0, eParamType::REAL, -1, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Circle, prefix + "loonie2_circle", 0, eParamType::REAL, -1, 1));
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_W2, prefix + "loonie2_w2"));//Precalc.
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_Sina, prefix + "loonie2_sina"));
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_Cosa, prefix + "loonie2_cosa"));
|
||||
@ -1508,7 +1508,7 @@ template <typename T>
|
||||
class EMBER_API Loonie3Variation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
Loonie3Variation(T weight = 1.0) : ParametricVariation<T>("loonie3", VAR_LOONIE3, weight, true)
|
||||
Loonie3Variation(T weight = 1.0) : ParametricVariation<T>("loonie3", eVariationId::VAR_LOONIE3, weight, true)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -1537,7 +1537,7 @@ public:
|
||||
helper.Out.y = m_Weight * helper.In.y;
|
||||
}
|
||||
|
||||
helper.Out.z = (m_VarType == VARTYPE_REG) ? 0 : helper.In.z;
|
||||
helper.Out.z = (m_VarType == eVariationType::VARTYPE_REG) ? 0 : helper.In.z;
|
||||
}
|
||||
|
||||
virtual string OpenCLString() const override
|
||||
@ -1569,7 +1569,7 @@ public:
|
||||
<< "\t\t vOut.y = xform->m_VariationWeights[" << varIndex << "] * vIn.y;\n"
|
||||
<< "\t\t}\n"
|
||||
<< "\n"
|
||||
<< "\t\tvOut.z = " << ((m_VarType == VARTYPE_REG) ? "0" : "vIn.z") << ";\n"
|
||||
<< "\t\tvOut.z = " << ((m_VarType == eVariationType::VARTYPE_REG) ? "0" : "vIn.z") << ";\n"
|
||||
<< "\t}\n";
|
||||
|
||||
return ss.str();
|
||||
@ -1600,7 +1600,7 @@ template <typename T>
|
||||
class EMBER_API Loonie3DVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
Loonie3DVariation(T weight = 1.0) : ParametricVariation<T>("loonie_3D", VAR_LOONIE3D, weight, true, false, false, false, true)
|
||||
Loonie3DVariation(T weight = 1.0) : ParametricVariation<T>("loonie_3D", eVariationId::VAR_LOONIE3D, weight, true, false, false, false, true)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -1686,7 +1686,7 @@ template <typename T>
|
||||
class EMBER_API McarpetVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
McarpetVariation(T weight = 1.0) : ParametricVariation<T>("mcarpet", VAR_MCARPET, weight, true)
|
||||
McarpetVariation(T weight = 1.0) : ParametricVariation<T>("mcarpet", eVariationId::VAR_MCARPET, weight, true)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -1702,7 +1702,7 @@ public:
|
||||
helper.Out.y = helper.In.y * r * m_Y;
|
||||
helper.Out.x += (1 - (m_Twist * SQR(helper.In.x)) + helper.In.y) * m_Weight;//The += is intentional.
|
||||
helper.Out.y += m_Tilt * helper.In.x * m_Weight;
|
||||
helper.Out.z = (m_VarType == VARTYPE_REG) ? 0 : helper.In.z;
|
||||
helper.Out.z = (m_VarType == eVariationType::VARTYPE_REG) ? 0 : helper.In.z;
|
||||
}
|
||||
|
||||
virtual string OpenCLString() const override
|
||||
@ -1724,7 +1724,7 @@ public:
|
||||
<< "\t\tvOut.y = vIn.y * r * " << y << ";\n"
|
||||
<< "\t\tvOut.x += (1 - (" << twist << " * SQR(vIn.x)) + vIn.y) * xform->m_VariationWeights[" << varIndex << "];\n"
|
||||
<< "\t\tvOut.y += " << tilt << " * vIn.x * xform->m_VariationWeights[" << varIndex << "];\n"
|
||||
<< "\t\tvOut.z = " << ((m_VarType == VARTYPE_REG) ? "0" : "vIn.z") << ";\n"
|
||||
<< "\t\tvOut.z = " << ((m_VarType == eVariationType::VARTYPE_REG) ? "0" : "vIn.z") << ";\n"
|
||||
<< "\t}\n";
|
||||
|
||||
return ss.str();
|
||||
@ -1759,7 +1759,7 @@ template <typename T>
|
||||
class EMBER_API Waves23DVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
Waves23DVariation(T weight = 1.0) : ParametricVariation<T>("waves2_3D", VAR_WAVES23D, weight)
|
||||
Waves23DVariation(T weight = 1.0) : ParametricVariation<T>("waves2_3D", eVariationId::VAR_WAVES23D, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -1817,7 +1817,7 @@ template <typename T>
|
||||
class EMBER_API Pie3DVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
Pie3DVariation(T weight = 1.0) : ParametricVariation<T>("pie3D", VAR_PIE3D, weight)
|
||||
Pie3DVariation(T weight = 1.0) : ParametricVariation<T>("pie3D", eVariationId::VAR_PIE3D, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -1871,9 +1871,9 @@ protected:
|
||||
string prefix = Prefix();
|
||||
|
||||
m_Params.clear();
|
||||
m_Params.push_back(ParamWithName<T>(&m_Slices, prefix + "pie3D_slices", 6, INTEGER_NONZERO, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Rotation, prefix + "pie3D_rotation", T(0.5), REAL_CYCLIC, 0, M_2PI));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Thickness, prefix + "pie3D_thickness", T(0.5), REAL, 0, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Slices, prefix + "pie3D_slices", 6, eParamType::INTEGER_NONZERO, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Rotation, prefix + "pie3D_rotation", T(0.5), eParamType::REAL_CYCLIC, 0, M_2PI));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Thickness, prefix + "pie3D_thickness", T(0.5), eParamType::REAL, 0, 1));
|
||||
}
|
||||
|
||||
private:
|
||||
@ -1889,7 +1889,7 @@ template <typename T>
|
||||
class EMBER_API Popcorn23DVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
Popcorn23DVariation(T weight = 1.0) : ParametricVariation<T>("popcorn2_3D", VAR_POPCORN23D, weight, false, false, false, false, true)
|
||||
Popcorn23DVariation(T weight = 1.0) : ParametricVariation<T>("popcorn2_3D", eVariationId::VAR_POPCORN23D, weight, false, false, false, false, true)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -1901,7 +1901,7 @@ public:
|
||||
T otherZ, tempPZ = 0;
|
||||
T tempTZ = helper.In.z == 0 ? m_Vv * m_SinTanC * helper.m_PrecalcAtanyx : helper.In.z;
|
||||
|
||||
if (m_VarType == VARTYPE_PRE)
|
||||
if (m_VarType == eVariationType::VARTYPE_PRE)
|
||||
otherZ = helper.In.z;
|
||||
else
|
||||
otherZ = outPoint.m_Z;
|
||||
@ -1932,7 +1932,7 @@ public:
|
||||
<< "\t\treal_t otherZ, tempPZ = 0;\n"
|
||||
<< "\t\treal_t tempTZ = vIn.z == 0 ? " << vv << " * " << stc << " * precalcAtanyx : vIn.z;\n";
|
||||
|
||||
if (m_VarType == VARTYPE_PRE)
|
||||
if (m_VarType == eVariationType::VARTYPE_PRE)
|
||||
ss << "\t\totherZ = vIn.z;\n";
|
||||
else
|
||||
ss << "\t\totherZ = outPoint->m_Z;\n";
|
||||
@ -2004,7 +2004,7 @@ template <typename T>
|
||||
class EMBER_API Sinusoidal3DVariation : public Variation<T>
|
||||
{
|
||||
public:
|
||||
Sinusoidal3DVariation(T weight = 1.0) : Variation<T>("sinusoidal3D", VAR_SINUSOIDAL3D, weight) { }
|
||||
Sinusoidal3DVariation(T weight = 1.0) : Variation<T>("sinusoidal3D", eVariationId::VAR_SINUSOIDAL3D, weight) { }
|
||||
|
||||
VARCOPY(Sinusoidal3DVariation)
|
||||
|
||||
@ -2037,7 +2037,7 @@ template <typename T>
|
||||
class EMBER_API Scry3DVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
Scry3DVariation(T weight = 1.0) : ParametricVariation<T>("scry_3D", VAR_SCRY3D, weight, true, false, false, false, true)
|
||||
Scry3DVariation(T weight = 1.0) : ParametricVariation<T>("scry_3D", eVariationId::VAR_SCRY3D, weight, true, false, false, false, true)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -2101,7 +2101,7 @@ template <typename T>
|
||||
class EMBER_API ShredlinVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
ShredlinVariation(T weight = 1.0) : ParametricVariation<T>("shredlin", VAR_SHRED_LIN, weight)
|
||||
ShredlinVariation(T weight = 1.0) : ParametricVariation<T>("shredlin", eVariationId::VAR_SHRED_LIN, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -2163,10 +2163,10 @@ protected:
|
||||
string prefix = Prefix();
|
||||
|
||||
m_Params.clear();
|
||||
m_Params.push_back(ParamWithName<T>(&m_XDistance, prefix + "shredlin_xdistance", 1, REAL_NONZERO));
|
||||
m_Params.push_back(ParamWithName<T>(&m_XWidth, prefix + "shredlin_xwidth", T(0.5), REAL, -1, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_YDistance, prefix + "shredlin_ydistance", 1, REAL_NONZERO));
|
||||
m_Params.push_back(ParamWithName<T>(&m_YWidth, prefix + "shredlin_ywidth", T(0.5), REAL, -1, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_XDistance, prefix + "shredlin_xdistance", 1, eParamType::REAL_NONZERO));
|
||||
m_Params.push_back(ParamWithName<T>(&m_XWidth, prefix + "shredlin_xwidth", T(0.5), eParamType::REAL, -1, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_YDistance, prefix + "shredlin_ydistance", 1, eParamType::REAL_NONZERO));
|
||||
m_Params.push_back(ParamWithName<T>(&m_YWidth, prefix + "shredlin_ywidth", T(0.5), eParamType::REAL, -1, 1));
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_Xw, prefix + "shredlin_xw"));
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_Yw, prefix + "shredlin_yw"));
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_1mX, prefix + "shredlin_1mx"));
|
||||
@ -2191,7 +2191,7 @@ template <typename T>
|
||||
class EMBER_API SplitBrdrVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
SplitBrdrVariation(T weight = 1.0) : ParametricVariation<T>("SplitBrdr", VAR_SPLIT_BRDR, weight, true)
|
||||
SplitBrdrVariation(T weight = 1.0) : ParametricVariation<T>("SplitBrdr", eVariationId::VAR_SPLIT_BRDR, weight, true)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -2246,7 +2246,7 @@ public:
|
||||
|
||||
helper.Out.x += helper.In.x * m_Px;
|
||||
helper.Out.y += helper.In.y * m_Py;
|
||||
helper.Out.z = (m_VarType == VARTYPE_REG) ? 0 : helper.In.z;
|
||||
helper.Out.z = (m_VarType == eVariationType::VARTYPE_REG) ? 0 : helper.In.z;
|
||||
}
|
||||
|
||||
virtual string OpenCLString() const override
|
||||
@ -2307,7 +2307,7 @@ public:
|
||||
<< "\n"
|
||||
<< "\t\tvOut.x += vIn.x * " << px << ";\n"
|
||||
<< "\t\tvOut.y += vIn.y * " << py << ";\n"
|
||||
<< "\t\tvOut.z = " << ((m_VarType == VARTYPE_REG) ? "0" : "vIn.z") << ";\n"
|
||||
<< "\t\tvOut.z = " << ((m_VarType == eVariationType::VARTYPE_REG) ? "0" : "vIn.z") << ";\n"
|
||||
<< "\t}\n";
|
||||
|
||||
return ss.str();
|
||||
@ -2339,7 +2339,7 @@ template <typename T>
|
||||
class EMBER_API WdiscVariation : public Variation<T>
|
||||
{
|
||||
public:
|
||||
WdiscVariation(T weight = 1.0) : Variation<T>("wdisc", VAR_WDISC, weight, true, true, false, false, true) { }
|
||||
WdiscVariation(T weight = 1.0) : Variation<T>("wdisc", eVariationId::VAR_WDISC, weight, true, true, false, false, true) { }
|
||||
|
||||
VARCOPY(WdiscVariation)
|
||||
|
||||
@ -2353,7 +2353,7 @@ public:
|
||||
|
||||
helper.Out.x = m_Weight * r * std::cos(a);
|
||||
helper.Out.y = m_Weight * r * std::sin(a);
|
||||
helper.Out.z = (m_VarType == VARTYPE_REG) ? 0 : helper.In.z;
|
||||
helper.Out.z = (m_VarType == eVariationType::VARTYPE_REG) ? 0 : helper.In.z;
|
||||
}
|
||||
|
||||
virtual string OpenCLString() const override
|
||||
@ -2370,7 +2370,7 @@ public:
|
||||
<< "\n"
|
||||
<< "\t\tvOut.x = xform->m_VariationWeights[" << varIndex << "] * r * cos(a);\n"
|
||||
<< "\t\tvOut.y = xform->m_VariationWeights[" << varIndex << "] * r * sin(a);\n"
|
||||
<< "\t\tvOut.z = " << ((m_VarType == VARTYPE_REG) ? "0" : "vIn.z") << ";\n"
|
||||
<< "\t\tvOut.z = " << ((m_VarType == eVariationType::VARTYPE_REG) ? "0" : "vIn.z") << ";\n"
|
||||
<< "\t}\n";
|
||||
|
||||
return ss.str();
|
||||
@ -2384,7 +2384,7 @@ template <typename T>
|
||||
class EMBER_API FalloffVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
FalloffVariation(T weight = 1.0) : ParametricVariation<T>("falloff", VAR_FALLOFF, weight, false, false, false, false, true)
|
||||
FalloffVariation(T weight = 1.0) : ParametricVariation<T>("falloff", eVariationId::VAR_FALLOFF, weight, false, false, false, false, true)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -2515,17 +2515,17 @@ protected:
|
||||
string prefix = Prefix();
|
||||
|
||||
m_Params.clear();
|
||||
m_Params.push_back(ParamWithName<T>(&m_Scatter, prefix + "falloff_scatter", 1, REAL, EPS, TMAX));
|
||||
m_Params.push_back(ParamWithName<T>(&m_MinDist, prefix + "falloff_mindist", T(0.5), REAL, 0, TMAX));
|
||||
m_Params.push_back(ParamWithName<T>(&m_MulX, prefix + "falloff_mul_x", 1, REAL, 0, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_MulY, prefix + "falloff_mul_y", 1, REAL, 0, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_MulZ, prefix + "falloff_mul_z", 0, REAL, 0, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Scatter, prefix + "falloff_scatter", 1, eParamType::REAL, EPS, TMAX));
|
||||
m_Params.push_back(ParamWithName<T>(&m_MinDist, prefix + "falloff_mindist", T(0.5), eParamType::REAL, 0, TMAX));
|
||||
m_Params.push_back(ParamWithName<T>(&m_MulX, prefix + "falloff_mul_x", 1, eParamType::REAL, 0, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_MulY, prefix + "falloff_mul_y", 1, eParamType::REAL, 0, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_MulZ, prefix + "falloff_mul_z", 0, eParamType::REAL, 0, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_X0, prefix + "falloff_x0"));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Y0, prefix + "falloff_y0"));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Z0, prefix + "falloff_z0"));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Invert, prefix + "falloff_invert", 0, INTEGER, 0, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Type, prefix + "falloff_type", 0, INTEGER, 0, 2));
|
||||
m_Params.push_back(ParamWithName<T>(&m_BoxPow, prefix + "falloff_boxpow", 2, INTEGER, 2, 32));//Original defaulted this to 0 which directly contradicts the specified range of 2-32.
|
||||
m_Params.push_back(ParamWithName<T>(&m_Invert, prefix + "falloff_invert", 0, eParamType::INTEGER, 0, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Type, prefix + "falloff_type", 0, eParamType::INTEGER, 0, 2));
|
||||
m_Params.push_back(ParamWithName<T>(&m_BoxPow, prefix + "falloff_boxpow", 2, eParamType::INTEGER, 2, 32));//Original defaulted this to 0 which directly contradicts the specified range of 2-32.
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_InternalScatter, prefix + "falloff_internal_scatter"));
|
||||
}
|
||||
|
||||
@ -2551,7 +2551,7 @@ template <typename T>
|
||||
class EMBER_API Falloff2Variation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
Falloff2Variation(T weight = 1.0) : ParametricVariation<T>("falloff2", VAR_FALLOFF2, weight, true, false, false, false, true)
|
||||
Falloff2Variation(T weight = 1.0) : ParametricVariation<T>("falloff2", eVariationId::VAR_FALLOFF2, weight, true, false, false, false, true)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -2717,17 +2717,17 @@ protected:
|
||||
string prefix = Prefix();
|
||||
|
||||
m_Params.clear();
|
||||
m_Params.push_back(ParamWithName<T>(&m_Scatter, prefix + "falloff2_scatter", 1, REAL, EPS, TMAX));
|
||||
m_Params.push_back(ParamWithName<T>(&m_MinDist, prefix + "falloff2_mindist", T(0.5), REAL, 0, TMAX));
|
||||
m_Params.push_back(ParamWithName<T>(&m_MulX, prefix + "falloff2_mul_x", 1, REAL, 0, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_MulY, prefix + "falloff2_mul_y", 1, REAL, 0, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_MulZ, prefix + "falloff2_mul_z", 0, REAL, 0, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_MulC, prefix + "falloff2_mul_c", 0, REAL, 0, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Scatter, prefix + "falloff2_scatter", 1, eParamType::REAL, EPS, TMAX));
|
||||
m_Params.push_back(ParamWithName<T>(&m_MinDist, prefix + "falloff2_mindist", T(0.5), eParamType::REAL, 0, TMAX));
|
||||
m_Params.push_back(ParamWithName<T>(&m_MulX, prefix + "falloff2_mul_x", 1, eParamType::REAL, 0, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_MulY, prefix + "falloff2_mul_y", 1, eParamType::REAL, 0, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_MulZ, prefix + "falloff2_mul_z", 0, eParamType::REAL, 0, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_MulC, prefix + "falloff2_mul_c", 0, eParamType::REAL, 0, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_X0, prefix + "falloff2_x0"));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Y0, prefix + "falloff2_y0"));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Z0, prefix + "falloff2_z0"));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Invert, prefix + "falloff2_invert", 0, INTEGER, 0, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Type, prefix + "falloff2_type", 0, INTEGER, 0, 2));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Invert, prefix + "falloff2_invert", 0, eParamType::INTEGER, 0, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Type, prefix + "falloff2_type", 0, eParamType::INTEGER, 0, 2));
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_RMax, prefix + "falloff2_rmax"));
|
||||
}
|
||||
|
||||
@ -2753,7 +2753,7 @@ template <typename T>
|
||||
class EMBER_API Falloff3Variation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
Falloff3Variation(T weight = 1.0) : ParametricVariation<T>("falloff3", VAR_FALLOFF3, weight, true, false, false, false, true)
|
||||
Falloff3Variation(T weight = 1.0) : ParametricVariation<T>("falloff3", eVariationId::VAR_FALLOFF3, weight, true, false, false, false, true)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -2948,15 +2948,15 @@ protected:
|
||||
string prefix = Prefix();
|
||||
|
||||
m_Params.clear();
|
||||
m_Params.push_back(ParamWithName<T>(&m_BlurType, prefix + "falloff3_blur_type", 0, INTEGER, 0, 3));
|
||||
m_Params.push_back(ParamWithName<T>(&m_BlurShape, prefix + "falloff3_blur_shape", 0, INTEGER, 0, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_BlurStrength, prefix + "falloff3_blur_strength", 1, REAL, EPS, TMAX));
|
||||
m_Params.push_back(ParamWithName<T>(&m_MinDistance, prefix + "falloff3_min_distance", T(0.5), REAL, 0, TMAX));
|
||||
m_Params.push_back(ParamWithName<T>(&m_InvertDistance, prefix + "falloff3_invert_distance", 0, INTEGER, 0, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_MulX, prefix + "falloff3_mul_x", 1, REAL, 0, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_MulY, prefix + "falloff3_mul_y", 1, REAL, 0, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_MulZ, prefix + "falloff3_mul_z", 0, REAL, 0, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_MulC, prefix + "falloff3_mul_c", 0, REAL, 0, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_BlurType, prefix + "falloff3_blur_type", 0, eParamType::INTEGER, 0, 3));
|
||||
m_Params.push_back(ParamWithName<T>(&m_BlurShape, prefix + "falloff3_blur_shape", 0, eParamType::INTEGER, 0, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_BlurStrength, prefix + "falloff3_blur_strength", 1, eParamType::REAL, EPS, TMAX));
|
||||
m_Params.push_back(ParamWithName<T>(&m_MinDistance, prefix + "falloff3_min_distance", T(0.5), eParamType::REAL, 0, TMAX));
|
||||
m_Params.push_back(ParamWithName<T>(&m_InvertDistance, prefix + "falloff3_invert_distance", 0, eParamType::INTEGER, 0, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_MulX, prefix + "falloff3_mul_x", 1, eParamType::REAL, 0, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_MulY, prefix + "falloff3_mul_y", 1, eParamType::REAL, 0, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_MulZ, prefix + "falloff3_mul_z", 0, eParamType::REAL, 0, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_MulC, prefix + "falloff3_mul_c", 0, eParamType::REAL, 0, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_CenterX, prefix + "falloff3_center_x"));
|
||||
m_Params.push_back(ParamWithName<T>(&m_CenterY, prefix + "falloff3_center_y"));
|
||||
m_Params.push_back(ParamWithName<T>(&m_CenterZ, prefix + "falloff3_center_z"));
|
||||
@ -2988,7 +2988,7 @@ template <typename T>
|
||||
class EMBER_API XtrbVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
XtrbVariation(T weight = 1.0) : ParametricVariation<T>("xtrb", VAR_XTRB, weight)
|
||||
XtrbVariation(T weight = 1.0) : ParametricVariation<T>("xtrb", eVariationId::VAR_XTRB, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -3029,7 +3029,7 @@ public:
|
||||
InverseTrilinear(alpha, beta, x, y, rand);
|
||||
helper.Out.x = m_Weight * x;
|
||||
helper.Out.y = m_Weight * y;
|
||||
helper.Out.z = (m_VarType == VARTYPE_REG) ? 0 : helper.In.z;
|
||||
helper.Out.z = (m_VarType == eVariationType::VARTYPE_REG) ? 0 : helper.In.z;
|
||||
}
|
||||
|
||||
virtual string OpenCLString() const override
|
||||
@ -3151,7 +3151,7 @@ public:
|
||||
<< "\n"
|
||||
<< "\t\tvOut.x = xform->m_VariationWeights[" << varIndex << "] * x;\n"
|
||||
<< "\t\tvOut.y = xform->m_VariationWeights[" << varIndex << "] * y;\n"
|
||||
<< "\t\tvOut.z = " << ((m_VarType == VARTYPE_REG) ? "0" : "vIn.z") << ";\n"
|
||||
<< "\t\tvOut.z = " << ((m_VarType == eVariationType::VARTYPE_REG) ? "0" : "vIn.z") << ";\n"
|
||||
<< "\t}\n";
|
||||
|
||||
return ss.str();
|
||||
@ -3344,7 +3344,7 @@ protected:
|
||||
string prefix = Prefix();
|
||||
|
||||
m_Params.clear();
|
||||
m_Params.push_back(ParamWithName<T>(&m_Power, prefix + "xtrb_power", 2, INTEGER_NONZERO));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Power, prefix + "xtrb_power", 2, eParamType::INTEGER_NONZERO));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Radius, prefix + "xtrb_radius", 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Width, prefix + "xtrb_width", T(0.5)));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Dist, prefix + "xtrb_dist", 1));
|
||||
@ -3538,7 +3538,7 @@ template <typename T>
|
||||
class EMBER_API Hexaplay3DVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
Hexaplay3DVariation(T weight = 1.0) : ParametricVariation<T>("hexaplay3D", VAR_HEXAPLAY3D, weight)
|
||||
Hexaplay3DVariation(T weight = 1.0) : ParametricVariation<T>("hexaplay3D", eVariationId::VAR_HEXAPLAY3D, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -3566,7 +3566,7 @@ public:
|
||||
T boost;//Boost is the separation distance between the two planes.
|
||||
T sumX, sumY;
|
||||
|
||||
if (m_VarType == VARTYPE_PRE)
|
||||
if (m_VarType == eVariationType::VARTYPE_PRE)
|
||||
{
|
||||
sumX = helper.In.x;
|
||||
sumY = helper.In.y;
|
||||
@ -3661,7 +3661,7 @@ public:
|
||||
<< "\t\treal_t boost;\n"
|
||||
<< "\t\treal_t sumX, sumY;\n\n";
|
||||
|
||||
if (m_VarType == VARTYPE_PRE)
|
||||
if (m_VarType == eVariationType::VARTYPE_PRE)
|
||||
{
|
||||
ss
|
||||
<< "\t\tsumX = vIn.x;\n"
|
||||
@ -3775,9 +3775,9 @@ protected:
|
||||
|
||||
m_Params.clear();
|
||||
m_Params.reserve(25);
|
||||
m_Params.push_back(ParamWithName<T>(&m_MajP, prefix + "hexaplay3D_majp", 1, REAL));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Scale, prefix + "hexaplay3D_scale", T(0.25), REAL));
|
||||
m_Params.push_back(ParamWithName<T>(&m_ZLift, prefix + "hexaplay3D_zlift", T(0.25), REAL));
|
||||
m_Params.push_back(ParamWithName<T>(&m_MajP, prefix + "hexaplay3D_majp", 1, eParamType::REAL));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Scale, prefix + "hexaplay3D_scale", T(0.25), eParamType::REAL));
|
||||
m_Params.push_back(ParamWithName<T>(&m_ZLift, prefix + "hexaplay3D_zlift", T(0.25), eParamType::REAL));
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_Seg60[0].x, prefix + "hexaplay3D_seg60x0"));//Precalc.
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_Seg60[1].x, prefix + "hexaplay3D_seg60x1"));
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_Seg60[2].x, prefix + "hexaplay3D_seg60x2"));
|
||||
@ -3825,7 +3825,7 @@ template <typename T>
|
||||
class EMBER_API Hexnix3DVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
Hexnix3DVariation(T weight = 1.0) : ParametricVariation<T>("hexnix3D", VAR_HEXNIX3D, weight)
|
||||
Hexnix3DVariation(T weight = 1.0) : ParametricVariation<T>("hexnix3D", eVariationId::VAR_HEXNIX3D, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -3855,7 +3855,7 @@ public:
|
||||
T gentleZ = 0;
|
||||
T sumX, sumY, sumZ;
|
||||
|
||||
if (m_VarType == VARTYPE_PRE)
|
||||
if (m_VarType == eVariationType::VARTYPE_PRE)
|
||||
{
|
||||
sumX = helper.In.x;
|
||||
sumY = helper.In.y;
|
||||
@ -3941,7 +3941,7 @@ public:
|
||||
{
|
||||
helper.Out.z = (sumZ - (2 * smooth * sumZ)) + (smooth * posNeg * (helper.In.z * scale * m_ZLift + boost));
|
||||
|
||||
if (m_VarType != VARTYPE_PRE)
|
||||
if (m_VarType != eVariationType::VARTYPE_PRE)
|
||||
outPoint.m_Z = 0;
|
||||
}
|
||||
}
|
||||
@ -4018,7 +4018,7 @@ public:
|
||||
<< "\t\treal_t gentleZ = 0;\n"
|
||||
<< "\t\treal_t sumX, sumY, sumZ;\n\n";
|
||||
|
||||
if (m_VarType == VARTYPE_PRE)
|
||||
if (m_VarType == eVariationType::VARTYPE_PRE)
|
||||
{
|
||||
ss
|
||||
<< "\t\tsumX = vIn.x;\n"
|
||||
@ -4108,7 +4108,7 @@ public:
|
||||
<< "\t\t {\n"
|
||||
<< "\t\t vOut.z = (sumZ - (2 * smooth * sumZ)) + (smooth * posNeg * (vIn.z * scale * " << zlift << " + boost));\n";
|
||||
|
||||
if (m_VarType != VARTYPE_PRE)
|
||||
if (m_VarType != eVariationType::VARTYPE_PRE)
|
||||
ss << "\t\t outPoint->m_Z = 0;\n";
|
||||
|
||||
ss
|
||||
@ -4200,10 +4200,10 @@ protected:
|
||||
|
||||
m_Params.clear();
|
||||
m_Params.reserve(25);
|
||||
m_Params.push_back(ParamWithName<T>(&m_MajP, prefix + "hexnix3D_majp", 1, REAL));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Scale, prefix + "hexnix3D_scale", T(0.25), REAL));
|
||||
m_Params.push_back(ParamWithName<T>(&m_MajP, prefix + "hexnix3D_majp", 1, eParamType::REAL));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Scale, prefix + "hexnix3D_scale", T(0.25), eParamType::REAL));
|
||||
m_Params.push_back(ParamWithName<T>(&m_ZLift, prefix + "hexnix3D_zlift"));
|
||||
m_Params.push_back(ParamWithName<T>(&m_3side, prefix + "hexnix3D_3side", T(0.667), REAL));
|
||||
m_Params.push_back(ParamWithName<T>(&m_3side, prefix + "hexnix3D_3side", T(0.667), eParamType::REAL));
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_Seg60[0].x, prefix + "hexnix3D_seg60x0"));//Precalc.
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_Seg60[1].x, prefix + "hexnix3D_seg60x1"));
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_Seg60[2].x, prefix + "hexnix3D_seg60x2"));
|
||||
@ -4246,7 +4246,7 @@ template <typename T>
|
||||
class EMBER_API HexcropVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
HexcropVariation(T weight = 1.0) : ParametricVariation<T>("hexcrop", VAR_HEXCROP, weight)
|
||||
HexcropVariation(T weight = 1.0) : ParametricVariation<T>("hexcrop", eVariationId::VAR_HEXCROP, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -4270,7 +4270,7 @@ public:
|
||||
j = n;
|
||||
}
|
||||
|
||||
if (m_VarType == VARTYPE_REG)
|
||||
if (m_VarType == eVariationType::VARTYPE_REG)
|
||||
{
|
||||
helper.Out.x = c != 0 ? outPoint.m_X + i.x * m_Weight : m_Dropoff;
|
||||
helper.Out.y = c != 0 ? outPoint.m_Y + i.y * m_Weight : m_Dropoff;
|
||||
@ -4324,7 +4324,7 @@ public:
|
||||
<< "\t\t}\n"
|
||||
<< "\n";
|
||||
|
||||
if (m_VarType == VARTYPE_REG)
|
||||
if (m_VarType == eVariationType::VARTYPE_REG)
|
||||
{
|
||||
ss
|
||||
<< "\t\tvOut.x = c != 0 ? outPoint->m_X + i.x * xform->m_VariationWeights[" << varIndex << "] : " << dropoff << ";\n"
|
||||
@ -4399,20 +4399,20 @@ private:
|
||||
|
||||
MAKEPREPOSTPARVAR(Bubble2, bubble2, BUBBLE2)
|
||||
MAKEPREPOSTPARVAR(CircleLinear, CircleLinear, CIRCLELINEAR)
|
||||
MAKEPREPOSTPARVARASSIGN(CircleRand, CircleRand, CIRCLERAND, ASSIGNTYPE_SUM)
|
||||
MAKEPREPOSTPARVARASSIGN(CircleRand, CircleRand, CIRCLERAND, eVariationAssignType::ASSIGNTYPE_SUM)
|
||||
MAKEPREPOSTPARVAR(CircleTrans1, CircleTrans1, CIRCLETRANS1)
|
||||
MAKEPREPOSTPARVAR(Cubic3D, cubic3D, CUBIC3D)
|
||||
MAKEPREPOSTPARVAR(CubicLattice3D, cubicLattice_3D, CUBIC_LATTICE3D)
|
||||
MAKEPREPOSTVAR(Foci3D, foci_3D, FOCI3D)
|
||||
MAKEPREPOSTPARVAR(Ho, ho, HO)
|
||||
MAKEPREPOSTPARVAR(Julia3Dq, julia3Dq, JULIA3DQ)
|
||||
MAKEPREPOSTPARVARASSIGN(Line, line, LINE, ASSIGNTYPE_SUM)
|
||||
MAKEPREPOSTPARVARASSIGN(Line, line, LINE, eVariationAssignType::ASSIGNTYPE_SUM)
|
||||
MAKEPREPOSTPARVAR(Loonie2, loonie2, LOONIE2)
|
||||
MAKEPREPOSTPARVAR(Loonie3, loonie3, LOONIE3)
|
||||
MAKEPREPOSTPARVAR(Loonie3D, loonie_3D, LOONIE3D)
|
||||
MAKEPREPOSTPARVAR(Mcarpet, mcarpet, MCARPET)
|
||||
MAKEPREPOSTPARVAR(Waves23D, waves2_3D, WAVES23D)
|
||||
MAKEPREPOSTPARVARASSIGN(Pie3D, pie3D, PIE3D, ASSIGNTYPE_SUM)
|
||||
MAKEPREPOSTPARVARASSIGN(Pie3D, pie3D, PIE3D, eVariationAssignType::ASSIGNTYPE_SUM)
|
||||
MAKEPREPOSTPARVAR(Popcorn23D, popcorn2_3D, POPCORN23D)
|
||||
MAKEPREPOSTVAR(Sinusoidal3D, sinusoidal3D, SINUSOIDAL3D)
|
||||
MAKEPREPOSTPARVAR(Scry3D, scry_3D, SCRY3D)
|
||||
|
||||
@ -11,7 +11,7 @@ template <typename T>
|
||||
class EMBER_API HexesVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
HexesVariation(T weight = 1.0) : ParametricVariation<T>("hexes", VAR_HEXES, weight)
|
||||
HexesVariation(T weight = 1.0) : ParametricVariation<T>("hexes", eVariationId::VAR_HEXES, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -130,7 +130,7 @@ public:
|
||||
//Finally add values in.
|
||||
helper.Out.x = m_Weight * v.x;
|
||||
helper.Out.y = m_Weight * v.y;
|
||||
helper.Out.z = (m_VarType == VARTYPE_REG) ? 0 : helper.In.z;
|
||||
helper.Out.z = (m_VarType == eVariationType::VARTYPE_REG) ? 0 : helper.In.z;
|
||||
}
|
||||
|
||||
virtual string OpenCLString() const override
|
||||
@ -232,7 +232,7 @@ public:
|
||||
<< "\n"
|
||||
<< "\t\tvOut.x = xform->m_VariationWeights[" << varIndex << "] * Vx;\n"
|
||||
<< "\t\tvOut.y = xform->m_VariationWeights[" << varIndex << "] * Vy;\n"
|
||||
<< "\t\tvOut.z = " << ((m_VarType == VARTYPE_REG) ? "0" : "vIn.z") << ";\n"
|
||||
<< "\t\tvOut.z = " << ((m_VarType == eVariationType::VARTYPE_REG) ? "0" : "vIn.z") << ";\n"
|
||||
<< "\t}\n";
|
||||
return ss.str();
|
||||
}
|
||||
@ -321,7 +321,7 @@ class EMBER_API NblurVariation : public ParametricVariation<T>
|
||||
};
|
||||
|
||||
public:
|
||||
NblurVariation(T weight = 1.0) : ParametricVariation<T>("nBlur", VAR_NBLUR, weight)
|
||||
NblurVariation(T weight = 1.0) : ParametricVariation<T>("nBlur", eVariationId::VAR_NBLUR, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -366,7 +366,7 @@ public:
|
||||
params.Y = m_Sina * xTmp + m_Cosa * yTmp;
|
||||
helper.Out.x = m_AdjustedWeight * params.X;
|
||||
helper.Out.y = m_AdjustedWeight * params.Y;
|
||||
helper.Out.z = (m_VarType == VARTYPE_REG) ? 0 : helper.In.z;
|
||||
helper.Out.z = (m_VarType == eVariationType::VARTYPE_REG) ? 0 : helper.In.z;
|
||||
}
|
||||
|
||||
virtual string OpenCLString() const override
|
||||
@ -441,7 +441,7 @@ public:
|
||||
<< "\n"
|
||||
<< "\t\tvOut.x = " << adjustedWeight << " * params.X;\n"
|
||||
<< "\t\tvOut.y = " << adjustedWeight << " * params.Y;\n"
|
||||
<< "\t\tvOut.z = " << ((m_VarType == VARTYPE_REG) ? "0" : "vIn.z") << ";\n"
|
||||
<< "\t\tvOut.z = " << ((m_VarType == eVariationType::VARTYPE_REG) ? "0" : "vIn.z") << ";\n"
|
||||
<< "\t}\n";
|
||||
return ss.str();
|
||||
}
|
||||
@ -821,14 +821,14 @@ protected:
|
||||
string prefix = Prefix();
|
||||
m_Params.clear();
|
||||
m_Params.reserve(25);
|
||||
m_Params.push_back(ParamWithName<T>(&m_NumEdges, prefix + "nBlur_numEdges", 3, INTEGER));
|
||||
m_Params.push_back(ParamWithName<T>(&m_NumStripes, prefix + "nBlur_numStripes", 0, INTEGER));
|
||||
m_Params.push_back(ParamWithName<T>(&m_RatioStripes, prefix + "nBlur_ratioStripes", 1, REAL, 0, 2));
|
||||
m_Params.push_back(ParamWithName<T>(&m_RatioHole, prefix + "nBlur_ratioHole", 0, REAL, 0, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_CircumCircle, prefix + "nBlur_circumCircle", 0, INTEGER, 0, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_AdjustToLinear, prefix + "nBlur_adjustToLinear", 1, INTEGER, 0, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_EqualBlur, prefix + "nBlur_equalBlur", 1, INTEGER, 0, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_ExactCalc, prefix + "nBlur_exactCalc", 0, INTEGER, 0, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_NumEdges, prefix + "nBlur_numEdges", 3, eParamType::INTEGER));
|
||||
m_Params.push_back(ParamWithName<T>(&m_NumStripes, prefix + "nBlur_numStripes", 0, eParamType::INTEGER));
|
||||
m_Params.push_back(ParamWithName<T>(&m_RatioStripes, prefix + "nBlur_ratioStripes", 1, eParamType::REAL, 0, 2));
|
||||
m_Params.push_back(ParamWithName<T>(&m_RatioHole, prefix + "nBlur_ratioHole", 0, eParamType::REAL, 0, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_CircumCircle, prefix + "nBlur_circumCircle", 0, eParamType::INTEGER, 0, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_AdjustToLinear, prefix + "nBlur_adjustToLinear", 1, eParamType::INTEGER, 0, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_EqualBlur, prefix + "nBlur_equalBlur", 1, eParamType::INTEGER, 0, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_ExactCalc, prefix + "nBlur_exactCalc", 0, eParamType::INTEGER, 0, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_HighlightEdges, prefix + "nBlur_highlightEdges", 1));
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_RatioComplement, prefix + "nBlur_ratioComplement"));//Precalc.
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_MidAngle, prefix + "nBlur_midAngle"));
|
||||
@ -1135,7 +1135,7 @@ template <typename T>
|
||||
class EMBER_API OctapolVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
OctapolVariation(T weight = 1.0) : ParametricVariation<T>("octapol", VAR_OCTAPOL, weight)
|
||||
OctapolVariation(T weight = 1.0) : ParametricVariation<T>("octapol", eVariationId::VAR_OCTAPOL, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -1176,7 +1176,7 @@ public:
|
||||
|
||||
if (clear)
|
||||
{
|
||||
if (m_VarType == VARTYPE_PRE)
|
||||
if (m_VarType == eVariationType::VARTYPE_PRE)
|
||||
{
|
||||
helper.m_TransX = 0;
|
||||
helper.m_TransY = 0;
|
||||
@ -1267,7 +1267,7 @@ public:
|
||||
<< "\t\tif (clear)\n"
|
||||
<< "\t\t{\n";
|
||||
|
||||
if (m_VarType == VARTYPE_PRE)
|
||||
if (m_VarType == eVariationType::VARTYPE_PRE)
|
||||
{
|
||||
ss
|
||||
<< "\t\t transX = 0;\n"
|
||||
@ -1474,7 +1474,7 @@ template <typename T>
|
||||
class EMBER_API CrobVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
CrobVariation(T weight = 1.0) : ParametricVariation<T>("crob", VAR_CROB, weight)
|
||||
CrobVariation(T weight = 1.0) : ParametricVariation<T>("crob", eVariationId::VAR_CROB, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -1489,12 +1489,12 @@ public:
|
||||
{
|
||||
if (m_Blur == 0)
|
||||
{
|
||||
if (m_VarType == VARTYPE_PRE)//Setting input point.
|
||||
if (m_VarType == eVariationType::VARTYPE_PRE)//Setting input point.
|
||||
{
|
||||
helper.m_TransX = 0;
|
||||
helper.m_TransY = 0;
|
||||
}
|
||||
else if (m_VarType == VARTYPE_REG)
|
||||
else if (m_VarType == eVariationType::VARTYPE_REG)
|
||||
{
|
||||
helper.In.x = 0;
|
||||
helper.In.y = 0;
|
||||
@ -1541,12 +1541,12 @@ public:
|
||||
xTmp = m_Left + m_Right - xTmp;
|
||||
}
|
||||
|
||||
if (m_VarType == VARTYPE_PRE)
|
||||
if (m_VarType == eVariationType::VARTYPE_PRE)
|
||||
{
|
||||
helper.m_TransX = xTmp;
|
||||
helper.m_TransY = yTmp;
|
||||
}
|
||||
else if (m_VarType == VARTYPE_REG)
|
||||
else if (m_VarType == eVariationType::VARTYPE_REG)
|
||||
{
|
||||
helper.In.x = xTmp;
|
||||
helper.In.y = yTmp;
|
||||
@ -1559,12 +1559,12 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
if (m_VarType == VARTYPE_PRE)
|
||||
if (m_VarType == eVariationType::VARTYPE_PRE)
|
||||
{
|
||||
helper.Out.x = helper.m_TransX;
|
||||
helper.Out.y = helper.m_TransY;
|
||||
}
|
||||
else if (m_VarType == VARTYPE_REG)
|
||||
else if (m_VarType == eVariationType::VARTYPE_REG)
|
||||
{
|
||||
helper.Out.x = helper.In.x;
|
||||
helper.Out.y = helper.In.y;
|
||||
@ -1575,7 +1575,7 @@ public:
|
||||
helper.Out.y = outPoint.m_Y;
|
||||
}
|
||||
|
||||
helper.Out.z = (m_VarType == VARTYPE_REG) ? 0 : helper.In.z;
|
||||
helper.Out.z = (m_VarType == eVariationType::VARTYPE_REG) ? 0 : helper.In.z;
|
||||
}
|
||||
|
||||
virtual string OpenCLString() const override
|
||||
@ -1620,13 +1620,13 @@ public:
|
||||
<< "\t\t if (" << blur << " == 0)\n"
|
||||
<< "\t\t {\n";
|
||||
|
||||
if (m_VarType == VARTYPE_PRE)
|
||||
if (m_VarType == eVariationType::VARTYPE_PRE)
|
||||
{
|
||||
ss
|
||||
<< "\t\t transX = 0;\n"
|
||||
<< "\t\t transY = 0;\n";
|
||||
}
|
||||
else if (m_VarType == VARTYPE_REG)
|
||||
else if (m_VarType == eVariationType::VARTYPE_REG)
|
||||
{
|
||||
ss
|
||||
<< "\t\t vIn.x = 0;\n"
|
||||
@ -1676,13 +1676,13 @@ public:
|
||||
<< "\t\t }\n"
|
||||
<< "\n";
|
||||
|
||||
if (m_VarType == VARTYPE_PRE)
|
||||
if (m_VarType == eVariationType::VARTYPE_PRE)
|
||||
{
|
||||
ss
|
||||
<< "\t\t transX = xTmp;\n"
|
||||
<< "\t\t transY = yTmp;\n";
|
||||
}
|
||||
else if (m_VarType == VARTYPE_REG)
|
||||
else if (m_VarType == eVariationType::VARTYPE_REG)
|
||||
{
|
||||
ss
|
||||
<< "\t\t vIn.x = xTmp;\n"
|
||||
@ -1700,13 +1700,13 @@ public:
|
||||
<< "\t\t}\n"
|
||||
<< "\n";
|
||||
|
||||
if (m_VarType == VARTYPE_PRE)
|
||||
if (m_VarType == eVariationType::VARTYPE_PRE)
|
||||
{
|
||||
ss
|
||||
<< "\t\tvOut.x = transX;\n"
|
||||
<< "\t\tvOut.y = transY;\n";
|
||||
}
|
||||
else if (m_VarType == VARTYPE_REG)
|
||||
else if (m_VarType == eVariationType::VARTYPE_REG)
|
||||
{
|
||||
ss
|
||||
<< "\t\tvOut.x = vIn.x;\n"
|
||||
@ -1720,7 +1720,7 @@ public:
|
||||
}
|
||||
|
||||
ss
|
||||
<< "\t\tvOut.z = " << ((m_VarType == VARTYPE_REG) ? "0" : "vIn.z") << ";\n"
|
||||
<< "\t\tvOut.z = " << ((m_VarType == eVariationType::VARTYPE_REG) ? "0" : "vIn.z") << ";\n"
|
||||
<< "\t}\n";
|
||||
return ss.str();
|
||||
}
|
||||
@ -1814,8 +1814,8 @@ protected:
|
||||
m_Params.push_back(ParamWithName<T>(&m_Bottom, prefix + "crob_bottom", 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Left, prefix + "crob_left", -1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Right, prefix + "crob_right", 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Blur, prefix + "crob_blur", 1, INTEGER));
|
||||
m_Params.push_back(ParamWithName<T>(&m_RatioBlur, prefix + "crob_ratioBlur", T(0.5), REAL, 0, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Blur, prefix + "crob_blur", 1, eParamType::INTEGER));
|
||||
m_Params.push_back(ParamWithName<T>(&m_RatioBlur, prefix + "crob_ratioBlur", T(0.5), eParamType::REAL, 0, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_DirectBlur, prefix + "crob_directBlur", 2));
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_XInterval, prefix + "crob_xinterval"));
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_YInterval, prefix + "crob_yinterval"));
|
||||
@ -1878,7 +1878,7 @@ template <typename T>
|
||||
class EMBER_API BubbleT3DVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
BubbleT3DVariation(T weight = 1.0) : ParametricVariation<T>("bubbleT3D", VAR_BUBBLET3D, weight, true)
|
||||
BubbleT3DVariation(T weight = 1.0) : ParametricVariation<T>("bubbleT3D", eVariationId::VAR_BUBBLET3D, weight, true)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -2331,12 +2331,12 @@ protected:
|
||||
string prefix = Prefix();
|
||||
m_Params.clear();
|
||||
m_Params.reserve(14);
|
||||
m_Params.push_back(ParamWithName<T>(&m_NumberStripes, prefix + "bubbleT3D_number_of_stripes", 0, INTEGER));
|
||||
m_Params.push_back(ParamWithName<T>(&m_RatioStripes, prefix + "bubbleT3D_ratio_of_stripes", 1, REAL, 0, 2));
|
||||
m_Params.push_back(ParamWithName<T>(&m_AngleHole, prefix + "bubbleT3D_angle_of_hole", 0, REAL, -360, 360));
|
||||
m_Params.push_back(ParamWithName<T>(&m_NumberStripes, prefix + "bubbleT3D_number_of_stripes", 0, eParamType::INTEGER));
|
||||
m_Params.push_back(ParamWithName<T>(&m_RatioStripes, prefix + "bubbleT3D_ratio_of_stripes", 1, eParamType::REAL, 0, 2));
|
||||
m_Params.push_back(ParamWithName<T>(&m_AngleHole, prefix + "bubbleT3D_angle_of_hole", 0, eParamType::REAL, -360, 360));
|
||||
m_Params.push_back(ParamWithName<T>(&m_ExponentZ, prefix + "bubbleT3D_exponentZ", 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_SymmetryZ, prefix + "bubbleT3D_symmetryZ", 0, INTEGER, 0, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_ModusBlur, prefix + "bubbleT3D_modusBlur", 0, INTEGER, 0, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_SymmetryZ, prefix + "bubbleT3D_symmetryZ", 0, eParamType::INTEGER, 0, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_ModusBlur, prefix + "bubbleT3D_modusBlur", 0, eParamType::INTEGER, 0, 1));
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_AbsNumberStripes, prefix + "bubbleT3D_abs_number_of_stripes"));//Precalc.
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_AngleHoleTemp, prefix + "bubbleT3D_ang_hole_temp"));
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_AngStrip, prefix + "bubbleT3D_ang_strip"));
|
||||
@ -2432,7 +2432,7 @@ template <typename T>
|
||||
class EMBER_API SynthVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
SynthVariation(T weight = 1.0) : ParametricVariation<T>("synth", VAR_SYNTH, weight, true, true, false, true)
|
||||
SynthVariation(T weight = 1.0) : ParametricVariation<T>("synth", eVariationId::VAR_SYNTH, weight, true, true, false, true)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -2749,7 +2749,7 @@ public:
|
||||
break;
|
||||
}
|
||||
|
||||
helper.Out.z = (m_VarType == VARTYPE_REG) ? 0 : helper.In.z;
|
||||
helper.Out.z = (m_VarType == eVariationType::VARTYPE_REG) ? 0 : helper.In.z;
|
||||
}
|
||||
|
||||
virtual string OpenCLString() const override
|
||||
@ -3048,7 +3048,7 @@ public:
|
||||
<< "\t\t break;\n"
|
||||
<< "\t\t}\n"
|
||||
<< "\n"
|
||||
<< "\t\tvOut.z = " << ((m_VarType == VARTYPE_REG) ? "0" : "vIn.z") << ";\n"
|
||||
<< "\t\tvOut.z = " << ((m_VarType == eVariationType::VARTYPE_REG) ? "0" : "vIn.z") << ";\n"
|
||||
<< "\t}\n";
|
||||
return ss.str();
|
||||
}
|
||||
@ -3314,40 +3314,40 @@ protected:
|
||||
m_Params.clear();
|
||||
m_Params.reserve(34);
|
||||
m_Params.push_back(ParamWithName<T>(&m_SynthA, prefix + "synth_a"));
|
||||
m_Params.push_back(ParamWithName<T>(&m_SynthMode, prefix + "synth_mode", 3, INTEGER));
|
||||
m_Params.push_back(ParamWithName<T>(&m_SynthMode, prefix + "synth_mode", 3, eParamType::INTEGER));
|
||||
m_Params.push_back(ParamWithName<T>(&m_SynthPower, prefix + "synth_power", -2));
|
||||
m_Params.push_back(ParamWithName<T>(&m_SynthMix, prefix + "synth_mix"));
|
||||
m_Params.push_back(ParamWithName<T>(&m_SynthSmooth, prefix + "synth_smooth", 0, INTEGER));
|
||||
m_Params.push_back(ParamWithName<T>(&m_SynthSmooth, prefix + "synth_smooth", 0, eParamType::INTEGER));
|
||||
m_Params.push_back(ParamWithName<T>(&m_SynthB, prefix + "synth_b"));
|
||||
m_Params.push_back(ParamWithName<T>(&m_SynthBType, prefix + "synth_b_type", 0, INTEGER));
|
||||
m_Params.push_back(ParamWithName<T>(&m_SynthBType, prefix + "synth_b_type", 0, eParamType::INTEGER));
|
||||
m_Params.push_back(ParamWithName<T>(&m_SynthBSkew, prefix + "synth_b_skew"));
|
||||
m_Params.push_back(ParamWithName<T>(&m_SynthBFrq, prefix + "synth_b_frq", 1, REAL));
|
||||
m_Params.push_back(ParamWithName<T>(&m_SynthBFrq, prefix + "synth_b_frq", 1, eParamType::REAL));
|
||||
m_Params.push_back(ParamWithName<T>(&m_SynthBPhs, prefix + "synth_b_phs"));
|
||||
m_Params.push_back(ParamWithName<T>(&m_SynthBLayer, prefix + "synth_b_layer", 0, INTEGER));
|
||||
m_Params.push_back(ParamWithName<T>(&m_SynthBLayer, prefix + "synth_b_layer", 0, eParamType::INTEGER));
|
||||
m_Params.push_back(ParamWithName<T>(&m_SynthC, prefix + "synth_c"));
|
||||
m_Params.push_back(ParamWithName<T>(&m_SynthCType, prefix + "synth_c_type", 0, INTEGER));
|
||||
m_Params.push_back(ParamWithName<T>(&m_SynthCType, prefix + "synth_c_type", 0, eParamType::INTEGER));
|
||||
m_Params.push_back(ParamWithName<T>(&m_SynthCSkew, prefix + "synth_c_skew"));
|
||||
m_Params.push_back(ParamWithName<T>(&m_SynthCFrq, prefix + "synth_c_frq", 1, REAL));
|
||||
m_Params.push_back(ParamWithName<T>(&m_SynthCFrq, prefix + "synth_c_frq", 1, eParamType::REAL));
|
||||
m_Params.push_back(ParamWithName<T>(&m_SynthCPhs, prefix + "synth_c_phs"));
|
||||
m_Params.push_back(ParamWithName<T>(&m_SynthCLayer, prefix + "synth_c_layer", 0, INTEGER));
|
||||
m_Params.push_back(ParamWithName<T>(&m_SynthCLayer, prefix + "synth_c_layer", 0, eParamType::INTEGER));
|
||||
m_Params.push_back(ParamWithName<T>(&m_SynthD, prefix + "synth_d"));
|
||||
m_Params.push_back(ParamWithName<T>(&m_SynthDType, prefix + "synth_d_type", 0, INTEGER));
|
||||
m_Params.push_back(ParamWithName<T>(&m_SynthDType, prefix + "synth_d_type", 0, eParamType::INTEGER));
|
||||
m_Params.push_back(ParamWithName<T>(&m_SynthDSkew, prefix + "synth_d_skew"));
|
||||
m_Params.push_back(ParamWithName<T>(&m_SynthDFrq, prefix + "synth_d_frq", 1, REAL));
|
||||
m_Params.push_back(ParamWithName<T>(&m_SynthDFrq, prefix + "synth_d_frq", 1, eParamType::REAL));
|
||||
m_Params.push_back(ParamWithName<T>(&m_SynthDPhs, prefix + "synth_d_phs"));
|
||||
m_Params.push_back(ParamWithName<T>(&m_SynthDLayer, prefix + "synth_d_layer", 0, INTEGER));
|
||||
m_Params.push_back(ParamWithName<T>(&m_SynthDLayer, prefix + "synth_d_layer", 0, eParamType::INTEGER));
|
||||
m_Params.push_back(ParamWithName<T>(&m_SynthE, prefix + "synth_e"));
|
||||
m_Params.push_back(ParamWithName<T>(&m_SynthEType, prefix + "synth_e_type", 0, INTEGER));
|
||||
m_Params.push_back(ParamWithName<T>(&m_SynthEType, prefix + "synth_e_type", 0, eParamType::INTEGER));
|
||||
m_Params.push_back(ParamWithName<T>(&m_SynthESkew, prefix + "synth_e_skew"));
|
||||
m_Params.push_back(ParamWithName<T>(&m_SynthEFrq, prefix + "synth_e_frq", 1, REAL));
|
||||
m_Params.push_back(ParamWithName<T>(&m_SynthEFrq, prefix + "synth_e_frq", 1, eParamType::REAL));
|
||||
m_Params.push_back(ParamWithName<T>(&m_SynthEPhs, prefix + "synth_e_phs"));
|
||||
m_Params.push_back(ParamWithName<T>(&m_SynthELayer, prefix + "synth_e_layer", 0, INTEGER));
|
||||
m_Params.push_back(ParamWithName<T>(&m_SynthELayer, prefix + "synth_e_layer", 0, eParamType::INTEGER));
|
||||
m_Params.push_back(ParamWithName<T>(&m_SynthF, prefix + "synth_f"));
|
||||
m_Params.push_back(ParamWithName<T>(&m_SynthFType, prefix + "synth_f_type", 0, INTEGER));
|
||||
m_Params.push_back(ParamWithName<T>(&m_SynthFType, prefix + "synth_f_type", 0, eParamType::INTEGER));
|
||||
m_Params.push_back(ParamWithName<T>(&m_SynthFSkew, prefix + "synth_f_skew"));
|
||||
m_Params.push_back(ParamWithName<T>(&m_SynthFFrq, prefix + "synth_f_frq", 1, REAL));
|
||||
m_Params.push_back(ParamWithName<T>(&m_SynthFFrq, prefix + "synth_f_frq", 1, eParamType::REAL));
|
||||
m_Params.push_back(ParamWithName<T>(&m_SynthFPhs, prefix + "synth_f_phs"));
|
||||
m_Params.push_back(ParamWithName<T>(&m_SynthFLayer, prefix + "synth_f_layer", 0, INTEGER));
|
||||
m_Params.push_back(ParamWithName<T>(&m_SynthFLayer, prefix + "synth_f_layer", 0, eParamType::INTEGER));
|
||||
}
|
||||
|
||||
private:
|
||||
@ -3641,7 +3641,7 @@ template <typename T>
|
||||
class EMBER_API CrackleVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
CrackleVariation(T weight = 1.0) : ParametricVariation<T>("crackle", VAR_CRACKLE, weight)
|
||||
CrackleVariation(T weight = 1.0) : ParametricVariation<T>("crackle", eVariationId::VAR_CRACKLE, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -3701,7 +3701,7 @@ public:
|
||||
dO += p[4];
|
||||
helper.Out.x = m_Weight * dO.x;
|
||||
helper.Out.y = m_Weight * dO.y;
|
||||
helper.Out.z = (m_VarType == VARTYPE_REG) ? 0 : helper.In.z;
|
||||
helper.Out.z = (m_VarType == eVariationType::VARTYPE_REG) ? 0 : helper.In.z;
|
||||
}
|
||||
|
||||
virtual vector<string> OpenCLGlobalFuncNames() const override
|
||||
@ -3799,7 +3799,7 @@ public:
|
||||
<< "\t\tdO += p[4];\n"
|
||||
<< "\t\tvOut.x = xform->m_VariationWeights[" << varIndex << "] * dO.x;\n"
|
||||
<< "\t\tvOut.y = xform->m_VariationWeights[" << varIndex << "] * dO.y;\n"
|
||||
<< "\t\tvOut.z = " << ((m_VarType == VARTYPE_REG) ? "0" : "vIn.z") << ";\n"
|
||||
<< "\t\tvOut.z = " << ((m_VarType == eVariationType::VARTYPE_REG) ? "0" : "vIn.z") << ";\n"
|
||||
<< "\t}\n";
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
@ -12,7 +12,7 @@ template <typename T>
|
||||
class EMBER_API DCBubbleVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
DCBubbleVariation(T weight = 1.0) : ParametricVariation<T>("dc_bubble", VAR_DC_BUBBLE, weight, true)
|
||||
DCBubbleVariation(T weight = 1.0) : ParametricVariation<T>("dc_bubble", eVariationId::VAR_DC_BUBBLE, weight, true)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -29,7 +29,7 @@ public:
|
||||
helper.Out.z = m_Weight * (2 / r4_1 - 1);
|
||||
T sumX, sumY;
|
||||
|
||||
if (m_VarType == VARTYPE_PRE)
|
||||
if (m_VarType == eVariationType::VARTYPE_PRE)
|
||||
{
|
||||
sumX = helper.In.x;
|
||||
sumY = helper.In.y;
|
||||
@ -66,7 +66,7 @@ public:
|
||||
<< "\n"
|
||||
<< "\t\treal_t sumX, sumY;\n\n";
|
||||
|
||||
if (m_VarType == VARTYPE_PRE)
|
||||
if (m_VarType == eVariationType::VARTYPE_PRE)
|
||||
{
|
||||
ss
|
||||
<< "\t\tsumX = vIn.x;\n"
|
||||
@ -123,7 +123,7 @@ template <typename T>
|
||||
class EMBER_API DCCarpetVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
DCCarpetVariation(T weight = 1.0) : ParametricVariation<T>("dc_carpet", VAR_DC_CARPET, weight)
|
||||
DCCarpetVariation(T weight = 1.0) : ParametricVariation<T>("dc_carpet", eVariationId::VAR_DC_CARPET, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -140,7 +140,7 @@ public:
|
||||
T h = -m_H + (1 - x0_xor_y0) * m_H;
|
||||
helper.Out.x = m_Weight * (m_Xform->m_Affine.A() * x + m_Xform->m_Affine.B() * y + m_Xform->m_Affine.E());
|
||||
helper.Out.y = m_Weight * (m_Xform->m_Affine.C() * x + m_Xform->m_Affine.D() * y + m_Xform->m_Affine.F());
|
||||
helper.Out.z = (m_VarType == VARTYPE_REG) ? 0 : helper.In.z;
|
||||
helper.Out.z = (m_VarType == eVariationType::VARTYPE_REG) ? 0 : helper.In.z;
|
||||
outPoint.m_ColorX = fmod(fabs(outPoint.m_ColorX * T(0.5) * (1 + h) + x0_xor_y0 * (1 - h) * T(0.5)), T(1.0));
|
||||
}
|
||||
|
||||
@ -162,7 +162,7 @@ public:
|
||||
<< "\n"
|
||||
<< "\t\tvOut.x = xform->m_VariationWeights[" << varIndex << "] * (xform->m_A * x + xform->m_B * y + xform->m_E);\n"
|
||||
<< "\t\tvOut.y = xform->m_VariationWeights[" << varIndex << "] * (xform->m_C * x + xform->m_D * y + xform->m_F);\n"
|
||||
<< "\t\tvOut.z = " << ((m_VarType == VARTYPE_REG) ? "0" : "vIn.z") << ";\n"
|
||||
<< "\t\tvOut.z = " << ((m_VarType == eVariationType::VARTYPE_REG) ? "0" : "vIn.z") << ";\n"
|
||||
<< "\t\toutPoint->m_ColorX = fmod(fabs(outPoint->m_ColorX * (real_t)(0.5) * (1 + h) + x0_xor_y0 * (1 - h) * (real_t)(0.5)), (real_t)(1.0));\n"
|
||||
<< "\t}\n";
|
||||
return ss.str();
|
||||
@ -194,7 +194,7 @@ template <typename T>
|
||||
class EMBER_API DCCubeVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
DCCubeVariation(T weight = 1.0) : ParametricVariation<T>("dc_cube", VAR_DC_CUBE, weight)
|
||||
DCCubeVariation(T weight = 1.0) : ParametricVariation<T>("dc_cube", eVariationId::VAR_DC_CUBE, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -384,7 +384,7 @@ template <typename T>
|
||||
class EMBER_API DCCylinderVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
DCCylinderVariation(T weight = 1.0) : ParametricVariation<T>("dc_cylinder", VAR_DC_CYLINDER, weight)
|
||||
DCCylinderVariation(T weight = 1.0) : ParametricVariation<T>("dc_cylinder", eVariationId::VAR_DC_CYLINDER, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -402,7 +402,7 @@ public:
|
||||
helper.Out.z = m_Weight * std::cos(helper.In.x + r * cr);
|
||||
T sumX, sumY;
|
||||
|
||||
if (m_VarType == VARTYPE_PRE)
|
||||
if (m_VarType == eVariationType::VARTYPE_PRE)
|
||||
{
|
||||
sumX = helper.In.x;
|
||||
sumY = helper.In.y;
|
||||
@ -445,7 +445,7 @@ public:
|
||||
<< "\n"
|
||||
<< "\t\treal_t sumX, sumY;\n\n";
|
||||
|
||||
if (m_VarType == VARTYPE_PRE)
|
||||
if (m_VarType == eVariationType::VARTYPE_PRE)
|
||||
{
|
||||
ss
|
||||
<< "\t\tsumX = vIn.x;\n"
|
||||
@ -511,7 +511,7 @@ template <typename T>
|
||||
class EMBER_API DCGridOutVariation : public Variation<T>
|
||||
{
|
||||
public:
|
||||
DCGridOutVariation(T weight = 1.0) : Variation<T>("dc_gridout", VAR_DC_GRIDOUT, weight) { }
|
||||
DCGridOutVariation(T weight = 1.0) : Variation<T>("dc_gridout", eVariationId::VAR_DC_GRIDOUT, weight) { }
|
||||
|
||||
VARCOPY(DCGridOutVariation)
|
||||
|
||||
@ -688,7 +688,7 @@ template <typename T>
|
||||
class EMBER_API DCLinearVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
DCLinearVariation(T weight = 1.0) : ParametricVariation<T>("dc_linear", VAR_DC_LINEAR, weight)
|
||||
DCLinearVariation(T weight = 1.0) : ParametricVariation<T>("dc_linear", eVariationId::VAR_DC_LINEAR, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -702,7 +702,7 @@ public:
|
||||
helper.Out.z = m_Weight * helper.In.z;
|
||||
T sumX, sumY;
|
||||
|
||||
if (m_VarType == VARTYPE_PRE)
|
||||
if (m_VarType == eVariationType::VARTYPE_PRE)
|
||||
{
|
||||
sumX = helper.In.x;
|
||||
sumY = helper.In.y;
|
||||
@ -738,7 +738,7 @@ public:
|
||||
<< "\n"
|
||||
<< "\t\treal_t sumX, sumY;\n\n";
|
||||
|
||||
if (m_VarType == VARTYPE_PRE)
|
||||
if (m_VarType == eVariationType::VARTYPE_PRE)
|
||||
{
|
||||
ss
|
||||
<< "\t\tsumX = vIn.x;\n"
|
||||
@ -798,7 +798,7 @@ template <typename T>
|
||||
class EMBER_API DCTriangleVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
DCTriangleVariation(T weight = 1.0) : ParametricVariation<T>("dc_triangle", VAR_DC_TRIANGLE, weight)
|
||||
DCTriangleVariation(T weight = 1.0) : ParametricVariation<T>("dc_triangle", eVariationId::VAR_DC_TRIANGLE, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -987,8 +987,8 @@ protected:
|
||||
{
|
||||
string prefix = Prefix();
|
||||
m_Params.clear();
|
||||
m_Params.push_back(ParamWithName<T>(&m_ScatterArea, prefix + "dc_triangle_scatter_area", 0, REAL, -1, 1));//Params.
|
||||
m_Params.push_back(ParamWithName<T>(&m_ZeroEdges, prefix + "dc_triangle_zero_edges", 0, INTEGER, 0, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_ScatterArea, prefix + "dc_triangle_scatter_area", 0, eParamType::REAL, -1, 1));//Params.
|
||||
m_Params.push_back(ParamWithName<T>(&m_ZeroEdges, prefix + "dc_triangle_zero_edges", 0, eParamType::INTEGER, 0, 1));
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_A, prefix + "dc_triangle_a"));//Precalc.
|
||||
}
|
||||
|
||||
@ -1007,7 +1007,7 @@ template <typename T>
|
||||
class EMBER_API DCZTranslVariation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
DCZTranslVariation(T weight = 1.0) : ParametricVariation<T>("dc_ztransl", VAR_DC_ZTRANSL, weight)
|
||||
DCZTranslVariation(T weight = 1.0) : ParametricVariation<T>("dc_ztransl", eVariationId::VAR_DC_ZTRANSL, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -1073,11 +1073,11 @@ protected:
|
||||
{
|
||||
string prefix = Prefix();
|
||||
m_Params.clear();
|
||||
m_Params.push_back(ParamWithName<T>(&m_X0, prefix + "dc_ztransl_x0", 0, REAL, 0, 1));//Params.
|
||||
m_Params.push_back(ParamWithName<T>(&m_X1, prefix + "dc_ztransl_x1", 1, REAL, 0, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_X0, prefix + "dc_ztransl_x0", 0, eParamType::REAL, 0, 1));//Params.
|
||||
m_Params.push_back(ParamWithName<T>(&m_X1, prefix + "dc_ztransl_x1", 1, eParamType::REAL, 0, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Factor, prefix + "dc_ztransl_factor", 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Overwrite, prefix + "dc_ztransl_overwrite", 1, INTEGER, 0, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Clamp, prefix + "dc_ztransl_clamp", 0, INTEGER, 0, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Overwrite, prefix + "dc_ztransl_overwrite", 1, eParamType::INTEGER, 0, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Clamp, prefix + "dc_ztransl_clamp", 0, eParamType::INTEGER, 0, 1));
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_X0_, prefix + "dc_ztransl_x0_"));//Precalc.
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_X1_, prefix + "dc_ztransl_x1_"));
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_X1_m_x0, prefix + "dc_ztransl_x1_m_x0"));
|
||||
@ -1112,7 +1112,7 @@ template <typename T>
|
||||
class EMBER_API DCPerlinVariation : public ParametricVariation <T>
|
||||
{
|
||||
public:
|
||||
DCPerlinVariation(T weight = 1.0) : ParametricVariation<T>("dc_perlin", VAR_DC_PERLIN, weight)
|
||||
DCPerlinVariation(T weight = 1.0) : ParametricVariation<T>("dc_perlin", eVariationId::VAR_DC_PERLIN, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
@ -1158,7 +1158,7 @@ public:
|
||||
break;
|
||||
|
||||
case SHAPE_BLUR:
|
||||
default:
|
||||
default:
|
||||
r = (1 + m_Edge) * rand.Frand01<T>();
|
||||
|
||||
if (r > 1 - m_Edge)
|
||||
@ -1215,7 +1215,7 @@ public:
|
||||
break;
|
||||
|
||||
case MAP_BUBBLE2:
|
||||
default:
|
||||
default:
|
||||
r = T(0.25) - (SQR(vx) + SQR(vy));
|
||||
|
||||
if (r < 0)
|
||||
@ -1242,7 +1242,7 @@ public:
|
||||
// Add blur effect to transform
|
||||
helper.Out.x = m_Weight * vx;
|
||||
helper.Out.y = m_Weight * vy;
|
||||
helper.Out.z = (m_VarType == VARTYPE_REG) ? 0 : helper.In.z;
|
||||
helper.Out.z = (m_VarType == eVariationType::VARTYPE_REG) ? 0 : helper.In.z;
|
||||
col = m_Centre + m_Range * p;
|
||||
outPoint.m_ColorX = col - Floor<T>(col);
|
||||
}
|
||||
@ -1393,7 +1393,7 @@ public:
|
||||
<< "\n"
|
||||
<< "\t\tvOut.x = xform->m_VariationWeights[" << varIndex << "] * vx; \n"
|
||||
<< "\t\tvOut.y = xform->m_VariationWeights[" << varIndex << "] * vy; \n"
|
||||
<< "\t\tvOut.z = " << ((m_VarType == VARTYPE_REG) ? "0" : "vIn.z") << ";\n"
|
||||
<< "\t\tvOut.z = " << ((m_VarType == eVariationType::VARTYPE_REG) ? "0" : "vIn.z") << ";\n"
|
||||
<< "\t\tcol = " << centre << " + " << range << " * p; \n"
|
||||
<< "\t\toutPoint->m_ColorX = col - floor(col); \n"
|
||||
<< "\t}\n";
|
||||
@ -1416,19 +1416,19 @@ protected:
|
||||
m_VarFuncs = VarFuncs<T>::Instance();
|
||||
m_Params.clear();
|
||||
m_Params.reserve(15);
|
||||
m_Params.push_back(ParamWithName<T>(&m_Shape, prefix + "dc_perlin_shape", 0, INTEGER, 0, 2));//Params.
|
||||
m_Params.push_back(ParamWithName<T>(&m_Map, prefix + "dc_perlin_map", 0, INTEGER, 0, 5));
|
||||
m_Params.push_back(ParamWithName<T>(&m_SelectCentre, prefix + "dc_perlin_select_centre", 0, REAL, -1, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_SelectRange, prefix + "dc_perlin_select_range", 1, REAL, T(0.1), 2));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Shape, prefix + "dc_perlin_shape", 0, eParamType::INTEGER, 0, 2));//Params.
|
||||
m_Params.push_back(ParamWithName<T>(&m_Map, prefix + "dc_perlin_map", 0, eParamType::INTEGER, 0, 5));
|
||||
m_Params.push_back(ParamWithName<T>(&m_SelectCentre, prefix + "dc_perlin_select_centre", 0, eParamType::REAL, -1, 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_SelectRange, prefix + "dc_perlin_select_range", 1, eParamType::REAL, T(0.1), 2));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Centre, prefix + "dc_perlin_centre", T(0.25)));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Range, prefix + "dc_perlin_range", T(0.25)));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Edge, prefix + "dc_perlin_edge"));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Scale, prefix + "dc_perlin_scale", 1));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Octaves, prefix + "dc_perlin_octaves", 2, INTEGER, 1, 5));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Octaves, prefix + "dc_perlin_octaves", 2, eParamType::INTEGER, 1, 5));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Amps, prefix + "dc_perlin_amps", 2));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Freqs, prefix + "dc_perlin_freqs", 2));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Z, prefix + "dc_perlin_z"));
|
||||
m_Params.push_back(ParamWithName<T>(&m_SelectBailout, prefix + "dc_perlin_select_bailout", 10, INTEGER, 2, 1000));
|
||||
m_Params.push_back(ParamWithName<T>(&m_SelectBailout, prefix + "dc_perlin_select_bailout", 10, eParamType::INTEGER, 2, 1000));
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_NotchBottom, prefix + "dc_perlin_notch_bottom"));
|
||||
m_Params.push_back(ParamWithName<T>(true, &m_NotchTop, prefix + "dc_perlin_notch_top"));
|
||||
}
|
||||
@ -1453,7 +1453,7 @@ private:
|
||||
|
||||
MAKEPREPOSTPARVAR(DCBubble, dc_bubble, DC_BUBBLE)
|
||||
MAKEPREPOSTPARVAR(DCCarpet, dc_carpet, DC_CARPET)
|
||||
MAKEPREPOSTPARVARASSIGN(DCCube, dc_cube, DC_CUBE, ASSIGNTYPE_SUM)
|
||||
MAKEPREPOSTPARVARASSIGN(DCCube, dc_cube, DC_CUBE, eVariationAssignType::ASSIGNTYPE_SUM)
|
||||
MAKEPREPOSTPARVAR(DCCylinder, dc_cylinder, DC_CYLINDER)
|
||||
MAKEPREPOSTVAR(DCGridOut, dc_gridout, DC_GRIDOUT)
|
||||
MAKEPREPOSTPARVAR(DCLinear, dc_linear, DC_LINEAR)
|
||||
|
||||
@ -880,7 +880,7 @@ public:
|
||||
{
|
||||
bool shouldFlatten = true;
|
||||
|
||||
if (GetVariationById(VAR_FLATTEN) == nullptr)
|
||||
if (GetVariationById(eVariationId::VAR_FLATTEN) == nullptr)
|
||||
{
|
||||
AllVarsFunc([&] (vector<Variation<T>*>& variations, bool & keepGoing)
|
||||
{
|
||||
@ -943,15 +943,15 @@ public:
|
||||
|
||||
switch (varType)
|
||||
{
|
||||
case VARTYPE_REG:
|
||||
case VARTYPE_PRE:
|
||||
case eVariationType::VARTYPE_REG:
|
||||
case eVariationType::VARTYPE_PRE:
|
||||
s =
|
||||
"\tvIn.x = transX;\n"
|
||||
"\tvIn.y = transY;\n"
|
||||
"\tvIn.z = transZ;\n";
|
||||
break;
|
||||
|
||||
case VARTYPE_POST:
|
||||
case eVariationType::VARTYPE_POST:
|
||||
default:
|
||||
s =
|
||||
"\tvIn.x = outPoint->m_X;\n"
|
||||
@ -972,7 +972,7 @@ public:
|
||||
{
|
||||
switch (assignType)
|
||||
{
|
||||
case ASSIGNTYPE_SET:
|
||||
case eVariationAssignType::ASSIGNTYPE_SET:
|
||||
{
|
||||
helper.m_TransX = helper.Out.x;
|
||||
helper.m_TransY = helper.Out.y;
|
||||
@ -980,7 +980,7 @@ public:
|
||||
break;
|
||||
}
|
||||
|
||||
case ASSIGNTYPE_SUM:
|
||||
case eVariationAssignType::ASSIGNTYPE_SUM:
|
||||
default:
|
||||
{
|
||||
helper.m_TransX += helper.Out.x;
|
||||
@ -1000,7 +1000,7 @@ public:
|
||||
{
|
||||
switch (assignType)
|
||||
{
|
||||
case ASSIGNTYPE_SET:
|
||||
case eVariationAssignType::ASSIGNTYPE_SET:
|
||||
{
|
||||
outPoint.m_X = helper.Out.x;
|
||||
outPoint.m_Y = helper.Out.y;
|
||||
@ -1008,7 +1008,7 @@ public:
|
||||
break;
|
||||
}
|
||||
|
||||
case ASSIGNTYPE_SUM:
|
||||
case eVariationAssignType::ASSIGNTYPE_SUM:
|
||||
default:
|
||||
{
|
||||
outPoint.m_X += helper.Out.x;
|
||||
@ -1031,7 +1031,7 @@ public:
|
||||
|
||||
switch (varType)
|
||||
{
|
||||
case VARTYPE_REG:
|
||||
case eVariationType::VARTYPE_REG:
|
||||
{
|
||||
s =
|
||||
"\toutPoint->m_X += vOut.x;\n"
|
||||
@ -1040,11 +1040,11 @@ public:
|
||||
break;
|
||||
}
|
||||
|
||||
case VARTYPE_PRE:
|
||||
case eVariationType::VARTYPE_PRE:
|
||||
{
|
||||
switch (assignType)
|
||||
{
|
||||
case ASSIGNTYPE_SET:
|
||||
case eVariationAssignType::ASSIGNTYPE_SET:
|
||||
{
|
||||
s =
|
||||
"\ttransX = vOut.x;\n"
|
||||
@ -1053,7 +1053,7 @@ public:
|
||||
break;
|
||||
}
|
||||
|
||||
case ASSIGNTYPE_SUM:
|
||||
case eVariationAssignType::ASSIGNTYPE_SUM:
|
||||
default:
|
||||
{
|
||||
s =
|
||||
@ -1067,12 +1067,12 @@ public:
|
||||
break;
|
||||
}
|
||||
|
||||
case VARTYPE_POST:
|
||||
case eVariationType::VARTYPE_POST:
|
||||
default:
|
||||
{
|
||||
switch (assignType)
|
||||
{
|
||||
case ASSIGNTYPE_SET:
|
||||
case eVariationAssignType::ASSIGNTYPE_SET:
|
||||
{
|
||||
s =
|
||||
"\toutPoint->m_X = vOut.x;\n"
|
||||
@ -1081,7 +1081,7 @@ public:
|
||||
break;
|
||||
}
|
||||
|
||||
case ASSIGNTYPE_SUM:
|
||||
case eVariationAssignType::ASSIGNTYPE_SUM:
|
||||
default:
|
||||
{
|
||||
s =
|
||||
|
||||
Reference in New Issue
Block a user