diff options
author | Siddhartha Jejurkar <f20180617@goa.bits-pilani.ac.in> | 2021-12-17 16:01:32 +0300 |
---|---|---|
committer | Siddhartha Jejurkar <f20180617@goa.bits-pilani.ac.in> | 2021-12-17 16:01:32 +0300 |
commit | dbc41b30f88b96f7d8c6e995b17f5930eb55cc77 (patch) | |
tree | c6c495328443ea3621e5df2ef483b0e0dd504496 /source/blender/blenlib/BLI_rand.hh | |
parent | 99a2af76d10e05a18987be5d554ada197b1ca086 (diff) | |
parent | 7c9e4099854a4fc8eab4db97173c1aacd25f9e08 (diff) |
Merge branch 'master' into soc-2021-uv-edge-select-supportsoc-2021-uv-edge-select-support
Diffstat (limited to 'source/blender/blenlib/BLI_rand.hh')
-rw-r--r-- | source/blender/blenlib/BLI_rand.hh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_rand.hh b/source/blender/blenlib/BLI_rand.hh index 0c0dd464d4d..cc9e9b374d7 100644 --- a/source/blender/blenlib/BLI_rand.hh +++ b/source/blender/blenlib/BLI_rand.hh @@ -47,6 +47,9 @@ class RandomNumberGenerator { x_ = (static_cast<uint64_t>(seed) << 16) | lowseed; } + /** + * Set a randomized hash of the value as seed. + */ void seed_random(uint32_t seed); uint32_t get_uint32() @@ -117,6 +120,9 @@ class RandomNumberGenerator { float2 get_unit_float2(); float3 get_unit_float3(); + /** + * Generate a random point inside the given triangle. + */ float2 get_triangle_sample(float2 v1, float2 v2, float2 v3); float3 get_triangle_sample_3d(float3 v1, float3 v2, float3 v3); void get_bytes(MutableSpan<char> r_bytes); |