HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TIL_TextureMap Class Reference

#include <TIL_TextureMap.h>

Public Member Functions

 TIL_TextureMap (const char *mapname=0, const char *relativeTo=0, TIL_Raster *rp=0)
 
virtual ~TIL_TextureMap ()
 
void setOpCaller (UT_OpCaller *c)
 
void setMap (const char *name, const char *relativeTo, TIL_Raster *rp=0, bool always_resolve=true)
 
void clearRaster ()
 
void forceReload (void)
 
const char * getMap (void) const
 
const TIL_RastergetOGLRaster ()
 
TIL_TextureOptions getTextureOptions () const
 
void getResolution (int &x, int &y)
 
int getNChannels () const
 
void setColorChannelName (const char *name)
 
const char * getColorChannelName () const
 
void setFaceIndex (int index)
 
int getFaceIndex () const
 
void setPtexChannel (int index)
 
int getPtexChannel () const
 
TIL_PtexOrient ptexOrient () const
 
void setPtexOrient (TIL_PtexOrient o)
 
void setFilter (UT_FilterType filter, float xw, float yw)
 
void setXFilter (UT_FilterType filter)
 
void setYFilter (UT_FilterType filter)
 
void setFilterWidths (float xwidth, float ywidth)
 
void setFilterBlurs (float xblur, float yblur)
 
void setMipInterpolate (int onoff)
 
void setWrapMode (UT_FilterWrap uwrap, UT_FilterWrap vwrap, const UT_Vector4 &border)
 
void setDeepInterp (IMG_DeepInterp interp)
 
void setBeerLambert (bool beerlambert)
 
void setSourceColorSpace (IMG_ColorSpace convert)
 
void setFilterMode (IMG_TextureFilter::FilterMode m)
 
void setZSkew (float zskew)
 
const UT_FiltergetXFilter () const
 
const UT_FiltergetYFilter () const
 
float getXFilterWidth () const
 
float getYFilterWidth () const
 
void setColorLookup (bool interp=true, bool needalpha=true)
 
void setBumpLookup (bool interp=false, TIL_BUMP_COMPUTE_TYPE type=TIL_BUMP_PRECOMPUTE)
 
UT_FilterWrap getUWrap () const
 
UT_FilterWrap getVWrap () const
 
const UT_Vector4getBorder () const
 
bool isDefault () const
 
int isTTMap () const
 
int isDSM () const
 
bool isPtex () const
 
int isIES () const
 
TIL_TextureHandle getLookupHandle () const
 
const IMG_TextureFiltergetFilter () const
 Query filter information. More...
 
IMG_TextureFiltergetFilter ()
 
TIL_BUMP_COMPUTE_TYPE getBumpCompute () const
 
bool getInterpRequired () const
 
bool getAlphaRequired () const
 
bool isVolatileTexture () const
 
bool hasTextureChanged (const TIL_Raster **newraster=0)
 
IMG_FilegetFile ()
 
IMG_FileTTMapgetTTMap ()
 
int getColorChannelIndex (IMG_FileTTMap *map) const
 
template<typename T >
void colorLookup (float u, float v, UT_Vector4T< T > &clr) const
 
template<typename T >
void colorLookup (const float u[4], const float v[4], UT_Vector4T< T > &clr) const
 
fpreal depthLookup (float u, float v, float farvalue=1E6) const
 
template<typename T >
void bumpLookup (float u, float v, T &du, T &dv) const
 
template<typename T >
void envLookup (const UT_Vector3T< T > &R, fpreal angle, UT_Vector4T< T > &clr) const
 
template<typename T >
void envLookup (const UT_Vector3T< T > &r00, const UT_Vector3T< T > &r10, const UT_Vector3T< T > &r11, const UT_Vector3T< T > &r01, UT_Vector4T< T > &clr) const
 
void colorLookup (TIL_TextureHandle &h, float u, float v, UT_Vector4F &clr) const
 
void colorLookup (TIL_TextureHandle &h, float u, float v, UT_Vector4D &clr) const
 
void colorLookup (TIL_TextureHandle &h, const float u[4], const float v[4], UT_Vector4F &clr) const
 
void colorLookup (TIL_TextureHandle &h, const float u[4], const float v[4], UT_Vector4D &clr) const
 
float depthLookup (TIL_TextureHandle &h, float u, float v, float farvalue=1E6) const
 
