lux::MIPMapImpl< T, U > Class Template Reference

#include <mipmap.h>

Inheritance diagram for lux::MIPMapImpl< T, U >:

lux::MIPMap< T >

List of all members.

Classes

struct  ResampleWeight

Public Member Functions

 MIPMapImpl (ImageTextureFilterType type, int xres, int yres, const U *data, float maxAniso=8.f, ImageWrap wrapMode=TEXTURE_REPEAT, float gain=1.f, float gamma=1.0f)
 ~MIPMapImpl ()
Lookup (float s, float t, float width=0.f) const
Lookup (float s, float t, float ds0, float dt0, float ds1, float dt1) const
u_int getMemoryUsed () const
void discardMipmaps (int n)

Protected Member Functions

const U & texelInternal (int level, int s, int t) const
const T texel (int level, int s, int t) const
const U & texelInternal (int s, int t) const
const T texel (int s, int t) const
virtual void convert (Spectrum &outputValue, const TextureColor< unsigned char, 1 > &internalValue) const
virtual void convert (Spectrum &outputValue, const TextureColor< unsigned char, 3 > &internalValue) const
virtual void convert (Spectrum &outputValue, const TextureColor< unsigned char, 4 > &internalValue) const
virtual void convert (Spectrum &outputValue, const TextureColor< unsigned short, 1 > &internalValue) const
virtual void convert (Spectrum &outputValue, const TextureColor< unsigned short, 3 > &internalValue) const
virtual void convert (Spectrum &outputValue, const TextureColor< unsigned short, 4 > &internalValue) const
virtual void convert (Spectrum &outputValue, const TextureColor< float, 1 > &internalValue) const
virtual void convert (Spectrum &outputValue, const TextureColor< float, 3 > &internalValue) const
virtual void convert (Spectrum &outputValue, const TextureColor< float, 4 > &internalValue) const
virtual void convert (Spectrum &outputValue, const Spectrum &internalValue) const
template<class V , int n>
void convert (float &outputValue, const TextureColor< V, n > &internalValue) const
virtual void convert (float &outputValue, const float internalValue) const

Static Protected Attributes

static float invMaxUnsignedChar = 1.0f / (std::numeric_limits<unsigned char>::max() - 1)
static float invMaxUnsignedShort = 1.0f / (std::numeric_limits<unsigned short>::max() - 1)

Private Member Functions

ResampleWeightresampleWeights (int oldres, int newres)
int uSize (int level) const
int vSize (int level) const
triangle (int level, float s, float t) const
triangle (float s, float t) const
nearest (float s, float t) const
EWA (float s, float t, float ds0, float dt0, float ds1, float dt1, int level) const
float clamp (float v)
Spectrum clamp (const Spectrum &v)
TextureColor< unsigned char, 1 > clamp (const TextureColor< unsigned char, 1 > &v)
TextureColor< unsigned char, 3 > clamp (const TextureColor< unsigned char, 3 > &v)
TextureColor< unsigned char, 4 > clamp (const TextureColor< unsigned char, 4 > &v)
TextureColor< unsigned short, 1 > clamp (const TextureColor< unsigned short, 1 > &v)
TextureColor< unsigned short, 3 > clamp (const TextureColor< unsigned short, 3 > &v)
TextureColor< unsigned short, 4 > clamp (const TextureColor< unsigned short, 4 > &v)
TextureColor< float, 1 > clamp (const TextureColor< float, 1 > &v)
TextureColor< float, 3 > clamp (const TextureColor< float, 3 > &v)
TextureColor< float, 4 > clamp (const TextureColor< float, 4 > &v)

Private Attributes

ImageTextureFilterType filterType
float maxAnisotropy
float gain
float gamma
ImageWrap wrapMode
int nLevels
union {
   BlockedArray< U > **   pyramid
   BlockedArray< U > *   singleMap
}; 

Static Private Attributes

static float * weightLut = NULL


Detailed Description

template<class T, class U>
class lux::MIPMapImpl< T, U >

Definition at line 63 of file mipmap.h.


Constructor & Destructor Documentation

template<class T , class U>
lux::MIPMapImpl< T, U >::MIPMapImpl ( ImageTextureFilterType  type,
int  xres,
int  yres,
const U *  data,
float  maxAniso = 8.f,
ImageWrap  wrapMode = TEXTURE_REPEAT,
float  gain = 1.f,
float  gamma = 1.0f 
) [inline]

template<class T , class U >
lux::MIPMapImpl< T, U >::~MIPMapImpl (  )  [inline]


Member Function Documentation

template<class T, class U>
TextureColor<float, 4> lux::MIPMapImpl< T, U >::clamp ( const TextureColor< float, 4 > &  v  )  [inline, private]

Definition at line 272 of file mipmap.h.

template<class T, class U>
TextureColor<float, 3> lux::MIPMapImpl< T, U >::clamp ( const TextureColor< float, 3 > &  v  )  [inline, private]

Definition at line 271 of file mipmap.h.

template<class T, class U>
TextureColor<float, 1> lux::MIPMapImpl< T, U >::clamp ( const TextureColor< float, 1 > &  v  )  [inline, private]

