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 PtexFaceData PtexReader::TiledFace PtexReader::TiledReducedFace

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 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...
 
- Public Member Functions inherited from PtexFaceData
virtual PtexFaceDatagetTile (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
 

Detailed Description

Definition at line 421 of file PtexReader.h.

Constructor & Destructor Documentation

◆ TiledFaceBase()

PtexReader::TiledFaceBase::TiledFaceBase ( PtexReader reader,
Res  resArg,
Res  tileresArg 
)
inline

◆ ~TiledFaceBase()

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

Definition at line 452 of file PtexReader.h.

References _tiles.

Member Function Documentation

◆ baseExtraMemUsed()

size_t PtexReader::TiledFaceBase::baseExtraMemUsed ( )
inlineprotected

Definition at line 450 of file PtexReader.h.

References _tiles.

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

◆ getData()

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 440 of file PtexReader.h.

◆ getPixel()

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 1104 of file PtexReader.cpp.

References PtexFaceData::getPixel().

◆ isConstant()

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

True if this data block is constant.

Implements PtexFaceData.

Definition at line 438 of file PtexReader.h.

◆ isTiled()

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 441 of file PtexReader.h.

◆ ntiles()

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

Definition at line 447 of file PtexReader.h.

References _ntiles.

◆ ntilesu()

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

Definition at line 445 of file PtexReader.h.

References _ntilesu.

◆ ntilesv()

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

Definition at line 446 of file PtexReader.h.

References _ntilesv.

◆ reduce()

PtexReader::FaceData * PtexReader::TiledFaceBase::reduce ( PtexReader r,
Res  newres,
PtexUtils::ReduceFn  reducefn,
size_t &  newMemUsed 
)
virtual

◆ release()

virtual void PtexReader::TiledFaceBase::release ( )
inlinevirtual

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

Reimplemented from PtexReader::FaceData.

Definition at line 437 of file PtexReader.h.

◆ tileRes()

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

Resolution of each tile in this data block.

Implements PtexFaceData.

Definition at line 442 of file PtexReader.h.

References _tileres.

◆ tileres()

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

Definition at line 444 of file PtexReader.h.

References _tileres.

Member Data Documentation

◆ _dt

DataType PtexReader::TiledFaceBase::_dt
protected

Definition at line 460 of file PtexReader.h.

Referenced by TiledFaceBase().

◆ _nchan

int PtexReader::TiledFaceBase::_nchan
protected

Definition at line 461 of file PtexReader.h.

Referenced by TiledFaceBase().

◆ _ntiles

int PtexReader::TiledFaceBase::_ntiles
protected

◆ _ntilesu

int PtexReader::TiledFaceBase::_ntilesu
protected

Definition at line 462 of file PtexReader.h.

Referenced by ntilesu(), and TiledFaceBase().

◆ _ntilesv

int PtexReader::TiledFaceBase::_ntilesv
protected

Definition at line 463 of file PtexReader.h.

Referenced by ntilesv(), and TiledFaceBase().

◆ _pixelsize

int PtexReader::TiledFaceBase::_pixelsize
protected

Definition at line 465 of file PtexReader.h.

Referenced by TiledFaceBase().

◆ _reader

PtexReader* PtexReader::TiledFaceBase::_reader
protected

Definition at line 458 of file PtexReader.h.

◆ _tileres

Res PtexReader::TiledFaceBase::_tileres
protected

Definition at line 459 of file PtexReader.h.

Referenced by tileRes(), and tileres().

◆ _tiles

std::vector<FaceData*> PtexReader::TiledFaceBase::_tiles
protected

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