A piecewise distribution function. More...
#include <piecewise.hpp>
Public Member Functions | |
Piecewise (const Shape2D &shape, const SpatialDistribution &inside, const SpatialDistribution &outside) | |
Class constructor. More... | |
double | operator() (const Vector2D &point) const |
Evaluates the function. More... | |
A piecewise distribution function.
Uses one distribution function if a point is withing a specified shape, and another if it is outside
Definition at line 15 of file piecewise.hpp.
Piecewise::Piecewise | ( | const Shape2D & | shape, |
const SpatialDistribution & | inside, | ||
const SpatialDistribution & | outside | ||
) |
Class constructor.
shape | A shape |
inside | Function to use when inside the shape |
outside | Function to use when outside the shape |
Definition at line 3 of file piecewise.cpp.
|
virtual |
Evaluates the function.
point | Position |
Implements SpatialDistribution.
Definition at line 8 of file piecewise.cpp.