lux::IrregularFunction1D Class Reference

#include <mcdistribution.h>

Collaboration diagram for lux::IrregularFunction1D:
[legend]

List of all members.

Public Member Functions

 IrregularFunction1D (float *aX, float *aFx, int aN)
 ~IrregularFunction1D ()
float Eval (float x) const
int IndexOf (float x, float *d) const

Private Attributes

float * xFunc
float * yFunc
int count

Detailed Description

A utility class for evaluating an irregularly sampled 1D function.

Definition at line 144 of file mcdistribution.h.


Constructor & Destructor Documentation

lux::IrregularFunction1D::IrregularFunction1D ( float *  aX,
float *  aFx,
int  aN 
) [inline]

Creates a 1D function from the given data. It is assumed that the given x values are ordered, starting with the smallest value. The function value is clamped at the edges. It is assumed there are no duplicate sample locations.

Parameters:
aX The sample locations of the function.
aFx The values of the function.
aN The number of samples.

Definition at line 156 of file mcdistribution.h.

References count, memcpy(), xFunc, and yFunc.

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

Definition at line 164 of file mcdistribution.h.

References xFunc, and yFunc.


Member Function Documentation

float lux::IrregularFunction1D::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 176 of file mcdistribution.h.

References count, cimg_library::cimg::max(), xFunc, and yFunc.

Referenced by lux::IESSphericalFunction::IESSphericalFunction().

int lux::IrregularFunction1D::IndexOf ( float  x,
float *  d 
) const [inline]

Returns the index of the given position.

Parameters:
x The x value to get the index of.
d The address to store the offset from the index in.
Returns:
The index of the given position.

Definition at line 198 of file mcdistribution.h.

References count, and xFunc.

Referenced by lux::IESSphericalFunction::IESSphericalFunction().


Member Data Documentation

Definition at line 224 of file mcdistribution.h.

Referenced by Eval(), IndexOf(), and IrregularFunction1D().

Definition at line 220 of file mcdistribution.h.

Referenced by Eval(), IndexOf(), IrregularFunction1D(), and ~IrregularFunction1D().

Definition at line 220 of file mcdistribution.h.

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


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