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). More... | |
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. More... | |
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.
Definition at line 419 of file Ptexture.h.
|
inlineprotectedvirtual |
Destructor not for public use. Use release() instead.
Definition at line 422 of file Ptexture.h.
|
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.
Implemented in PtexReader::TiledFaceBase, PtexReader::PackedFace, and PtexReader::ConstDataPtr.
Referenced by PtexSeparableFilter::apply(), PtexTriangleFilter::applyIter(), PtexSeparableFilter::eval(), PtexTriangleFilter::eval(), PtexMainWriter::finish(), PtexReader::getData(), PtexReader::TiledReducedFace::getTile(), and PtexReader::TiledFaceBase::reduce().
|
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.
Implemented in PtexReader::ConstantFace, PtexReader::ConstDataPtr, PtexReader::TiledFaceBase, and PtexReader::PackedFace.
Referenced by PtexReader::getPixel(), and PtexReader::TiledFaceBase::getPixel().
|
pure virtual |
Access a tile from the data block.
Tiles are accessed in v-major order.
Implemented in PtexReader::PackedFace, PtexReader::ConstDataPtr, PtexReader::TiledReducedFace, and PtexReader::TiledFace.
Referenced by PtexSeparableFilter::apply(), PtexTriangleFilter::applyIter(), PtexReader::getData(), and PtexReader::TiledReducedFace::getTile().
|
pure virtual |
True if this data block is constant.
Implemented in PtexReader::TiledFaceBase, PtexReader::ConstantFace, PtexReader::PackedFace, and PtexReader::ConstDataPtr.
Referenced by PtexSeparableFilter::apply(), PtexTriangleFilter::applyIter(), PtexReader::getData(), PtexReader::TiledReducedFace::getTile(), and PtexReader::TiledFaceBase::reduce().
|
pure virtual |
True if this data block is tiled.
If tiled, the data must be access per-tile via getTile().
Implemented in PtexReader::TiledFaceBase, PtexReader::PackedFace, and PtexReader::ConstDataPtr.
Referenced by PtexSeparableFilter::apply(), PtexTriangleFilter::applyIter(), and PtexReader::getData().
|
pure virtual |
Release resources held by this pointer (pointer becomes invalid).
Implemented in PtexReader::TiledFaceBase, PtexReader::ErrorFace, PtexReader::FaceData, and PtexReader::ConstDataPtr.
|
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.
Implemented in PtexReader::FaceData, and PtexReader::ConstDataPtr.
|
pure virtual |
Resolution of each tile in this data block.
Implemented in PtexReader::TiledFaceBase, PtexReader::PackedFace, and PtexReader::ConstDataPtr.
Referenced by PtexSeparableFilter::apply(), PtexTriangleFilter::applyIter(), and PtexReader::getData().