cpe::anti_aliasing_table Class Reference

Compute weights for anti-aliasing rays. More...

+ Collaboration diagram for cpe::anti_aliasing_table:

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...
 

Detailed Description

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); } }

Constructor & Destructor Documentation

cpe::anti_aliasing_table::anti_aliasing_table ( int  N,
float  L 
)

Setup antialiasing for (NxN) rays with spacing=L.

References displacement, and weight.

Member Function Documentation

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.

Member Data Documentation

std::vector<float> cpe::anti_aliasing_table::displacement
private

internal displacement

Referenced by anti_aliasing_table(), dL(), and w().

std::vector<float> cpe::anti_aliasing_table::weight
private

internal weight

Referenced by anti_aliasing_table(), and w().


The documentation for this class was generated from the following files: