25 #ifndef OPENSUBDIV3_FAR_STENCILTABLE_FACTORY_H 26 #define OPENSUBDIV3_FAR_STENCILTABLE_FACTORY_H 28 #include "../version.h" 30 #include "../far/patchTable.h" 35 namespace OPENSUBDIV_VERSION {
39 class TopologyRefiner;
41 template <
typename REAL>
class StencilReal;
42 template <
typename REAL>
class StencilTableReal;
44 template <
typename REAL>
class LimitStencilReal;
45 template <
typename REAL>
class LimitStencilTableReal;
50 template <
typename REAL>
51 class StencilTableFactoryReal {
132 bool factorize =
true);
152 bool factorize =
true) {
154 refiner, baseStencilTable, localPointStencilTable, factorize);
179 bool factorize =
true);
184 static void generateControlVertStencils(
208 template <
typename REAL>
222 generate1stDerivatives(true),
223 generate2ndDerivatives(false),
227 generate1stDerivatives : 1,
228 generate2ndDerivatives : 1;
271 LocationArrayVec
const & locationArrays,
297 BaseFactory::Create(refiner, options));
304 BaseFactory::Create(numTables,
305 reinterpret_cast<BaseTable const **>(tables)));
312 bool factorize =
true) {
315 BaseFactory::AppendLocalPointStencilTable(refiner,
316 static_cast<BaseTable const *>(baseStencilTable),
317 static_cast<BaseTable const *>(localPointStencilTable),
325 bool factorize =
true) {
328 BaseFactory::AppendLocalPointStencilTableVarying(refiner,
329 static_cast<BaseTable const *>(baseStencilTable),
330 static_cast<BaseTable const *>(localPointStencilTable),
339 bool factorize =
true) {
342 BaseFactory::AppendLocalPointStencilTableFaceVarying(refiner,
343 static_cast<BaseTable const *>(baseStencilTable),
344 static_cast<BaseTable const *>(localPointStencilTable),
345 channel, factorize));
362 LocationArrayVec
const & locationArrays,
371 static_cast<BaseTable const *>(cvStencils),
380 using namespace OPENSUBDIV_VERSION;
384 #endif // OPENSUBDIV3_FAR_STENCILTABLE_FACTORY_H static LimitStencilTable const * Create(TopologyRefiner const &refiner, LocationArrayVec const &locationArrays, StencilTable const *cvStencils=0, PatchTable const *patchTable=0, Options options=Options())
static StencilTable const * AppendLocalPointStencilTableFaceVarying(TopologyRefiner const &refiner, StencilTable const *baseStencilTable, StencilTable const *localPointStencilTable, int channel=0, bool factorize=true)
static StencilTable const * AppendLocalPointStencilTableVarying(TopologyRefiner const &refiner, StencilTable const *baseStencilTable, StencilTable const *localPointStencilTable, bool factorize=true)
face-varying primvar stencils
static StencilTable const * Create(TopologyRefiner const &refiner, Options options=Options())
unsigned int interpolationMode
interpolation mode
static StencilTableReal< REAL > const * AppendLocalPointStencilTable(TopologyRefiner const &refiner, StencilTableReal< REAL > const *baseStencilTable, StencilTableReal< REAL > const *localPointStencilTable, bool factorize=true)
Utility function for stencil splicing for local point stencils.
unsigned int maxLevel
generate stencils up to 'maxLevel'
static StencilTableReal< REAL > const * Create(TopologyRefiner const &refiner, Options options=Options())
Instantiates StencilTable from TopologyRefiner that have been refined uniformly or adaptively...
static StencilTable const * AppendLocalPointStencilTable(TopologyRefiner const &refiner, StencilTable const *baseStencilTable, StencilTable const *localPointStencilTable, bool factorize=true)
unsigned int generateIntermediateLevels
vertices at all levels or highest only
unsigned int generateControlVerts
generate stencils for control-vertices
Vertex stencil descriptor.
Stores topology data for a specified set of refinement options.
Limit point stencil class wrapping the template for compatibility.
unsigned int factorizeIntermediateLevels
Descriptor for limit surface locations.
int ptexIdx
ptex face index
std::vector< LocationArray > LocationArrayVec
Table of subdivision stencils.
static StencilTable const * Create(int numTables, StencilTable const **tables)
A specialized factory for LimitStencilTable.
Limit stencil table class wrapping the template for compatibility.
unsigned int fvarChannel
face-varying channel to use
REAL const * t
array of v coordinates
Vertex stencil class wrapping the template for compatibility.
unsigned int interpolationMode
interpolation mode
A specialized factory for StencilTable.
Stencil table factory class wrapping the template for compatibility.
Container for arrays of parametric patches.
Table of limit subdivision stencils.
unsigned int generateOffsets
populate optional "_offsets" field
Stencil table class wrapping the template for compatibility.
static StencilTableReal< REAL > const * AppendLocalPointStencilTableFaceVarying(TopologyRefiner const &refiner, StencilTableReal< REAL > const *baseStencilTable, StencilTableReal< REAL > const *localPointStencilTable, int channel=0, bool factorize=true)
Utility function for stencil splicing for local point face-varying stencils.
static StencilTableReal< REAL > const * AppendLocalPointStencilTableVarying(TopologyRefiner const &refiner, StencilTableReal< REAL > const *baseStencilTable, StencilTableReal< REAL > const *localPointStencilTable, bool factorize=true)
Utility function for stencil splicing for local point varying stencils.
Stencil table factory class wrapping the template for compatibility.