Public Member Functions | |
virtual unsigned | getImportanceAt (Point2D pt)=0 |
This virtual function must be implemented in order to use the sampling system. | |
std::vector< Point2D > | getSamplingPoints () |
Builds and collects the point set generated be the sampling system, using the previously defined importance function. | |
Protected Member Functions | |
Quasisampler (double width=0.0, double height=0.0) | |
Protected constructor, which initializes the Region of Interest. | |
unsigned | getImportanceAt_bounded (Point2D pt) |
This is a helper function which constrains the incoming points to the region of interest. | |
void | subdivideAll (int times=1) |
Subdivides all tiles down a level, a given number of times. | |
void | buildAdaptiveSubdivision (unsigned minSubdivisionLevel=6) |
Generates the hierarchical structure. | |
void | collectPoints (std::vector< Point2D > &pointlist, bool filterBounds=true) |
Collect the resulting point set. | |
Static Protected Member Functions | |
unsigned | fibonacci (unsigned i) |
Fibonacci number at a given position. | |
unsigned | getReqSubdivisionLevel (unsigned importance) |
Returns the required level of subdivision for a given importance value. | |
unsigned | calcFCodeValue (unsigned bitsequence, unsigned nbits) |
Returns the decimal value of an F-Code, over a given number of bits. | |
unsigned | calcStructuralIndex (unsigned bitsequence) |
Returns the Structural Index (i_s) for a given F-Code. | |
unsigned | calcImportanceIndex (unsigned importance) |
Returns the Importance Index (i_v) for a given importance value. | |
Point2D | calcDisplacementVector (unsigned importance, unsigned f_code, int dir) |
Fetches the appropriate vector from the lookup table. | |
Protected Attributes | |
TileNode * | root |
Root node of the tile subdivision tree. | |
double | width |
Extents of the region of interest. | |
double | height |
Extents of the region of interest. | |
Static Protected Attributes | |
const unsigned | fiboTable [32] |
Fibonacci sequence (first 32 numbers). | |
const Point2D | vvect [20] |
Unit vectors rotated around origin, in ![]() | |
const double | lut [LUT_SIZE][21][2] |
Pre-calculated correction vectors lookup table. |
This is a pure-virtual class, and you must implement the "getImportanceAt()" function in order to use the sampling system. The mechanics of the system can be observed in the given source code.
example.cpp, example2.cpp, and example3.cpp.
Definition at line 75 of file quasisampler_prototype.h.
|
Returns the decimal value of an F-Code, over a given number of bits.
The value returned is Definition at line 126 of file quasisampler_prototype.h. |
|
Returns the Importance Index (i_v) for a given importance value.
The value returned is Definition at line 145 of file quasisampler_prototype.h. |
|
Fibonacci number at a given position.
The value returned is Definition at line 106 of file quasisampler_prototype.h. |
|
This virtual function must be implemented in order to use the sampling system. It should return the value of the importance function at the given point. |
|
Returns the required level of subdivision for a given importance value.
The value returned is Definition at line 116 of file quasisampler_prototype.h. |
|
Initial value: Fibonacci sequence (first 32 numbers).
Definition at line 619 of file quasisampler_prototype.h. |
|
Pre-calculated correction vectors lookup table. These are available in ASCII format on the web-site. Definition at line 634 of file quasisampler_prototype.h. |
|
Initial value: Unit vectors rotated around origin, in ![]() 0 = North. This table can be used to accelerate the trigonomic operations within the tile subdivision process, since all angles can only take these values. Definition at line 624 of file quasisampler_prototype.h. |