mirror of
https://bitbucket.org/mfeemster/fractorium.git
synced 2025-01-21 21:20:07 -05:00
Add 'saw' motion function
This commit is contained in:
parent
957779639f
commit
1a37504b09
@ -114,7 +114,7 @@ enum eInterp : uint { EMBER_INTERP_LINEAR = 0, EMBER_INTERP_SMOOTH = 1 };
|
|||||||
enum eAffineInterp : uint { INTERP_LINEAR = 0, INTERP_LOG = 1, INTERP_COMPAT = 2, INTERP_OLDER = 3 };
|
enum eAffineInterp : uint { INTERP_LINEAR = 0, INTERP_LOG = 1, INTERP_COMPAT = 2, INTERP_OLDER = 3 };
|
||||||
enum ePaletteMode : uint { PALETTE_STEP = 0, PALETTE_LINEAR = 1 };
|
enum ePaletteMode : uint { PALETTE_STEP = 0, PALETTE_LINEAR = 1 };
|
||||||
enum ePaletteInterp : uint { INTERP_HSV = 0, INTERP_SWEEP = 1 };
|
enum ePaletteInterp : uint { INTERP_HSV = 0, INTERP_SWEEP = 1 };
|
||||||
enum eMotion : uint { MOTION_SIN = 1, MOTION_TRIANGLE = 2, MOTION_HILL = 3 };
|
enum eMotion : uint { MOTION_SIN = 1, MOTION_TRIANGLE = 2, MOTION_HILL = 3, MOTION_SAW = 4 };
|
||||||
enum eProcessAction : uint { NOTHING = 0, ACCUM_ONLY = 1, FILTER_AND_ACCUM = 2, KEEP_ITERATING = 3, FULL_RENDER = 4 };
|
enum eProcessAction : uint { NOTHING = 0, ACCUM_ONLY = 1, FILTER_AND_ACCUM = 2, KEEP_ITERATING = 3, FULL_RENDER = 4 };
|
||||||
enum eProcessState : uint { NONE = 0, ITER_STARTED = 1, ITER_DONE = 2, FILTER_DONE = 3, ACCUM_DONE = 4 };
|
enum eProcessState : uint { NONE = 0, ITER_STARTED = 1, ITER_DONE = 2, FILTER_DONE = 3, ACCUM_DONE = 4 };
|
||||||
enum eInteractiveFilter : uint { FILTER_LOG = 0, FILTER_DE = 1 };
|
enum eInteractiveFilter : uint { FILTER_LOG = 0, FILTER_DE = 1 };
|
||||||
|
@ -488,6 +488,8 @@ private:
|
|||||||
os << "motion_function=\"triangle\" ";
|
os << "motion_function=\"triangle\" ";
|
||||||
else if (xform.m_MotionFunc== MOTION_HILL)
|
else if (xform.m_MotionFunc== MOTION_HILL)
|
||||||
os << "motion_function=\"hill\" ";
|
os << "motion_function=\"hill\" ";
|
||||||
|
else if (xform.m_MotionFunc== MOTION_SAW)
|
||||||
|
os << "motion_function=\"saw\" ";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -883,10 +883,14 @@ public:
|
|||||||
|
|
||||||
return fr;
|
return fr;
|
||||||
}
|
}
|
||||||
else//MOTION_HILL
|
else if (funcNum == MOTION_HILL)
|
||||||
{
|
{
|
||||||
return ((1 - cos(T(2.0) * T(M_PI) * timeVal)) * T(0.5));
|
return ((1 - cos(T(2.0) * T(M_PI) * timeVal)) * T(0.5));
|
||||||
}
|
}
|
||||||
|
else //MOTION_SAW
|
||||||
|
{
|
||||||
|
return (T(2.0) * fmod(timeVal - T(0.5), T(1.0)) - T(1.0));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1073,6 +1073,8 @@ private:
|
|||||||
xform.m_MotionFunc = MOTION_TRIANGLE;
|
xform.m_MotionFunc = MOTION_TRIANGLE;
|
||||||
else if (!_stricmp("hill", attStr))
|
else if (!_stricmp("hill", attStr))
|
||||||
xform.m_MotionFunc = MOTION_HILL;
|
xform.m_MotionFunc = MOTION_HILL;
|
||||||
|
else if (!_stricmp("saw", attStr))
|
||||||
|
xform.m_MotionFunc = MOTION_SAW;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
xform.m_MotionFunc = MOTION_SIN;
|
xform.m_MotionFunc = MOTION_SIN;
|
||||||
|
Loading…
Reference in New Issue
Block a user