Om
1.0.0
A universal framework for multimedia simulation
|
A class that stores parameters for projecting a function into the spherical harmonic basis. More...
#include <omSphericalHarmonics.h>
Public Member Functions | |
SHProjection () | |
Create a new SH projection with the default parameters. More... | |
Public Attributes | |
Size | maxOrder |
The maximum spherical harmonic order to use for the projection. More... | |
Float | maxError |
The maximum allowed error in the projected function, expressed as a fraction (e.g. 0.05 = 5% error). More... | |
Float | convergence |
If the error improves by less than this amount for an iteration, the fitting terminates. More... | |
Size | sampleCount |
The number of integration samples to use for the projection. More... | |
A class that stores parameters for projecting a function into the spherical harmonic basis.
|
inline |
Create a new SH projection with the default parameters.
Size om::math::SHProjection::maxOrder |
The maximum spherical harmonic order to use for the projection.
A higher-order projection produces a SH fit that is closer to the original data, but the number of coefficients and the filter interpolation time also increases quadratically with the maximum order.
A lower-order representation may be used if it satisfies the maximum error constraint.
Float om::math::SHProjection::maxError |
The maximum allowed error in the projected function, expressed as a fraction (e.g. 0.05 = 5% error).
Float om::math::SHProjection::convergence |
If the error improves by less than this amount for an iteration, the fitting terminates.
The fitting terminates when (lastError/error - 1) < convergence.
Size om::math::SHProjection::sampleCount |
The number of integration samples to use for the projection.
If Monte Carlo integration is used, these samples will be random and uniformly distributed. The higher the number of samples, the better quality the SH projection will have. However, the time to compute the projection increases linearly with the number of samples.