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/intern/rand.cc')
-rw-r--r--source/blender/blenlib/intern/rand.cc29
1 files changed, 1 insertions, 28 deletions
diff --git a/source/blender/blenlib/intern/rand.cc b/source/blender/blenlib/intern/rand.cc
index db5e08d37ce..1d2274ede37 100644
--- a/source/blender/blenlib/intern/rand.cc
+++ b/source/blender/blenlib/intern/rand.cc
@@ -59,9 +59,6 @@ RNG *BLI_rng_new(unsigned int seed)
return rng;
}
-/**
- * A version of #BLI_rng_new that hashes the seed.
- */
RNG *BLI_rng_new_srandom(unsigned int seed)
{
RNG *rng = new RNG();
@@ -84,9 +81,6 @@ void BLI_rng_seed(RNG *rng, unsigned int seed)
rng->rng.seed(seed);
}
-/**
- * Use a hash table to create better seed.
- */
void BLI_rng_srandom(RNG *rng, unsigned int seed)
{
rng->rng.seed_random(seed);
@@ -107,17 +101,11 @@ unsigned int BLI_rng_get_uint(RNG *rng)
return rng->rng.get_uint32();
}
-/**
- * \return Random value (0..1), but never 1.0.
- */
double BLI_rng_get_double(RNG *rng)
{
return rng->rng.get_double();
}
-/**
- * \return Random value (0..1), but never 1.0.
- */
float BLI_rng_get_float(RNG *rng)
{
return rng->rng.get_float();
@@ -133,9 +121,6 @@ void BLI_rng_get_float_unit_v3(RNG *rng, float v[3])
copy_v3_v3(v, rng->rng.get_unit_float3());
}
-/**
- * Generate a random point inside given tri.
- */
void BLI_rng_get_tri_sample_float_v2(
RNG *rng, const float v1[2], const float v2[2], const float v3[2], float r_pt[2])
{
@@ -190,11 +175,6 @@ void BLI_rng_shuffle_bitmap(struct RNG *rng, BLI_bitmap *bitmap, unsigned int bi
}
}
-/**
- * Simulate getting \a n random values.
- *
- * \note Useful when threaded code needs consistent values, independent of task division.
- */
void BLI_rng_skip(RNG *rng, int n)
{
rng->rng.skip((uint)n);
@@ -202,7 +182,6 @@ void BLI_rng_skip(RNG *rng, int n)
/***/
-/* fill an array with random numbers */
void BLI_array_frand(float *ar, int count, unsigned int seed)
{
RNG rng;
@@ -272,7 +251,7 @@ struct RNG_THREAD_ARRAY {
RNG rng_tab[BLENDER_MAX_THREADS];
};
-RNG_THREAD_ARRAY *BLI_rng_threaded_new(void)
+RNG_THREAD_ARRAY *BLI_rng_threaded_new()
{
unsigned int i;
RNG_THREAD_ARRAY *rngarr = (RNG_THREAD_ARRAY *)MEM_mallocN(sizeof(RNG_THREAD_ARRAY),
@@ -402,9 +381,6 @@ void BLI_hammersley_2d_sequence(unsigned int n, double *r)
namespace blender {
-/**
- * Set a randomized hash of the value as seed.
- */
void RandomNumberGenerator::seed_random(uint32_t seed)
{
this->seed(seed + hash[seed & 255]);
@@ -434,9 +410,6 @@ float3 RandomNumberGenerator::get_unit_float3()
return {0.0f, 0.0f, 1.0f};
}
-/**
- * Generate a random point inside the given triangle.
- */
float2 RandomNumberGenerator::get_triangle_sample(float2 v1, float2 v2, float2 v3)
{
float u = this->get_float();