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; } }
120 refinementLevel(level),
121 orderVerticesFromFacesFirst(false),
122 fullTopologyInLastLevel(false) { }
124 unsigned int refinementLevel:4,
125 orderVerticesFromFacesFirst:1,
126 fullTopologyInLastLevel:1;
155 isolationLevel(level),
157 useSingleCreasePatch(false),
158 useInfSharpPatch(false),
159 considerFVarChannels(false),
160 orderVerticesFromFacesFirst(false) { }
162 unsigned int isolationLevel:4;
163 unsigned int secondaryLevel:4;
165 unsigned int useSingleCreasePatch:1;
167 unsigned int useInfSharpPatch:1;
169 unsigned int considerFVarChannels:1;
171 unsigned int orderVerticesFromFacesFirst:1;
194 int GetNumFVarChannels()
const;
200 int GetNumFVarValuesTotal(
int channel = 0)
const;
209 template <
class MESH>
213 friend class EndCapGregoryBasisPatchFactory;
214 friend class EndCapLegacyGregoryPatchFactory;
231 internal::FeatureMask
const & mask);
233 void initializeInventory();
238 void assembleFarLevels();
245 unsigned int _isUniform : 1,
257 int _totalFaceVertices;
261 std::vector<Vtr::internal::Level *> _levels;
262 std::vector<Vtr::internal::Refinement *> _refinements;
264 std::vector<TopologyLevel> _farLevels;
269 TopologyRefiner::GetNumFVarChannels()
const {
271 return _levels[0]->getNumFVarChannels();
274 TopologyRefiner::GetFVarLinearInterpolation(
int channel)
const {
276 return _levels[0]->getFVarOptions(channel).GetFVarLinearInterpolation();
282 using namespace OPENSUBDIV_VERSION;
int GetNumEdgesTotal() const
Returns the total number of edges in all levels.
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)
int GetMaxLevel() const
Returns the highest level of refinement.
Vtr::internal::Refinement const & getRefinement(int l) const
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.
UniformOptions GetUniformOptions() const
Returns the options specified on refinement.
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.
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.
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.
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.