void bumpLookup (TIL_TextureHandle &h, float u, float v, fpreal32 &du, fpreal32 &dv) const
 
void bumpLookup (TIL_TextureHandle &h, float u, float v, fpreal64 &du, fpreal64 &dv) const
 
void envLookup (TIL_TextureHandle &h, const UT_Vector3F &R, fpreal angle, UT_Vector4F &clr) const
 
void envLookup (TIL_TextureHandle &h, const UT_Vector3D &R, fpreal angle, UT_Vector4D &clr) const
 
void envLookup (TIL_TextureHandle &h, const UT_Vector3F &r00, const UT_Vector3F &r10, const UT_Vector3F &r11, const UT_Vector3F &r01, UT_Vector4 &clr) const
 
void envLookup (TIL_TextureHandle &h, const UT_Vector3D &r00, const UT_Vector3D &r10, const UT_Vector3D &r11, const UT_Vector3D &r01, UT_Vector4D &clr) const
 
void getResolution (const TIL_TextureHandle &h, int &x, int &y)
 
void deepLookup (TIL_TextureHandle &h, UT_Vector3F &clr, const UT_Vector3F &p, const UT_Vector3F &du, const UT_Vector3F &dv, float quality, int maxsamples)
 
void deepLookup (TIL_TextureHandle &h, UT_Vector3D &clr, const UT_Vector3D &p, const UT_Vector3D &du, const UT_Vector3D &dv, float quality, int maxsamples)
 

Static Public Member Functions

static UT_StringHolder expandUDIM (const char *format, int iu, int iv)
 
static const TIL_MissingTexturesetMissingTexture (const TIL_MissingTexture *m)
 

Friends

class ut_Map
 

Detailed Description

Definition at line 238 of file TIL_TextureMap.h.

Constructor & Destructor Documentation

TIL_TextureMap::TIL_TextureMap ( const char *  mapname = 0,
const char *  relativeTo = 0,
TIL_Raster rp = 0 
)
virtual TIL_TextureMap::~TIL_TextureMap ( )
virtual

Member Function Documentation

template<typename T >
void TIL_TextureMap::bumpLookup ( float  u,
float  v,
T du,
T dv 
) const
inline

Evaluate using an automatic lookup handle

Definition at line 371 of file TIL_TextureMap.h.

void TIL_TextureMap::bumpLookup ( TIL_TextureHandle h,
float  u,
float  v,
fpreal32 du,
fpreal32 dv 
) const

Evaluate using a lookup handle

void TIL_TextureMap::bumpLookup ( TIL_TextureHandle h,
float  u,
float  v,
fpreal64 du,
fpreal64 dv 
) const

Evaluate using a lookup handle

void TIL_TextureMap::clearRaster ( )
template<typename T >
void TIL_TextureMap::colorLookup ( float  u,
float  v,
UT_Vector4T< T > &  clr 
) const
inline

Evaluate using an automatic lookup handle

Definition at line 352 of file TIL_TextureMap.h.

template<typename T >
void TIL_TextureMap::colorLookup ( const float  u[4],
const float  v[4],
UT_Vector4T< T > &  clr 
) const
inline

Evaluate using an automatic lookup handle

Definition at line 358 of file TIL_TextureMap.h.

void TIL_TextureMap::colorLookup ( TIL_TextureHandle h,
float  u,
float  v,
UT_Vector4F clr 
) const

Evaluate using a lookup handle

void TIL_TextureMap::colorLookup ( TIL_TextureHandle h,
float  u,
float  v,
UT_Vector4D clr 
) const

Evaluate using a lookup handle

void TIL_TextureMap::colorLookup ( TIL_TextureHandle h,
const float  u[4],
const float  v[4],
UT_Vector4F clr 
) const

Evaluate using a lookup handle

void TIL_TextureMap::colorLookup ( TIL_TextureHandle h,
const float  u[4],
const float  v[4],
UT_Vector4D clr 
) const

Evaluate using a lookup handle

void TIL_TextureMap::deepLookup ( TIL_TextureHandle h,
UT_Vector3F clr,
const UT_Vector3F p,
const UT_Vector3F du,
const UT_Vector3F dv,
float  quality,
int  maxsamples 
)

Deep shadow lookup will fall back to regular depth map lookups if this map is not a deep shadow map.

void TIL_TextureMap::deepLookup ( TIL_TextureHandle h,
UT_Vector3D clr,
const UT_Vector3D p,
const UT_Vector3D du,
const UT_Vector3D dv,
float  quality,
int  maxsamples 
)

