source: GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Halton.h @ 3227

Revision 3227, 600 bytes checked in by mattausch, 16 years ago (diff)

worked on sampling / convergence

Line 
1#ifndef __HALTON_H
2#define __HALTON_H
3
4#include <iostream>
5#include <vector>
6
7class Halton
8{
9public:
10
11        static void TestHalton(int n, int dim);
12
13        static void TestPrime();
14
15
16        Halton(int dim);
17
18
19        float GetNext();
20
21
22protected:
23
24        static bool IsPrime(int n);
25   
26    static int FindPrime(int idx);
27
28
29        ////////////////////
30
31        unsigned int mIndex;
32        int mBase;
33};             
34
35
36class HaltonSequence
37{
38public:
39
40        static void TestHalton(int n, int dim);
41
42        HaltonSequence(int dim);
43
44        void GetNext(float *numbers);
45
46
47protected:
48
49        std::vector<Halton> mHaltons;
50};
51
52
53#endif
Note: See TracBrowser for help on using the repository browser.