From Tom Jolly. a couple of small changes to osgParticle.
"The first is with Particle.cpp. I made a change so that when the lifetime is 0 (lasts forever) the sizeRange, colorRange, and alphaRange are used to create a random size, color, and alpha." "The second change is with range and SectorPlacer. The distribution of particles across the sector was not uniform. I added get_random_sqrtf() function where it is used in SectorPlacer::Place(). This seems to make the distribution uniform (at least when minimum radius is 0)."
This commit is contained in:
@@ -116,7 +116,7 @@ namespace osgParticle
|
||||
|
||||
inline void SectorPlacer::place(Particle *P) const
|
||||
{
|
||||
float rad = rad_range_.get_random();
|
||||
float rad = rad_range_.get_random_sqrtf();
|
||||
float phi = phi_range_.get_random();
|
||||
|
||||
osg::Vec3 pos(
|
||||
|
||||
Reference in New Issue
Block a user