Deep shadow lookup will fall back to regular depth map lookups if this map is not a deep shadow map.

fpreal TIL_TextureMap::depthLookup ( float  u,
float  v,
float  farvalue = 1E6 
) const
inline

Evaluate using an automatic lookup handle

Definition at line 364 of file TIL_TextureMap.h.

float TIL_TextureMap::depthLookup ( TIL_TextureHandle h,
float  u,
float  v,
float  farvalue = 1E6 
) const

Evaluate using a lookup handle

template<typename T >
void TIL_TextureMap::envLookup ( const UT_Vector3T< T > &  R,
fpreal  angle,
UT_Vector4T< T > &  clr 
) const
inline

Evaluate using an automatic lookup handle

Definition at line 379 of file TIL_TextureMap.h.

template<typename T >
void TIL_TextureMap::envLookup ( const UT_Vector3T< T > &  r00,
const UT_Vector3T< T > &  r10,
const UT_Vector3T< T > &  r11,
const UT_Vector3T< T > &  r01,
UT_Vector4T< T > &  clr 
) const
inline

Evaluate using an automatic lookup handle

Definition at line 387 of file TIL_TextureMap.h.

void TIL_TextureMap::envLookup ( TIL_TextureHandle h,
const UT_Vector3F R,
fpreal  angle,
UT_Vector4F clr 
) const

Evaluate using a lookup handle

void TIL_TextureMap::envLookup ( TIL_TextureHandle h,
const UT_Vector3D R,
fpreal  angle,
UT_Vector4D clr 
) const

Evaluate using a lookup handle

void TIL_TextureMap::envLookup ( TIL_TextureHandle h,
const UT_Vector3F r00,
const UT_Vector3F r10,
const UT_Vector3F r11,
const UT_Vector3F r01,
UT_Vector4 clr 
) const

Evaluate using a lookup handle

void TIL_TextureMap::envLookup ( TIL_TextureHandle h,
const UT_Vector3D r00,
const UT_Vector3D r10,
const UT_Vector3D r11,
const UT_Vector3D r01,
UT_Vector4D clr 
) const

Evaluate using a lookup handle

static UT_StringHolder TIL_TextureMap::expandUDIM ( const char *  format,
int  iu,
int  iv 
)
static

Expand a file containing %(UDIM)d, %(U)d or %(V)d formatting characters The iu and iv parameters passed in are the zero-based coordinates (i.e. UDIM == (1000 + iu+1+ 10*iv) and U == iu+1).

For example: expandUDIM("%s/%s_%(UDIM)%d_%(U)02d_%(V)d.rat", 3, 7) will return "%s/%s_1074_04_8.rat"

void TIL_TextureMap::forceReload ( void  )
bool TIL_TextureMap::getAlphaRequired ( ) const
inline

Definition at line 465 of file TIL_TextureMap.h.

const UT_Vector4& TIL_TextureMap::getBorder ( ) const
inline

Definition at line 323 of file TIL_TextureMap.h.

TIL_BUMP_COMPUTE_TYPE TIL_TextureMap::getBumpCompute ( ) const
inline

Definition at line 459 of file TIL_TextureMap.h.

int TIL_TextureMap::getColorChannelIndex ( IMG_FileTTMap map) const
const char* TIL_TextureMap::getColorChannelName ( ) const
int TIL_TextureMap::getFaceIndex ( ) const
inline

Definition at line 277 of file TIL_TextureMap.h.

IMG_File* TIL_TextureMap::getFile ( )
const IMG_TextureFilter& TIL_TextureMap::getFilter ( ) const
inline

Query filter information.

Definition at line 455 of file TIL_TextureMap.h.

IMG_TextureFilter& TIL_TextureMap::getFilter ( )
inline

Definition at line 456 of file TIL_TextureMap.h.

bool TIL_TextureMap::getInterpRequired ( ) const
inline

Definition at line 464 of file TIL_TextureMap.h.

TIL_TextureHandle TIL_TextureMap::getLookupHandle ( ) const

When performing multiple texture evaluations, this allows the texture class to pre-compute some common values rather than performing the computation on every lookup.

const char* TIL_TextureMap::getMap ( void  ) const
int TIL_TextureMap::getNChannels ( ) const
const TIL_Raster* TIL_TextureMap::getOGLRaster ( )
int TIL_TextureMap::getPtexChannel ( ) const
inline