Definition at line 270 of file mipmap.h.

template<class T, class U>
TextureColor<unsigned short, 4> lux::MIPMapImpl< T, U >::clamp ( const TextureColor< unsigned short, 4 > &  v  )  [inline, private]

Definition at line 269 of file mipmap.h.

template<class T, class U>
TextureColor<unsigned short, 3> lux::MIPMapImpl< T, U >::clamp ( const TextureColor< unsigned short, 3 > &  v  )  [inline, private]

Definition at line 268 of file mipmap.h.

template<class T, class U>
TextureColor<unsigned short, 1> lux::MIPMapImpl< T, U >::clamp ( const TextureColor< unsigned short, 1 > &  v  )  [inline, private]

Definition at line 267 of file mipmap.h.

template<class T, class U>
TextureColor<unsigned char, 4> lux::MIPMapImpl< T, U >::clamp ( const TextureColor< unsigned char, 4 > &  v  )  [inline, private]

Definition at line 266 of file mipmap.h.

template<class T, class U>
TextureColor<unsigned char, 3> lux::MIPMapImpl< T, U >::clamp ( const TextureColor< unsigned char, 3 > &  v  )  [inline, private]

Definition at line 265 of file mipmap.h.

template<class T, class U>
TextureColor<unsigned char, 1> lux::MIPMapImpl< T, U >::clamp ( const TextureColor< unsigned char, 1 > &  v  )  [inline, private]

Definition at line 264 of file mipmap.h.

template<class T, class U>
Spectrum lux::MIPMapImpl< T, U >::clamp ( const Spectrum v  )  [inline, private]

Definition at line 263 of file mipmap.h.

template<class T, class U>
float lux::MIPMapImpl< T, U >::clamp ( float  v  )  [inline, private]

Definition at line 262 of file mipmap.h.

Referenced by lux::MIPMapImpl< T, U >::MIPMapImpl().

template<class T, class U>
virtual void lux::MIPMapImpl< T, U >::convert ( float &  outputValue,
const float  internalValue 
) const [inline, protected, virtual]

Reimplemented in lux::MIPMapFastImpl< T, U >.

Definition at line 201 of file mipmap.h.

template<class T, class U>
template<class V , int n>
void lux::MIPMapImpl< T, U >::convert ( float &  outputValue,
const TextureColor< V, n > &  internalValue 
) const [inline, protected]

Definition at line 195 of file mipmap.h.

template<class T, class U>
virtual void lux::MIPMapImpl< T, U >::convert ( Spectrum outputValue,
const Spectrum internalValue 
) const [inline, protected, virtual]

Reimplemented in lux::MIPMapFastImpl< T, U >.

Definition at line 189 of file mipmap.h.

template<class T, class U>
virtual void lux::MIPMapImpl< T, U >::convert ( Spectrum outputValue,
const TextureColor< float, 4 > &  internalValue 
) const [inline, protected, virtual]

Reimplemented in lux::MIPMapFastImpl< T, U >.

Definition at line 185 of file mipmap.h.

template<class T, class U>
virtual void lux::MIPMapImpl< T, U >::convert ( Spectrum outputValue,
const TextureColor< float, 3 > &  internalValue 
) const [inline, protected, virtual]

Reimplemented in lux::MIPMapFastImpl< T, U >.

Definition at line 181 of file mipmap.h.

template<class T, class U>
virtual void lux::MIPMapImpl< T, U >::convert ( Spectrum outputValue,
const TextureColor< float, 1 > &  internalValue 
) const [inline, protected, virtual]

Reimplemented in lux::MIPMapFastImpl< T, U >.

Definition at line 177 of file mipmap.h.

template<class T, class U>
virtual void lux::MIPMapImpl< T, U >::convert ( Spectrum outputValue,
const TextureColor< unsigned short, 4 > &  internalValue 
) const [inline, protected, virtual]

Reimplemented in lux::MIPMapFastImpl< T, U >.

Definition at line 167 of file mipmap.h.

template<class T, class U>
virtual void lux::MIPMapImpl< T, U >::convert ( Spectrum outputValue,
const TextureColor< unsigned short, 3 > &  internalValue 
) const [inline, protected, virtual]

Reimplemented in lux::MIPMapFastImpl< T, U >.

Definition at line 159 of file mipmap.h.

template<class T, class U>
virtual void lux::MIPMapImpl< T, U >::convert ( Spectrum outputValue,
const TextureColor< unsigned short, 1 > &  internalValue 
) const [inline, protected, virtual]

Reimplemented in lux::MIPMapFastImpl< T, U >.

Definition at line 154 of file mipmap.h.

template<class T, class U>
virtual void lux::MIPMapImpl< T, U >::convert ( Spectrum outputValue,
const TextureColor< unsigned char, 4 > &  internalValue 
) const [inline, protected, virtual]

Reimplemented in lux::MIPMapFastImpl< T, U >.

Definition at line 144 of file mipmap.h.

template<class T, class U>
virtual void lux::MIPMapImpl< T, U >::convert ( Spectrum outputValue,
const TextureColor< unsigned char, 3 > &  internalValue 
) const [inline, protected, virtual]

