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 GetNumFacesTotal() const
Returns the total number of edges in all levels.
Adaptive refinement options.
Factory for constructing TopologyRefiners from specific mesh classes.
AdaptiveOptions(int level)
void RefineAdaptive(AdaptiveOptions options)
Feature Adaptive topology refinement (restricted to scheme Catmark)
SchemeType
Enumerated type for all subdivision schemes supported by OpenSubdiv.
int GetMaxValence() const
Returns the maximum vertex valence in all levels.
unsigned int orderVerticesFromFacesFirst
unsigned int secondaryLevel
int GetNumFVarChannels() const
Returns the number of face-varying channels in the tables.
Applies refinement operations to generic primvar data.
int GetNumFaceVerticesTotal() const
Returns the total number of face vertices in all levels.
~TopologyRefiner()
Destructor.
friend class EndCapLegacyGregoryPatchFactory
unsigned int refinementLevel
Number of refinement iterations.
Uniform refinement options.
An interface for accessing data in a specific level of a refined topology hierarchy.
int GetNumFVarValuesTotal(int channel=0) const
Returns the total number of face-varying values in all levels.
UniformOptions GetUniformOptions() const
Returns the options specified on refinement.
unsigned int considerFVarChannels
int GetNumEdgesTotal() const
Returns the total number of edges in all levels.
Factory for constructing a PatchTable from a TopologyRefiner.
Vtr::internal::Level const & getLevel(int l) const
Private base class of Factories for constructing TopologyRefiners.
unsigned int fullTopologyInLastLevel
Stores topology data for a specified set of refinement options.
TopologyLevel const & GetLevel(int level) const
Returns a handle to access data specific to a particular level.
Object used to compute and query ptex face indices.
Sdc::Options::FVarLinearInterpolation GetFVarLinearInterpolation(int channel=0) const
Returns the face-varying interpolation rule set for a given channel.
unsigned int useInfSharpPatch
void RefineUniform(UniformOptions options)
Refine the topology uniformly.
friend class EndCapGregoryBasisPatchFactory
All supported options applying to subdivision scheme.
UniformOptions(int level)
AdaptiveOptions GetAdaptiveOptions() const
Returns the options specified on refinement.
unsigned int isolationLevel
int GetNumLevels() const
Returns the number of refinement levels.
Vtr::internal::Level & getLevel(int l)
int GetNumVerticesTotal() const
Returns the total number of vertices in all levels.
unsigned int useSingleCreasePatch
Sdc::SchemeType GetSchemeType() const
Returns the subdivision scheme.
bool HasHoles() const
Returns true if faces have been tagged as holes.
Sdc::Options GetSchemeOptions() const
Returns the subdivision options.
int GetMaxLevel() const
Returns the highest level of refinement.
Vtr::internal::Refinement const & getRefinement(int l) const
void Unrefine()
Unrefine the topology, keeping only the base level.
Vtr::internal::Refinement & getRefinement(int l)
bool IsUniform() const
Returns true if uniform refinement has been applied.
unsigned int orderVerticesFromFacesFirst