diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2015-01-09 13:54:51 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2015-01-09 15:03:55 +0300 |
commit | 2e72d756c4909cd77f9313909159e368a26ccc92 (patch) | |
tree | 2b26168b6d2e448ac7b625774e04de43a32bc66b /source/blender/blenlib/BLI_rand.h | |
parent | 88ee44a9ac3676db44181c5dac9bab442c2a6e1a (diff) |
BLI_rand: add a function returning a random point whithin given 2D triangle.
Needed by transfer data.
Diffstat (limited to 'source/blender/blenlib/BLI_rand.h')
-rw-r--r-- | source/blender/blenlib/BLI_rand.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_rand.h b/source/blender/blenlib/BLI_rand.h index 879af446469..7b84dddcb68 100644 --- a/source/blender/blenlib/BLI_rand.h +++ b/source/blender/blenlib/BLI_rand.h @@ -55,6 +55,9 @@ double BLI_rng_get_double(struct RNG *rng) ATTR_WARN_UNUSED_RESULT ATTR_NON float BLI_rng_get_float(struct RNG *rng) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1); void BLI_rng_get_float_unit_v2(struct RNG *rng, float v[2]) ATTR_NONNULL(1, 2); void BLI_rng_get_float_unit_v3(struct RNG *rng, float v[3]) ATTR_NONNULL(1, 2); +void BLI_rng_get_tri_sample_float_v2( + struct RNG *rng, const float v1[2], const float v2[2], const float v3[2], + float r_pt[2]) ATTR_NONNULL(); void BLI_rng_shuffle_array(struct RNG *rng, void *data, unsigned int elem_size_i, unsigned int elem_tot) ATTR_NONNULL(1, 2); /** Note that skipping is as slow as generating n numbers! */ |