Ptex: PtexPointFilterTri Class Reference

Ptex

Public Member Functions | Private Attributes | List of all members
PtexPointFilterTri Class Reference

Point-sampling filter for triangular textures. More...

Inheritance diagram for PtexPointFilterTri:

## Public Member Functions
| PtexPointFilterTri (PtexTexture *tx)
virtual void | release ()
| Release resources held by this pointer (pointer becomes invalid).
virtual void | eval (float *result, int firstchan, int nchannels, int faceid, float u, float v, float, float, float, float, float, float)
| Apply filter to a ptex data file.

## Private Attributes
PtexTexture * | _tx

## Additional Inherited Members
Public Types inherited from PtexFilter
enum | FilterType { f_point , f_bilinear , f_box , f_gaussian , f_bicubic , f_bspline , f_catmullrom , f_mitchell }
| Filter types. More...
Static Public Member Functions inherited from PtexFilter
static void | eval (PtexTexture *tx, const Options &opts, float *result, int firstchan, int nchannels, int faceid, float u, float v, float uw1, float vw1, float uw2, float vw2, float width=1, float blur=0)
static PtexFilter * | getFilter (PtexTexture *tx, const Options &opts)
Protected Member Functions inherited from PtexFilter
virtual | ~PtexFilter ()
| Destructor not for public use. Use release() instead.

## Detailed Description

Point-sampling filter for triangular textures.

Definition at line 70 of file PtexFilters.cpp.

## Constructor & Destructor Documentation

## ◆ PtexPointFilterTri()

PtexPointFilterTri::PtexPointFilterTri | ( | PtexTexture * | tx | ) |
| inline

Definition at line 73 of file PtexFilters.cpp.

References _tx.

Referenced by PtexFilter::eval(), and PtexFilter::getFilter().

## Member Function Documentation

## ◆ eval()

virtual void PtexPointFilterTri::eval | ( | float * | result,
|  | int | firstchan,
|  | int | nchannels,
|  | int | faceid,
|  | float | u,
|  | float | v,
|  | float | uw1,
|  | float | vw1,
|  | float | uw2,
|  | float | vw2,
|  | float | width,
|  | float | blur )
| inlinevirtual

Apply filter to a ptex data file.

Deprecated. (use static eval method)

The filter region is a parallelogram centered at the given (u,v) coordinate with sides defined by two vectors [uw1, vw1] and [uw2, vw2]. For an axis-aligned rectangle, the vectors are [uw, 0] and [0, vw]. See Filter Footprint for details.

Parameters

  result | Buffer to hold filter result. Must be large enough to hold nchannels worth of data.
  firstchan | First channel to evaluate [0..tx->numChannels()-1]
  nchannels | Number of channels to evaluate
  faceid | Face index [0..tx->numFaces()-1]
  u | U coordinate, normalized [0..1]
  v | V coordinate, normalized [0..1]
  uw1 | U filter width 1, normalized [0..1]
  vw1 | V filter width 1, normalized [0..1]
  uw2 | U filter width 2, normalized [0..1]
  vw2 | V filter width 2, normalized [0..1]
  width | scale factor for filter width
  blur | amount to add to filter width [0..1]

Implements PtexFilter.

Definition at line 75 of file PtexFilters.cpp.

References _tx, PtexTexture::getFaceInfo(), PtexTexture::getPixel(), PtexTexture::numFaces(), Ptex::FaceInfo::res, and Ptex::Res::u().

## ◆ release()

virtual void PtexPointFilterTri::release | ( |  | ) |
| inlinevirtual

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

Implements PtexFilter.

Definition at line 74 of file PtexFilters.cpp.

## Member Data Documentation

## ◆ _tx

PtexTexture* PtexPointFilterTri::_tx
| private

Definition at line 101 of file PtexFilters.cpp.

Referenced by eval(), and PtexPointFilterTri().

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

- PtexFilters.cpp