StencilTable Class Reference

Table of subdivision stencils. More...

#include <stencilTable.h>

Inheritance diagram for StencilTable:
LimitStencilTable

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
 

Detailed Description

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.

Constructor & Destructor Documentation

StencilTable ( )
inlineprotected

Definition at line 207 of file stencilTable.h.

StencilTable ( int  numControlVerts)
inlineprotected

Definition at line 208 of file stencilTable.h.

Member Function Documentation

void Clear ( )

Clears the stencils from the table.

void generateOffsets ( )
inlineprotected

Definition at line 383 of file stencilTable.h.

std::vector<Index> const& GetControlIndices ( ) const
inline

Returns the indices of the control vertices.

Definition at line 160 of file stencilTable.h.

int GetNumControlVertices ( ) const
inline

Returns the number of control vertices indexed in the table.

Definition at line 142 of file stencilTable.h.

int GetNumStencils ( ) const
inline

Returns the number of stencils in the table.

Definition at line 137 of file stencilTable.h.

std::vector<Index> const& GetOffsets ( ) const
inline

Returns the offset to a given stencil (factory may leave empty)

Definition at line 155 of file stencilTable.h.

std::vector<int> const& GetSizes ( ) const
inline

Returns the number of control vertices of each stencil in the table.

Definition at line 150 of file stencilTable.h.

Stencil GetStencil ( Index  i) const
inline

Returns a Stencil at index i in the table.

Definition at line 402 of file stencilTable.h.

std::vector<float> const& GetWeights ( ) const
inline

Returns the stencil interpolation weights.

Definition at line 165 of file stencilTable.h.

Stencil operator[] ( Index  index) const
inline

Returns the stencil at index i in the table.

Definition at line 413 of file stencilTable.h.

void resize ( int  nstencils,
int  nelems 
)
inlineprotected

Definition at line 394 of file stencilTable.h.

void update ( T const *  controlValues,
T *  values,
std::vector< float > const &  valueWeights,
Index  start,
Index  end 
) const
protected

Definition at line 350 of file stencilTable.h.

void UpdateValues ( T const *  controlValues,
T *  values,
Index  start = -1,
Index  end = -1 
) const
inline

Updates point values based on the control values.

Note
The destination buffers are assumed to have allocated at least GetNumStencils() elements.
Parameters
controlValuesBuffer with primvar data for the control vertices
valuesDestination buffer for the interpolated primvar data
start(skip to )index of first value to update
endIndex of last value to update

Definition at line 187 of file stencilTable.h.

Friends And Related Function Documentation

friend class GregoryBasis
friend

Definition at line 214 of file stencilTable.h.

friend class StencilTableFactory
friend

Definition at line 212 of file stencilTable.h.

Member Data Documentation

std::vector<Index> _indices
protected

Definition at line 219 of file stencilTable.h.

int _numControlVertices
protected

Definition at line 216 of file stencilTable.h.

std::vector<Index> _offsets
protected

Definition at line 219 of file stencilTable.h.

std::vector<int> _sizes
protected

Definition at line 218 of file stencilTable.h.

std::vector<float> _weights
protected

Definition at line 221 of file stencilTable.h.


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