Reimplemented in lux::MIPMapFastImpl< T, U >.

Definition at line 136 of file mipmap.h.

template<class T, class U>
virtual void lux::MIPMapImpl< T, U >::convert ( Spectrum outputValue,
const TextureColor< unsigned char, 1 > &  internalValue 
) const [inline, protected, virtual]

Reimplemented in lux::MIPMapFastImpl< T, U >.

Definition at line 131 of file mipmap.h.

Referenced by lux::MIPMapImpl< T, U >::convert(), and lux::MIPMapImpl< T, U >::texel().

template<class T, class U>
void lux::MIPMapImpl< T, U >::discardMipmaps ( int  n  )  [inline, virtual]

Reimplemented from lux::MIPMap< T >.

Definition at line 93 of file mipmap.h.

template<class T , class U >
T lux::MIPMapImpl< T, U >::EWA ( float  s,
float  t,
float  ds0,
float  dt0,
float  ds1,
float  dt1,
int  level 
) const [inline, private]

template<class T, class U>
u_int lux::MIPMapImpl< T, U >::getMemoryUsed (  )  const [inline, virtual]

Implements lux::MIPMap< T >.

Definition at line 77 of file mipmap.h.

template<class T , class U >
T lux::MIPMapImpl< T, U >::Lookup ( float  s,
float  t,
float  ds0,
float  dt0,
float  ds1,
float  dt1 
) const [inline, virtual]

template<class T , class U >
T lux::MIPMapImpl< T, U >::Lookup ( float  s,
float  t,
float  width = 0.f 
) const [inline, virtual]

template<class T , class U >
T lux::MIPMapImpl< T, U >::nearest ( float  s,
float  t 
) const [inline, private]

template<class T, class U>
ResampleWeight* lux::MIPMapImpl< T, U >::resampleWeights ( int  oldres,
int  newres 
) [inline, private]

Definition at line 217 of file mipmap.h.

Referenced by lux::MIPMapImpl< T, U >::MIPMapImpl().

template<class T, class U>
const T lux::MIPMapImpl< T, U >::texel ( int  s,
int  t 
) const [inline, protected]

Definition at line 122 of file mipmap.h.

template<class T, class U>
const T lux::MIPMapImpl< T, U >::texel ( int  level,
int  s,
int  t 
) const [inline, protected]

template<class T , class U >
const U & lux::MIPMapImpl< T, U >::texelInternal ( int  s,
int  t 
) const [inline, protected]

template<class T , class U >
const U & lux::MIPMapImpl< T, U >::texelInternal ( int  level,
int  s,
int  t 
) const [inline, protected]

template<class T , class U >
T lux::MIPMapImpl< T, U >::triangle ( float  s,
float  t 
) const [inline, private]

Definition at line 324 of file mipmap.h.

References Floor2Int().

template<class T , class U >
T lux::MIPMapImpl< T, U >::triangle ( int  level,
float  s,
float  t 
) const [inline, private]

template<class T, class U>
int lux::MIPMapImpl< T, U >::uSize ( int  level  )  const [inline, private]

template<class T, class U>
int lux::MIPMapImpl< T, U >::vSize ( int  level  )  const [inline, private]


Member Data Documentation

union { ... } [private]

template<class T, class U>
ImageTextureFilterType lux::MIPMapImpl< T, U >::filterType [private]

template<class T, class U>
float lux::MIPMapImpl< T, U >::gain [private]

template<class T, class U>
float lux::MIPMapImpl< T, U >::gamma [private]

template<class T, class U>
float lux::MIPMapImpl< T, U >::invMaxUnsignedChar = 1.0f / (std::numeric_limits<unsigned char>::max() - 1) [inline, static, protected]

Definition at line 207 of file mipmap.h.

Referenced by lux::MIPMapImpl< T, U >::convert().

template<class T, class U>
float lux::MIPMapImpl< T, U >::invMaxUnsignedShort = 1.0f / (std::numeric_limits<unsigned short>::max() - 1) [inline, static, protected]

Definition at line 208 of file mipmap.h.

Referenced by lux::MIPMapImpl< T, U >::convert().

template<class T, class U>
float lux::MIPMapImpl< T, U >::maxAnisotropy [private]

Definition at line 248 of file mipmap.h.

Referenced by lux::MIPMapImpl< T, U >::MIPMapImpl().

template<class T, class U>
int lux::MIPMapImpl< T, U >::nLevels [private]

template<class T, class U>
BlockedArray<U>** lux::MIPMapImpl< T, U >::pyramid

template<class T, class U>
BlockedArray<U>* lux::MIPMapImpl< T, U >::singleMap

template<class T, class U>
float * lux::MIPMapImpl< T, U >::weightLut = NULL [inline, static, private]

Definition at line 259 of file mipmap.h.

Referenced by lux::MIPMapImpl< T, U >::EWA(), and lux::MIPMapImpl< T, U >::MIPMapImpl().

template<class T, class U>
ImageWrap lux::MIPMapImpl< T, U >::wrapMode [private]


The documentation for this class was generated from the following file:

Generated on Mon May 18 07:16:39 2009 for lux by  doxygen 1.5.8