24 #ifndef OPENSUBDIV3_FAR_TOPOLOGY_REFINER_H 25 #define OPENSUBDIV3_FAR_TOPOLOGY_REFINER_H 27 #include "../version.h" 29 #include "../sdc/types.h" 30 #include "../sdc/options.h" 31 #include "../far/types.h" 32 #include "../far/topologyLevel.h" 38 namespace OPENSUBDIV_VERSION {
41 namespace Far {
namespace internal {
class FeatureMask; } }
209 template <
class MESH>
227 TopologyRefiner(TopologyRefiner
const &) : _uniformOptions(0), _adaptiveOptions(0) { }
228 TopologyRefiner & operator=(TopologyRefiner
const &) {
return *
this; }
230 void selectFeatureAdaptiveComponents(Vtr::internal::SparseSelector& selector,
231 internal::FeatureMask
const & mask);
233 void initializeInventory();
234 void updateInventory(Vtr::internal::Level
const & newLevel);
236 void appendLevel(Vtr::internal::Level & newLevel);
237 void appendRefinement(Vtr::internal::Refinement & newRefinement);
238 void assembleFarLevels();
243 Sdc::Options _subdivOptions;
245 unsigned int _isUniform : 1,
250 UniformOptions _uniformOptions;
251 AdaptiveOptions _adaptiveOptions;
257 int _totalFaceVertices;
261 std::vector<Vtr::internal::Level *> _levels;
262 std::vector<Vtr::internal::Refinement *> _refinements;
264 std::vector<TopologyLevel> _farLevels;
271 return _levels[0]->getNumFVarChannels();
276 return _levels[0]->getFVarOptions(channel).GetFVarLinearInterpolation();
282 using namespace OPENSUBDIV_VERSION;
int GetNumEdgesTotal() const
Returns the total number of edges in all levels.
unsigned int isolationLevel
void RefineAdaptive(AdaptiveOptions options)
Feature Adaptive topology refinement (restricted to scheme Catmark)
Vtr::internal::Level const & getLevel(int l) const
int GetNumFaceVerticesTotal() const
Returns the total number of face vertices in all levels.
Sdc::Options GetSchemeOptions() const
Returns the subdivision options.
int GetNumLevels() const
Returns the number of refinement levels.
UniformOptions(int level)
unsigned int useInfSharpPatch
unsigned int orderVerticesFromFacesFirst
int GetMaxLevel() const
Returns the highest level of refinement.
unsigned int secondaryLevel
Vtr::internal::Refinement const & getRefinement(int l) const
~TopologyRefiner()
Destructor.
unsigned int considerFVarChannels
friend class EndCapGregoryBasisPatchFactory
Uniform refinement options.
All supported options applying to subdivision scheme.
An interface for accessing data in a specific level of a refined topology hierarchy.
SchemeType
Enumerated type for all subdivisions schemes supported by OpenSubdiv.
unsigned int fullTopologyInLastLevel
UniformOptions GetUniformOptions() const
Returns the options specified on refinement.
unsigned int useSingleCreasePatch
Factory for constructing a PatchTable from a TopologyRefiner.
Private base class of Factories for constructing TopologyRefiners.
Stores topology data for a specified set of refinement options.
int GetNumFacesTotal() const
Returns the total number of edges in all levels.
int GetNumFVarValuesTotal(int channel=0) const
Returns the total number of face-varying values in all levels.
AdaptiveOptions GetAdaptiveOptions() const
Returns the options specified on refinement.
int GetNumVerticesTotal() const
Returns the total number of vertices in all levels.
int GetMaxValence() const
Returns the maximum vertex valence in all levels.
Adaptive refinement options.
AdaptiveOptions(int level)
Vtr::internal::Level & getLevel(int l)
Vtr::internal::Refinement & getRefinement(int l)
Sdc::SchemeType GetSchemeType() const
Returns the subdivision scheme.
Applies refinement operations to generic primvar data.
Sdc::Options::FVarLinearInterpolation GetFVarLinearInterpolation(int channel=0) const
Returns the face-varying interpolation rule set for a given channel.
TopologyLevel const & GetLevel(int level) const
Returns a handle to access data specific to a particular level.
bool IsUniform() const
Returns true if uniform refinement has been applied.
unsigned int refinementLevel
Number of refinement iterations.
void Unrefine()
Unrefine the topology, keeping only the base level.
friend class EndCapLegacyGregoryPatchFactory
void RefineUniform(UniformOptions options)
Refine the topology uniformly.
unsigned int orderVerticesFromFacesFirst
int GetNumFVarChannels() const
Returns the number of face-varying channels in the tables.
bool HasHoles() const
Returns true if faces have been tagged as holes.
Object used to compute and query ptex face indices.
Factory for constructing TopologyRefiners from specific mesh classes.