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 {
181 template <
class MESH>
199 TopologyRefiner(TopologyRefiner
const &) : _uniformOptions(0), _adaptiveOptions(0) { }
200 TopologyRefiner & operator=(TopologyRefiner
const &) {
return *
this; }
202 void selectFeatureAdaptiveComponents(Vtr::internal::SparseSelector& selector);
204 void initializeInventory();
205 void updateInventory(Vtr::internal::Level
const & newLevel);
207 void appendLevel(Vtr::internal::Level & newLevel);
208 void appendRefinement(Vtr::internal::Refinement & newRefinement);
209 void assembleFarLevels();
214 Sdc::Options _subdivOptions;
216 unsigned int _isUniform : 1,
221 UniformOptions _uniformOptions;
222 AdaptiveOptions _adaptiveOptions;
228 int _totalFaceVertices;
232 std::vector<Vtr::internal::Level *> _levels;
233 std::vector<Vtr::internal::Refinement *> _refinements;
235 std::vector<TopologyLevel> _farLevels;;
242 return _levels[0]->getNumFVarChannels();
247 return _levels[0]->getFVarOptions(channel).GetFVarLinearInterpolation();
253 using namespace OPENSUBDIV_VERSION;
SchemeType
Enumerated type for all subdivisions schemes supported by OpenSubdiv.
int GetMaxLevel() const
Returns the highest level of refinement.
Adaptive refinement options.
void Unrefine()
Unrefine the topology (keep control cage)
Private base class of Factories for constructing TopologyRefiners.
int GetNumFVarChannels() const
Returns the number of face-varying channels in the tables.
int GetNumFaceVerticesTotal() const
Returns the total number of face vertices in all levels.
bool IsUniform() const
Returns true if uniform subdivision has been applied.
unsigned int refinementLevel
Number of refinement iterations.
unsigned int orderVerticesFromFacesFirst
friend class EndCapGregoryBasisPatchFactory
int GetNumFVarValuesTotal(int channel=0) const
Returns the total number of face-varying values in all levels.
int GetNumFacesTotal() const
Returns the total number of edges in all levels.
Factory for constructing TopologyRefiners from specific mesh classes.
Vtr::internal::Refinement & getRefinement(int l)
int GetMaxValence() const
Returns the maximum vertex valence in all levels.
UniformOptions(int level)
friend class EndCapLegacyGregoryPatchFactory
bool HasHoles() const
\ brief Returns true if faces have been tagged as holes
unsigned int orderVerticesFromFacesFirst
void RefineUniform(UniformOptions options)
Refine the topology uniformly.
TopologyLevel const & GetLevel(int level) const
Returns a handle to access data specific to a particular level.
UniformOptions GetUniformOptions() const
Returns the options specified on refinement.
Sdc::Options GetSchemeOptions() const
Returns the subdivision options.
All supported options applying to subdivision scheme.
unsigned int fullTopologyInLastLevel
AdaptiveOptions(int level)
AdaptiveOptions GetAdaptiveOptions() const
Returns the options specified on refinement.
Vtr::internal::Level const & getLevel(int l) const
Sdc::Options::FVarLinearInterpolation GetFVarLinearInterpolation(int channel=0) const
Returns the face-varying interpolation rule-set for a given channel.
void RefineAdaptive(AdaptiveOptions options)
Feature Adaptive topology refinement (restricted to scheme Catmark)
int GetNumLevels() const
Returns the number of refinement levels.
Vtr::internal::Level & getLevel(int l)
int GetNumEdgesTotal() const
Returns the total number of edges in all levels.
Stores topology data for a specified set of refinement options.
Object used to compute and query ptex face indices.
Sdc::SchemeType GetSchemeType() const
Returns the subdivision scheme.
~TopologyRefiner()
Destructor.
unsigned int useSingleCreasePatch
Uniform refinement options.
unsigned int isolationLevel
Vtr::internal::Refinement const & getRefinement(int l) const
TopologyLevel is an interface for accessing data in a specific level of a refined topology hierarchy...
int GetNumVerticesTotal() const
Returns the total number of vertices in all levels.
Applies refinement operations to generic primvar data.