Stores a truncated real spherical harmonics representation of an L2-integrable function.
More...
|
| | SHVector () |
| | Construct an invalid SH vector. More...
|
| |
| | SHVector (int bands) |
| | Construct a new SH vector (initialized to zero) More...
|
| |
| | SHVector (Stream *stream) |
| | Unserialize a SH vector to a binary data stream. More...
|
| |
| | SHVector (const SHVector &v) |
| | Copy constructor. More...
|
| |
| int | getBands () const |
| | Return the number of stored SH coefficient bands. More...
|
| |
| void | serialize (Stream *stream) const |
| | Serialize a SH vector to a binary data stream. More...
|
| |
| Float | energy (int band) const |
| | Get the energy per band. More...
|
| |
| SHVector & | operator= (const SHVector &v) |
| | Assignment. More...
|
| |
| void | clear () |
| | Set all coefficients to zero. More...
|
| |
| SHVector & | operator+= (const SHVector &v) |
| | Component-wise addition. More...
|
| |
| SHVector | operator+ (const SHVector &v) const |
| | Component-wise addition. More...
|
| |
| SHVector & | operator-= (const SHVector &v) |
| | Component-wise subtraction. More...
|
| |
| SHVector | operator- (const SHVector &v) const |
| | Component-wise subtraction. More...
|
| |
| SHVector & | madd (Float f, const SHVector &v) |
| | Add a scalar multiple of another vector. More...
|
| |
| SHVector & | operator*= (Float f) |
| | Scalar multiplication. More...
|
| |
| SHVector | operator* (Float f) const |
| | Scalar multiplication. More...
|
| |
| SHVector & | operator/= (Float f) |
| | Scalar division. More...
|
| |
| SHVector | operator/ (Float f) const |
| | Scalar division. More...
|
| |
| SHVector | operator- () const |
| | Negation operator. More...
|
| |
| Float & | operator() (int l, int m) |
| | Access coefficient m (in {-l, ..., l}) on band l. More...
|
| |
| const Float & | operator() (int l, int m) const |
| | Access coefficient m (in {-l, ..., l}) on band l. More...
|
| |
| Float | eval (Float theta, Float phi) const |
| | Evaluate for a direction given in spherical coordinates. More...
|
| |
| Float | eval (const Vector &v) const |
| | Evaluate for a direction given in Cartesian coordinates. More...
|
| |
| Float | evalAzimuthallyInvariant (Float theta, Float phi) const |
| | Evaluate for a direction given in spherical coordinates. More...
|
| |
| Float | evalAzimuthallyInvariant (const Vector &v) const |
| | Evaluate for a direction given in cartesian coordinates. More...
|
| |
| bool | isAzimuthallyInvariant () const |
| | Check if this function is azumuthally invariant. More...
|
| |
| bool | operator== (const SHVector &v) const |
| | Equality comparison operator. More...
|
| |
| bool | operator!= (const SHVector &v) const |
| | Equality comparison operator. More...
|
| |
| void | normalize () |
| | Normalize so that the represented function becomes a valid distribution. More...
|
| |
| Matrix3x3 | mu2 () const |
| | Compute the second spherical moment (analytic) More...
|
| |
| Float | findMinimum (int res) const |
| | Brute-force search for the minimum value over the sphere. More...
|
| |
| void | addOffset (Float value) |
| | Add a constant value. More...
|
| |
| void | convolve (const SHVector &kernel) |
| | Convolve the SH representation with the supplied kernel. More...
|
| |
| template<typename Functor > |
| void | project (const Functor &f, int res=32) |
| | Project the given function onto a SH basis (using a 2D composite Simpson's rule) More...
|
| |
| template<typename Functor > |
| Float | l2Error (const Functor &f, int res=32) const |
| | Compute the relative L2 error. More...
|
| |
| std::string | toString () const |
| | Turn into a string representation. More...
|
| |
Stores a truncated real spherical harmonics representation of an L2-integrable function.
Also provides some other useful functionality, such as evaluation, projection and rotation.
The Mathematica equivalent of the basis functions implemented here is:
SphericalHarmonicQ[l_, m_, \[Theta]_, \[Phi]_] :=
Piecewise[{
{SphericalHarmonicY[l, m, \[Theta], \[Phi]], m == 0},
{Sqrt[2]*Re[SphericalHarmonicY[l, m, \[Theta], \[Phi]]], m > 0},
{Sqrt[2]*Im[SphericalHarmonicY[l, -m, \[Theta], \[Phi]]], m < 0}
}]