Clarisse 5.0 SP8 SDK  5.0.5.8.0
SphericalFunction< _Degree > Class Template Reference

Represents a spherical function on the basis of tesseral spherical harmonics up to _Degree. More...

Public Member Functions

SphericalFunction (SphericalFunction const &other)

SphericalFunctionoperator= (SphericalFunction const &other)

void set_zero ()

Scalar operator() (GMathVec3< Scalar > const &direction) const

Scalar evaluate (GMathVec3< Scalar > const &direction, const Scalar &distance) const

SphericalFunction operator+ (SphericalFunction const &other) const

SphericalFunctionoperator+= (SphericalFunction const &other)

SphericalFunction operator* (Scalar const &value) const

Static Public Member Functions

static SphericalFunction unilateral_projection (GMathVec3< Scalar > const &n, Scalar const a=GMath< Scalar >::one())
Creates a SphericalFunction representing the unilaterally projected area of a planar surface oriented by its normal n and having area a.

static Function_3D get_basis_function (int n)
Returns a pointer to the n-th basis function (in top-to-bottom pyramidal order).

Static Public Attributes

static constexpr int N = (_Degree + 1) * (_Degree + 1)

Detailed Description

template<int _Degree> class SphericalFunction< _Degree >

Represents a spherical function on the basis of tesseral spherical harmonics up to _Degree.

Tesseral coefficients are stored in m_data in the following order: (0,0),(1,-1),(1,0),(1,1) etc.

Member Function Documentation

template<int _Degree>
 SphericalFunction< _Degree > SphericalFunction< _Degree >::unilateral_projection ( GMathVec3< Scalar > const & n, Scalar const a = `GMath::one()` )
static

Creates a SphericalFunction representing the unilaterally projected area of a planar surface oriented by its normal n and having area a.

Unilateral here means that the projected area in any direction in the half-space opposed to n is zero.