Ptex: PtexReader.h Source File

Ptex

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List
- File Members

PtexReader.h
Go to the documentation of this file.
1 #ifndef PtexReader_h
2 #define PtexReader_h
3
4 /*
5 PTEX SOFTWARE
6 Copyright 2009 Disney Enterprises, Inc. All rights reserved
7
8 Redistribution and use in source and binary forms, with or without
9 modification, are permitted provided that the following conditions are
10 met:
11
12 * Redistributions of source code must retain the above copyright
13 notice, this list of conditions and the following disclaimer.
14
15 * Redistributions in binary form must reproduce the above copyright
16 notice, this list of conditions and the following disclaimer in
17 the documentation and/or other materials provided with the
18 distribution.
19
20 * The names "Disney", "Walt Disney Pictures", "Walt Disney Animation
21 Studios" or the names of its contributors may NOT be used to
22 endorse or promote products derived from this software without
23 specific prior written permission from Walt Disney Pictures.
24
25 Disclaimer: THIS SOFTWARE IS PROVIDED BY WALT DISNEY PICTURES AND
26 CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
27 BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
28 FOR A PARTICULAR PURPOSE, NONINFRINGEMENT AND TITLE ARE DISCLAIMED.
29 IN NO EVENT SHALL WALT DISNEY PICTURES, THE COPYRIGHT HOLDER OR
30 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
31 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
32 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
33 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND BASED ON ANY
34 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
35 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
36 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
37 */
38 #include <stdio.h>
39 #include <zlib.h>
40 #include <vector>
41 #include <string>
42 #include <map>
43 #include <errno.h>
44 #include "Ptexture.h"
45 #include "PtexIO.h"
46 #include "PtexCache.h"
47 #include "PtexUtils.h"
48
49 #include "PtexHashMap.h"
50 using namespace PtexInternal;
51
52 #ifndef NDEBUG
53 #include <assert.h>
54 template<typename T> class safevector : public std::vector<T>
55 {
56 public:
57 safevector() : std::vector<T>() {}
58 safevector(size_t n, const T& val = T()) : std::vector<T>(n, val) {}
59 const T& operator[] (size_t n) const {
60 assert(n < std::vector<T>::size());
61 return std::vector<T>::operator[](n);
62 }
63 T& operator[] (size_t n) {
64 assert(n < std::vector<T>::size());
65 return std::vector<T>::operator[](n);
66 }
67 };
68 #else
69 #define safevector std::vector
70 #endif
71
72 class PtexReader : public PtexCachedFile, public PtexTexture, public PtexIO {
73 public:
74 PtexReader(void** parent, PtexCacheImpl* cache, bool premultiply,
75 PtexInputHandler* handler);
76 bool open(const char* path, Ptex::String& error);
77
78 void setOwnsCache() { _ownsCache = true; }
79 virtual void release();
80 virtual const char* path() { return _path.c_str(); }
81 virtual Ptex::MeshType meshType() { return MeshType(_header.meshtype); }
82 virtual Ptex::DataType dataType() { return DataType(_header.datatype); }
83 virtual Ptex::BorderMode uBorderMode() { return BorderMode(_extheader.ubordermode); }
84 virtual Ptex::BorderMode vBorderMode() { return BorderMode(_extheader.vbordermode); }
85 virtual int alphaChannel() { return _header.alphachan; }
86 virtual int numChannels() { return _header.nchannels; }
87 virtual int numFaces() { return _header.nfaces; }
88 virtual bool hasEdits() { return _hasEdits; }
89 virtual bool hasMipMaps() { return _header.nlevels > 1; }
90
91 virtual PtexMetaData* getMetaData();
92 virtual const Ptex::FaceInfo& getFaceInfo(int faceid);
93 virtual void getData(int faceid, void* buffer, int stride);
94 virtual void getData(int faceid, void* buffer, int stride, Res res);
95 virtual PtexFaceData* getData(int faceid);
96 virtual PtexFaceData* getData(int faceid, Res res);
97 virtual void getPixel(int faceid, int u, int v,
98 float* result, int firstchan, int nchannels);
99 virtual void getPixel(int faceid, int u, int v,
100 float* result, int firstchan, int nchannels,
101 Ptex::Res res);
102
103 DataType datatype() const { return _header.datatype; }
104 int nchannels() const { return _header.nchannels; }
105 int pixelsize() const { return _pixelsize; }
106 const Header& header() const { return _header; }
107 const ExtHeader& extheader() const { return _extheader; }
108 const LevelInfo& levelinfo(int level) const { return _levelinfo[level]; }
109
110 class MetaData : public PtexCachedData, public PtexMetaData {
111 public:
112 MetaData(MetaData** parent, PtexCacheImpl* cache, int size, PtexReader* reader)
113 : PtexCachedData((void**)parent, cache, (int)sizeof(*this) + size),
114 _reader(reader) {}
115 virtual void release() {
116 AutoLockCache lock(_cache->cachelock);
117 // first, unref all lmdData refs
118 for (size_t i = 0, n = _lmdRefs.size(); i < n; i++)
119 _lmdRefs[i]->unref();
120 _lmdRefs.resize(0);
121
122 // finally, unref self
123 unref();
124 }
125
126 virtual int numKeys() { return int(_entries.size()); }
127 virtual void getKey(int n, const char*& key, MetaDataType& type)
128 {
129 Entry* e = _entries[n];
130 key = e->key;
131 type = e->type;
132 }
133
134 virtual void getValue(const char* key, const char*& value)
135 {
136 Entry* e = getEntry(key);
137 if (e) value = (const char*) e->data;
138 else value = 0;
139 }
140
141 virtual void getValue(const char* key, const int8_t*& value, int& count)
142 {
143 Entry* e = getEntry(key);
144 if (e) { value = (const int8_t*) e->data; count = e->datasize; }
145 else { value = 0; count = 0; }
146 }
147
148 virtual void getValue(const char* key, const int16_t*& value, int& count)
149 {
150 Entry* e = getEntry(key);
151 if (e) {
152 value = (const int16_t*) e->data;
153 count = int(e->datasize/sizeof(int16_t));
154 }
155 else { value = 0; count = 0; }
156 }
157
158 virtual void getValue(const char* key, const int32_t*& value, int& count)
159 {
160 Entry* e = getEntry(key);
161 if (e) {
162 value = (const int32_t*) e->data;
163 count = int(e->datasize/sizeof(int32_t));
164 }
165 else { value = 0; count = 0; }
166 }
167
168 virtual void getValue(const char* key, const float*& value, int& count)
169 {
170 Entry* e = getEntry(key);
171 if (e) {
172 value = (const float*) e->data;
173 count = int(e->datasize/sizeof(float));
174 }
175 else { value = 0; count = 0; }
176 }
177
178 virtual void getValue(const char* key, const double*& value, int& count)
179 {
180 Entry* e = getEntry(key);
181 if (e) {
182 value = (const double*) e->data;
183 count = int(e->datasize/sizeof(double));
184 }
185 else { value = 0; count = 0; }
186 }
187
188 void addEntry(uint8_t keysize, const char* key, uint8_t datatype,
189 uint32_t datasize, void* data)
190 {
191 Entry* e = newEntry(keysize, key, datatype, datasize);
192 e->data = malloc(datasize);
193 memcpy(e->data, data, datasize);
194 }
195
196 void addLmdEntry(uint8_t keysize, const char* key, uint8_t datatype,
197 uint32_t datasize, FilePos filepos, uint32_t zipsize)
198 {
199 Entry* e = newEntry(keysize, key, datatype, datasize);
200 e->isLmd = true;
201 e->lmdData = 0;
202 e->lmdPos = filepos;
203 e->lmdZipSize = zipsize;
204 }
205
206 protected:
207 class LargeMetaData : public PtexCachedData
208 {
209 public:
210 LargeMetaData(void** parent, PtexCacheImpl* cache, int size)
211 : PtexCachedData(parent, cache, size), _data(malloc(size)) {}
212 void* data() { return _data; }
213 private:
214 virtual ~LargeMetaData() { free(_data); }
215 void* _data;
216 };
217
218 struct Entry {
219 const char* key; // ptr to map key string
220 MetaDataType type; // meta data type
221 uint32_t datasize; // size of data in bytes
222 void* data; // if lmd, data only valid when lmd is loaded and ref'ed
223 bool isLmd; // true if data is a large meta data block
224 LargeMetaData* lmdData; // large meta data (lazy-loaded, lru-cached)
225 FilePos lmdPos; // large meta data file position
226 uint32_t lmdZipSize; // large meta data size on disk
227
228 Entry() :
229 key(0), type(MetaDataType(0)), datasize(0), data(0),
230 isLmd(0), lmdData(0), lmdPos(0), lmdZipSize(0) {}
231 ~Entry() { clear(); }
232 void clear() {
233 if (isLmd) {
234 isLmd = 0;
235 if (lmdData) { lmdData->orphan(); lmdData = 0; }
236 lmdPos = 0;
237 lmdZipSize = 0;
238 }
239 else {
240 free(data);
241 }
242 data = 0;
243 }
244 };
245
246 Entry* newEntry(uint8_t keysize, const char* key, uint8_t datatype, uint32_t datasize)
247 {
248 std::pair<MetaMap::iterator,bool> result =
249 _map.insert(std::make_pair(std::string(key, keysize), Entry()));
250 Entry* e = &result.first->second;
251 bool newEntry = result.second;
252 if (newEntry) _entries.push_back(e);
253 else e->clear();
254 e->key = result.first->first.c_str();
255 e->type = MetaDataType(datatype);
256 e->datasize = datasize;
257 return e;
258 }
259
260 Entry* getEntry(const char* key);
261
262 PtexReader* _reader;
263 typedef std::map<std::string, Entry> MetaMap;
264 MetaMap _map;
265 safevector<Entry*> _entries;
266 std::vector<LargeMetaData*> _lmdRefs;
267 };
268
269
270 class ConstDataPtr : public PtexFaceData {
271 public:
272 ConstDataPtr(void* data, int pixelsize)
273 : _data(data), _pixelsize(pixelsize) {}
274 virtual void release() { delete this; }
275 virtual Ptex::Res res() { return 0; }
276 virtual bool isConstant() { return true; }
277 virtual void getPixel(int, int, void* result)
278 { memcpy(result, _data, _pixelsize); }
279 virtual void* getData() { return _data; }
280 virtual bool isTiled() { return false; }
281 virtual Ptex::Res tileRes() { return 0; }
282 virtual PtexFaceData* getTile(int) { return 0; }
283
284 protected:
285 void* _data;
286 int _pixelsize;
287 };
288
289
290 class FaceData : public PtexCachedData, public PtexFaceData {
291 public:
292 FaceData(void** parent, PtexCacheImpl* cache, Res res, int size)
293 : PtexCachedData(parent, cache, size), _res(res) {}
294 virtual void release() { AutoLockCache lock(_cache->cachelock); unref(); }
295 virtual Ptex::Res res() { return _res; }
296 virtual void reduce(FaceData*&, PtexReader*,
297 Res newres, PtexUtils::ReduceFn) = 0;
298 protected:
299 Res _res;
300 };
301
302 class PackedFace : public FaceData {
303 public:
304 PackedFace(void** parent, PtexCacheImpl* cache, Res res, int pixelsize, int size)
305 : FaceData(parent, cache, res, (int)sizeof(*this)+size),
306 _pixelsize(pixelsize), _data(malloc(size)) {}
307 void* data() { return _data; }
308 virtual bool isConstant() { return false; }
309 virtual void getPixel(int u, int v, void* result)
310 {
311 memcpy(result, (char*)_data + (v*_res.u() + u) * _pixelsize, _pixelsize);
312 }
313 virtual void* getData() { return _data; }
314 virtual bool isTiled() { return false; }
315 virtual Ptex::Res tileRes() { return _res; }
316 virtual PtexFaceData* getTile(int) { return 0; }
317 virtual void reduce(FaceData*&, PtexReader*,
318 Res newres, PtexUtils::ReduceFn);
319
320 protected:
321 virtual ~PackedFace() { free(_data); }
322
323 int _pixelsize;
324 void* _data;
325 };
326
327 class ConstantFace : public PackedFace {
328 public:
329 ConstantFace(void** parent, PtexCacheImpl* cache, int pixelsize)
330 : PackedFace(parent, cache, 0, pixelsize, pixelsize) {}
331 virtual bool isConstant() { return true; }
332 virtual void getPixel(int, int, void* result) { memcpy(result, _data, _pixelsize); }
333 virtual void reduce(FaceData*&, PtexReader*,
334 Res newres, PtexUtils::ReduceFn);
335 };
336
337
338 class TiledFaceBase : public FaceData {
339 public:
340 TiledFaceBase(void** parent, PtexCacheImpl* cache, Res res,
341 Res tileres, DataType dt, int nchan)
342 : FaceData(parent, cache, res, sizeof(*this)),
343 _tileres(tileres),
344 _dt(dt),
345 _nchan(nchan),
346 _pixelsize(DataSize(dt)*nchan)
347 {
348 _ntilesu = _res.ntilesu(tileres);
349 _ntilesv = _res.ntilesv(tileres);
350 _ntiles = _ntilesu*_ntilesv;
351 _tiles.resize(_ntiles);
352 incSize((int)sizeof(FaceData*)*_ntiles);
353 }
354
355 virtual void release() {
356 // Tiled faces ref the reader (directly or indirectly) and
357 // thus may trigger cache deletion on release. Call cache
358 // to check for pending delete.
359 // Note: release() may delete "this", so save _cache in
360 // local var.
361 PtexCacheImpl* cache = _cache;
362 FaceData::release();
363 cache->handlePendingDelete();
364 }
365 virtual bool isConstant() { return false; }
366 virtual void getPixel(int u, int v, void* result);
367 virtual void* getData() { return 0; }
368 virtual bool isTiled() { return true; }
369 virtual Ptex::Res tileRes() { return _tileres; }
370 virtual void reduce(FaceData*&, PtexReader*,
371 Res newres, PtexUtils::ReduceFn);
372 Res tileres() const { return _tileres; }
373 int ntilesu() const { return _ntilesu; }
374 int ntilesv() const { return _ntilesv; }
375 int ntiles() const { return _ntiles; }
376
377 protected:
378 virtual ~TiledFaceBase() { orphanList(_tiles); }
379
380 Res _tileres;
381 DataType _dt;
382 int _nchan;
383 int _ntilesu;
384 int _ntilesv;
385 int _ntiles;
386 int _pixelsize;
387 safevector<FaceData*> _tiles;
388 };
389
390
391 class TiledFace : public TiledFaceBase {
392 public:
393 TiledFace(void** parent, PtexCacheImpl* cache, Res res, Res tileres,
394 int levelid, PtexReader* reader)
395 : TiledFaceBase(parent, cache, res, tileres,
396 reader->datatype(), reader->nchannels()),
397 _reader(reader),
398 _levelid(levelid)
399 {
400 _fdh.resize(_ntiles),
401 _offsets.resize(_ntiles);
402 incSize((int)(sizeof(FaceDataHeader)+sizeof(FilePos))*_ntiles);
403 }
404 virtual PtexFaceData* getTile(int tile)
405 {
406 AutoLockCache locker(_cache->cachelock);
407 FaceData*& f = _tiles[tile];
408 if (!f) readTile(tile, f);
409 else f->ref();
410 return f;
411 }
412 void readTile(int tile, FaceData*& data);
413
414 protected:
415 friend class PtexReader;
416 PtexReader* _reader;
417 int _levelid;
418 safevector<FaceDataHeader> _fdh;
419 safevector<FilePos> _offsets;
420 };
421
422
423 class TiledReducedFace : public TiledFaceBase {
424 public:
425 TiledReducedFace(void** parent, PtexCacheImpl* cache, Res res,
426 Res tileres, DataType dt, int nchan,
427 TiledFaceBase* parentface, PtexUtils::ReduceFn reducefn)
428 : TiledFaceBase(parent, cache, res, tileres, dt, nchan),
429 _parentface(parentface),
430 _reducefn(reducefn)
431 {
432 AutoLockCache locker(_cache->cachelock);
433 _parentface->ref();
434 }
435 ~TiledReducedFace()
436 {
437 _parentface->unref();
438 }
439 virtual PtexFaceData* getTile(int tile);
440
441 protected:
442 TiledFaceBase* _parentface;
443 PtexUtils::ReduceFn* _reducefn;
444 };
445
446
447 class Level : public PtexCachedData {
448 public:
449 safevector<FaceDataHeader> fdh;
450 safevector<FilePos> offsets;
451 safevector<FaceData*> faces;
452
453 Level(void** parent, PtexCacheImpl* cache, int nfaces)
454 : PtexCachedData(parent, cache,
455 (int)(sizeof(*this) + (size_t)nfaces * (sizeof(FaceDataHeader) +
456 sizeof(FilePos) +
457 sizeof(FaceData*)))),
458 fdh(nfaces),
459 offsets(nfaces),
460 faces(nfaces) {}
461 protected:
462 virtual ~Level() { orphanList(faces); }
463 };
464
465 Mutex readlock;
466 Mutex reducelock;
467
468 protected:
469 virtual ~PtexReader();
470 void setError(const char* error)
471 {
472 _error = error; _error += " PtexFile: "; _error += _path;
473 _ok = 0;
474 }
475
476 FilePos tell() { return _pos; }
477 void seek(FilePos pos)
478 {
479 if (pos != _pos) {
480 _io->seek(_fp, pos);
481 _pos = pos;
482 STATS_INC(nseeks);
483 }
484 }
485
486 bool readBlock(void* data, int size, bool reportError=true);
487 bool readZipBlock(void* data, int zipsize, int unzipsize);
488 Level* getLevel(int levelid)
489 {
490 Level*& level = _levels[levelid];
491 if (!level) readLevel(levelid, level);
492 else level->ref();
493 return level;
494 }
495
496 uint8_t* getConstData() { if (!_constdata) readConstData(); return _constdata; }
497 FaceData* getFace(int levelid, Level* level, int faceid)
498 {
499 FaceData*& face = level->faces[faceid];
500 if (!face) readFace(levelid, level, faceid);
501 else face->ref();
502 return face;
503 }
504
505 Res getRes(int levelid, int faceid)
506 {
507 if (levelid == 0) return _faceinfo[faceid].res;
508 else {
509 // for reduction level, look up res via rfaceid
510 Res res = _res_r[faceid];
511 // and adjust for number of reductions
512 return Res((uint8_t)(res.ulog2 - levelid), (uint8_t)(res.vlog2 - levelid));
513 }
514 }
515
516 int unpackedSize(FaceDataHeader fdh, int levelid, int faceid)
517 {
518 if (fdh.encoding() == enc_constant)
519 // level 0 constant faces are not stored
520 return levelid == 0 ? 0 : _pixelsize;
521 else
522 return getRes(levelid, faceid).size() * _pixelsize;
523 }
524
525 void readFaceInfo();
526 void readLevelInfo();
527 void readConstData();
528 void readLevel(int levelid, Level*& level);
529 void readFace(int levelid, Level* level, int faceid);
530 void readFaceData(FilePos pos, FaceDataHeader fdh, Res res, int levelid, FaceData*& face);
531 void readMetaData();
532 void readMetaDataBlock(MetaData* metadata, FilePos pos, int zipsize, int memsize);
533 void readLargeMetaDataHeaders(MetaData* metadata, FilePos pos, int zipsize, int memsize);
534 void readEditData();
535 void readEditFaceData();
536 void readEditMetaData();
537
538 void computeOffsets(FilePos pos, int noffsets, const FaceDataHeader* fdh, FilePos* offsets)
539 {
540 FilePos* end = offsets + noffsets;
541 while (offsets != end) { *offsets++ = pos; pos += fdh->blocksize(); fdh++; }
542 }
543 void blendFaces(FaceData*& face, int faceid, Res res, bool blendu);
544
545 class DefaultInputHandler : public PtexInputHandler
546 {
547 char* buffer;
548 public:
549 virtual Handle open(const char* path) {
550 FILE* fp = fopen(path, "rb");
551 if (fp) {
552 buffer = (char*) malloc(IBuffSize);
553 setvbuf(fp, buffer, _IOFBF, IBuffSize);
554 }
555 else buffer = 0;
556 return (Handle) fp;
557 }
558 virtual void seek(Handle handle, int64_t pos) { fseeko((FILE*)handle, pos, SEEK_SET); }
559 virtual size_t read(void* buffer, size_t size, Handle handle) {
560 return fread(buffer, size, 1, (FILE*)handle) == 1 ? size : 0;
561 }
562 virtual bool close(Handle handle) {
563 bool ok = handle && (fclose((FILE*)handle) == 0);
564 if (buffer) free(buffer);
565 buffer = 0;
566 return ok;
567 }
568 virtual const char* lastError() { return strerror(errno); }
569 };
570
571 DefaultInputHandler _defaultIo; // Default IO handler
572 PtexInputHandler* _io; // IO handler
573 bool _premultiply; // true if reader should premultiply the alpha chan
574 bool _ownsCache; // true if reader owns the cache
575 bool _ok; // flag set if read error occurred)
576 std::string _error; // error string (if !_ok)
577 PtexInputHandler::Handle _fp; // file pointer
578 FilePos _pos; // current seek position
579 std::string _path; // current file path
580 Header _header; // the header
581 ExtHeader _extheader; // extended header
582 FilePos _faceinfopos; // file positions of data sections
583 FilePos _constdatapos; // ...
584 FilePos _levelinfopos;
585 FilePos _leveldatapos;
586 FilePos _metadatapos;
587 FilePos _lmdheaderpos;
588 FilePos _lmddatapos;
589 FilePos _editdatapos;
590 int _pixelsize; // size of a pixel in bytes
591 uint8_t* _constdata; // constant pixel value per face
592 MetaData* _metadata; // meta data (read on demand)
593 bool _hasEdits; // has edit blocks
594
595 safevector<FaceInfo> _faceinfo; // per-face header info
596 safevector<uint32_t> _rfaceids; // faceids sorted in reduction order
597 safevector<Res> _res_r; // face res indexed by rfaceid
598 safevector<LevelInfo> _levelinfo; // per-level header info
599 safevector<FilePos> _levelpos; // file position of each level's data
600 safevector<Level*> _levels; // level data (read on demand)
601
602 struct MetaEdit
603 {
604 FilePos pos;
605 int zipsize;
606 int memsize;
607 };
608 safevector<MetaEdit> _metaedits;
609
610 struct FaceEdit
611 {
612 FilePos pos;
613 int faceid;
614 FaceDataHeader fdh;
615 };
616 safevector<FaceEdit> _faceedits;
617
618 struct ReductionKey {
619 int faceid;
620 Res res;
621 ReductionKey() : faceid(0), res(0,0) {}
622 ReductionKey(uint32_t faceid, Res res) : faceid(faceid), res(res) {}
623 bool operator==(const ReductionKey& k) const
624 { return k.faceid == faceid && k.res == res; }
625 struct Hasher {
626 uint32_t operator() (const ReductionKey& key) const
627 {
628 // constants from Knuth
629 static uint32_t M = 1664525, C = 1013904223;
630 uint32_t val = (key.res.ulog2 * M + key.res.vlog2 + C) * M + key.faceid;
631 return val;
632 }
633 };
634 };
635 typedef PtexHashMap<ReductionKey, FaceData*, ReductionKey::Hasher> ReductionMap;
636 ReductionMap _reductions;
637
638 z_stream_s _zstream;
639 };
640
641 #endif
PtexReader::_defaultIo
DefaultInputHandler _defaultIo
Definition: PtexReader.h:571
PtexReader::ConstDataPtr::_pixelsize
int _pixelsize
Definition: PtexReader.h:286
PtexCacheImpl::handlePendingDelete
void handlePendingDelete()
Definition: PtexCache.h:220
PtexReader::getFace
FaceData * getFace(int levelid, Level *level, int faceid)
Definition: PtexReader.h:497
PtexReader::numFaces
virtual int numFaces()
Number of faces stored in file.
Definition: PtexReader.h:87
PtexReader::_ownsCache
bool _ownsCache
Definition: PtexReader.h:574
PtexReader::PackedFace::~PackedFace
virtual ~PackedFace()
Definition: PtexReader.h:321
PtexReader::_extheader
ExtHeader _extheader
Definition: PtexReader.h:581
PtexReader::FaceData::release
virtual void release()
Release resources held by this pointer (pointer becomes invalid).
Definition: PtexReader.h:294
PtexReader::setOwnsCache
void setOwnsCache()
Definition: PtexReader.h:78
PtexReader::hasMipMaps
virtual bool hasMipMaps()
True if the file has mipmaps.
Definition: PtexReader.h:89
PtexReader::ConstDataPtr::getTile
virtual PtexFaceData * getTile(int)
Access a tile from the data block.
Definition: PtexReader.h:282
PtexReader::MetaData::getValue
virtual void getValue(const char *key, const float *&value, int &count)
Query the value of a given meta data entry.
Definition: PtexReader.h:168
PtexReader::extheader
const ExtHeader & extheader() const
Definition: PtexReader.h:107
PtexReader::TiledFaceBase::_tiles
safevector< FaceData * > _tiles
Definition: PtexReader.h:387
PtexReader::_error
std::string _error
Definition: PtexReader.h:576
PtexReader::TiledFaceBase::ntilesv
int ntilesv() const
Definition: PtexReader.h:374
PtexReader::_levelinfo
safevector< LevelInfo > _levelinfo
Definition: PtexReader.h:598
PtexReader::TiledReducedFace::~TiledReducedFace
~TiledReducedFace()
Definition: PtexReader.h:435
PtexIO::FaceDataHeader
Definition: PtexIO.h:78
PtexReader::MetaData::_lmdRefs
std::vector< LargeMetaData * > _lmdRefs
Definition: PtexReader.h:266
PtexReader::TiledFaceBase::getData
virtual void * getData()
Access the data from this data block.
Definition: PtexReader.h:367
PtexReader::ConstDataPtr::release
virtual void release()
Release resources held by this pointer (pointer becomes invalid).
Definition: PtexReader.h:274
PtexReader::hasEdits
virtual bool hasEdits()
True if the file has edit blocks.
Definition: PtexReader.h:88
PtexReader::reducelock
Mutex reducelock
Definition: PtexReader.h:466
PtexReader::TiledFaceBase::tileRes
virtual Ptex::Res tileRes()
Resolution of each tile in this data block.
Definition: PtexReader.h:369
PtexReader::_io
PtexInputHandler * _io
Definition: PtexReader.h:572
MeshType
MeshType
Type of base mesh for which the textures are defined.
Definition: Ptexture.h:190
PtexReader::ReductionKey::ReductionKey
ReductionKey(uint32_t faceid, Res res)
Definition: PtexReader.h:622
Ptex::String
Memory-managed string.
Definition: Ptexture.h:303
PtexReader::FaceData::FaceData
FaceData(void **parent, PtexCacheImpl *cache, Res res, int size)
Definition: PtexReader.h:292
safevector
#define safevector
Definition: PtexReader.h:69
PtexReader::DefaultInputHandler::buffer
char * buffer
Definition: PtexReader.h:547
PtexReader::MetaData::LargeMetaData::~LargeMetaData
virtual ~LargeMetaData()
Definition: PtexReader.h:214
PtexReader::PackedFace::getTile
virtual PtexFaceData * getTile(int)
Access a tile from the data block.
Definition: PtexReader.h:316
PtexReader::_levelpos
safevector< FilePos > _levelpos
Definition: PtexReader.h:599
PtexReader::TiledFace::_offsets
safevector< FilePos > _offsets
Definition: PtexReader.h:419
Ptex::DataType
DataType
Type of data stored in texture file.
Definition: Ptexture.h:83
PtexReader::DefaultInputHandler::read
virtual size_t read(void *buffer, size_t size, Handle handle)
Read a number of bytes from the file.
Definition: PtexReader.h:559
PtexReader::_metaedits
safevector< MetaEdit > _metaedits
Definition: PtexReader.h:608
PtexCachedData::ref
void ref()
Definition: PtexCache.h:288
PtexReader::TiledFace
Definition: PtexReader.h:391
PtexReader::Level::~Level
virtual ~Level()
Definition: PtexReader.h:462
PtexReader::_leveldatapos
FilePos _leveldatapos
Definition: PtexReader.h:585
PtexReader::MetaData::LargeMetaData::LargeMetaData
LargeMetaData(void **parent, PtexCacheImpl *cache, int size)
Definition: PtexReader.h:210
PtexReader::_levels
safevector< Level * > _levels
Definition: PtexReader.h:600
PtexReader::ReductionKey::res
Res res
Definition: PtexReader.h:620
PtexMetaData
Meta data accessor.
Definition: Ptexture.h:337
PtexReader::TiledFaceBase::_ntilesv
int _ntilesv
Definition: PtexReader.h:384
PtexReader::PackedFace::data
void * data()
Definition: PtexReader.h:307
PtexReader::MetaData
Definition: PtexReader.h:110
PtexReader::MetaData::newEntry
Entry * newEntry(uint8_t keysize, const char *key, uint8_t datatype, uint32_t datasize)
Definition: PtexReader.h:246
PtexReader::_metadata
MetaData * _metadata
Definition: PtexReader.h:592
PtexReader::alphaChannel
virtual int alphaChannel()
Index of alpha channel (if any).
Definition: PtexReader.h:85
PtexReader::TiledFaceBase::_dt
DataType _dt
Definition: PtexReader.h:381
PtexReader::DefaultInputHandler::close
virtual bool close(Handle handle)
Close a file.
Definition: PtexReader.h:562
PtexReader::TiledFaceBase::isConstant
virtual bool isConstant()
True if this data block is constant.
Definition: PtexReader.h:365
PtexReader::MetaData::release
virtual void release()
Release resources held by this pointer (pointer becomes invalid).
Definition: PtexReader.h:115
PtexReader::_ok
bool _ok
Definition: PtexReader.h:575
PtexReader::path
virtual const char * path()
Path that file was opened with.
Definition: PtexReader.h:80
PtexReader::TiledFaceBase
Definition: PtexReader.h:338
PtexReader::_path
std::string _path
Definition: PtexReader.h:579
PtexReader::MetaData::Entry::clear
void clear()
Definition: PtexReader.h:232
PtexReader::DefaultInputHandler::lastError
virtual const char * lastError()
Return the last error message encountered.
Definition: PtexReader.h:568
PtexReader::numChannels
virtual int numChannels()
Number of channels stored in file.
Definition: PtexReader.h:86
PtexReader::_constdata
uint8_t * _constdata
Definition: PtexReader.h:591
Res
Pixel resolution of a given texture.
Definition: Ptexture.h:274
PtexReader::FaceData
Definition: PtexReader.h:290
PtexReader::MetaEdit::zipsize
int zipsize
Definition: PtexReader.h:605
PtexReader::MetaData::getValue
virtual void getValue(const char *key, const int32_t *&value, int &count)
Query the value of a given meta data entry.
Definition: PtexReader.h:158
PtexReader::DefaultInputHandler
Definition: PtexReader.h:545
PtexCache.h
Ptex::MetaDataType
MetaDataType
Type of meta data entry.
Definition: Ptexture.h:107
PtexReader::MetaData::Entry::lmdData
LargeMetaData * lmdData
Definition: PtexReader.h:224
STATS_INC
#define STATS_INC(x)
Definition: PtexCache.h:97
PtexReader::FaceData::res
virtual Ptex::Res res()
Resolution of the texture held by this data block.
Definition: PtexReader.h:295
Res::vlog2
int8_t vlog2
log base 2 of v resolution, in texels
Definition: Ptexture.h:276
C
#define C(eid, aeid)
PtexInternal::_Mutex
Definition: PtexPlatform.h:120
PtexReader::PackedFace::_data
void * _data
Definition: PtexReader.h:324
PtexReader::TiledFaceBase::tileres
Res tileres() const
Definition: PtexReader.h:372
PtexReader::ConstDataPtr::getPixel
virtual void getPixel(int, int, void *result)
Read a single texel from the data block.
Definition: PtexReader.h:277
PtexIO.h
PtexReader::MetaData::getValue
virtual void getValue(const char *key, const double *&value, int &count)
Query the value of a given meta data entry.
Definition: PtexReader.h:178
PtexReader::PackedFace::PackedFace
PackedFace(void **parent, PtexCacheImpl *cache, Res res, int pixelsize, int size)
Definition: PtexReader.h:304
PtexReader::_reductions
ReductionMap _reductions
Definition: PtexReader.h:636
PtexReader::TiledFaceBase::_nchan
int _nchan
Definition: PtexReader.h:382
PtexReader::dataType
virtual Ptex::DataType dataType()
Type of data stored in file.
Definition: PtexReader.h:82
FilePos
off_t FilePos
Definition: PtexPlatform.h:85
Ptex::BorderMode
BorderMode
How to handle mesh border when filtering.
Definition: Ptexture.h:91
PtexReader::PackedFace::_pixelsize
int _pixelsize
Definition: PtexReader.h:323
PtexReader::TiledFace::_levelid
int _levelid
Definition: PtexReader.h:417
PtexReader::_faceedits
safevector< FaceEdit > _faceedits
Definition: PtexReader.h:616
PtexIO::FaceDataHeader::blocksize
uint32_t blocksize() const
Definition: PtexIO.h:80
PtexReader::TiledFaceBase::release
virtual void release()
Release resources held by this pointer (pointer becomes invalid).
Definition: PtexReader.h:355
PtexReader::_rfaceids
safevector< uint32_t > _rfaceids
Definition: PtexReader.h:596
DataSize
static int DataSize(DataType dt)
Look up size of given data type (in bytes).
Definition: Ptexture.h:245
PtexReader::_zstream
z_stream_s _zstream
Definition: PtexReader.h:638
PtexFaceData
Per-face texture data accessor.
Definition: Ptexture.h:388
PtexReader::MetaData::Entry::datasize
uint32_t datasize
Definition: PtexReader.h:221
PtexReader::getRes
Res getRes(int levelid, int faceid)
Definition: PtexReader.h:505
PtexReader::MetaData::MetaData
MetaData(MetaData **parent, PtexCacheImpl *cache, int size, PtexReader *reader)
Definition: PtexReader.h:112
Ptex::Res::vlog2
int8_t vlog2
log base 2 of v resolution, in texels
Definition: Ptexture.h:163
PtexReader::_lmdheaderpos
FilePos _lmdheaderpos
Definition: PtexReader.h:587
PtexReader::TiledFace::_reader
PtexReader * _reader
Definition: PtexReader.h:416
PtexReader::DefaultInputHandler::seek
virtual void seek(Handle handle, int64_t pos)
Seek to an absolute byte position in the input stream.
Definition: PtexReader.h:558
PtexReader::vBorderMode
virtual Ptex::BorderMode vBorderMode()
Mode for filtering texture access beyond mesh border.
Definition: PtexReader.h:84
PtexReader::levelinfo
const LevelInfo & levelinfo(int level) const
Definition: PtexReader.h:108
PtexReader::PackedFace::getPixel
virtual void getPixel(int u, int v, void *result)
Read a single texel from the data block.
Definition: PtexReader.h:309
PtexReader::MetaData::Entry::Entry
Entry()
Definition: PtexReader.h:228
PtexReader::ConstDataPtr::isTiled
virtual bool isTiled()
True if this data block is tiled.
Definition: PtexReader.h:280
PtexReader::MetaData::Entry::lmdPos
FilePos lmdPos
Definition: PtexReader.h:225
PtexReader::uBorderMode
virtual Ptex::BorderMode uBorderMode()
Mode for filtering texture access beyond mesh border.
Definition: PtexReader.h:83
PtexReader::FaceEdit::faceid
int faceid
Definition: PtexReader.h:613
PtexReader::PackedFace::isConstant
virtual bool isConstant()
True if this data block is constant.
Definition: PtexReader.h:308
PtexIO::ExtHeader
Definition: PtexIO.h:62
Res::ulog2
int8_t ulog2
log base 2 of u resolution, in texels
Definition: Ptexture.h:275
PtexReader::ConstDataPtr::getData
virtual void * getData()
Access the data from this data block.
Definition: PtexReader.h:279
PtexCachedData
Cache entry for allocated memory block.
Definition: PtexCache.h:282
DataType
DataType
Type of data stored in texture file.
Definition: Ptexture.h:196
PtexReader::TiledFaceBase::ntilesu
int ntilesu() const
Definition: PtexReader.h:373
PtexReader::ConstDataPtr::isConstant
virtual bool isConstant()
True if this data block is constant.
Definition: PtexReader.h:276
PtexReader::Level::offsets
safevector< FilePos > offsets
Definition: PtexReader.h:450
PtexReader::TiledFaceBase::_pixelsize
int _pixelsize
Definition: PtexReader.h:386
BorderMode
BorderMode
How to handle mesh border when filtering.
Definition: Ptexture.h:204
PtexReader::MetaData::LargeMetaData
Definition: PtexReader.h:207
PtexReader::ConstDataPtr::_data
void * _data
Definition: PtexReader.h:285
PtexReader::TiledFaceBase::_ntilesu
int _ntilesu
Definition: PtexReader.h:383
PtexReader::MetaEdit::pos
FilePos pos
Definition: PtexReader.h:604
PtexReader::PackedFace::tileRes
virtual Ptex::Res tileRes()
Resolution of each tile in this data block.
Definition: PtexReader.h:315
PtexReader::computeOffsets
void computeOffsets(FilePos pos, int noffsets, const FaceDataHeader *fdh, FilePos *offsets)
Definition: PtexReader.h:538
PtexUtils::ReduceFn
void ReduceFn(const void *src, int sstride, int ures, int vres, void *dst, int dstride, DataType dt, int nchannels)
Definition: PtexUtils.h:132
PtexIO
Definition: PtexIO.h:41
PtexReader
Definition: PtexReader.h:72
PtexReader::readlock
Mutex readlock
Definition: PtexReader.h:465
PtexReader::Level::fdh
safevector< FaceDataHeader > fdh
Definition: PtexReader.h:449
PtexReader::ReductionKey::ReductionKey
ReductionKey()
Definition: PtexReader.h:621
PtexReader::MetaData::Entry
Definition: PtexReader.h:218
PtexReader::TiledFaceBase::~TiledFaceBase
virtual ~TiledFaceBase()
Definition: PtexReader.h:378
PtexReader::_hasEdits
bool _hasEdits
Definition: PtexReader.h:593
PtexReader::_faceinfopos
FilePos _faceinfopos
Definition: PtexReader.h:582
PtexReader::MetaData::Entry::type
MetaDataType type
Definition: PtexReader.h:220
PtexReader::setError
void setError(const char *error)
Definition: PtexReader.h:470
PtexIO::FaceDataHeader::encoding
Encoding encoding() const
Definition: PtexIO.h:81
PtexReader::FaceEdit
Definition: PtexReader.h:610
PtexReader::_editdatapos
FilePos _editdatapos
Definition: PtexReader.h:589
PtexInputHandler::Handle
void * Handle
Definition: Ptexture.h:590
PtexReader::ConstDataPtr::res
virtual Ptex::Res res()
Resolution of the texture held by this data block.
Definition: PtexReader.h:275
PtexReader::_res_r
safevector< Res > _res_r
Definition: PtexReader.h:597
PtexReader::TiledFace::getTile
virtual PtexFaceData * getTile(int tile)
Access a tile from the data block.
Definition: PtexReader.h:404
PtexReader::_levelinfopos
FilePos _levelinfopos
Definition: PtexReader.h:584
PtexReader::datatype
DataType datatype() const
Definition: PtexReader.h:103
PtexReader::ConstantFace::isConstant
virtual bool isConstant()
True if this data block is constant.
Definition: PtexReader.h:331
Ptex::MeshType
MeshType
Type of base mesh for which the textures are defined.
Definition: Ptexture.h:77
PtexReader::_premultiply
bool _premultiply
Definition: PtexReader.h:573
MetaDataType
MetaDataType
Type of meta data entry.
Definition: Ptexture.h:220
PtexReader::Level
Definition: PtexReader.h:447
PtexReader::PackedFace::isTiled
virtual bool isTiled()
True if this data block is tiled.
Definition: PtexReader.h:314
PtexReader::_constdatapos
FilePos _constdatapos
Definition: PtexReader.h:583
PtexReader::getLevel
Level * getLevel(int levelid)
Definition: PtexReader.h:488
PtexReader::TiledFaceBase::isTiled
virtual bool isTiled()
True if this data block is tiled.
Definition: PtexReader.h:368
PtexReader::_fp
PtexInputHandler::Handle _fp
Definition: PtexReader.h:577
PtexReader::ConstantFace
Definition: PtexReader.h:327
PtexInternal
For internal use only.
Definition: PtexCache.h:48
PtexReader::PackedFace
Definition: PtexReader.h:302
PtexReader::nchannels
int nchannels() const
Definition: PtexReader.h:104
PtexReader::MetaData::Entry::key
const char * key
Definition: PtexReader.h:219
PtexReader::header
const Header & header() const
Definition: PtexReader.h:106
PtexReader::ConstantFace::getPixel
virtual void getPixel(int, int, void *result)
Read a single texel from the data block.
Definition: PtexReader.h:332
PtexReader::TiledReducedFace::_reducefn
PtexUtils::ReduceFn * _reducefn
Definition: PtexReader.h:443
PtexReader::ReductionKey::operator==
bool operator==(const ReductionKey &k) const
Definition: PtexReader.h:623
PtexReader::DefaultInputHandler::open
virtual Handle open(const char *path)
Open a file in read mode.
Definition: PtexReader.h:549
PtexReader::MetaData::numKeys
virtual int numKeys()
Query number of meta data entries stored in file.
Definition: PtexReader.h:126
PtexReader::MetaData::getValue
virtual void getValue(const char *key, const int16_t *&value, int &count)
Query the value of a given meta data entry.
Definition: PtexReader.h:148
PtexReader::_metadatapos
FilePos _metadatapos
Definition: PtexReader.h:586
PtexReader::PackedFace::getData
virtual void * getData()
Access the data from this data block.
Definition: PtexReader.h:313
PtexReader::_header
Header _header
Definition: PtexReader.h:580
PtexReader::_pixelsize
int _pixelsize
Definition: PtexReader.h:590
PtexReader::MetaData::getValue
virtual void getValue(const char *key, const int8_t *&value, int &count)
Query the value of a given meta data entry.
Definition: PtexReader.h:141
Ptex::Res::ulog2
int8_t ulog2
log base 2 of u resolution, in texels
Definition: Ptexture.h:162
PtexReader::FaceEdit::fdh
FaceDataHeader fdh
Definition: PtexReader.h:614
PtexTexture
Interface for reading data from a ptex file.
Definition: Ptexture.h:439
PtexReader::MetaData::Entry::isLmd
bool isLmd
Definition: PtexReader.h:223
PtexReader::getConstData
uint8_t * getConstData()
Definition: PtexReader.h:496
PtexReader::ReductionMap
PtexHashMap< ReductionKey, FaceData *, ReductionKey::Hasher > ReductionMap
Definition: PtexReader.h:635
PtexReader::Level::faces
safevector< FaceData * > faces
Definition: PtexReader.h:451
Ptex::Res
Pixel resolution of a given texture.
Definition: Ptexture.h:161
PtexReader::TiledFace::_fdh
safevector< FaceDataHeader > _fdh
Definition: PtexReader.h:418
PtexCachedFile
Cache entry for open file handle.
Definition: PtexCache.h:265
PtexReader::_faceinfo
safevector< FaceInfo > _faceinfo
Definition: PtexReader.h:595
PtexReader::MetaData::LargeMetaData::_data
void * _data
Definition: PtexReader.h:215
PtexReader::meshType
virtual Ptex::MeshType meshType()
Type of mesh for which texture data is defined.
Definition: PtexReader.h:81
PtexReader::TiledReducedFace
Definition: PtexReader.h:423
PtexReader::MetaData::_map
MetaMap _map
Definition: PtexReader.h:264
PtexHashMap.h
Contains PtexHashMap, a lightweight hash table.
PtexReader::FaceEdit::pos
FilePos pos
Definition: PtexReader.h:612
PtexReader::ConstDataPtr::ConstDataPtr
ConstDataPtr(void *data, int pixelsize)
Definition: PtexReader.h:272
PtexCacheImpl
Ptex cache implementation.
Definition: PtexCache.h:192
PtexReader::TiledFaceBase::ntiles
int ntiles() const
Definition: PtexReader.h:375
PtexReader::ConstDataPtr
Definition: PtexReader.h:270
PtexReader::TiledFaceBase::_ntiles
int _ntiles
Definition: PtexReader.h:385
PtexLruItem::orphan
void orphan()
Definition: PtexCache.h:107
PtexReader::ReductionKey::Hasher
Definition: PtexReader.h:625
PtexReader::ConstDataPtr::tileRes
virtual Ptex::Res tileRes()
Resolution of each tile in this data block.
Definition: PtexReader.h:281
PtexReader::MetaEdit::memsize
int memsize
Definition: PtexReader.h:606
PtexInternal::AutoLock
Automatically acquire and release lock within enclosing scope.
Definition: PtexMutex.h:58
PtexReader::MetaData::getKey
virtual void getKey(int n, const char *&key, MetaDataType &type)
Query the name and type of a meta data entry.
Definition: PtexReader.h:127
Ptex::FaceInfo
Information about a face, as stored in the Ptex file header.
Definition: Ptexture.h:237
PtexReader::MetaData::Entry::~Entry
~Entry()
Definition: PtexReader.h:231
PtexReader::TiledFaceBase::_tileres
Res _tileres
Definition: PtexReader.h:380
PtexReader::TiledFaceBase::TiledFaceBase
TiledFaceBase(void **parent, PtexCacheImpl *cache, Res res, Res tileres, DataType dt, int nchan)
Definition: PtexReader.h:340
PtexReader::MetaData::getValue
virtual void getValue(const char *key, const char *&value)
Query the value of a given meta data entry.
Definition: PtexReader.h:134
PtexReader::ReductionKey
Definition: PtexReader.h:618
PtexReader::pixelsize
int pixelsize() const
Definition: PtexReader.h:105
PtexReader::MetaData::addEntry
void addEntry(uint8_t keysize, const char *key, uint8_t datatype, uint32_t datasize, void *data)
Definition: PtexReader.h:188
PtexReader::MetaData::LargeMetaData::data
void * data()
Definition: PtexReader.h:212
PtexReader::TiledFace::TiledFace
TiledFace(void **parent, PtexCacheImpl *cache, Res res, Res tileres, int levelid, PtexReader *reader)
Definition: PtexReader.h:393
PtexReader::MetaData::addLmdEntry
void addLmdEntry(uint8_t keysize, const char *key, uint8_t datatype, uint32_t datasize, FilePos filepos, uint32_t zipsize)
Definition: PtexReader.h:196
PtexIO::LevelInfo
Definition: PtexIO.h:71
PtexReader::FaceData::_res
Res _res
Definition: PtexReader.h:299
PtexReader::seek
void seek(FilePos pos)
Definition: PtexReader.h:477
PtexReader::MetaData::Entry::lmdZipSize
uint32_t lmdZipSize
Definition: PtexReader.h:226
PtexUtils.h
PtexReader::ReductionKey::faceid
int faceid
Definition: PtexReader.h:619
PtexReader::MetaData::_entries
safevector< Entry * > _entries
Definition: PtexReader.h:265
PtexReader::tell
FilePos tell()
Definition: PtexReader.h:476
PtexReader::Level::Level
Level(void **parent, PtexCacheImpl *cache, int nfaces)
Definition: PtexReader.h:453
PtexReader::MetaData::Entry::data
void * data
Definition: PtexReader.h:222
PtexReader::_pos
FilePos _pos
Definition: PtexReader.h:578
Ptexture.h
Public API classes for reading, writing, caching, and filtering Ptex files.
PtexReader::unpackedSize
int unpackedSize(FaceDataHeader fdh, int levelid, int faceid)
Definition: PtexReader.h:516
PtexReader::ConstantFace::ConstantFace
ConstantFace(void **parent, PtexCacheImpl *cache, int pixelsize)
Definition: PtexReader.h:329
PtexReader::TiledReducedFace::TiledReducedFace
TiledReducedFace(void **parent, PtexCacheImpl *cache, Res res, Res tileres, DataType dt, int nchan, TiledFaceBase *parentface, PtexUtils::ReduceFn reducefn)
Definition: PtexReader.h:425
PtexReader::MetaData::MetaMap
std::map< std::string, Entry > MetaMap
Definition: PtexReader.h:263
PtexHashMap< ReductionKey, FaceData *, ReductionKey::Hasher >
PtexReader::MetaData::_reader
PtexReader * _reader
Definition: PtexReader.h:262
PtexReader::MetaEdit
Definition: PtexReader.h:602
PtexInputHandler
Custom handler interface for intercepting and redirecting Ptex input stream calls.
Definition: Ptexture.h:585
PtexReader::_lmddatapos
FilePos _lmddatapos
Definition: PtexReader.h:588
PtexReader::TiledReducedFace::_parentface
TiledFaceBase * _parentface
Definition: PtexReader.h:442