2014-07-08 03:11:14 -04:00
# pragma once
# include "EmberPch.h"
/// <summary>
/// Basic #defines used throughout the library.
/// </summary>
2014-09-01 00:25:15 -04:00
# ifdef _WIN32
# if defined(BUILDING_EMBER)
# define EMBER_API __declspec(dllexport)
# else
# define EMBER_API __declspec(dllimport)
# endif
2014-07-08 03:11:14 -04:00
# else
2014-09-01 00:25:15 -04:00
# define EMBER_API
2014-09-10 01:41:26 -04:00
# define fopen_s(pFile,filename,mode) ((*(pFile)=fopen((filename),(mode)))==nullptr)
2014-09-01 00:25:15 -04:00
# define _stat stat
# define _fstat fstat
# define _stricmp strcmp
# define sscanf_s sscanf
# define sprintf_s snprintf
2014-12-05 21:30:46 -05:00
# define snprintf_s snprintf
2014-09-01 00:25:15 -04:00
typedef int errno_t ;
2014-07-08 03:11:14 -04:00
# endif
# define RESTRICT __restrict //This might make things faster, unsure if it really does though.
//#define RESTRICT
//Wrap the sincos function for Macs and PC.
# if defined(__APPLE__) || defined(_MSC_VER)
2015-12-31 19:00:36 -05:00
# define sincos(x, s, c) *(s)=std::sin(x); *(c)=std::cos(x);
2014-07-08 03:11:14 -04:00
# else
2015-12-31 19:00:36 -05:00
static void sincos ( float x , float * s , float * c )
{
* s = std : : sin ( x ) ;
* c = std : : cos ( x ) ;
}
2014-07-08 03:11:14 -04:00
# endif
2014-12-05 21:30:46 -05:00
namespace EmberNs
{
2016-01-17 19:10:06 -05:00
# define EMBER_VERSION "0.9.9.3"
2014-07-08 03:11:14 -04:00
# define EPS6 T(1e-6)
Numerous fixes
0.4.0.5 Beta 07/18/2014
--User Changes
Allow for vibrancy values > 1.
Add flatten and unflatten menu items.
Automatically flatten like Apophysis does.
Add plugin and new_linear tags to Xml to be compatible with Apophysis.
--Bug Fixes
Fix blur, blur3d, bubble, cropn, cross, curl, curl3d, epispiral, ho,
julia3d, julia3dz, loonie, mirror_x, mirror_y, mirror_z, rotate_x,
sinusoidal, spherical, spherical3d, stripes.
Unique filename on final render was completely broken.
Two severe OpenCL bugs. Random seeds were biased and fusing was being
reset too often leading to results that differ from the CPU.
Subtle, but sometimes severe bug in the setup of the xaos weights.
Use properly defined epsilon by getting the value from
std::numeric_limits, rather than hard coding 1e-6 or 1e-10.
Omit incorrect usage of epsilon everywhere. It should not be
automatically added to denominators. Rather, it should only be used if
the denominator is zero.
Force final render progress bars to 100 on completion. Sometimes they
didn't seem to make it there.
Make variation name and params comparisons be case insensitive.
--Code Changes
Make ForEach and FindIf wrappers around std::for_each and std::find_if.
2014-07-19 02:33:18 -04:00
# define EPS std::numeric_limits<T>::epsilon() //Apoplugin.h uses -20, but it's more mathematically correct to do it this way.
2014-07-08 03:11:14 -04:00
# define ISAAC_SIZE 4
# define MEMALIGN 32
# define DE_THRESH 100
# define MAX_VARS_PER_XFORM 8
# define DEG_2_RAD (M_PI / 180)
# define RAD_2_DEG (180 / M_PI)
# define DEG_2_RAD_T (T(M_PI) / T(180))
# define RAD_2_DEG_T (T(180) / T(M_PI))
# define M_2PI (T(M_PI * 2))
# define M_3PI (T(M_PI * 3))
# define SQRT5 T(2.2360679774997896964091736687313)
# define M_PHI T(1.61803398874989484820458683436563)
# define COLORMAP_LENGTH 256 //These will need to change if 2D palette support is ever added, or variable sized palettes.
# define COLORMAP_LENGTH_MINUS_1 255
# define WHITE 255
2014-11-28 04:37:51 -05:00
# define DEFAULT_SBS (1024 * 10)
2014-12-07 02:51:44 -05:00
//#define XC(c) ((const xmlChar*)(c))
# define XC(c) (reinterpret_cast<const xmlChar*>(c))
# define CX(c) (reinterpret_cast<char*>(c))
# define CCX(c) (reinterpret_cast<const char*>(c))
2014-07-08 03:11:14 -04:00
# define BadVal(x) (((x) != (x)) || ((x) > 1e10) || ((x) < -1e10))
# define Vlen(x) (sizeof(x) / sizeof(*x))
# define SQR(x) ((x) * (x))
# define CUBE(x) ((x) * (x) * (x))
# define TLOW std::numeric_limits<T>::lowest()
# define TMAX std::numeric_limits<T>::max()
2014-09-08 00:05:27 -04:00
# define FLOAT_MAX_TAN 8388607.0f
# define FLOAT_MIN_TAN -FLOAT_MAX_TAN
2015-03-25 23:47:57 -04:00
# define EMPTYFIELD -9999
2014-09-01 00:25:15 -04:00
typedef std : : chrono : : high_resolution_clock Clock ;
2016-01-04 19:50:15 -05:00
typedef uint et ;
2016-02-12 00:38:21 -05:00
typedef std : : lock_guard < std : : recursive_mutex > rlg ;
2014-07-08 03:11:14 -04:00
2015-04-13 07:12:38 -04:00
/// <summary>
/// Thin wrapper around getting the current time in milliseconds.
/// </summary>
static inline size_t NowMs ( )
{
return duration_cast < milliseconds > ( Clock : : now ( ) . time_since_epoch ( ) ) . count ( ) ;
}
2014-12-06 00:05:09 -05:00
# ifndef byte
typedef unsigned char byte ;
# endif
2014-07-08 03:11:14 -04:00
# define DO_DOUBLE 1 //Comment this out for shorter build times during development. Always uncomment for release.
Numerous fixes
0.4.0.5 Beta 07/18/2014
--User Changes
Allow for vibrancy values > 1.
Add flatten and unflatten menu items.
Automatically flatten like Apophysis does.
Add plugin and new_linear tags to Xml to be compatible with Apophysis.
--Bug Fixes
Fix blur, blur3d, bubble, cropn, cross, curl, curl3d, epispiral, ho,
julia3d, julia3dz, loonie, mirror_x, mirror_y, mirror_z, rotate_x,
sinusoidal, spherical, spherical3d, stripes.
Unique filename on final render was completely broken.
Two severe OpenCL bugs. Random seeds were biased and fusing was being
reset too often leading to results that differ from the CPU.
Subtle, but sometimes severe bug in the setup of the xaos weights.
Use properly defined epsilon by getting the value from
std::numeric_limits, rather than hard coding 1e-6 or 1e-10.
Omit incorrect usage of epsilon everywhere. It should not be
automatically added to denominators. Rather, it should only be used if
the denominator is zero.
Force final render progress bars to 100 on completion. Sometimes they
didn't seem to make it there.
Make variation name and params comparisons be case insensitive.
--Code Changes
Make ForEach and FindIf wrappers around std::for_each and std::find_if.
2014-07-19 02:33:18 -04:00
//#define ISAAC_FLAM3_DEBUG 1//This is almost never needed, but is very useful when troubleshooting difficult bugs. Enable it to do a side by side comparison with flam3.
2014-07-08 03:11:14 -04:00
--User changes
-Add new variations: bubbleT3D, crob, hexaplay3D, hexcrop, hexes, hexnix3D, loonie2, loonie3, nBlur, octapol and synth.
-Allow for pre/post versions of dc_bubble, dc_cylinder and dc_linear whereas before they were omitted.
-When saving a file with multiple embers in it, detect if time values are all the same and if so, start them at zero and increment by 1 for each ember.
-Allow for numerous quality increases to be coalesced into one. It will pick up at the end of the current render.
-Show selection highlight on variations tree in response to mouse hover. This makes it easier to see for which variation or param the current mouse wheel action will apply.
-Make default temporal samples be 100, whereas before it was 1000 which was overkill.
-Require the shift key to be held with delete for deleting an ember to prevent it from triggering when the user enters delete in the edit box.
-This wasn't otherwise fixable without writing a lot more code.
--Bug fixes
-EmberGenome was crashing when generating a sequence from a source file with more than 2 embers in it.
-EmberGenome was improperly handling the first frame of a merge after the last frame of the loop.
-These bugs were due to a previous commit. Revert parts of that commit.
-Prevent a zoom value of less than 0 when reading from xml.
-Slight optimization of the crescents, and mask variations, if the compiler wasn't doing it already.
-Unique file naming was broken because it was looking for _# and the default names ended with -#.
-Disallow renaming of an ember in the library tree to an empty string.
-Severe bug that prevented some variations from being read correctly from params generated outside this program.
-Severe OpenCL randomization bug. The first x coordinates of the first points in the first kernel call of the first ember of a render since the OpenCL renderer object was created were not random and were mostly -1.
-Severe bug when populating xform selection distributions that could sometimes cause a crash due to roundoff error. Fix by using double.
-Limit the max number of variations in a random ember to MAX_CL_VARS, which is 8. This ensures they'll look the same on CPU and GPU.
-Prevent user from saving stylesheet to default.qss, it's a special reserved filename.
--Code changes
-Generalize using the running sum output point inside of a variation for all cases: pre, reg and post.
-Allow for array variables in variations where the address of each element is stored in m_Params.
-Qualify all math functions with std::
-No longer use our own Clamp() in OpenCL, instead use the standard clamp().
-Redesign how functions are used in the variations OpenCL code.
-Add tests to EmberTester to verify some of the new functionality.
-Place more const and override qualifiers on functions where appropriate.
-Add a global rand with a lock to be used very sparingly.
-Use a map instead of a vector for bad param names in Xml parsing.
-Prefix affine interpolation mode defines with "AFFINE_" to make their purpose more clear.
-Allow for variations that change state during iteration by sending a separate copy of the ember to each rendering thread.
-Implement this same functionality with a local struct in OpenCL. It's members are the total of all variables that need to change state within an ember.
-Add Contains() function to Utils.h.
-EmberRender: print names of kernels being printed with --dump_kernel option.
-Clean up EmberTester to handle some of the recent changes.
-Fix various casts.
-Replace % 2 with & 1, even though the compiler was likely doing this already.
-Add new file Variations06.h to accommodate new variations.
-General cleanup.
2015-11-22 17:15:07 -05:00
//These two must always match.
# ifdef WIN32
2015-12-31 19:00:36 -05:00
# define ALIGN __declspec(align(16))
--User changes
-Add new variations: bubbleT3D, crob, hexaplay3D, hexcrop, hexes, hexnix3D, loonie2, loonie3, nBlur, octapol and synth.
-Allow for pre/post versions of dc_bubble, dc_cylinder and dc_linear whereas before they were omitted.
-When saving a file with multiple embers in it, detect if time values are all the same and if so, start them at zero and increment by 1 for each ember.
-Allow for numerous quality increases to be coalesced into one. It will pick up at the end of the current render.
-Show selection highlight on variations tree in response to mouse hover. This makes it easier to see for which variation or param the current mouse wheel action will apply.
-Make default temporal samples be 100, whereas before it was 1000 which was overkill.
-Require the shift key to be held with delete for deleting an ember to prevent it from triggering when the user enters delete in the edit box.
-This wasn't otherwise fixable without writing a lot more code.
--Bug fixes
-EmberGenome was crashing when generating a sequence from a source file with more than 2 embers in it.
-EmberGenome was improperly handling the first frame of a merge after the last frame of the loop.
-These bugs were due to a previous commit. Revert parts of that commit.
-Prevent a zoom value of less than 0 when reading from xml.
-Slight optimization of the crescents, and mask variations, if the compiler wasn't doing it already.
-Unique file naming was broken because it was looking for _# and the default names ended with -#.
-Disallow renaming of an ember in the library tree to an empty string.
-Severe bug that prevented some variations from being read correctly from params generated outside this program.
-Severe OpenCL randomization bug. The first x coordinates of the first points in the first kernel call of the first ember of a render since the OpenCL renderer object was created were not random and were mostly -1.
-Severe bug when populating xform selection distributions that could sometimes cause a crash due to roundoff error. Fix by using double.
-Limit the max number of variations in a random ember to MAX_CL_VARS, which is 8. This ensures they'll look the same on CPU and GPU.
-Prevent user from saving stylesheet to default.qss, it's a special reserved filename.
--Code changes
-Generalize using the running sum output point inside of a variation for all cases: pre, reg and post.
-Allow for array variables in variations where the address of each element is stored in m_Params.
-Qualify all math functions with std::
-No longer use our own Clamp() in OpenCL, instead use the standard clamp().
-Redesign how functions are used in the variations OpenCL code.
-Add tests to EmberTester to verify some of the new functionality.
-Place more const and override qualifiers on functions where appropriate.
-Add a global rand with a lock to be used very sparingly.
-Use a map instead of a vector for bad param names in Xml parsing.
-Prefix affine interpolation mode defines with "AFFINE_" to make their purpose more clear.
-Allow for variations that change state during iteration by sending a separate copy of the ember to each rendering thread.
-Implement this same functionality with a local struct in OpenCL. It's members are the total of all variables that need to change state within an ember.
-Add Contains() function to Utils.h.
-EmberRender: print names of kernels being printed with --dump_kernel option.
-Clean up EmberTester to handle some of the recent changes.
-Fix various casts.
-Replace % 2 with & 1, even though the compiler was likely doing this already.
-Add new file Variations06.h to accommodate new variations.
-General cleanup.
2015-11-22 17:15:07 -05:00
# else
2015-12-31 19:00:36 -05:00
# define ALIGN __attribute__ ((aligned (16)))
--User changes
-Add new variations: bubbleT3D, crob, hexaplay3D, hexcrop, hexes, hexnix3D, loonie2, loonie3, nBlur, octapol and synth.
-Allow for pre/post versions of dc_bubble, dc_cylinder and dc_linear whereas before they were omitted.
-When saving a file with multiple embers in it, detect if time values are all the same and if so, start them at zero and increment by 1 for each ember.
-Allow for numerous quality increases to be coalesced into one. It will pick up at the end of the current render.
-Show selection highlight on variations tree in response to mouse hover. This makes it easier to see for which variation or param the current mouse wheel action will apply.
-Make default temporal samples be 100, whereas before it was 1000 which was overkill.
-Require the shift key to be held with delete for deleting an ember to prevent it from triggering when the user enters delete in the edit box.
-This wasn't otherwise fixable without writing a lot more code.
--Bug fixes
-EmberGenome was crashing when generating a sequence from a source file with more than 2 embers in it.
-EmberGenome was improperly handling the first frame of a merge after the last frame of the loop.
-These bugs were due to a previous commit. Revert parts of that commit.
-Prevent a zoom value of less than 0 when reading from xml.
-Slight optimization of the crescents, and mask variations, if the compiler wasn't doing it already.
-Unique file naming was broken because it was looking for _# and the default names ended with -#.
-Disallow renaming of an ember in the library tree to an empty string.
-Severe bug that prevented some variations from being read correctly from params generated outside this program.
-Severe OpenCL randomization bug. The first x coordinates of the first points in the first kernel call of the first ember of a render since the OpenCL renderer object was created were not random and were mostly -1.
-Severe bug when populating xform selection distributions that could sometimes cause a crash due to roundoff error. Fix by using double.
-Limit the max number of variations in a random ember to MAX_CL_VARS, which is 8. This ensures they'll look the same on CPU and GPU.
-Prevent user from saving stylesheet to default.qss, it's a special reserved filename.
--Code changes
-Generalize using the running sum output point inside of a variation for all cases: pre, reg and post.
-Allow for array variables in variations where the address of each element is stored in m_Params.
-Qualify all math functions with std::
-No longer use our own Clamp() in OpenCL, instead use the standard clamp().
-Redesign how functions are used in the variations OpenCL code.
-Add tests to EmberTester to verify some of the new functionality.
-Place more const and override qualifiers on functions where appropriate.
-Add a global rand with a lock to be used very sparingly.
-Use a map instead of a vector for bad param names in Xml parsing.
-Prefix affine interpolation mode defines with "AFFINE_" to make their purpose more clear.
-Allow for variations that change state during iteration by sending a separate copy of the ember to each rendering thread.
-Implement this same functionality with a local struct in OpenCL. It's members are the total of all variables that need to change state within an ember.
-Add Contains() function to Utils.h.
-EmberRender: print names of kernels being printed with --dump_kernel option.
-Clean up EmberTester to handle some of the recent changes.
-Fix various casts.
-Replace % 2 with & 1, even though the compiler was likely doing this already.
-Add new file Variations06.h to accommodate new variations.
-General cleanup.
2015-11-22 17:15:07 -05:00
# endif
# define ALIGN_CL "((aligned (16)))" //The extra parens are necessary.
2015-03-21 18:27:37 -04:00
# if GLM_VERSION >= 96
# define v2T glm::tvec2<T, glm::defaultp>
# define v3T glm::tvec3<T, glm::defaultp>
# define v4T glm::tvec4<T, glm::defaultp>
2015-08-10 23:10:23 -04:00
# define v4bT glm::tvec4<bucketT, glm::defaultp>
2015-03-21 18:27:37 -04:00
# define m2T glm::tmat2x2<T, glm::defaultp>
# define m3T glm::tmat3x3<T, glm::defaultp>
# define m4T glm::tmat4x4<T, glm::defaultp>
# define m23T glm::tmat2x3<T, glm::defaultp>
# else
# define v2T glm::detail::tvec2<T, glm::defaultp>
# define v3T glm::detail::tvec3<T, glm::defaultp>
# define v4T glm::detail::tvec4<T, glm::defaultp>
2015-08-10 23:10:23 -04:00
# define v4bT glm::detail::tvec4<bucketT, glm::defaultp>
2015-03-21 18:27:37 -04:00
# define m2T glm::detail::tmat2x2<T, glm::defaultp>
# define m3T glm::detail::tmat3x3<T, glm::defaultp>
# define m4T glm::detail::tmat4x4<T, glm::defaultp>
# define m23T glm::detail::tmat2x3<T, glm::defaultp>
# endif
2014-07-08 03:11:14 -04:00
2016-01-04 19:50:15 -05:00
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.
2015-07-07 00:36:46 -04:00
{
2015-12-31 19:00:36 -05:00
FLAME_MOTION_NONE ,
FLAME_MOTION_ZOOM ,
FLAME_MOTION_ZPOS ,
FLAME_MOTION_PERSPECTIVE ,
FLAME_MOTION_YAW ,
FLAME_MOTION_PITCH ,
FLAME_MOTION_DEPTH_BLUR ,
FLAME_MOTION_CENTER_X ,
FLAME_MOTION_CENTER_Y ,
FLAME_MOTION_ROTATE ,
FLAME_MOTION_BRIGHTNESS ,
FLAME_MOTION_GAMMA ,
FLAME_MOTION_GAMMA_THRESH ,
FLAME_MOTION_HIGHLIGHT_POWER ,
FLAME_MOTION_BACKGROUND_R ,
FLAME_MOTION_BACKGROUND_G ,
FLAME_MOTION_BACKGROUND_B ,
FLAME_MOTION_VIBRANCY
2015-06-24 06:23:17 -04:00
} ;
2015-12-31 19:00:36 -05:00
/// <summary>
/// Thin wrapper to allow << operator on interp 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 eInterp & t )
{
switch ( t )
{
case EmberNs : : eInterp : : EMBER_INTERP_LINEAR :
stream < < " linear " ;
break ;
case EmberNs : : eInterp : : EMBER_INTERP_SMOOTH :
stream < < " smooth " ;
break ;
default :
stream < < " error " ;
break ;
}
return stream ;
}
/// <summary>
/// Thin wrapper to allow << operator on affine interp 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 eAffineInterp & t )
{
switch ( t )
{
case EmberNs : : eAffineInterp : : AFFINE_INTERP_LINEAR :
stream < < " linear " ;
break ;
case EmberNs : : eAffineInterp : : AFFINE_INTERP_LOG :
stream < < " log " ;
break ;
case EmberNs : : eAffineInterp : : AFFINE_INTERP_COMPAT :
stream < < " compat " ;
break ;
case EmberNs : : eAffineInterp : : AFFINE_INTERP_OLDER :
stream < < " older " ;
break ;
default :
stream < < " error " ;
break ;
}
return stream ;
}
/// <summary>
/// Thin wrapper to allow << operator on palette mode 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 ePaletteMode & t )
{
switch ( t )
{
case EmberNs : : ePaletteMode : : PALETTE_STEP :
stream < < " step " ;
break ;
case EmberNs : : ePaletteMode : : PALETTE_LINEAR :
stream < < " linear " ;
break ;
default :
stream < < " error " ;
break ;
}
return stream ;
}
/// <summary>
/// Thin wrapper to allow << operator on palette interp 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 ePaletteInterp & t )
{
switch ( t )
{
case EmberNs : : ePaletteInterp : : INTERP_HSV :
stream < < " hsv " ;
break ;
case EmberNs : : ePaletteInterp : : INTERP_SWEEP :
stream < < " sweep " ;
break ;
default :
stream < < " error " ;
break ;
}
return stream ;
}
/// <summary>
/// Thin wrapper to allow << operator on scale 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 eScaleType & t )
{
switch ( t )
{
case EmberNs : : eScaleType : : SCALE_NONE :
stream < < " none " ;
break ;
case EmberNs : : eScaleType : : SCALE_WIDTH :
stream < < " width " ;
break ;
case EmberNs : : eScaleType : : SCALE_HEIGHT :
stream < < " height " ;
break ;
default :
stream < < " error " ;
break ;
}
return stream ;
}
/// <summary>
/// Thin wrapper to allow << operator on motion 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 eMotion & t )
{
switch ( t )
{
case EmberNs : : eMotion : : MOTION_SIN :
stream < < " sin " ;
break ;
case EmberNs : : eMotion : : MOTION_TRIANGLE :
stream < < " triangle " ;
break ;
case EmberNs : : eMotion : : MOTION_HILL :
stream < < " hill " ;
break ;
case EmberNs : : eMotion : : MOTION_SAW :
stream < < " saw " ;
break ;
default :
stream < < " error " ;
break ;
}
return stream ;
}
2014-07-08 03:11:14 -04:00
}