Ptex
|
Interface for filtered sampling of ptex data files. More...
#include <Ptexture.h>
Classes | |
struct | Options |
Choose filter options. More... | |
Public Types | |
enum | FilterType { f_point, f_bilinear, f_box, f_gaussian, f_bicubic, f_bspline, f_catmullrom, f_mitchell } |
Filter types. More... | |
Public Member Functions | |
virtual void | release ()=0 |
Release resources held by this pointer (pointer becomes invalid). More... | |
virtual void | eval (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)=0 |
Apply filter to a ptex data file. More... | |
Static Public Member Functions | |
static PtexFilter * | getFilter (PtexTexture *tx, const Options &opts) |
Protected Member Functions | |
virtual | ~PtexFilter () |
Destructor not for public use. Use release() instead. More... | |
Interface for filtered sampling of ptex data files.
PtexFilter instances are obtained by calling one of the particular static methods. When finished using the filter, it must be returned to the library using release().
To apply the filter to a ptex data file, use the eval() method.
Definition at line 950 of file Ptexture.h.
Filter types.
Definition at line 957 of file Ptexture.h.
|
inlineprotectedvirtual |
Destructor not for public use. Use release() instead.
Definition at line 953 of file Ptexture.h.
|
pure virtual |
Apply filter to a ptex data file.
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.
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] |
Implemented in PtexPointFilterTri, PtexPointFilter, PtexTriangleFilter, and PtexSeparableFilter.
|
static |
Definition at line 419 of file PtexFilters.cpp.
References f_bicubic, f_bilinear, f_box, f_bspline, f_catmullrom, f_gaussian, f_mitchell, f_point, PtexFilter::Options::filter, PtexTexture::meshType(), Ptex::mt_quad, Ptex::mt_triangle, and PtexFilter::Options::sharpness.
|
pure virtual |
Release resources held by this pointer (pointer becomes invalid).
Implemented in PtexPointFilterTri, PtexTriangleFilter, PtexPointFilter, and PtexSeparableFilter.