Ptex
|
#include <PtexReader.h>
Public Member Functions | |
PackedFace (void **parent, PtexCacheImpl *cache, Res res, int pixelsize, int size) | |
void * | data () |
virtual bool | isConstant () |
True if this data block is constant. More... | |
virtual void | getPixel (int u, int v, void *result) |
Read a single texel from the data block. More... | |
virtual void * | getData () |
Access the data from this data block. More... | |
virtual bool | isTiled () |
True if this data block is tiled. More... | |
virtual Ptex::Res | tileRes () |
Resolution of each tile in this data block. More... | |
virtual PtexFaceData * | getTile (int) |
Access a tile from the data block. More... | |
virtual void | reduce (FaceData *&, PtexReader *, Res newres, PtexUtils::ReduceFn) |
![]() | |
FaceData (void **parent, PtexCacheImpl *cache, Res res, int size) | |
virtual void | release () |
Release resources held by this pointer (pointer becomes invalid). More... | |
virtual Ptex::Res | res () |
Resolution of the texture held by this data block. More... | |
virtual void | reduce (FaceData *&, PtexReader *, Res newres, PtexUtils::ReduceFn)=0 |
![]() | |
PtexCachedData (void **parent, PtexCacheImpl *cache, int size) | |
void | ref () |
void | unref () |
![]() | |
bool | inuse () |
void | orphan () |
Protected Member Functions | |
virtual | ~PackedFace () |
![]() | |
void | incSize (int size) |
virtual | ~PtexCachedData () |
![]() | |
PtexLruItem (void **parent=0) | |
virtual | ~PtexLruItem () |
![]() | |
virtual | ~PtexFaceData () |
Destructor not for public use. Use release() instead. More... | |
Protected Attributes | |
int | _pixelsize |
void * | _data |
![]() | |
Res | _res |
![]() | |
PtexCacheImpl * | _cache |
Additional Inherited Members | |
![]() | |
template<typename T > | |
static void | orphanList (T &list) |
Definition at line 302 of file PtexReader.h.
|
inline |
Definition at line 304 of file PtexReader.h.
|
inlineprotectedvirtual |
Definition at line 321 of file PtexReader.h.
|
inline |
Definition at line 307 of file PtexReader.h.
Referenced by PtexReader::readFaceData().
|
inlinevirtual |
Access the data from this data block.
If the data block is constant, getData will return a pointer to a single texel's data value.
If the data block is tiled, then getData will return null and the data must be accessed per-tile via the getTile() function.
Implements PtexFaceData.
Definition at line 313 of file PtexReader.h.
Referenced by PtexReader::blendFaces().
|
inlinevirtual |
Read a single texel from the data block.
The texel coordinates, u and v, have a range of [0..ures-1, 0..vres-1]. Note: this method will work correctly even if the face is constant or tiled.
Implements PtexFaceData.
Reimplemented in PtexReader::ConstantFace.
Definition at line 309 of file PtexReader.h.
|
inlinevirtual |
Access a tile from the data block.
Tiles are accessed in v-major order.
Implements PtexFaceData.
Definition at line 316 of file PtexReader.h.
|
inlinevirtual |
True if this data block is constant.
Implements PtexFaceData.
Reimplemented in PtexReader::ConstantFace.
Definition at line 308 of file PtexReader.h.
|
inlinevirtual |
True if this data block is tiled.
If tiled, the data must be access per-tile via getTile().
Implements PtexFaceData.
Definition at line 314 of file PtexReader.h.
|
virtual |
Reimplemented in PtexReader::ConstantFace.
Definition at line 1100 of file PtexReader.cpp.
References PtexCachedFile::_cache, _data, PtexReader::_pixelsize, PtexCacheImpl::cachelock, PtexReader::datatype(), PtexReader::nchannels(), PtexCacheImpl::purgeData(), PtexReader::reducelock, PtexCachedData::ref(), Ptex::Res::size(), and Ptex::Res::u().
|
inlinevirtual |
Resolution of each tile in this data block.
Implements PtexFaceData.
Definition at line 315 of file PtexReader.h.
|
protected |
Definition at line 324 of file PtexReader.h.
Referenced by reduce(), and PtexReader::ConstantFace::reduce().
|
protected |
Definition at line 323 of file PtexReader.h.