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