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 {
107 refinementLevel(level),
108 orderVerticesFromFacesFirst(false),
109 fullTopologyInLastLevel(false) { }
112 orderVerticesFromFacesFirst:1,
113 fullTopologyInLastLevel:1;
136 isolationLevel(level),
137 useSingleCreasePatch(false),
138 orderVerticesFromFacesFirst(false) { }
140 unsigned int isolationLevel:4,
143 orderVerticesFromFacesFirst:1;
166 int GetNumFVarChannels()
const;
172 int GetNumFVarValuesTotal(
int channel = 0)
const;
181 template <
class MESH>
185 friend class EndCapGregoryBasisPatchFactory;
186 friend class EndCapLegacyGregoryPatchFactory;
204 void initializeInventory();
209 void assembleFarLevels();
216 unsigned int _isUniform : 1,
228 int _totalFaceVertices;
232 std::vector<Vtr::internal::Level *> _levels;
233 std::vector<Vtr::internal::Refinement *> _refinements;
235 std::vector<TopologyLevel> _farLevels;
240 TopologyRefiner::GetNumFVarChannels()
const {
242 return _levels[0]->getNumFVarChannels();
245 TopologyRefiner::GetFVarLinearInterpolation(
int channel)
const {
247 return _levels[0]->getFVarOptions(channel).GetFVarLinearInterpolation();
253 using namespace OPENSUBDIV_VERSION;
Factory for constructing TopologyRefiners from specific mesh classes.
Sdc::SchemeType GetSchemeType() const
Returns the subdivision scheme.
AdaptiveOptions GetAdaptiveOptions() const
Returns the options specified on refinement.
Uniform refinement options.
Sdc::Options GetSchemeOptions() const
Returns the subdivision options.
AdaptiveOptions(int level)
int GetNumLevels() const
Returns the number of refinement levels.
unsigned int useSingleCreasePatch
Vtr::internal::Level & getLevel(int l)
Object used to compute and query ptex face indices.
int GetMaxValence() const
Returns the maximum vertex valence in all levels.
UniformOptions GetUniformOptions() const
Returns the options specified on refinement.
Vtr::internal::Refinement const & getRefinement(int l) const
int GetMaxLevel() const
Returns the highest level of refinement.
int GetNumEdgesTotal() const
Returns the total number of edges in all levels.
bool HasHoles() const
\ brief Returns true if faces have been tagged as holes
int GetNumFacesTotal() const
Returns the total number of edges in all levels.
Vtr::internal::Refinement & getRefinement(int l)
All supported options applying to subdivision scheme.
TopologyLevel is an interface for accessing data in a specific level of a refined topology hierarchy...
bool IsUniform() const
Returns true if uniform subdivision has been applied.
UniformOptions(int level)
Private base class of Factories for constructing TopologyRefiners.
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.
Vtr::internal::Level const & getLevel(int l) const
int GetNumFaceVerticesTotal() const
Returns the total number of face vertices in all levels.
int GetNumVerticesTotal() const
Returns the total number of vertices in all levels.
unsigned int refinementLevel
Number of refinement iterations.
Applies refinement operations to generic primvar data.
SchemeType
Enumerated type for all subdivisions schemes supported by OpenSubdiv.
Adaptive refinement options.