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) { }
111 unsigned int refinementLevel:4,
112 orderVerticesFromFacesFirst:1,
113 fullTopologyInLastLevel:1;
136 isolationLevel(level),
137 useSingleCreasePatch(false),
138 orderVerticesFromFacesFirst(false) { }
140 unsigned int isolationLevel:4,
141 useSingleCreasePatch:1,
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;
SchemeType
Enumerated type for all subdivisions schemes supported by OpenSubdiv.
int GetMaxLevel() const
Returns the highest level of refinement.
Adaptive refinement options.
Private base class of Factories for constructing TopologyRefiners.
int GetNumFaceVerticesTotal() const
Returns the total number of face vertices in all levels.
bool IsUniform() const
Returns true if uniform subdivision has been applied.
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)
bool HasHoles() const
\ brief Returns true if faces have been tagged as holes
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.
AdaptiveOptions(int level)
AdaptiveOptions GetAdaptiveOptions() const
Returns the options specified on refinement.
Vtr::internal::Level const & getLevel(int l) const
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.
Uniform refinement options.
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.