PtexReader::TiledFaceBase Class Reference

`#include <PtexReader.h>`

Inheritance diagram for PtexReader::TiledFaceBase:

## Public Member Functions

| TiledFaceBase (PtexReader *reader, Res resArg, Res tileresArg)
virtual void | release ()
| Release resources held by this pointer (pointer becomes invalid).
virtual bool | isConstant ()
| True if this data block is constant.
virtual void | getPixel (int u, int v, void *result)
| Read a single texel from the data block.
virtual void * | getData ()
| Access the data from this data block.
virtual bool | isTiled ()
| True if this data block is tiled.
virtual Ptex::Res | tileRes ()
| Resolution of each tile in this data block.
virtual FaceData * | reduce (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.
Public Member Functions inherited from PtexFaceData
virtual PtexFaceData * | getTile (int tile)=0
| Access a tile from the data block.

## Protected Member Functions

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

## 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

Definition at line 423 of file PtexReader.h.

References _dt, _nchan, _ntiles, _ntilesu, _ntilesv, _pixelsize, PtexReader::FaceData::_res, _tiles, PtexReader::datatype(), and PtexReader::nchannels().

## ~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.

## 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

Implements PtexReader::FaceData.

Definition at line 979 of file PtexReader.cpp.

References PtexReader::_header, PtexReader::_pixelsize, PtexUtils::copy(), PtexUtils::fill(), PtexFaceData::getData(), PtexReader::getData(), PtexFaceData::isConstant(), PtexReader::TiledReducedFace::memUsed(), Header::meshtype, and PtexReader::release().

## 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

Definition at line 464 of file PtexReader.h.

Referenced by ntiles(), PtexReader::readFaceData(), PtexReader::TiledFace::TiledFace(), and TiledFaceBase().

## _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

Definition at line 466 of file PtexReader.h.

Referenced by baseExtraMemUsed(), PtexReader::TiledFace::getTile(), TiledFaceBase(), and ~TiledFaceBase().

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

- PtexReader.h
- PtexReader.cpp