Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenlib/BLI_rand.hh')
-rw-r--r--source/blender/blenlib/BLI_rand.hh6
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);