Table of subdivision stencils. More...
#include <stencilTable.h>
Public Member Functions | |
int | GetNumStencils () const |
Returns the number of stencils in the table. More... | |
int | GetNumControlVertices () const |
Returns the number of control vertices indexed in the table. More... | |
Stencil | GetStencil (Index i) const |
Returns a Stencil at index i in the table. More... | |
std::vector< int > const & | GetSizes () const |
Returns the number of control vertices of each stencil in the table. More... | |
std::vector< Index > const & | GetOffsets () const |
Returns the offset to a given stencil (factory may leave empty) More... | |
std::vector< Index > const & | GetControlIndices () const |
Returns the indices of the control vertices. More... | |
std::vector< float > const & | GetWeights () const |
Returns the stencil interpolation weights. More... | |
Stencil | operator[] (Index index) const |
Returns the stencil at index i in the table. More... | |
template<class T > | |
void | UpdateValues (T const *controlValues, T *values, Index start=-1, Index end=-1) const |
Updates point values based on the control values. More... | |
void | Clear () |
Clears the stencils from the table. More... | |
Protected Member Functions | |
template<class T > | |
void | update (T const *controlValues, T *values, std::vector< float > const &valueWeights, Index start, Index end) const |
void | generateOffsets () |
void | resize (int nstencils, int nelems) |
StencilTable () | |
StencilTable (int numControlVerts) | |
Protected Attributes | |
int | _numControlVertices |
std::vector< int > | _sizes |
std::vector< Index > | _offsets |
std::vector< Index > | _indices |
std::vector< float > | _weights |
Friends | |
class | StencilTableFactory |
class | GregoryBasis |
Table of subdivision stencils.
Stencils are the most direct methods of evaluation of locations on the limit of a surface. Every point of a limit surface can be computed by linearly blending a collection of coarse control vertices.
A stencil assigns a series of control vertex indices with a blending weight that corresponds to a unique parametric location of the limit surface. When the control vertices move in space, the limit location can be very efficiently recomputed simply by applying the blending weights to the series of coarse control vertices.
Definition at line 125 of file stencilTable.h.
|
inlineprotected |
Definition at line 207 of file stencilTable.h.
|
inlineprotected |
Definition at line 208 of file stencilTable.h.
void Clear | ( | ) |
Clears the stencils from the table.
|
inlineprotected |
Definition at line 383 of file stencilTable.h.
|
inline |
Returns the indices of the control vertices.
Definition at line 160 of file stencilTable.h.
|
inline |
Returns the number of control vertices indexed in the table.
Definition at line 142 of file stencilTable.h.
|
inline |
Returns the number of stencils in the table.
Definition at line 137 of file stencilTable.h.
|
inline |
Returns the offset to a given stencil (factory may leave empty)
Definition at line 155 of file stencilTable.h.
|
inline |
Returns the number of control vertices of each stencil in the table.
Definition at line 150 of file stencilTable.h.
Returns a Stencil at index i in the table.
Definition at line 402 of file stencilTable.h.
|
inline |
Returns the stencil interpolation weights.
Definition at line 165 of file stencilTable.h.
Returns the stencil at index i in the table.
Definition at line 413 of file stencilTable.h.
|
inlineprotected |
Definition at line 394 of file stencilTable.h.
|
protected |
Definition at line 350 of file stencilTable.h.
|
inline |
Updates point values based on the control values.
GetNumStencils()
elements.controlValues | Buffer with primvar data for the control vertices |
values | Destination buffer for the interpolated primvar data |
start | (skip to )index of first value to update |
end | Index of last value to update |
Definition at line 187 of file stencilTable.h.
|
friend |
Definition at line 214 of file stencilTable.h.
|
friend |
Definition at line 212 of file stencilTable.h.
|
protected |
Definition at line 219 of file stencilTable.h.
|
protected |
Definition at line 216 of file stencilTable.h.
|
protected |
Definition at line 219 of file stencilTable.h.
|
protected |
Definition at line 218 of file stencilTable.h.
|
protected |
Definition at line 221 of file stencilTable.h.