6#ifndef MATERIALX_HARMONICS_H
7#define MATERIALX_HARMONICS_H
16MATERIALX_NAMESPACE_BEGIN
25 static const size_t NUM_BANDS = B;
26 static const size_t NUM_COEFFS = B * B;
30 explicit ShCoeffs(
const std::array<C, NUM_COEFFS>& arr) :
50 const C&
operator[](
size_t i)
const {
return _arr.at(i); }
55 std::array<C, NUM_COEFFS> _arr;
100MATERIALX_NAMESPACE_END
MX_RENDER_API ImagePtr renderReferenceIrradiance(ConstImagePtr env, unsigned int width, unsigned int height)
Render a reference irradiance map from the given environment map, using brute-force computations for ...
MX_RENDER_API Sh3ColorCoeffs projectEnvironment(ConstImagePtr env, bool irradiance=false)
Project an environment map to third-order SH, with an optional convolution to convert radiance to irr...
MX_RENDER_API void computeDominantLight(ConstImagePtr env, Vector3 &lightDir, Color3 &lightColor)
Compute the dominant light direction and color of an environment map.
MX_RENDER_API ImagePtr renderEnvironment(const Sh3ColorCoeffs &shEnv, unsigned int width, unsigned int height)
Render the given spherical harmonic signal to an environment map.
MX_RENDER_API ImagePtr normalizeEnvironment(ConstImagePtr env, float envRadiance, float maxTexelRadiance)
Normalize an environment to the given radiance.
shared_ptr< const Image > ConstImagePtr
A shared pointer to a const image.
Definition: Image.h:26
shared_ptr< Image > ImagePtr
A shared pointer to an image.
Definition: Image.h:23
Macros for declaring imported and exported symbols.
Data types for rendering functionality.
A three-component color value.
Definition: Types.h:342
Class template for a vector of spherical harmonic coefficients.
Definition: Harmonics.h:23
const C & operator[](size_t i) const
Return the const coefficient at the given index.
Definition: Harmonics.h:50
C & operator[](size_t i)
Return the coefficient at the given index.
Definition: Harmonics.h:47
bool operator!=(const ShCoeffs &rhs) const
Return true if the given vector differs from this one.
Definition: Harmonics.h:40
bool operator==(const ShCoeffs &rhs) const
Return true if the given vector is identical to this one.
Definition: Harmonics.h:37
A vector of three floating-point values.
Definition: Types.h:306