#include <mipmap.h>
Classes | |
struct | ResampleWeight |
Public Member Functions | |
MIPMap () | |
MIPMap (uint32_t xres, uint32_t yres, const T *data, bool doTri=false, float maxAniso=8.f, ImageWrap wrapMode=TEXTURE_REPEAT) | |
~MIPMap () | |
uint32_t | Width () const |
uint32_t | Height () const |
uint32_t | Levels () const |
const T & | Texel (uint32_t level, int s, int t) const |
T | Lookup (float s, float t, float width=0.f) const |
T | Lookup (float s, float t, float ds0, float dt0, float ds1, float dt1) const |
Private Member Functions | |
ResampleWeight * | resampleWeights (uint32_t oldres, uint32_t newres) |
float | clamp (float v) |
RGBSpectrum | clamp (const RGBSpectrum &v) |
SampledSpectrum | clamp (const SampledSpectrum &v) |
T | triangle (uint32_t level, float s, float t) const |
T | EWA (uint32_t level, float s, float t, float ds0, float dt0, float ds1, float dt1) const |
Private Attributes | |
bool | doTrilinear |
float | maxAnisotropy |
ImageWrap | wrapMode |
BlockedArray< T > ** | pyramid |
uint32_t | width |
uint32_t | height |
uint32_t | nLevels |
Static Private Attributes | |
static float * | weightLut = NULL |
Definition at line 42 of file mipmap.h.
MIPMap< T >::MIPMap | ( | uint32_t | xres, | |
uint32_t | yres, | |||
const T * | data, | |||
bool | doTri = false , |
|||
float | maxAniso = 8.f , |
|||
ImageWrap | wrapMode = TEXTURE_REPEAT | |||
) | [inline] |
Definition at line 104 of file mipmap.h.
References MIPMap< T >::clamp(), Clamp(), MIPMap< T >::doTrilinear, MIPMap< T >::ResampleWeight::firstTexel, MIPMap< T >::height, IsPowerOf2(), Log2Int(), MIPMap< T >::maxAnisotropy, Mod(), MIPMap< T >::nLevels, MIPMap< T >::pyramid, MIPMap< T >::resampleWeights(), RoundUpPow2(), MIPMap< T >::Texel(), TEXTURE_CLAMP, TEXTURE_REPEAT, MIPMap< T >::ResampleWeight::weight, WEIGHT_LUT_SIZE, MIPMap< T >::weightLut, MIPMap< T >::width, and MIPMap< T >::wrapMode.
Definition at line 223 of file mipmap.h.
References MIPMap< T >::nLevels, and MIPMap< T >::pyramid.
SampledSpectrum MIPMap< T >::clamp | ( | const SampledSpectrum & | v | ) | [inline, private] |
RGBSpectrum MIPMap< T >::clamp | ( | const RGBSpectrum & | v | ) | [inline, private] |
float MIPMap< T >::clamp | ( | float | v | ) | [inline, private] |
Definition at line 80 of file mipmap.h.
Referenced by MIPMap< T >::MIPMap().
T MIPMap< T >::EWA | ( | uint32_t | level, | |
float | s, | |||
float | t, | |||
float | ds0, | |||
float | dt0, | |||
float | ds1, | |||
float | dt1 | |||
) | const [inline, private] |
Definition at line 312 of file mipmap.h.
References Ceil2Int(), Float2Int(), Floor2Int(), MIPMap< T >::nLevels, MIPMap< T >::pyramid, MIPMap< T >::Texel(), BlockedArray< T, logBlockSize >::uSize(), BlockedArray< T, logBlockSize >::vSize(), WEIGHT_LUT_SIZE, and MIPMap< T >::weightLut.
Referenced by MIPMap< T >::Lookup().
uint32_t MIPMap< T >::Height | ( | ) | const [inline] |
Definition at line 50 of file mipmap.h.
Referenced by InfiniteAreaLight::SHProject().
uint32_t MIPMap< T >::Levels | ( | ) | const [inline] |
T MIPMap< T >::Lookup | ( | float | s, | |
float | t, | |||
float | ds0, | |||
float | dt0, | |||
float | ds1, | |||
float | dt1 | |||
) | const [inline] |
Definition at line 265 of file mipmap.h.
References MIPMap< T >::doTrilinear, MIPMap< T >::EWA(), Floor2Int(), Log2(), MIPMap< T >::Lookup(), MIPMap< T >::maxAnisotropy, MIPMap< T >::nLevels, and MIPMap< T >::triangle().
T MIPMap< T >::Lookup | ( | float | s, | |
float | t, | |||
float | width = 0.f | |||
) | const [inline] |
Definition at line 231 of file mipmap.h.
References Floor2Int(), Log2(), MIPMap< T >::nLevels, MIPMap< T >::Texel(), and MIPMap< T >::triangle().
Referenced by ImageTexture< Tmemory, Treturn >::Evaluate(), InfiniteAreaLight::InfiniteAreaLight(), InfiniteAreaLight::Le(), MIPMap< T >::Lookup(), ProjectionLight::Power(), InfiniteAreaLight::Power(), GonioPhotometricLight::Power(), ProjectionLight::Projection(), InfiniteAreaLight::Sample_L(), and GonioPhotometricLight::Scale().
ResampleWeight* MIPMap< T >::resampleWeights | ( | uint32_t | oldres, | |
uint32_t | newres | |||
) | [inline, private] |
Definition at line 59 of file mipmap.h.
Referenced by MIPMap< T >::MIPMap().
const T & MIPMap< T >::Texel | ( | uint32_t | level, | |
int | s, | |||
int | t | |||
) | const [inline] |
Definition at line 196 of file mipmap.h.
References Assert, Clamp(), Mod(), MIPMap< T >::nLevels, MIPMap< T >::pyramid, TEXTURE_BLACK, TEXTURE_CLAMP, TEXTURE_REPEAT, BlockedArray< T, logBlockSize >::uSize(), BlockedArray< T, logBlockSize >::vSize(), and MIPMap< T >::wrapMode.
Referenced by MIPMap< T >::EWA(), MIPMap< T >::Lookup(), MIPMap< T >::MIPMap(), InfiniteAreaLight::SHProject(), and MIPMap< T >::triangle().
T MIPMap< T >::triangle | ( | uint32_t | level, | |
float | s, | |||
float | t | |||
) | const [inline, private] |
Definition at line 251 of file mipmap.h.
References Clamp(), Floor2Int(), MIPMap< T >::nLevels, MIPMap< T >::pyramid, MIPMap< T >::Texel(), BlockedArray< T, logBlockSize >::uSize(), and BlockedArray< T, logBlockSize >::vSize().
Referenced by MIPMap< T >::Lookup().
uint32_t MIPMap< T >::Width | ( | ) | const [inline] |
Definition at line 49 of file mipmap.h.
Referenced by InfiniteAreaLight::SHProject().
bool MIPMap< T >::doTrilinear [private] |
Definition at line 87 of file mipmap.h.
Referenced by MIPMap< T >::Lookup(), and MIPMap< T >::MIPMap().
Definition at line 95 of file mipmap.h.
Referenced by MIPMap< RGBSpectrum >::Height(), MIPMap< T >::MIPMap(), and MIPMap< RGBSpectrum >::MIPMap().
float MIPMap< T >::maxAnisotropy [private] |
Definition at line 88 of file mipmap.h.
Referenced by MIPMap< T >::Lookup(), and MIPMap< T >::MIPMap().
Definition at line 95 of file mipmap.h.
Referenced by MIPMap< T >::EWA(), MIPMap< RGBSpectrum >::Levels(), MIPMap< T >::Lookup(), MIPMap< T >::MIPMap(), MIPMap< RGBSpectrum >::MIPMap(), MIPMap< T >::Texel(), MIPMap< T >::triangle(), and MIPMap< T >::~MIPMap().
BlockedArray<T>** MIPMap< T >::pyramid [private] |
Definition at line 94 of file mipmap.h.
Referenced by MIPMap< T >::EWA(), MIPMap< T >::MIPMap(), MIPMap< RGBSpectrum >::MIPMap(), MIPMap< T >::Texel(), MIPMap< T >::triangle(), and MIPMap< T >::~MIPMap().
Definition at line 97 of file mipmap.h.
Referenced by MIPMap< T >::EWA(), and MIPMap< T >::MIPMap().
Definition at line 95 of file mipmap.h.
Referenced by MIPMap< T >::MIPMap(), MIPMap< RGBSpectrum >::MIPMap(), and MIPMap< RGBSpectrum >::Width().
Definition at line 89 of file mipmap.h.
Referenced by MIPMap< T >::MIPMap(), and MIPMap< T >::Texel().