Definition at line 280 of file TIL_TextureMap.h.

void TIL_TextureMap::getResolution ( int x,
int y 
)
inline

Definition at line 267 of file TIL_TextureMap.h.

void TIL_TextureMap::getResolution ( const TIL_TextureHandle h,
int x,
int y 
)

Evaluate using a lookup handle

TIL_TextureOptions TIL_TextureMap::getTextureOptions ( ) const
IMG_FileTTMap* TIL_TextureMap::getTTMap ( )
UT_FilterWrap TIL_TextureMap::getUWrap ( ) const
inline

Definition at line 321 of file TIL_TextureMap.h.

UT_FilterWrap TIL_TextureMap::getVWrap ( ) const
inline

Definition at line 322 of file TIL_TextureMap.h.

const UT_Filter* TIL_TextureMap::getXFilter ( ) const
inline

Definition at line 301 of file TIL_TextureMap.h.

float TIL_TextureMap::getXFilterWidth ( ) const
inline

Definition at line 303 of file TIL_TextureMap.h.

const UT_Filter* TIL_TextureMap::getYFilter ( ) const
inline

Definition at line 302 of file TIL_TextureMap.h.

float TIL_TextureMap::getYFilterWidth ( ) const
inline

Definition at line 304 of file TIL_TextureMap.h.

bool TIL_TextureMap::hasTextureChanged ( const TIL_Raster **  newraster = 0)
bool TIL_TextureMap::isDefault ( ) const
int TIL_TextureMap::isDSM ( ) const
int TIL_TextureMap::isIES ( ) const
bool TIL_TextureMap::isPtex ( ) const
int TIL_TextureMap::isTTMap ( ) const
bool TIL_TextureMap::isVolatileTexture ( ) const
TIL_PtexOrient TIL_TextureMap::ptexOrient ( ) const
inline

Definition at line 283 of file TIL_TextureMap.h.

void TIL_TextureMap::setBeerLambert ( bool  beerlambert)
void TIL_TextureMap::setBumpLookup ( bool  interp = false,
TIL_BUMP_COMPUTE_TYPE  type = TIL_BUMP_PRECOMPUTE 
)
inline

Definition at line 314 of file TIL_TextureMap.h.

void TIL_TextureMap::setColorChannelName ( const char *  name)
void TIL_TextureMap::setColorLookup ( bool  interp = true,
bool  needalpha = true 
)
inline

Definition at line 308 of file TIL_TextureMap.h.

void TIL_TextureMap::setDeepInterp ( IMG_DeepInterp  interp)
void TIL_TextureMap::setFaceIndex ( int  index)
void TIL_TextureMap::setFilter ( UT_FilterType  filter,
float  xw,
float  yw 
)
void TIL_TextureMap::setFilterBlurs ( float  xblur,
float  yblur 
)
void TIL_TextureMap::setFilterMode ( IMG_TextureFilter::FilterMode  m)
void TIL_TextureMap::setFilterWidths ( float  xwidth,
float  ywidth 
)
void TIL_TextureMap::setMap ( const char *  name,
const char *  relativeTo,
TIL_Raster rp = 0,
bool  always_resolve = true 
)
void TIL_TextureMap::setMipInterpolate ( int  onoff)
static const TIL_MissingTexture* TIL_TextureMap::setMissingTexture ( const TIL_MissingTexture m)
static

Set the callback for missing textures. This returns the previous callback.

void TIL_TextureMap::setOpCaller ( UT_OpCaller c)
inline

Definition at line 258 of file TIL_TextureMap.h.

void TIL_TextureMap::setPtexChannel ( int  index)
void TIL_TextureMap::setPtexOrient ( TIL_PtexOrient  o)
inline

Definition at line 284 of file TIL_TextureMap.h.

void TIL_TextureMap::setSourceColorSpace ( IMG_ColorSpace  convert)
void TIL_TextureMap::setWrapMode ( UT_FilterWrap  uwrap,
UT_FilterWrap  vwrap,
const UT_Vector4 border 
)
void TIL_TextureMap::setXFilter ( UT_FilterType  filter)
void TIL_TextureMap::setYFilter ( UT_FilterType  filter)
void TIL_TextureMap::setZSkew ( float  zskew)

Friends And Related Function Documentation

friend class ut_Map
friend

Definition at line 512 of file TIL_TextureMap.h.


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