Ptex
|
#include <PtexReader.h>
Public Member Functions | |
ConstDataPtr (void *data, int pixelsize) | |
virtual void | release () |
Release resources held by this pointer (pointer becomes invalid). | |
virtual Ptex::Res | res () |
Resolution of the texture held by this data block. | |
virtual bool | isConstant () |
True if this data block is constant. | |
virtual void | getPixel (int, int, void *result) |
Read a single texel from the data block. | |
virtual void * | getData () |
Access the data from this data block. | |
virtual bool | isTiled () |
True if this data block is tiled. | |
virtual Ptex::Res | tileRes () |
Resolution of each tile in this data block. | |
virtual PtexFaceData * | getTile (int) |
Access a tile from the data block. | |
virtual void | release ()=0 |
Release resources held by this pointer (pointer becomes invalid). | |
virtual bool | isConstant ()=0 |
True if this data block is constant. | |
virtual Ptex::Res | res ()=0 |
Resolution of the texture held by this data block. | |
virtual void | getPixel (int u, int v, void *result)=0 |
Read a single texel from the data block. | |
virtual void * | getData ()=0 |
Access the data from this data block. | |
virtual bool | isTiled ()=0 |
True if this data block is tiled. | |
virtual Ptex::Res | tileRes ()=0 |
Resolution of each tile in this data block. | |
virtual PtexFaceData * | getTile (int tile)=0 |
Access a tile from the data block. | |
Protected Attributes | |
void * | _data |
int | _pixelsize |
Additional Inherited Members | |
Protected Member Functions inherited from PtexFaceData | |
virtual | ~PtexFaceData () |
Destructor not for public use. Use release() instead. | |
Definition at line 345 of file PtexReader.h.
|
inline |
Definition at line 347 of file PtexReader.h.
|
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 354 of file PtexReader.h.
References _data.
|
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.
Definition at line 352 of file PtexReader.h.
References _data, and _pixelsize.
|
inlinevirtual |
Access a tile from the data block.
Tiles are accessed in v-major order.
Implements PtexFaceData.
Definition at line 357 of file PtexReader.h.
|
inlinevirtual |
True if this data block is constant.
Implements PtexFaceData.
Definition at line 351 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 355 of file PtexReader.h.
|
inlinevirtual |
Release resources held by this pointer (pointer becomes invalid).
Implements PtexFaceData.
Definition at line 349 of file PtexReader.h.
|
inlinevirtual |
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.
Implements PtexFaceData.
Definition at line 350 of file PtexReader.h.
|
inlinevirtual |
Resolution of each tile in this data block.
Implements PtexFaceData.
Definition at line 356 of file PtexReader.h.
|
protected |
Definition at line 360 of file PtexReader.h.
Referenced by getData(), and getPixel().
|
protected |
Definition at line 361 of file PtexReader.h.
Referenced by getPixel().