HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT_LatinSampler.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: UT_LatinSampler.h ( UT Library, C++)
7  *
8  * COMMENTS: This class distributes samples in a 2D latin square
9  * pattern.
10  */
11 
12 #ifndef __UT_LatinSampler__
13 #define __UT_LatinSampler__
14 
15 #include "UT_API.h"
16 
17 // Generate latin hypercube samples
19 public:
21  virtual ~UT_LatinSampler();
22 
23  void init(int xsamples, int ysamples);
24 
25  template<typename R>
26  void fillSamples(float *s, float *t,
27  float sscale, float tscale,
28  R &rand,
29  bool permute = false);
30 
31 private:
32  int myXSamples;
33  int myYSamples;
34  int mySamples;
35 };
36 
37 // Generates samples in the unit circle by filling in concentric rings.
39 public:
41  ~UT_DiskSampler();
42 
43  template<typename R>
44  void init(int total_samples, R &rand);
45 
46  template<typename R>
47  void fillSamples(float *s, float *t,
48  float sscale, float tscale,
49  R &rand);
50 
51 private:
52  int mySamples;
53  float *myS;
54 };
55 
56 #endif
57 
#define UT_API
Definition: UT_API.h:13