MayaFlux 0.2.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ generate_sample_at()

SampleResult MayaFlux::Kinesis::generate_sample_at ( SpatialDistribution  distribution,
size_t  index,
size_t  total,
const SamplerBounds bounds,
Kinesis::Stochastic::Stochastic rng 
)

Generate a single sample at a specific index (for indexed/sequential modes).

Parameters
distributionSpatial distribution algorithm
indexSample index within the total sequence
totalTotal number of samples in the sequence
boundsSpatial domain
rngStochastic engine
Returns
Single SampleResult

Useful for ParticleNetwork's per-index generation pattern.

Definition at line 367 of file VertexSampler.cpp.

373{
374 switch (dist) {
375 case SpatialDistribution::RANDOM_VOLUME:
376 return sample_random_volume(bounds, rng);
377 case SpatialDistribution::RANDOM_SURFACE:
378 return sample_random_surface(bounds, rng);
379 case SpatialDistribution::GRID:
380 return sample_grid(bounds, index, total);
381 case SpatialDistribution::SPHERE_VOLUME:
382 return sample_sphere_volume(bounds, rng);
383 case SpatialDistribution::SPHERE_SURFACE:
384 return sample_sphere_surface(bounds, rng);
385 case SpatialDistribution::UNIFORM_GRID:
386 return sample_uniform_grid(bounds, index, total);
387 case SpatialDistribution::RANDOM_SPHERE:
388 return sample_random_sphere(bounds, rng);
389 case SpatialDistribution::RANDOM_CUBE:
390 return sample_random_cube(bounds, rng);
391 default:
392 return { .position = glm::vec3(0.0F), .color = glm::vec3(0.5F), .scalar = 0.5F };
393 }
394}

References GRID, RANDOM_CUBE, RANDOM_SPHERE, RANDOM_SURFACE, RANDOM_VOLUME, SPHERE_SURFACE, SPHERE_VOLUME, and UNIFORM_GRID.

Referenced by generate_samples(), and MayaFlux::Nodes::Network::ParticleNetwork::generate_single_vertex().

+ Here is the caller graph for this function: