Ptex
|
#include <PtexReader.h>
Public Member Functions | |
TiledFaceBase (PtexReader *reader, Res resArg, Res tileresArg) | |
virtual void | release () |
Release resources held by this pointer (pointer becomes invalid). | |
virtual bool | isConstant () |
True if this data block is constant. | |
virtual void | getPixel (int u, int v, 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 FaceData * | reduce (PtexReader *, Res newres, PtexUtils::ReduceFn, size_t &newMemUsed) |
Res | tileres () const |
int | ntilesu () const |
int | ntilesv () const |
int | ntiles () const |
Public Member Functions inherited from PtexReader::FaceData | |
FaceData (Res resArg) | |
virtual | ~FaceData () |
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 FaceData * | reduce (PtexReader *, Res newres, PtexUtils::ReduceFn, size_t &newMemUsed)=0 |
Public Member Functions inherited from PtexFaceData | |
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 Member Functions | |
size_t | baseExtraMemUsed () |
virtual | ~TiledFaceBase () |
Protected Member Functions inherited from PtexFaceData | |
virtual | ~PtexFaceData () |
Destructor not for public use. Use release() instead. | |
Protected Attributes | |
PtexReader * | _reader |
Res | _tileres |
DataType | _dt |
int | _nchan |
int | _ntilesu |
int | _ntilesv |
int | _ntiles |
int | _pixelsize |
std::vector< FaceData * > | _tiles |
Protected Attributes inherited from PtexReader::FaceData | |
Res | _res |
Definition at line 421 of file PtexReader.h.
|
inline |
Definition at line 423 of file PtexReader.h.
References _dt, _nchan, _ntiles, _ntilesu, _ntilesv, _pixelsize, PtexReader::FaceData::_res, _tiles, PtexReader::datatype(), and PtexReader::nchannels().
|
inlineprotectedvirtual |
Definition at line 452 of file PtexReader.h.
References _tiles.
|
inlineprotected |
Definition at line 450 of file PtexReader.h.
References _tiles.
Referenced by PtexReader::TiledFace::memUsed(), and PtexReader::TiledReducedFace::memUsed().
|
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 440 of file PtexReader.h.
|
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.
Implements PtexFaceData.
Definition at line 1104 of file PtexReader.cpp.
|
inlinevirtual |
True if this data block is constant.
Implements PtexFaceData.
Definition at line 438 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 441 of file PtexReader.h.
|
inline |
Definition at line 447 of file PtexReader.h.
References _ntiles.
|
inline |
Definition at line 445 of file PtexReader.h.
References _ntilesu.
|
inline |
Definition at line 446 of file PtexReader.h.
References _ntilesv.
|
virtual |
Implements PtexReader::FaceData.
Definition at line 979 of file PtexReader.cpp.
References PtexReader::_header, PtexReader::_pixelsize, PtexUtils::copy(), PtexUtils::fill(), PtexFaceData::getData(), PtexReader::getData(), PtexFaceData::isConstant(), PtexReader::TiledReducedFace::memUsed(), Header::meshtype, and PtexReader::release().
|
inlinevirtual |
Release resources held by this pointer (pointer becomes invalid).
Reimplemented from PtexReader::FaceData.
Definition at line 437 of file PtexReader.h.
|
inlinevirtual |
Resolution of each tile in this data block.
Implements PtexFaceData.
Definition at line 442 of file PtexReader.h.
References _tileres.
|
inline |
Definition at line 444 of file PtexReader.h.
References _tileres.
|
protected |
Definition at line 460 of file PtexReader.h.
Referenced by TiledFaceBase().
|
protected |
Definition at line 461 of file PtexReader.h.
Referenced by TiledFaceBase().
|
protected |
Definition at line 464 of file PtexReader.h.
Referenced by ntiles(), PtexReader::readFaceData(), PtexReader::TiledFace::TiledFace(), and TiledFaceBase().
|
protected |
Definition at line 462 of file PtexReader.h.
Referenced by ntilesu(), and TiledFaceBase().
|
protected |
Definition at line 463 of file PtexReader.h.
Referenced by ntilesv(), and TiledFaceBase().
|
protected |
Definition at line 465 of file PtexReader.h.
Referenced by TiledFaceBase().
|
protected |
Definition at line 458 of file PtexReader.h.
|
protected |
Definition at line 459 of file PtexReader.h.
|
protected |
Definition at line 466 of file PtexReader.h.
Referenced by baseExtraMemUsed(), PtexReader::TiledFace::getTile(), TiledFaceBase(), and ~TiledFaceBase().