Ptex
|
#include <PtexReader.h>
Classes | |
class | ConstantFace |
class | ConstDataPtr |
class | DefaultInputHandler |
class | ErrorFace |
class | FaceData |
struct | FaceEdit |
class | Level |
class | MetaData |
struct | MetaEdit |
class | PackedFace |
class | ReductionKey |
class | TiledFace |
class | TiledFaceBase |
class | TiledReducedFace |
Public Member Functions | |
PtexReader (bool premultiply, PtexInputHandler *inputHandler, PtexErrorHandler *errorHandler) | |
virtual | ~PtexReader () |
virtual void | release () |
Release resources held by this pointer (pointer becomes invalid). | |
bool | needToOpen () const |
bool | open (const char *path, Ptex::String &error) |
void | prune () |
void | purge () |
void | setPendingPurge () |
bool | pendingPurge () const |
bool | tryClose () |
bool | ok () const |
bool | isOpen () |
void | invalidate () |
void | increaseMemUsed (size_t amount) |
void | logOpen () |
void | logBlockRead () |
virtual const char * | path () |
Path that file was opened with. | |
virtual Info | getInfo () |
virtual Ptex::MeshType | meshType () |
Type of mesh for which texture data is defined. | |
virtual Ptex::DataType | dataType () |
Type of data stored in file. | |
virtual Ptex::BorderMode | uBorderMode () |
Mode for filtering texture access beyond mesh border. | |
virtual Ptex::BorderMode | vBorderMode () |
Mode for filtering texture access beyond mesh border. | |
virtual Ptex::EdgeFilterMode | edgeFilterMode () |
Mode for filtering textures across edges. | |
virtual int | alphaChannel () |
Index of alpha channel (if any). | |
virtual int | numChannels () |
Number of channels stored in file. | |
virtual int | numFaces () |
Number of faces stored in file. | |
virtual bool | hasEdits () |
True if the file has edit blocks. | |
virtual bool | hasMipMaps () |
True if the file has mipmaps. | |
virtual PtexMetaData * | getMetaData () |
Access meta data. | |
virtual const Ptex::FaceInfo & | getFaceInfo (int faceid) |
Access resolution and adjacency information about a face. | |
virtual void | getData (int faceid, void *buffer, int stride) |
Access texture data for a face at highest-resolution. | |
virtual void | getData (int faceid, void *buffer, int stride, Res res) |
virtual PtexFaceData * | getData (int faceid) |
Access texture data for a face at highest-resolution as stored on disk. | |
virtual PtexFaceData * | getData (int faceid, Res res) |
virtual void | getPixel (int faceid, int u, int v, float *result, int firstchan, int nchannels) |
Access a single texel from the highest resolution texture . | |
virtual void | getPixel (int faceid, int u, int v, float *result, int firstchan, int nchannels, Ptex::Res res) |
Access a single texel for a face at a particular resolution. | |
DataType | datatype () const |
int | nchannels () const |
int | pixelsize () const |
const Header & | header () const |
const ExtHeader & | extheader () const |
const LevelInfo & | levelinfo (int level) const |
Public Member Functions inherited from PtexTexture | |
virtual void | release ()=0 |
Release resources held by this pointer (pointer becomes invalid). | |
virtual const char * | path ()=0 |
Path that file was opened with. | |
virtual Info | getInfo ()=0 |
virtual Ptex::MeshType | meshType ()=0 |
Type of mesh for which texture data is defined. | |
virtual Ptex::DataType | dataType ()=0 |
Type of data stored in file. | |
virtual Ptex::BorderMode | uBorderMode ()=0 |
Mode for filtering texture access beyond mesh border. | |
virtual Ptex::BorderMode | vBorderMode ()=0 |
Mode for filtering texture access beyond mesh border. | |
virtual Ptex::EdgeFilterMode | edgeFilterMode ()=0 |
Mode for filtering textures across edges. | |
virtual int | alphaChannel ()=0 |
Index of alpha channel (if any). | |
virtual int | numChannels ()=0 |
Number of channels stored in file. | |
virtual int | numFaces ()=0 |
Number of faces stored in file. | |
virtual bool | hasEdits ()=0 |
True if the file has edit blocks. | |
virtual bool | hasMipMaps ()=0 |
True if the file has mipmaps. | |
virtual PtexMetaData * | getMetaData ()=0 |
Access meta data. | |
virtual const Ptex::FaceInfo & | getFaceInfo (int faceid)=0 |
Access resolution and adjacency information about a face. | |
virtual void | getData (int faceid, void *buffer, int stride)=0 |
Access texture data for a face at highest-resolution. | |
virtual void | getData (int faceid, void *buffer, int stride, Ptex::Res res)=0 |
Access texture data for a face at a specific resolution. | |
virtual PtexFaceData * | getData (int faceid)=0 |
Access texture data for a face at highest-resolution as stored on disk. | |
virtual PtexFaceData * | getData (int faceid, Ptex::Res res)=0 |
Access texture data for a face at a specific resolution as stored on disk. | |
virtual void | getPixel (int faceid, int u, int v, float *result, int firstchan, int nchannels)=0 |
Access a single texel from the highest resolution texture . | |
virtual void | getPixel (int faceid, int u, int v, float *result, int firstchan, int nchannels, Ptex::Res res)=0 |
Access a single texel for a face at a particular resolution. | |
Protected Types | |
typedef PtexHashMap< ReductionKey, FaceData * > | ReductionMap |
Protected Member Functions | |
void | setError (const char *error) |
FilePos | tell () |
void | seek (FilePos pos) |
void | closeFP () |
bool | reopenFP () |
bool | readBlock (void *data, int size, bool reportError=true) |
bool | readZipBlock (void *data, int zipsize, int unzipsize) |
Level * | getLevel (int levelid) |
uint8_t * | getConstData () |
FaceData * | getFace (int levelid, Level *level, int faceid, Res res) |
void | readFaceInfo () |
void | readLevelInfo () |
void | readConstData () |
void | readLevel (int levelid, Level *&level) |
void | readFace (int levelid, Level *level, int faceid, Res res) |
void | readFaceData (FilePos pos, FaceDataHeader fdh, Res res, int levelid, FaceData *&face) |
void | readMetaData () |
void | readMetaDataBlock (MetaData *metadata, FilePos pos, int zipsize, int memsize, size_t &metaDataMemUsed) |
void | readLargeMetaDataHeaders (MetaData *metadata, FilePos pos, int zipsize, int memsize, size_t &metaDataMemUsed) |
void | readEditData () |
void | readEditFaceData () |
void | readEditMetaData () |
FaceData * | errorData (bool deleteOnRelease=false) |
void | computeOffsets (FilePos pos, int noffsets, const FaceDataHeader *fdh, FilePos *offsets) |
Protected Member Functions inherited from PtexTexture | |
virtual | ~PtexTexture () |
Destructor not for public use. Use release() instead. | |
Protected Attributes | |
Mutex | readlock |
DefaultInputHandler | _defaultIo |
PtexInputHandler * | _io |
PtexErrorHandler * | _err |
bool | _premultiply |
bool | _ok |
bool | _needToOpen |
bool | _pendingPurge |
PtexInputHandler::Handle | _fp |
FilePos | _pos |
std::string | _path |
Header | _header |
ExtHeader | _extheader |
FilePos | _faceinfopos |
FilePos | _constdatapos |
FilePos | _levelinfopos |
FilePos | _leveldatapos |
FilePos | _metadatapos |
FilePos | _lmdheaderpos |
FilePos | _lmddatapos |
FilePos | _editdatapos |
int | _pixelsize |
uint8_t * | _constdata |
MetaData * | _metadata |
bool | _hasEdits |
std::vector< FaceInfo > | _faceinfo |
std::vector< uint32_t > | _rfaceids |
std::vector< LevelInfo > | _levelinfo |
std::vector< FilePos > | _levelpos |
std::vector< Level * > | _levels |
std::vector< MetaEdit > | _metaedits |
std::vector< FaceEdit > | _faceedits |
ReductionMap | _reductions |
std::vector< char > | _errorPixel |
z_stream_s | _zstream |
size_t | _baseMemUsed |
volatile size_t | _memUsed |
volatile size_t | _opens |
volatile size_t | _blockReads |
Additional Inherited Members | |
Static Public Member Functions inherited from PtexTexture | |
static PtexTexture * | open (const char *path, Ptex::String &error, bool premultiply=0) |
Open a ptex file for reading. | |
Definition at line 52 of file PtexReader.h.
|
protected |
Definition at line 712 of file PtexReader.h.
PtexReader::PtexReader | ( | bool | premultiply, |
PtexInputHandler * | inputHandler, | ||
PtexErrorHandler * | errorHandler | ||
) |
Definition at line 71 of file PtexReader.cpp.
References _zstream.
|
virtual |
Definition at line 93 of file PtexReader.cpp.
References _constdata, _levels, _metadata, and closeFP().
|
inlinevirtual |
Index of alpha channel (if any).
One channel in the file can be flagged to be the alpha channel. If no channel is acting as the alpha channel, -1 is returned. See PtexWriter for more details.
Implements PtexTexture.
Definition at line 95 of file PtexReader.h.
References _header, and Header::alphachan.
|
protected |
Definition at line 230 of file PtexReader.cpp.
References _fp, _io, _zstream, and PtexInputHandler::close().
Referenced by open(), purge(), tryClose(), and ~PtexReader().
|
inlineprotected |
Definition at line 605 of file PtexReader.h.
References FaceDataHeader::blocksize().
Referenced by readFaceData(), and readLevel().
|
inlinevirtual |
Type of data stored in file.
Implements PtexTexture.
Definition at line 91 of file PtexReader.h.
References _header, and Header::datatype.
|
inline |
Definition at line 113 of file PtexReader.h.
References _header, and Header::datatype.
Referenced by PtexReader::MetaData::addEntry(), PtexReader::MetaData::addLmdEntry(), getPixel(), getPixel(), PtexReader::MetaData::newEntry(), readConstData(), readEditFaceData(), readFaceData(), PtexReader::PackedFace::reduce(), and PtexReader::TiledFaceBase::TiledFaceBase().
|
inlinevirtual |
Mode for filtering textures across edges.
Implements PtexTexture.
Definition at line 94 of file PtexReader.h.
References _extheader, and ExtHeader::edgefiltermode.
|
inlineprotected |
Definition at line 600 of file PtexReader.h.
References _errorPixel, and _pixelsize.
Referenced by getData(), getData(), and readFaceData().
|
inline |
Definition at line 117 of file PtexReader.h.
References _extheader.
|
inlineprotected |
Definition at line 579 of file PtexReader.h.
References _constdata.
|
virtual |
Access texture data for a face at highest-resolution as stored on disk.
Implements PtexTexture.
Definition at line 767 of file PtexReader.cpp.
References _faceinfo, _header, _ok, _pixelsize, errorData(), getConstData(), getFace(), getLevel(), and Header::nfaces.
|
virtual |
Definition at line 785 of file PtexReader.cpp.
References _faceinfo, _header, _levels, _ok, _pixelsize, _reductions, _rfaceids, errorData(), PtexReader::Level::faces, PtexPtr< T >::get(), PtexHashMap< Key, Value >::get(), getConstData(), getData(), getFace(), getLevel(), increaseMemUsed(), Header::meshtype, Header::nfaces, PtexReader::FaceData::reduce(), PtexUtils::reduceTri(), PtexUtils::reduceu(), PtexUtils::reducev(), and PtexHashMap< Key, Value >::tryInsert().
|
virtual |
Access texture data for a face at highest-resolution.
The texture data is copied into the user-supplied buffer. The buffer must be at least this size (in bytes): DataSize(dataType()) * numChannels() * getFaceInfo(faceid).res.size().
If a stride is given, then (stride-row_length) bytes will be skipped after each row. If stride is zero, then no bytes will be skipped. Note: the image can be flipped vertically by using an appropriate negative stride value.
faceid | Face index [0..numFaces-1] |
buffer | User-supplied buffer |
stride | Size of each row in user buffer (in bytes) |
Implements PtexTexture.
Definition at line 711 of file PtexReader.cpp.
References getData(), and getFaceInfo().
Referenced by PtexMainWriter::finish(), getData(), getData(), getData(), getPixel(), getPixel(), PtexReader::TiledReducedFace::getTile(), and PtexReader::TiledFaceBase::reduce().
|
virtual |
Definition at line 718 of file PtexReader.cpp.
References _errorPixel, _header, _ok, _pixelsize, PtexUtils::copy(), PtexUtils::fill(), getData(), and Header::nfaces.
Definition at line 580 of file PtexReader.h.
References PtexReader::Level::faces, and readFace().
|
virtual |
Access resolution and adjacency information about a face.
Implements PtexTexture.
Definition at line 267 of file PtexReader.cpp.
References _faceinfo.
Referenced by PtexMainWriter::finish(), and getData().
|
inlinevirtual |
Implements PtexTexture.
Definition at line 77 of file PtexReader.h.
References _extheader, _header, Header::alphachan, PtexTexture::Info::alphaChannel, Header::datatype, PtexTexture::Info::dataType, ExtHeader::edgefiltermode, PtexTexture::Info::edgeFilterMode, Header::meshtype, PtexTexture::Info::meshType, Header::nchannels, Header::nfaces, PtexTexture::Info::numChannels, PtexTexture::Info::numFaces, ExtHeader::ubordermode, PtexTexture::Info::uBorderMode, ExtHeader::vbordermode, and PtexTexture::Info::vBorderMode.
|
inlineprotected |
Definition at line 572 of file PtexReader.h.
References _levels, and readLevel().
|
virtual |
Access meta data.
Implements PtexTexture.
Definition at line 335 of file PtexReader.cpp.
References _metadata, and readMetaData().
Referenced by PtexMainWriter::PtexMainWriter().
|
virtual |
Access a single texel from the highest resolution texture .
The texel data is converted to floating point (integer types are normalized 0.0 to 1.0). A subset of the available channels may be accessed.
faceid | Face index [0..numFaces-1] |
u | U coordinate [0..ures-1] |
v | V coordinate [0..vres-1] |
result | Result data |
firstchan | First channel to access [0..numChannels-1] |
nchannels | Number of channels to access. |
Implements PtexTexture.
Definition at line 893 of file PtexReader.cpp.
References _header, _pixelsize, ConvertToFloat(), datatype(), getData(), PtexUtils::min(), and Header::nchannels.
|
virtual |
Access a single texel for a face at a particular resolution.
The specified resolution may be lower (but not higher) than the full resolution for the face. If it is lower, then the texture data is accessed from the stored mip-maps. If the requested resolution doesn't match a stored resolution, the desired resolution will be generated from the nearest available resolution.
See previous getPixel() method for details.
Implements PtexTexture.
Definition at line 920 of file PtexReader.cpp.
References _header, _pixelsize, ConvertToFloat(), datatype(), getData(), PtexUtils::min(), and Header::nchannels.
|
inlinevirtual |
True if the file has edit blocks.
See PtexWriter for more details.
Implements PtexTexture.
Definition at line 98 of file PtexReader.h.
References _hasEdits.
Referenced by PtexMainWriter::PtexMainWriter().
|
inlinevirtual |
True if the file has mipmaps.
See PtexWriter for more details.
Implements PtexTexture.
Definition at line 99 of file PtexReader.h.
References _header, and Header::nlevels.
|
inline |
Definition at line 116 of file PtexReader.h.
References _header.
|
inline |
Definition at line 71 of file PtexReader.h.
References _memUsed, and AtomicAdd().
Referenced by getData(), PtexReader::MetaData::getEntry(), readConstData(), readEditData(), readFaceData(), readFaceInfo(), readLevel(), readLevelInfo(), and readMetaData().
|
inline |
Definition at line 66 of file PtexReader.h.
References _needToOpen, and _ok.
Referenced by PtexReaderCache::get().
|
inline |
Definition at line 65 of file PtexReader.h.
References _fp.
|
inline |
Definition at line 118 of file PtexReader.h.
References _levelinfo.
|
inline |
Definition at line 73 of file PtexReader.h.
References _blockReads, and AtomicIncrement().
Referenced by seek().
|
inline |
Definition at line 72 of file PtexReader.h.
References _opens, and AtomicIncrement().
Referenced by PtexReaderCache::get(), and reopenFP().
|
inlinevirtual |
Type of mesh for which texture data is defined.
Implements PtexTexture.
Definition at line 90 of file PtexReader.h.
References _header, and Header::meshtype.
|
inline |
Definition at line 114 of file PtexReader.h.
References _header, and Header::nchannels.
Referenced by PtexReader::PackedFace::reduce(), and PtexReader::TiledFaceBase::TiledFaceBase().
|
inline |
Definition at line 57 of file PtexReader.h.
References _needToOpen.
Referenced by PtexReaderCache::get(), and open().
|
inlinevirtual |
Number of channels stored in file.
Implements PtexTexture.
Definition at line 96 of file PtexReader.h.
References _header, and Header::nchannels.
|
inlinevirtual |
Number of faces stored in file.
Implements PtexTexture.
Definition at line 97 of file PtexReader.h.
References _header, and Header::nfaces.
|
inline |
Definition at line 64 of file PtexReader.h.
References _ok.
Referenced by PtexReader::DefaultInputHandler::close(), and PtexReaderCache::get().
bool PtexReader::open | ( | const char * | path, |
Ptex::String & | error | ||
) |
Definition at line 137 of file PtexReader.cpp.
References _baseMemUsed, _constdatapos, _editdatapos, _err, _errorPixel, _extheader, _faceinfopos, _fp, _header, _io, _leveldatapos, _levelinfopos, _lmddatapos, _lmdheaderpos, _memUsed, _metadatapos, _needToOpen, _ok, _path, _pixelsize, AtomicStore(), Ptex::String::c_str(), closeFP(), Header::constdatasize, ExtHeader::editdatapos, Header::extheadersize, ExtHeaderSize, Header::faceinfosize, HeaderSize, PtexInputHandler::lastError(), Header::leveldatasize, Header::levelinfosize, LittleEndian(), ExtHeader::lmddatasize, ExtHeader::lmdheaderzipsize, Header::magic, Magic, PtexUtils::max(), Header::metadatazipsize, PtexUtils::min(), needToOpen(), PtexInputHandler::open(), Header::pixelSize(), readBlock(), readConstData(), readEditData(), readFaceInfo(), readLevelInfo(), readlock, and Header::version.
Referenced by PtexReaderCache::get(), and PtexTexture::open().
|
inlinevirtual |
Path that file was opened with.
If the file was opened using a search path (via PtexCache), the the path will be the path as found in the search path. Otherwise, the path will be the path as supplied to open.
Implements PtexTexture.
Definition at line 75 of file PtexReader.h.
References _path.
Referenced by PtexReader::DefaultInputHandler::open().
|
inline |
Definition at line 62 of file PtexReader.h.
References _pendingPurge.
Referenced by PtexReaderCache::get().
|
inline |
Definition at line 115 of file PtexReader.h.
References _pixelsize.
Referenced by PtexReader::ErrorFace::ErrorFace().
void PtexReader::prune | ( | ) |
Definition at line 104 of file PtexReader.cpp.
References _baseMemUsed, _levels, _memUsed, _metadata, _reductions, and PtexHashMap< Key, Value >::clear().
Referenced by purge(), and PtexCachedReader::tryPrune().
void PtexReader::purge | ( | ) |
Definition at line 115 of file PtexReader.cpp.
References _baseMemUsed, _constdata, _faceedits, _faceinfo, _levelinfo, _levelpos, _levels, _memUsed, _metaedits, _needToOpen, _ok, _pendingPurge, _rfaceids, closeFP(), and prune().
Referenced by PtexCachedReader::tryPurge().
|
protected |
Definition at line 548 of file PtexReader.cpp.
References _fp, _io, _pos, PtexInputHandler::read(), and setError().
Referenced by open(), readEditData(), readEditFaceData(), readEditMetaData(), readFaceData(), readLevelInfo(), readZipBlock(), and reopenFP().
|
protected |
Definition at line 319 of file PtexReader.cpp.
References _constdata, _constdatapos, _header, _pixelsize, _premultiply, Header::alphachan, Header::constdatasize, datatype(), Header::hasAlpha(), increaseMemUsed(), PtexUtils::multalpha(), Header::nchannels, Header::nfaces, readZipBlock(), and seek().
Referenced by open().
|
protected |
Definition at line 468 of file PtexReader.cpp.
References _editdatapos, _extheader, _faceedits, _hasEdits, _metaedits, ExtHeader::editdatapos, ExtHeader::editdatasize, et_editfacedata, et_editmetadata, increaseMemUsed(), readBlock(), readEditFaceData(), readEditMetaData(), seek(), and tell().
Referenced by open().
|
protected |
Definition at line 502 of file PtexReader.cpp.
References _constdata, _faceedits, _faceinfo, _header, _pixelsize, _premultiply, Header::alphachan, datatype(), EditFaceDataHeaderSize, EditFaceDataHeader::faceid, PtexReader::FaceEdit::faceid, EditFaceDataHeader::faceinfo, EditFaceDataHeader::fdh, PtexReader::FaceEdit::fdh, Header::hasAlpha(), PtexUtils::multalpha(), Header::nchannels, Header::nfaces, PtexReader::FaceEdit::pos, readBlock(), and tell().
Referenced by readEditData().
|
protected |
Definition at line 533 of file PtexReader.cpp.
References _metaedits, EditMetaDataHeaderSize, PtexReader::MetaEdit::memsize, EditMetaDataHeader::metadatamemsize, EditMetaDataHeader::metadatazipsize, PtexReader::MetaEdit::pos, readBlock(), tell(), and PtexReader::MetaEdit::zipsize.
Referenced by readEditData().
|
protected |
Definition at line 627 of file PtexReader.cpp.
References PtexReader::Level::faces, PtexReader::Level::fdh, PtexReader::Level::offsets, and readFaceData().
Referenced by getFace().
|
protected |
Definition at line 641 of file PtexReader.cpp.
References PtexReader::TiledFace::_fdh, _header, PtexReader::TiledFaceBase::_ntiles, PtexReader::TiledFace::_offsets, _pixelsize, _premultiply, AllocaMax, Header::alphachan, AtomicStore(), FaceDataHeader::blocksize(), computeOffsets(), PtexReader::PackedFace::data(), datatype(), PtexUtils::decodeDifference(), enc_constant, enc_diffzipped, enc_tiled, enc_zipped, FaceDataHeader::encoding(), errorData(), FaceDataHeaderSize, Header::hasAlpha(), increaseMemUsed(), PtexUtils::interleave(), PtexReader::TiledFace::memUsed(), PtexUtils::multalpha(), Header::nchannels, readBlock(), readlock, readZipBlock(), seek(), and tell().
Referenced by readFace().
|
protected |
Definition at line 277 of file PtexReader.cpp.
References _faceinfo, _faceinfopos, _header, _rfaceids, Header::faceinfosize, PtexUtils::genRfaceids(), increaseMemUsed(), Header::nfaces, readZipBlock(), and seek().
Referenced by open().
|
protected |
Definition at line 440 of file PtexReader.cpp.
References PtexReader::MetaData::addLmdEntry(), AllocaMax, readZipBlock(), and seek().
Referenced by readMetaData().
|
protected |
Definition at line 595 of file PtexReader.cpp.
References _faceedits, _levelinfo, _levelpos, AtomicStore(), computeOffsets(), FaceDataHeaderSize, PtexReader::FaceEdit::faceid, PtexReader::Level::fdh, PtexReader::FaceEdit::fdh, increaseMemUsed(), LevelInfo::levelheadersize, PtexReader::Level::memUsed(), LevelInfo::nfaces, PtexReader::Level::offsets, PtexReader::FaceEdit::pos, readlock, readZipBlock(), seek(), and tell().
Referenced by getLevel().
|
protected |
Definition at line 298 of file PtexReader.cpp.
References _header, _leveldatapos, _levelinfo, _levelinfopos, _levelpos, _levels, increaseMemUsed(), LevelInfoSize, Header::nlevels, readBlock(), and seek().
Referenced by open().
|
protected |
Definition at line 381 of file PtexReader.cpp.
References _extheader, _header, _lmdheaderpos, _metadata, _metadatapos, _metaedits, AtomicStore(), increaseMemUsed(), ExtHeader::lmdheadermemsize, ExtHeader::lmdheaderzipsize, Header::metadatamemsize, Header::metadatazipsize, readLargeMetaDataHeaders(), readlock, readMetaDataBlock(), and PtexReader::MetaData::selfDataSize().
Referenced by getMetaData().
|
protected |
Definition at line 414 of file PtexReader.cpp.
References PtexReader::MetaData::addEntry(), AllocaMax, readZipBlock(), and seek().
Referenced by readMetaData().
|
protected |
Definition at line 563 of file PtexReader.cpp.
References _zstream, BlockSize, readBlock(), and setError().
Referenced by PtexReader::MetaData::getEntry(), readConstData(), readFaceData(), readFaceInfo(), readLargeMetaDataHeaders(), readLevel(), and readMetaDataBlock().
|
inlinevirtual |
Release resources held by this pointer (pointer becomes invalid).
Implements PtexTexture.
Reimplemented in PtexCachedReader.
Definition at line 56 of file PtexReader.h.
Referenced by PtexMainWriter::close(), PtexTexture::open(), PtexReader::TiledFaceBase::reduce(), and PtexMainWriter::~PtexMainWriter().
|
protected |
Definition at line 240 of file PtexReader.cpp.
References _extheader, _fp, _header, _io, _path, _pos, Header::extheadersize, ExtHeaderSize, HeaderSize, logOpen(), PtexUtils::min(), PtexInputHandler::open(), readBlock(), and setError().
Referenced by seek().
|
inlineprotected |
Definition at line 558 of file PtexReader.h.
References _fp, _io, _pos, logBlockRead(), reopenFP(), and PtexInputHandler::seek().
Referenced by PtexReader::MetaData::getEntry(), readConstData(), readEditData(), readFaceData(), readFaceInfo(), readLargeMetaDataHeaders(), readLevel(), readLevelInfo(), and readMetaDataBlock().
|
inlineprotected |
Definition at line 546 of file PtexReader.h.
References _err, _ok, _path, and PtexErrorHandler::reportError().
Referenced by readBlock(), readZipBlock(), and reopenFP().
|
inline |
Definition at line 61 of file PtexReader.h.
References _pendingPurge.
Referenced by PtexCachedReader::tryPurge().
|
inlineprotected |
Definition at line 557 of file PtexReader.h.
References _pos.
Referenced by readEditData(), readEditFaceData(), readEditMetaData(), readFaceData(), and readLevel().
bool PtexReader::tryClose | ( | ) |
Definition at line 219 of file PtexReader.cpp.
References _fp, closeFP(), readlock, Mutex::trylock(), and Mutex::unlock().
Referenced by PtexReaderCache::pruneFiles().
|
inlinevirtual |
Mode for filtering texture access beyond mesh border.
Implements PtexTexture.
Definition at line 92 of file PtexReader.h.
References _extheader, and ExtHeader::ubordermode.
|
inlinevirtual |
Mode for filtering texture access beyond mesh border.
Implements PtexTexture.
Definition at line 93 of file PtexReader.h.
References _extheader, and ExtHeader::vbordermode.
|
protected |
Definition at line 717 of file PtexReader.h.
|
protected |
Definition at line 720 of file PtexReader.h.
Referenced by PtexCachedReader::getBlockReadsChange(), and logBlockRead().
|
protected |
Definition at line 659 of file PtexReader.h.
Referenced by getConstData(), purge(), readConstData(), readEditFaceData(), and ~PtexReader().
|
protected |
Definition at line 651 of file PtexReader.h.
Referenced by open(), and readConstData().
|
protected |
Definition at line 638 of file PtexReader.h.
|
protected |
Definition at line 657 of file PtexReader.h.
Referenced by open(), and readEditData().
|
protected |
Definition at line 640 of file PtexReader.h.
Referenced by open(), and setError().
|
protected |
Definition at line 714 of file PtexReader.h.
Referenced by errorData(), getData(), and open().
|
protected |
Definition at line 649 of file PtexReader.h.
Referenced by edgeFilterMode(), extheader(), getInfo(), open(), readEditData(), readMetaData(), reopenFP(), uBorderMode(), and vBorderMode().
|
protected |
Definition at line 683 of file PtexReader.h.
Referenced by purge(), readEditData(), readEditFaceData(), and readLevel().
|
protected |
Definition at line 663 of file PtexReader.h.
Referenced by getData(), getData(), getFaceInfo(), purge(), readEditFaceData(), and readFaceInfo().
|
protected |
Definition at line 650 of file PtexReader.h.
Referenced by open(), and readFaceInfo().
|
protected |
Definition at line 645 of file PtexReader.h.
Referenced by closeFP(), isOpen(), open(), readBlock(), reopenFP(), seek(), and tryClose().
|
protected |
Definition at line 661 of file PtexReader.h.
Referenced by hasEdits(), and readEditData().
|
protected |
Definition at line 648 of file PtexReader.h.
Referenced by alphaChannel(), dataType(), datatype(), getData(), getData(), getData(), getInfo(), getPixel(), getPixel(), hasMipMaps(), header(), meshType(), nchannels(), numChannels(), numFaces(), open(), readConstData(), readEditFaceData(), readFaceData(), readFaceInfo(), readLevelInfo(), readMetaData(), PtexReader::TiledFaceBase::reduce(), and reopenFP().
|
protected |
Definition at line 639 of file PtexReader.h.
Referenced by closeFP(), open(), readBlock(), reopenFP(), and seek().
|
protected |
Definition at line 653 of file PtexReader.h.
Referenced by open(), and readLevelInfo().
|
protected |
Definition at line 665 of file PtexReader.h.
Referenced by levelinfo(), purge(), readLevel(), and readLevelInfo().
|
protected |
Definition at line 652 of file PtexReader.h.
Referenced by open(), and readLevelInfo().
|
protected |
Definition at line 666 of file PtexReader.h.
Referenced by purge(), readLevel(), and readLevelInfo().
|
protected |
Definition at line 667 of file PtexReader.h.
Referenced by getData(), getLevel(), prune(), purge(), readLevelInfo(), and ~PtexReader().
|
protected |
Definition at line 656 of file PtexReader.h.
Referenced by open().
|
protected |
Definition at line 655 of file PtexReader.h.
Referenced by open(), and readMetaData().
|
protected |
Definition at line 718 of file PtexReader.h.
Referenced by PtexCachedReader::getMemUsedChange(), increaseMemUsed(), open(), prune(), and purge().
|
protected |
Definition at line 660 of file PtexReader.h.
Referenced by getMetaData(), prune(), readMetaData(), and ~PtexReader().
|
protected |
Definition at line 654 of file PtexReader.h.
Referenced by open(), and readMetaData().
|
protected |
Definition at line 675 of file PtexReader.h.
Referenced by purge(), readEditData(), readEditMetaData(), and readMetaData().
|
protected |
Definition at line 643 of file PtexReader.h.
Referenced by invalidate(), needToOpen(), open(), and purge().
|
protected |
Definition at line 642 of file PtexReader.h.
Referenced by getData(), getData(), getData(), invalidate(), ok(), open(), purge(), and setError().
|
protected |
Definition at line 719 of file PtexReader.h.
Referenced by PtexCachedReader::getOpensChange(), and logOpen().
|
protected |
Definition at line 647 of file PtexReader.h.
Referenced by open(), path(), reopenFP(), and setError().
|
protected |
Definition at line 644 of file PtexReader.h.
Referenced by pendingPurge(), purge(), and setPendingPurge().
|
protected |
Definition at line 658 of file PtexReader.h.
Referenced by errorData(), getData(), getData(), getData(), getPixel(), getPixel(), PtexReader::TiledReducedFace::getTile(), open(), pixelsize(), readConstData(), readEditFaceData(), readFaceData(), PtexReader::PackedFace::reduce(), PtexReader::ConstantFace::reduce(), and PtexReader::TiledFaceBase::reduce().
|
protected |
Definition at line 646 of file PtexReader.h.
Referenced by readBlock(), reopenFP(), seek(), and tell().
|
protected |
Definition at line 641 of file PtexReader.h.
Referenced by readConstData(), readEditFaceData(), and readFaceData().
|
protected |
Definition at line 713 of file PtexReader.h.
|
protected |
Definition at line 664 of file PtexReader.h.
Referenced by getData(), purge(), and readFaceInfo().
|
protected |
Definition at line 716 of file PtexReader.h.
Referenced by closeFP(), PtexReader(), and readZipBlock().
|
protected |
Definition at line 637 of file PtexReader.h.
Referenced by PtexReader::MetaData::getEntry(), open(), readFaceData(), readLevel(), readMetaData(), and tryClose().