From d5ef29e01530ba54941fe8afa350b5e98a519a8f Mon Sep 17 00:00:00 2001 From: Alex Szpakowski Date: Tue, 9 Jul 2013 07:48:42 -0300 Subject: [PATCH] Removed the optional variation parameter from ParticleSystem:setSpin (issue #634). ParticleSystem:setSpinVariation still exists. --- src/modules/graphics/opengl/ParticleSystem.cpp | 7 ------- src/modules/graphics/opengl/ParticleSystem.h | 14 +++----------- .../graphics/opengl/wrap_ParticleSystem.cpp | 3 +-- 3 files changed, 4 insertions(+), 20 deletions(-) diff --git a/src/modules/graphics/opengl/ParticleSystem.cpp b/src/modules/graphics/opengl/ParticleSystem.cpp index efb79d2f8..c6c99fa00 100644 --- a/src/modules/graphics/opengl/ParticleSystem.cpp +++ b/src/modules/graphics/opengl/ParticleSystem.cpp @@ -629,13 +629,6 @@ void ParticleSystem::setSpin(float start, float end) spinEnd = end; } -void ParticleSystem::setSpin(float start, float end, float variation) -{ - spinStart = start; - spinEnd = end; - spinVariation = variation; -} - void ParticleSystem::getSpin(float *start, float *end) const { if (start) diff --git a/src/modules/graphics/opengl/ParticleSystem.h b/src/modules/graphics/opengl/ParticleSystem.h index 4ebdf3236..1524d4bd2 100644 --- a/src/modules/graphics/opengl/ParticleSystem.h +++ b/src/modules/graphics/opengl/ParticleSystem.h @@ -375,19 +375,11 @@ public: /** * Sets the spin of the sprite upon particle creation and death. - * @param start The spin of the sprite upon creation (in degrees). - * @param end The spin of the sprite upon death (in degrees). + * @param start The spin of the sprite upon creation (in radians / second). + * @param end The spin of the sprite upon death (in radians / second). **/ void setSpin(float start, float end); - /** - * Sets the spin of the sprite upon particle creation and death and the variation. - * @param start The spin of the sprite upon creation (in degrees). - * @param end The spin of the sprite upon death (in degrees). - * @param variation The variation of the start spin (0 being no variation and 1 beign a random spin between start and end). - **/ - void setSpin(float start, float end, float variation); - /** * Gets the amount of spin of a particle during its lifetime. * @param[out] start @@ -397,7 +389,7 @@ public: /** * Sets the variation of the start spin (0 being no variation and 1 being a random spin between start and end). - * @param variation The variation in degrees. + * @param variation The variation. **/ void setSpinVariation(float variation); diff --git a/src/modules/graphics/opengl/wrap_ParticleSystem.cpp b/src/modules/graphics/opengl/wrap_ParticleSystem.cpp index 131f76588..ff6f8290a 100644 --- a/src/modules/graphics/opengl/wrap_ParticleSystem.cpp +++ b/src/modules/graphics/opengl/wrap_ParticleSystem.cpp @@ -423,8 +423,7 @@ int w_ParticleSystem_setSpin(lua_State *L) ParticleSystem *t = luax_checkparticlesystem(L, 1); float arg1 = (float)luaL_checknumber(L, 2); float arg2 = (float)luaL_optnumber(L, 3, arg1); - float arg3 = (float)luaL_optnumber(L, 4, 0); - t->setSpin(arg1, arg2, arg3); + t->setSpin(arg1, arg2); return 0; }