6 #ifndef MATERIALX_HARMONICS_H
7 #define MATERIALX_HARMONICS_H
30 explicit ShCoeffs(
const std::array<C, NUM_COEFFS>& arr) :
55 std::array<C, NUM_COEFFS>
_arr;
#define MATERIALX_NAMESPACE_BEGIN
std::array< C, NUM_COEFFS > _arr
MX_RENDER_API ImagePtr renderReferenceIrradiance(ConstImagePtr env, unsigned int width, unsigned int height)
MX_RENDER_API Sh3ColorCoeffs projectEnvironment(ConstImagePtr env, bool irradiance=false)
MX_RENDER_API ImagePtr renderEnvironment(const Sh3ColorCoeffs &shEnv, unsigned int width, unsigned int height)
bool operator==(const ShCoeffs &rhs) const
Return true if the given vector is identical to this one.
GLint GLsizei GLsizei height
MX_RENDER_API ImagePtr normalizeEnvironment(ConstImagePtr env, float envRadiance, float maxTexelRadiance)
bool operator!=(const ShCoeffs &rhs) const
Return true if the given vector differs from this one.
C & operator[](size_t i)
Return the coefficient at the given index.
static const size_t NUM_BANDS
MX_RENDER_API void computeDominantLight(ConstImagePtr env, Vector3 &lightDir, Color3 &lightColor)
ShCoeffs(const std::array< C, NUM_COEFFS > &arr)
const C & operator[](size_t i) const
Return the const coefficient at the given index.
#define MATERIALX_NAMESPACE_END
shared_ptr< Image > ImagePtr
A shared pointer to an image.
static const size_t NUM_COEFFS
shared_ptr< const Image > ConstImagePtr
A shared pointer to a const image.