Compute weights for anti-aliasing rays. More...
Public Member Functions | |
anti_aliasing_table (int N, float L) | |
Setup antialiasing for (NxN) rays with spacing=L. More... | |
float | dL (unsigned int k) const |
get spacing for ray k More... | |
float | w (unsigned int kx, unsigned int ky) const |
get weight for ray k More... | |
Private Attributes | |
std::vector< float > | displacement |
internal displacement More... | |
std::vector< float > | weight |
internal weight More... | |
Compute weights for anti-aliasing rays.
Example of use:
int N_aa=3; float dL=0.25; anti_aliasing_table aa(N_aa,dL); for(int k_aa_x=0;k_aa_x<N_aa;++k_aa_x) { for(int k_aa_y=0;k_aa_y<N_aa;++k_aa_y) { float dx=aa.dL(k_aa_x); float dy=aa.dL(k_aa_y); float w=aa.w(k_aa_x,k_aa_y); } }
cpe::anti_aliasing_table::anti_aliasing_table | ( | int | N, |
float | L | ||
) |
Setup antialiasing for (NxN) rays with spacing=L.
References displacement, and weight.
float cpe::anti_aliasing_table::dL | ( | unsigned int | k | ) | const |
get spacing for ray k
References displacement.
float cpe::anti_aliasing_table::w | ( | unsigned int | kx, |
unsigned int | ky | ||
) | const |
get weight for ray k
References displacement, and weight.
|
private |
internal displacement
Referenced by anti_aliasing_table(), dL(), and w().
|
private |
internal weight
Referenced by anti_aliasing_table(), and w().