Clarisse 5.0 SP8 SDK  5.0.5.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Types | Public Member Functions | List of all members
SamplingKernel2d Class Reference

SamplingKernel2d defines a framework that tells, with its evaluate function, if a sample (<x>, <y>) must be processed and how. More...

Public Types

typedef double(* EvaluateCallback )(const SamplingKernel2d &filter, const double &x, const double &y)
 
typedef void(* SampleCallback )(const SamplingKernel2d &filter, const double &u, const double &v, GMathVec2d &xy, double &pdf)
 

Public Member Functions

 SamplingKernel2d (const double &width, const double &height)
 Default constructor.
 
virtual ~SamplingKernel2d ()
 
void set_callbacks (EvaluateCallback evaluate_callback, SampleCallback sample_callback=nullptr)
 
const double & get_width () const
 
const double & get_height () const
 
double evaluate (const double &x, const double &y) const
 Gives this kernel value for the corresponding sample given by its coordinates.
 
void sample (const double &u, const double &v, GMathVec2d &xy, double &pdf) const
 

Detailed Description

SamplingKernel2d defines a framework that tells, with its evaluate function, if a sample (<x>, <y>) must be processed and how.

Member Typedef Documentation

typedef double(* SamplingKernel2d::EvaluateCallback)(const SamplingKernel2d &filter, const double &x, const double &y)

Define the type of function that gives the kernel <filter>'s value for one sample located at (<x>, <y>).

Constructor & Destructor Documentation

SamplingKernel2d::SamplingKernel2d ( const double &  width,
const double &  height 
)
inline

Default constructor.

Parameters
widthof the sampling kernel.
heightof the sampling kernel.
virtual SamplingKernel2d::~SamplingKernel2d ( )
inlinevirtual

Class Destructor

Member Function Documentation

double SamplingKernel2d::evaluate ( const double &  x,
const double &  y 
) const
inline

Gives this kernel value for the corresponding sample given by its coordinates.

Parameters
x- Normalized x coordinate of the sample.
y- Normalized y coordinate of the sample
Returns
the kernel value for that sample as a double.
const double& SamplingKernel2d::get_height ( ) const
inline

Sampling kernel's height accessor.

const double& SamplingKernel2d::get_width ( ) const
inline

Sampling kernel's width accessor.

void SamplingKernel2d::set_callbacks ( EvaluateCallback  evaluate_callback,
SampleCallback  sample_callback = nullptr 
)
inline

m_evaluate_callback modifier that put SamplingKernel2d::default_evaluate_callback if callback is NULL.