Ptex
|
Per-face texture data accessor. More...
#include <Ptexture.h>
Public Member Functions | |
virtual void | release ()=0 |
Release resources held by this pointer (pointer becomes invalid). | |
virtual bool | isConstant ()=0 |
True if this data block is constant. More... | |
virtual Ptex::Res | res ()=0 |
Resolution of the texture held by this data block. More... | |
virtual void | getPixel (int u, int v, void *result)=0 |
Read a single texel from the data block. More... | |
virtual void * | getData ()=0 |
Access the data from this data block. More... | |
virtual bool | isTiled ()=0 |
True if this data block is tiled. More... | |
virtual Ptex::Res | tileRes ()=0 |
Resolution of each tile in this data block. More... | |
virtual PtexFaceData * | getTile (int tile)=0 |
Access a tile from the data block. More... | |
Protected Member Functions | |
virtual | ~PtexFaceData () |
Destructor not for public use. Use release() instead. | |
Per-face texture data accessor.
Per-face texture data is acquired from PtexTexture and accessed through this interface. This interface provides low-level access to the data as stored on disk for maximum efficiency. If this isn't needed, face data can be more conveniently read directly from PtexTexture.
|
pure virtual |
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.
|
pure virtual |
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.
|
pure virtual |
Access a tile from the data block.
Tiles are accessed in v-major order.
|
pure virtual |
True if this data block is constant.
|
pure virtual |
True if this data block is tiled.
If tiled, the data must be access per-tile via getTile().
|
pure virtual |
Resolution of the texture held by this data block.
Note: the indicated texture res may be larger than 1x1 even if the texture data is constant.
|
pure virtual |
Resolution of each tile in this data block.