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

#include <PtexReader.h>

Inheritance diagram for PtexReader::TiledFaceBase:
PtexReader::FaceData PtexCachedData PtexFaceData PtexLruItem PtexReader::TiledFace PtexReader::TiledReducedFace

Public Member Functions

 TiledFaceBase (void **parent, PtexCacheImpl *cache, Res res, Res tileres, DataType dt, int nchan)
 
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 void reduce (FaceData *&, PtexReader *, Res newres, PtexUtils::ReduceFn)
 
Res tileres () const
 
int ntilesu () const
 
int ntilesv () const
 
int ntiles () const
 
- Public Member Functions inherited from PtexReader::FaceData
 FaceData (void **parent, PtexCacheImpl *cache, Res res, int size)
 
virtual Ptex::Res res ()
 Resolution of the texture held by this data block. More...
 
virtual void reduce (FaceData *&, PtexReader *, Res newres, PtexUtils::ReduceFn)=0
 
- Public Member Functions inherited from PtexCachedData
 PtexCachedData (void **parent, PtexCacheImpl *cache, int size)
 
void ref ()
 
void unref ()
 
- Public Member Functions inherited from PtexLruItem
bool inuse ()
 
void orphan ()
 
- Public Member Functions inherited from PtexFaceData
virtual PtexFaceDatagetTile (int tile)=0
 Access a tile from the data block. More...
 

Protected Member Functions

virtual ~TiledFaceBase ()
 
- Protected Member Functions inherited from PtexCachedData
void incSize (int size)
 
virtual ~PtexCachedData ()
 
- Protected Member Functions inherited from PtexLruItem
 PtexLruItem (void **parent=0)
 
virtual ~PtexLruItem ()
 
- Protected Member Functions inherited from PtexFaceData
virtual ~PtexFaceData ()
 Destructor not for public use. Use release() instead. More...
 

Protected Attributes

Res _tileres
 
DataType _dt
 
int _nchan
 
int _ntilesu
 
int _ntilesv
 
int _ntiles
 
int _pixelsize
 
safevector< FaceData * > _tiles
 
- Protected Attributes inherited from PtexReader::FaceData
Res _res
 
- Protected Attributes inherited from PtexCachedData
PtexCacheImpl_cache
 

Additional Inherited Members

- Static Public Member Functions inherited from PtexLruItem
template<typename T >
static void orphanList (T &list)
 

Detailed Description

Definition at line 338 of file PtexReader.h.

Constructor & Destructor Documentation

PtexReader::TiledFaceBase::TiledFaceBase ( void **  parent,
PtexCacheImpl cache,
Res  res,
Res  tileres,
DataType  dt,
int  nchan 
)
inline

Definition at line 340 of file PtexReader.h.

virtual PtexReader::TiledFaceBase::~TiledFaceBase ( )
inlineprotectedvirtual

Definition at line 378 of file PtexReader.h.

Member Function Documentation

virtual void* PtexReader::TiledFaceBase::getData ( )
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 367 of file PtexReader.h.

void PtexReader::TiledFaceBase::getPixel ( int  u,
int  v,
void *  result 
)
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 1285 of file PtexReader.cpp.

References PtexFaceData::getPixel().

virtual bool PtexReader::TiledFaceBase::isConstant ( )
inlinevirtual

True if this data block is constant.

Implements PtexFaceData.

Definition at line 365 of file PtexReader.h.

virtual bool PtexReader::TiledFaceBase::isTiled ( )
inlinevirtual

True if this data block is tiled.

If tiled, the data must be access per-tile via getTile().

Implements PtexFaceData.

Definition at line 368 of file PtexReader.h.

int PtexReader::TiledFaceBase::ntiles ( ) const
inline

Definition at line 375 of file PtexReader.h.

int PtexReader::TiledFaceBase::ntilesu ( ) const
inline

Definition at line 373 of file PtexReader.h.

int PtexReader::TiledFaceBase::ntilesv ( ) const
inline

Definition at line 374 of file PtexReader.h.

void PtexReader::TiledFaceBase::reduce ( FaceData *&  face,
PtexReader r,
Res  newres,
PtexUtils::ReduceFn  reducefn 
)
virtual
virtual void PtexReader::TiledFaceBase::release ( )
inlinevirtual

Release resources held by this pointer (pointer becomes invalid).

Reimplemented from PtexReader::FaceData.

Definition at line 355 of file PtexReader.h.

References PtexCacheImpl::handlePendingDelete().

virtual Ptex::Res PtexReader::TiledFaceBase::tileRes ( )
inlinevirtual

Resolution of each tile in this data block.

Implements PtexFaceData.

Definition at line 369 of file PtexReader.h.

Res PtexReader::TiledFaceBase::tileres ( ) const
inline

Definition at line 372 of file PtexReader.h.

Member Data Documentation

DataType PtexReader::TiledFaceBase::_dt
protected

Definition at line 381 of file PtexReader.h.

int PtexReader::TiledFaceBase::_nchan
protected

Definition at line 382 of file PtexReader.h.

int PtexReader::TiledFaceBase::_ntiles
protected

Definition at line 385 of file PtexReader.h.

Referenced by PtexReader::readFaceData().

int PtexReader::TiledFaceBase::_ntilesu
protected

Definition at line 383 of file PtexReader.h.

int PtexReader::TiledFaceBase::_ntilesv
protected

Definition at line 384 of file PtexReader.h.

int PtexReader::TiledFaceBase::_pixelsize
protected

Definition at line 386 of file PtexReader.h.

Res PtexReader::TiledFaceBase::_tileres
protected

Definition at line 380 of file PtexReader.h.

safevector<FaceData*> PtexReader::TiledFaceBase::_tiles
protected

Definition at line 387 of file PtexReader.h.


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