StencilTable Class Reference

Table of subdivision stencils. More...

#include <stencilTable.h>

Inheritance diagram for StencilTable:
LimitStencilTable

Public Member Functions

virtual ~StencilTable ()
 
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)
 
void reserve (int nstencils, int nelems)
 
void shrinkToFit ()
 
void finalize ()
 
 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 PatchTableFactory
 
class GregoryBasis
 
class EndCapBSplineBasisPatchFactory
 
class EndCapGregoryBasisPatchFactory
 

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()

virtual ~StencilTable ( )
inlinevirtual

Definition at line 136 of file stencilTable.h.

§ StencilTable() [1/2]

StencilTable ( )
inlineprotected

Definition at line 218 of file stencilTable.h.

§ StencilTable() [2/2]

StencilTable ( int  numControlVerts)
inlineprotected

Definition at line 219 of file stencilTable.h.

Member Function Documentation

§ Clear()

void Clear ( )

Clears the stencils from the table.

§ finalize()

void finalize ( )
inlineprotected

Definition at line 519 of file stencilTable.h.

§ generateOffsets()

void generateOffsets ( )
inlineprotected

Definition at line 487 of file stencilTable.h.

§ GetControlIndices()

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

Returns the indices of the control vertices.

Definition at line 162 of file stencilTable.h.

§ GetNumControlVertices()

int GetNumControlVertices ( ) const
inline

Returns the number of control vertices indexed in the table.

Definition at line 144 of file stencilTable.h.

§ GetNumStencils()

int GetNumStencils ( ) const
inline

Returns the number of stencils in the table.

Definition at line 139 of file stencilTable.h.

§ GetOffsets()

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

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

Definition at line 157 of file stencilTable.h.

§ GetSizes()

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

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

Definition at line 152 of file stencilTable.h.

§ GetStencil()

Stencil GetStencil ( Index  i) const
inline

Returns a Stencil at index i in the table.

Definition at line 526 of file stencilTable.h.

§ GetWeights()

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

Returns the stencil interpolation weights.

Definition at line 167 of file stencilTable.h.

§ operator[]()

Stencil operator[] ( Index  index) const
inline

Returns the stencil at index i in the table.

Definition at line 537 of file stencilTable.h.

§ reserve()

void reserve ( int  nstencils,
int  nelems 
)
inlineprotected

Definition at line 505 of file stencilTable.h.

§ resize()

void resize ( int  nstencils,
int  nelems 
)
inlineprotected

Definition at line 498 of file stencilTable.h.

§ shrinkToFit()

void shrinkToFit ( )
inlineprotected

Definition at line 512 of file stencilTable.h.

§ update()

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

Definition at line 454 of file stencilTable.h.

§ UpdateValues()

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
startindex of first value to update
endIndex of last value to update

Definition at line 189 of file stencilTable.h.

Friends And Related Function Documentation

§ EndCapBSplineBasisPatchFactory

friend class EndCapBSplineBasisPatchFactory
friend

Definition at line 228 of file stencilTable.h.

§ EndCapGregoryBasisPatchFactory

friend class EndCapGregoryBasisPatchFactory
friend

Definition at line 229 of file stencilTable.h.

§ GregoryBasis

friend class GregoryBasis
friend

Definition at line 226 of file stencilTable.h.

§ PatchTableFactory

friend class PatchTableFactory
friend

Definition at line 224 of file stencilTable.h.

§ StencilTableFactory

friend class StencilTableFactory
friend

Definition at line 223 of file stencilTable.h.

Member Data Documentation

§ _indices

std::vector<Index> _indices
protected

Definition at line 234 of file stencilTable.h.

§ _numControlVertices

int _numControlVertices
protected

Definition at line 231 of file stencilTable.h.

§ _offsets

std::vector<Index> _offsets
protected

Definition at line 234 of file stencilTable.h.

§ _sizes

std::vector<int> _sizes
protected

Definition at line 233 of file stencilTable.h.

§ _weights

std::vector<float> _weights
protected

Definition at line 236 of file stencilTable.h.


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