OpenSubdiv.OPENSUBDIV_VERSION.Far.StencilTable是用于存储Subdivision Surface(细分曲面)的建模过程中的Stencil数据的类。StencilTable存储了每个控制点的邻域信息,以便在构建细分曲面的过程中使用。
Far::StencilTable::StencilTable(int numStencils, int const * sizes, unsigned char const * offsets, unsigned char const * indices, float const * weights);
int GetNumStencils() const;
int const * GetSizes() const;
unsigned char const * GetOffsets() const;
unsigned char const * GetIndices() const;
float const * GetWeights() const;
Far::StencilTable const * stencilTable =
factory->CreateStencilTable(vertexBuffer, patchTable);
int numStencils = stencilTable->GetNumStencils();
int const * sizes = stencilTable->GetSizes();
unsigned char const * offsets = stencilTable->GetOffsets();
unsigned char const * indices = stencilTable->GetIndices();
float const * weights = stencilTable->GetWeights();