Ptex
Public Member Functions | Protected Attributes | Friends | List of all members
PtexReader::TiledFace Class Reference

#include <PtexReader.h>

Inheritance diagram for PtexReader::TiledFace:
PtexReader::TiledFaceBase PtexReader::FaceData PtexFaceData

Public Member Functions

 TiledFace (PtexReader *reader, Res resArg, Res tileresArg, int levelid)
 
virtual PtexFaceDatagetTile (int tile)
 Access a tile from the data block. More...
 
void readTile (int tile, FaceData *&data)
 
size_t memUsed ()
 
- Public Member Functions inherited from PtexReader::TiledFaceBase
 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 FaceDatareduce (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...
 

Protected Attributes

int _levelid
 
std::vector< FaceDataHeader_fdh
 
std::vector< FilePos_offsets
 
- Protected Attributes inherited from PtexReader::TiledFaceBase
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
 

Friends

class PtexReader
 

Additional Inherited Members

- Protected Member Functions inherited from PtexReader::TiledFaceBase
size_t baseExtraMemUsed ()
 
virtual ~TiledFaceBase ()
 
- Protected Member Functions inherited from PtexFaceData
virtual ~PtexFaceData ()
 Destructor not for public use. Use release() instead. More...
 

Detailed Description

Definition at line 470 of file PtexReader.h.

Constructor & Destructor Documentation

◆ TiledFace()

PtexReader::TiledFace::TiledFace ( PtexReader reader,
Res  resArg,
Res  tileresArg,
int  levelid 
)
inline

Definition at line 472 of file PtexReader.h.

References _fdh, PtexReader::TiledFaceBase::_ntiles, and _offsets.

Member Function Documentation

◆ getTile()

virtual PtexFaceData* PtexReader::TiledFace::getTile ( int  tile)
inlinevirtual

Access a tile from the data block.

Tiles are accessed in v-major order.

Implements PtexFaceData.

Definition at line 479 of file PtexReader.h.

References PtexReader::TiledFaceBase::_tiles, and readTile().

◆ memUsed()

size_t PtexReader::TiledFace::memUsed ( )
inline

Definition at line 486 of file PtexReader.h.

References _fdh, _offsets, and PtexReader::TiledFaceBase::baseExtraMemUsed().

Referenced by PtexReader::readFaceData().

◆ readTile()

void PtexReader::TiledFace::readTile ( int  tile,
FaceData *&  data 
)

Definition at line 635 of file PtexReader.cpp.

Referenced by getTile().

Friends And Related Function Documentation

◆ PtexReader

friend class PtexReader
friend

Definition at line 491 of file PtexReader.h.

Member Data Documentation

◆ _fdh

std::vector<FaceDataHeader> PtexReader::TiledFace::_fdh
protected

Definition at line 493 of file PtexReader.h.

Referenced by memUsed(), PtexReader::readFaceData(), and TiledFace().

◆ _levelid

int PtexReader::TiledFace::_levelid
protected

Definition at line 492 of file PtexReader.h.

◆ _offsets

std::vector<FilePos> PtexReader::TiledFace::_offsets
protected

Definition at line 494 of file PtexReader.h.

Referenced by memUsed(), PtexReader::readFaceData(), and TiledFace().


The documentation for this class was generated from the following files: