25#ifndef OPENSUBDIV3_FAR_PATCH_TABLE_FACTORY_H
26#define OPENSUBDIV3_FAR_PATCH_TABLE_FACTORY_H
28#include "../version.h"
30#include "../far/topologyRefiner.h"
31#include "../far/patchTable.h"
34namespace OPENSUBDIV_VERSION {
107 return adaptiveOptions;
212template <>
inline void PatchTableFactory::Options::SetPatchPrecision<float>() {
215template <>
inline void PatchTableFactory::Options::SetFVarPatchPrecision<float>() {
216 fvarPatchPrecisionDouble =
false;
219template <>
inline void PatchTableFactory::Options::SetPatchPrecision<double>() {
220 patchPrecisionDouble =
true;
222template <>
inline void PatchTableFactory::Options::SetFVarPatchPrecision<double>() {
223 fvarPatchPrecisionDouble =
true;
230using namespace OPENSUBDIV_VERSION;
Vtr::ConstIndexArray ConstIndexArray
Container for arrays of parametric patches.
Factory for constructing a PatchTable from a TopologyRefiner.
std::vector< PatchFaceTag > PatchTagVector
static PatchTable * Create(TopologyRefiner const &refiner, Options options=Options(), ConstIndexArray selectedFaces=ConstIndexArray())
Instantiates a PatchTable from a client-provided TopologyRefiner.
Public options for the PatchTable factory.
unsigned int generateVaryingTables
Generate varying patch tables.
unsigned int generateLegacySharpCornerPatches
Generate sharp regular patches at smooth corners (legacy)
unsigned int shareEndCapPatchPoints
TopologyRefiner::AdaptiveOptions GetRefineAdaptiveOptions() const
Determine adaptive refinement options to match assigned patch options.
unsigned int maxIsolationLevel
Cap adaptive feature isolation to the given level (max. 10)
EndCapType GetEndCapType() const
Get endcap basis type.
unsigned int generateFVarLegacyLinearPatches
Generate all linear face-varying patches (legacy)
void SetPatchPrecision()
Set precision of vertex patches.
unsigned int fvarPatchPrecisionDouble
Generate double-precision stencils for face-varying patches.
void SetMaxIsolationLevel(unsigned int level)
Set maximum isolation level.
unsigned int endCapType
EndCapType.
int const * fvarChannelIndices
List containing the indices of the channels selected for the factory.
unsigned int useSingleCreasePatch
Use single crease patch.
unsigned int useInfSharpPatch
Use infinitely-sharp patch.
void SetEndCapType(EndCapType e)
Set endcap basis type.
unsigned int generateVaryingLocalPoints
Generate local points with varying patches.
unsigned int includeFVarBaseLevelIndices
Include base level in face-varying patch point indices (Uniform mode only)
unsigned int generateAllLevels
Generate levels from 'firstLevel' to 'maxLevel' (Uniform mode only)
unsigned int patchPrecisionDouble
Generate double-precision stencils for vertex patches.
unsigned int generateFVarTables
Generate face-varying patch tables.
unsigned int includeBaseLevelIndices
Include base level in patch point indices (Uniform mode only)
void SetFVarPatchPrecision()
Set precision of face-varying patches.
int numFVarChannels
Number of channel indices and interpolation modes passed.
unsigned int triangulateQuads
Triangulate 'QUADS' primitives (Uniform mode only)
EndCapType
Choice for approximating irregular patches (end-caps)
@ ENDCAP_LEGACY_GREGORY
legacy option for 2.x style Gregory patches (Catmark only)
@ ENDCAP_GREGORY_BASIS
use Gregory patches (highest quality, recommended default)
@ ENDCAP_BILINEAR_BASIS
use linear patches (simple quads or tris)
@ ENDCAP_BSPLINE_BASIS
use BSpline-like patches (same patch type as regular)
Options(unsigned int maxIsolation=10)
Obsolete internal struct not intended for public use – due to be deprecated.
unsigned int _isSingleCrease
unsigned int _boundaryIndex
void assignBoundaryPropertiesFromVertexMask(int boundaryVertexMask)
unsigned int _transitionMask
unsigned int _hasBoundaryEdge
unsigned int _boundaryMask
void assignTransitionPropertiesFromEdgeMask(int boundaryVertexMask)
void assignBoundaryPropertiesFromEdgeMask(int boundaryEdgeMask)
unsigned int _boundaryCount
Stores topology data for a specified set of refinement options.
Adaptive refinement options.
unsigned int useSingleCreasePatch
unsigned int useInfSharpPatch
unsigned int considerFVarChannels