Fix return type of ParticleSystem:getAreaSpreadIsRelativeDirection, remove optional parameters from ParticleSystem:setAreaSpread (resolves #1340)

I opted to remove the optional parameters altogether since they seemed oddly
out-of-place. They used to reset the values to defaults when not supplied, and
they also weren't returned by getAreaSpread(), so
setAreaSpread(getAreaSpread()) actually changed spread parameters.

The other option was to remove the separate getters/setters for
AreaSpreadIsRelativeDirection and AreaSpreadAngle, and fully rely on
setAreaSpread for these parameters, but the rest of the ParticleSystem API
tends to keep parameters separate.

--HG--
branch : minor
This commit is contained in:
Bart van Strien
2017-09-12 12:40:21 +02:00
parent 09c1259857
commit 7dae80f552
3 changed files with 5 additions and 56 deletions
-33
View File
@@ -208,39 +208,6 @@ public:
**/
void setAreaSpread(AreaSpreadDistribution distribution, float x, float y);
/**
* Sets the emission area spread parameters and distribution type. The interpretation of
* the parameters depends on the distribution type:
*
* * None: Parameters are ignored. No area spread.
* * Uniform: Parameters denote maximal (symmetric) displacement from emitter position.
* * Normal: Parameters denote the standard deviation in x and y direction. x and y are assumed to be uncorrelated.
* * borderellipse: Parameter causes particle distribution around outside of ellipse
* * borderrectangle: Parameter causes particle distribution around outside of rectangle
* @param x First parameter. Interpretation depends on distribution type.
* @param y Second parameter. Interpretation depends on distribution type.
* @param distribution Distribution type
* @param angle Angle for the distribution to be rotated by
**/
void setAreaSpread(AreaSpreadDistribution distribution, float x, float y, float angle);
/**
* Sets the emission area spread parameters and distribution type. The interpretation of
* the parameters depends on the distribution type:
*
* * None: Parameters are ignored. No area spread.
* * Uniform: Parameters denote maximal (symmetric) displacement from emitter position.
* * Normal: Parameters denote the standard deviation in x and y direction. x and y are assumed to be uncorrelated.
* * borderellipse: Parameter causes particle distribution around outside of ellipse
* * borderrectangle: Parameter causes particle distribution around outside of rectangle
* @param x First parameter. Interpretation depends on distribution type.
* @param y Second parameter. Interpretation depends on distribution type.
* @param distribution Distribution type
* @param angle Angle for the distribution to be rotated by
* @param isRelativeDirection whether to set direction of each particle to away from center
**/
void setAreaSpread(AreaSpreadDistribution distribution, float x, float y, float angle, bool isRelativeDirection);
/**
* Returns area spread distribution type.
**/