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

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