#include <mipmap.h>
Public Member Functions | |
| MIPMap (int xres, int yres, const T *data, bool doTri=false, float maxAniso=8.f, ImageWrap wrapMode=TEXTURE_REPEAT) | |
| ~MIPMap () | |
| 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 (int oldres, int newres) |
| float | clamp (float v) |
| Spectrum | clamp (const Spectrum &v) |
| const T & | texel (int level, int s, int t) const |
| T | triangle (int level, float s, float t) const |
| T | EWA (float s, float t, float ds0, float dt0, float ds1, float dt1, int level) const |
Private Attributes | |
| bool | doTrilinear |
| float | maxAnisotropy |
| ImageWrap | wrapMode |
| BlockedArray< T > ** | pyramid |
| int | nLevels |
Static Private Attributes | |
| static float * | weightLut = NULL |
Classes | |
| struct | ResampleWeight |
Definition at line 35 of file mipmap.h.
| MIPMap< T >::MIPMap | ( | int | xres, | |
| int | yres, | |||
| const T * | data, | |||
| bool | doTri = false, |
|||
| float | maxAniso = 8.f, |
|||
| ImageWrap | wrapMode = TEXTURE_REPEAT | |||
| ) | [inline] |
Definition at line 87 of file mipmap.h.
References AllocAligned(), MIPMap< T >::clamp(), Clamp(), MIPMap< T >::doTrilinear, MIPMap< T >::ResampleWeight::firstTexel, 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, and MIPMap< T >::wrapMode.
| T MIPMap< T >::Lookup | ( | float | s, | |
| float | t, | |||
| float | width = 0.f | |||
| ) | const [inline] |
Definition at line 203 of file mipmap.h.
References Floor2Int(), Log2(), MIPMap< T >::nLevels, MIPMap< T >::texel(), and MIPMap< T >::triangle().
Referenced by InfiniteAreaLightIS::InfiniteAreaLightIS(), InfiniteAreaLightIS::Le(), InfiniteAreaLight::Le(), MIPMap< T >::Lookup(), HighContrastOp::Map(), ProjectionLight::Power(), InfiniteAreaLightIS::Power(), InfiniteAreaLight::Power(), GonioPhotometricLight::Power(), ProjectionLight::Projection(), InfiniteAreaLightIS::Sample_L(), and GonioPhotometricLight::Scale().
| T MIPMap< T >::Lookup | ( | float | s, | |
| float | t, | |||
| float | ds0, | |||
| float | dt0, | |||
| float | ds1, | |||
| float | dt1 | |||
| ) | const [inline] |
Definition at line 234 of file mipmap.h.
References MIPMap< T >::doTrilinear, MIPMap< T >::EWA(), Floor2Int(), Log2(), MIPMap< T >::Lookup(), MIPMap< T >::maxAnisotropy, and MIPMap< T >::nLevels.
| ResampleWeight* MIPMap< T >::resampleWeights | ( | int | oldres, | |
| int | newres | |||
| ) | [inline, private] |
| float MIPMap< T >::clamp | ( | float | v | ) | [inline, private] |
| const T & MIPMap< T >::texel | ( | int | level, | |
| int | s, | |||
| int | t | |||
| ) | const [inline, private] |
Definition at line 174 of file mipmap.h.
References Clamp(), Mod(), 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(), and MIPMap< T >::triangle().
| T MIPMap< T >::triangle | ( | int | level, | |
| float | s, | |||
| float | t | |||
| ) | const [inline, private] |
Definition at line 222 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().
| T MIPMap< T >::EWA | ( | float | s, | |
| float | t, | |||
| float | ds0, | |||
| float | dt0, | |||
| float | ds1, | |||
| float | dt1, | |||
| int | level | |||
| ) | const [inline, private] |
Definition at line 267 of file mipmap.h.
References StatsRatio::Add(), 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().
bool MIPMap< T >::doTrilinear [private] |
Definition at line 73 of file mipmap.h.
Referenced by MIPMap< T >::Lookup(), and MIPMap< T >::MIPMap().
float MIPMap< T >::maxAnisotropy [private] |
Definition at line 74 of file mipmap.h.
Referenced by MIPMap< T >::Lookup(), and MIPMap< T >::MIPMap().
Definition at line 75 of file mipmap.h.
Referenced by MIPMap< T >::MIPMap(), and MIPMap< T >::texel().
BlockedArray<T>** MIPMap< T >::pyramid [private] |
Definition at line 80 of file mipmap.h.
Referenced by MIPMap< T >::EWA(), MIPMap< T >::MIPMap(), MIPMap< T >::texel(), MIPMap< T >::triangle(), and MIPMap< T >::~MIPMap().
Definition at line 81 of file mipmap.h.
Referenced by MIPMap< T >::EWA(), MIPMap< T >::Lookup(), MIPMap< T >::MIPMap(), MIPMap< T >::triangle(), and MIPMap< T >::~MIPMap().
Definition at line 83 of file mipmap.h.
Referenced by MIPMap< T >::EWA(), and MIPMap< T >::MIPMap().
1.5.6