lux::Function1D Class Reference

#include <mcdistribution.h>

Collaboration diagram for lux::Function1D:
[legend]

List of all members.

Public Member Functions

 Function1D (float *f, int n)
 ~Function1D ()
float Eval (float x) const

Public Attributes

float * func
int count

Detailed Description

A utility class evaluating a regularly sampled 1D function.

Definition at line 33 of file mcdistribution.h.


Constructor & Destructor Documentation

lux::Function1D::Function1D ( float *  f,
int  n 
) [inline]

Creates a 1D function from the given data. It is assumed that the given function is sampled regularly sampled in the interval [0,1] (ex. 0.1, 0.3, 0.5, 0.7, 0.9 for 5 samples).

Parameters:
f The values of the function.
n The number of samples.

Definition at line 43 of file mcdistribution.h.

References count, func, and memcpy().

lux::Function1D::~Function1D (  )  [inline]

Definition at line 48 of file mcdistribution.h.

References func.


Member Function Documentation

float lux::Function1D::Eval ( float  x  )  const [inline]

Evaluates the function at the given position.

Parameters:
x The x value to evaluate the function at.
Returns:
The function value at the given position.

Definition at line 59 of file mcdistribution.h.

References Clamp(), count, func, and cimg_library::cimg::min().


Member Data Documentation

Definition at line 75 of file mcdistribution.h.

Referenced by Eval(), and Function1D().

Definition at line 71 of file mcdistribution.h.

Referenced by Eval(), Function1D(), and ~Function1D().


The documentation for this class was generated from the following file:
Generated by  doxygen 1.6.2-20100208