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; } }
121 refinementLevel(level),
122 orderVerticesFromFacesFirst(false),
123 fullTopologyInLastLevel(false) { }
126 orderVerticesFromFacesFirst:1,
127 fullTopologyInLastLevel:1;
156 isolationLevel(level),
158 useSingleCreasePatch(false),
159 useInfSharpPatch(false),
160 considerFVarChannels(false),
161 orderVerticesFromFacesFirst(false) { }
164 unsigned int secondaryLevel:4;
166 unsigned int useSingleCreasePatch:1;
168 unsigned int useInfSharpPatch:1;
170 unsigned int considerFVarChannels:1;
172 unsigned int orderVerticesFromFacesFirst:1;
198 int GetNumFVarChannels()
const;
204 int GetNumFVarValuesTotal(
int channel = 0)
const;
213 template <
class MESH>
216 friend class PatchTableBuilder;
217 friend class PatchBuilder;
219 template <
typename REAL>
237 internal::FeatureMask
const & mask,
242 void initializeInventory();
247 void assembleFarLevels();
254 unsigned int _isUniform : 1;
255 unsigned int _hasHoles : 1;
256 unsigned int _hasIrregFaces : 1;
257 unsigned int _regFaceSize : 3;
258 unsigned int _maxLevel : 4;
268 int _totalFaceVertices;
272 bool _baseLevelOwned;
274 std::vector<Vtr::internal::Level *> _levels;
275 std::vector<Vtr::internal::Refinement *> _refinements;
277 std::vector<TopologyLevel> _farLevels;
282 TopologyRefiner::GetNumFVarChannels()
const {
284 return _levels[0]->getNumFVarChannels();
287 TopologyRefiner::GetFVarLinearInterpolation(
int channel)
const {
289 return _levels[0]->getFVarOptions(channel).GetFVarLinearInterpolation();
295 using namespace OPENSUBDIV_VERSION;
Sdc::SchemeType GetSchemeType() const
Returns the subdivision scheme.
Vtr::internal::Refinement const & getRefinement(int l) const
bool HasHoles() const
Returns true if faces have been tagged as holes.
An interface for accessing data in a specific level of a refined topology hierarchy.
UniformOptions GetUniformOptions() const
Returns the options specified on refinement.
Private base class of Factories for constructing TopologyRefiners.
Vtr::internal::Refinement & getRefinement(int l)
int GetMaxLevel() const
Returns the highest level of refinement.
SchemeType
Enumerated type for all subdivision schemes supported by OpenSubdiv.
UniformOptions(int level)
TopologyLevel const & GetLevel(int level) const
Returns a handle to access data specific to a particular level.
Stores topology data for a specified set of refinement options.
Vtr::internal::Level & getLevel(int l)
Vtr::internal::Level const & getLevel(int l) const
Object used to compute and query ptex face indices.
ConstArray< Index > ConstIndexArray
int GetNumEdgesTotal() const
Returns the total number of edges in all levels.
Applies refinement operations to generic primvar data.
Adaptive refinement options.
Factory for constructing TopologyRefiners from specific mesh classes.
bool IsUniform() const
Returns true if uniform refinement has been applied.
AdaptiveOptions(int level)
All supported options applying to subdivision scheme.
int GetNumVerticesTotal() const
Returns the total number of vertices in all levels.
unsigned int refinementLevel
Number of refinement iterations.
AdaptiveOptions GetAdaptiveOptions() const
Returns the options specified on refinement.
Uniform refinement options.
int GetNumFacesTotal() const
Returns the total number of edges in all levels.
int GetMaxValence() const
Returns the maximum vertex valence in all levels.
int GetNumLevels() const
Returns the number of refinement levels.
Sdc::Options GetSchemeOptions() const
Returns the subdivision options.
unsigned int isolationLevel
int GetNumFaceVerticesTotal() const
Returns the total number of face vertices in all levels.