RiSamplingStrategy

Takes a RiRandom, and generates N samples points in [0,1)^D based on some strategy.

This is an abstract class and cannot be directly instanced.


[ Math | Source | Search | Keywords | Summary | Ancestors | All Members | Descendants ]

Quick Index

DESCRIPTION
IMPLEMENTATION DETAIL
PATTERN

Class Summary

class RiSamplingStrategy
{
public:
int CreateSamples(RiReal *samples, int numSamples, int numDimensions, RiRandom &gen) const; // pure virtual
protected:
}; // RiSamplingStrategy


DESCRIPTION

Used to fill the data of an RiSamplePattern based on some sampling strategy such as uniform or jittered. This class should be able to handle any number of requested samples. This may mean that the sample pattern isn't perfect, for example if the strategy is jittered 2D and the caller asks for 10 samples, the first 9 might be jittered on a 3x3 grid and the last sample chosen uniformly.


IMPLEMENTATION DETAIL

This class must be stateless to the extent that it can be shared among multiple users with different sample pattern size needs.


PATTERN

Strategy

int CreateSamples(RiReal *samples, int numSamples, int numDimensions, RiRandom &gen) const;

in numSamples
Number of samples desired
in numDimensions
The dimension of the sample spaces
in gen
The random number generator to be used
out realNum
Number actually created (<= numSamples)

    virtual int CreateSamples(RiReal *samples, int numSamples, int numDimensions, RiRandom &gen) const;    

All Members

public:
int CreateSamples(RiReal *samples, int numSamples, int numDimensions, RiRandom &gen) const; // pure virtual
protected:

Ancestors

Class does not inherit from any other class.


Descendants


Generated from source by the Cocoon utilities on Fri Feb 25 15:15:36 2000 .