Ptex
|
#include <PtexReader.h>
Public Member Functions | |
ConstDataPtr (void *data, int pixelsize) | |
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 bool | isConstant () |
True if this data block is constant. More... | |
virtual void | getPixel (int, int, 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... | |
Protected Attributes | |
void * | _data |
int | _pixelsize |
Additional Inherited Members | |
![]() | |
virtual | ~PtexFaceData () |
Destructor not for public use. Use release() instead. More... | |
Definition at line 363 of file PtexReader.h.
|
inline |
Definition at line 365 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 372 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 370 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 375 of file PtexReader.h.
|
inlinevirtual |
True if this data block is constant.
Implements PtexFaceData.
Definition at line 369 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 373 of file PtexReader.h.
|
inlinevirtual |
Release resources held by this pointer (pointer becomes invalid).
Implements PtexFaceData.
Definition at line 367 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 368 of file PtexReader.h.
|
inlinevirtual |
Resolution of each tile in this data block.
Implements PtexFaceData.
Definition at line 374 of file PtexReader.h.
|
protected |
Definition at line 378 of file PtexReader.h.
Referenced by getData(), and getPixel().
|
protected |
Definition at line 379 of file PtexReader.h.
Referenced by getPixel().