OpenSubdiv
|
Applies refinement operations to generic primvar data. More...
#include <primvarRefiner.h>
Public Member Functions | |
PrimvarRefinerReal (TopologyRefiner const &refiner) | |
~PrimvarRefinerReal () | |
TopologyRefiner const & | GetTopologyRefiner () const |
Primvar data interpolation | |
| |
template<class T , class U > | |
void | Interpolate (int level, T const &src, U &dst) const |
Apply vertex interpolation weights to a primvar buffer for a single level of refinement. | |
template<class T , class U > | |
void | InterpolateVarying (int level, T const &src, U &dst) const |
Apply only varying interpolation weights to a primvar buffer for a single level of refinement. | |
template<class T , class U > | |
void | InterpolateFaceUniform (int level, T const &src, U &dst) const |
Refine uniform (per-face) primvar data between levels. | |
template<class T , class U > | |
void | InterpolateFaceVarying (int level, T const &src, U &dst, int channel=0) const |
Apply face-varying interpolation weights to a primvar buffer associated with a particular face-varying channel. | |
template<class T , class U > | |
void | Limit (T const &src, U &dstPos) const |
Apply limit weights to a primvar buffer. | |
template<class T , class U , class U1 , class U2 > | |
void | Limit (T const &src, U &dstPos, U1 &dstTan1, U2 &dstTan2) const |
template<class T , class U > | |
void | LimitFaceVarying (T const &src, U &dst, int channel=0) const |
Applies refinement operations to generic primvar data.
Definition at line 56 of file primvarRefiner.h.
|
inline |
Definition at line 59 of file primvarRefiner.h.
|
inline |
Definition at line 60 of file primvarRefiner.h.
|
inline |
Definition at line 62 of file primvarRefiner.h.
|
inline |
Apply vertex interpolation weights to a primvar buffer for a single level of refinement.
The destination buffer must allocate an array of data for all the refined vertices, i.e. at least refiner.GetLevel(level).GetNumVertices()
level | The refinement level |
src | Source primvar buffer (templating control vertex data) |
dst | Destination primvar buffer (templating refined vertex data) |
Definition at line 267 of file primvarRefiner.h.
|
inline |
Refine uniform (per-face) primvar data between levels.
Data is simply copied from a parent face to its child faces and does not involve any weighting. Setting the source primvar data for the base level to be the index of each face allows the propagation of the base face to primvar data for child faces in all levels.
The destination buffer must allocate an array of data for all the refined faces, i.e. at least refiner.GetLevel(level).GetNumFaces()
level | The refinement level |
src | Source primvar buffer |
dst | Destination primvar buffer |
Definition at line 394 of file primvarRefiner.h.
|
inline |
Apply face-varying interpolation weights to a primvar buffer associated with a particular face-varying channel.
Unlike vertex and varying primvar buffers, there is not a 1-to-1 correspondence between vertices and face-varying values – typically there are more face-varying values than vertices. Each face-varying channel is also independent in how its values relate to the vertices.
The destination buffer must allocate an array of data for all the refined values, i.e. at least refiner.GetLevel(level).GetNumFVarValues(channel).
Definition at line 293 of file primvarRefiner.h.
|
inline |
Apply only varying interpolation weights to a primvar buffer for a single level of refinement.
This method can useful if the varying primvar data does not need to be re-computed over time.
The destination buffer must allocate an array of data for all the refined vertices, i.e. at least refiner.GetLevel(level).GetNumVertices()
level | The refinement level |
src | Source primvar buffer (templating control vertex data) |
dst | Destination primvar buffer (templating refined vertex data) |
Definition at line 412 of file primvarRefiner.h.
|
inline |
Apply limit weights to a primvar buffer.
The source buffer must refer to an array of previously interpolated vertex data for the last refinement level. The destination buffer must allocate an array for all vertices at the last refinement level, i.e. at least refiner.GetLevel(refiner.GetMaxLevel()).GetNumVertices()
src | Source primvar buffer (refined data) for last level |
dstPos | Destination primvar buffer (data at the limit) |
Definition at line 319 of file primvarRefiner.h.
|
inline |
Definition at line 344 of file primvarRefiner.h.
|
inline |
Definition at line 369 of file primvarRefiner.h.