diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2007-12-04 16:57:28 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2007-12-04 16:57:28 +0300 |
commit | 32a8b4f8e686938ec2f0f95e6acc2eb3c25ebfdf (patch) | |
tree | ff232d89da0b2f0db1da4becb1980af513ea2274 /source/blender/blenlib | |
parent | ebfedd20b290e356f35eb1fcbcb5ddfb8e8bf0a9 (diff) |
Particles
=========
- Fix crash in particle transform with the particle system not editable.
- Particle child distribution and caching is now multithreaded.
- Child particles now have a separate Render Amount next to the existing
Amount. The render amount particles are now only distributed and cached
at render time, which should make editing with child particles faster.
- Two new options for diffuse strand shading:
- Surface Diffuse: computes the strand normal taking the normal at
the surface into account.
- Blending Distance: the distance in Blender units over which to
blend in the normal at the surface.
- Special strand rendering for more memory efficient and faster hair and
grass. This is a work in progress, and has a number of known issues,
don't report bugs to me for this feature yet.
More info:
http://www.blender.org/development/current-projects/changes-since-244/particles/
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r-- | source/blender/blenlib/BLI_rand.h | 3 | ||||
-rw-r--r-- | source/blender/blenlib/intern/rand.c | 8 |
2 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_rand.h b/source/blender/blenlib/BLI_rand.h index da2ecb79651..638f36b7414 100644 --- a/source/blender/blenlib/BLI_rand.h +++ b/source/blender/blenlib/BLI_rand.h @@ -52,6 +52,9 @@ double rng_getDouble (struct RNG* rng); float rng_getFloat (struct RNG* rng); void rng_shuffleArray(struct RNG *rng, void *data, int elemSize, int numElems); + /** Note that skipping is as slow as generating n numbers! */ +void rng_skip (struct RNG *rng, int n); + /** Seed the random number generator */ void BLI_srand (unsigned int seed); diff --git a/source/blender/blenlib/intern/rand.c b/source/blender/blenlib/intern/rand.c index df01288aab8..71df0ede037 100644 --- a/source/blender/blenlib/intern/rand.c +++ b/source/blender/blenlib/intern/rand.c @@ -116,6 +116,14 @@ void rng_shuffleArray(RNG *rng, void *data, int elemSize, int numElems) free(temp); } +void rng_skip(RNG *rng, int n) +{ + int i; + + for(i=0; i<n; i++) + rng_getInt(rng); +} + /***/ static RNG theBLI_rng = {0}; |