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). More... | |
virtual bool | isConstant () |
True if this data block is constant. More... | |
virtual void | getPixel (int u, int v, 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 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 Ptex::Res | res () |
Resolution of the texture held by this data block. More... | |
Public Member Functions inherited from PtexFaceData | |
virtual PtexFaceData * | getTile (int tile)=0 |
Access a tile from the data block. More... | |
Protected Member Functions | |
size_t | baseExtraMemUsed () |
virtual | ~TiledFaceBase () |
Protected Member Functions inherited from PtexFaceData | |
virtual | ~PtexFaceData () |
Destructor not for public use. Use release() instead. More... | |
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, Ptex::DataSize(), 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.
References PtexFaceData::getPixel().
|
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(), PtexReader::getData(), PtexFaceData::getData(), PtexFaceData::isConstant(), PtexReader::TiledReducedFace::memUsed(), Header::meshtype, Ptex::mt_triangle, 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().