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" 
   37 namespace OpenSubdiv {
 
   38 namespace OPENSUBDIV_VERSION {
 
   41 namespace Far { 
namespace internal { 
class FeatureMask; } }
 
  213     template <
class MESH>
 
  219     template <
typename REAL>
 
  234     TopologyRefiner & operator=(TopologyRefiner 
const &) { 
return *
this; }
 
  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;
 
  261     UniformOptions  _uniformOptions;
 
  262     AdaptiveOptions _adaptiveOptions;
 
  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;
 
  284     return _levels[0]->getNumFVarChannels();
 
  289     return _levels[0]->getFVarOptions(channel).GetFVarLinearInterpolation();
 
  295 using namespace OPENSUBDIV_VERSION;
 
Vtr::internal::Refinement & getRefinement(int l)
void Unrefine()
Unrefine the topology, keeping only the base level. 
AdaptiveOptions GetAdaptiveOptions() const 
Returns the options specified on refinement. 
Adaptive refinement options. 
unsigned int useInfSharpPatch
Private base class of Factories for constructing TopologyRefiners. 
Vtr::internal::Level & getLevel(int l)
unsigned int considerFVarChannels
unsigned int secondaryLevel
Sdc::SchemeType GetSchemeType() const 
Returns the subdivision scheme. 
int GetNumVerticesTotal() const 
Returns the total number of vertices in all levels. 
void RefineAdaptive(AdaptiveOptions options, ConstIndexArray selectedFaces=ConstIndexArray())
Feature Adaptive topology refinement. 
unsigned int fullTopologyInLastLevel
UniformOptions(int level)
~TopologyRefiner()
Destructor. 
int GetMaxLevel() const 
Returns the highest level of refinement. 
Object used to compute and query ptex face indices. 
int GetNumLevels() const 
Returns the number of refinement levels. 
Stores topology data for a specified set of refinement options. 
friend class PatchBuilder
int GetNumFVarValuesTotal(int channel=0) const 
Returns the total number of face-varying values in all levels. 
friend class PatchTableBuilder
unsigned int refinementLevel
Number of refinement iterations. 
unsigned int orderVerticesFromFacesFirst
Factory for constructing TopologyRefiners from specific mesh classes. 
Applies refinement operations to generic primvar data. 
TopologyLevel const & GetLevel(int level) const 
Returns a handle to access data specific to a particular level. 
AdaptiveOptions(int level)
bool HasHoles() const 
Returns true if faces have been tagged as holes. 
int GetMaxValence() const 
Returns the maximum vertex valence in all levels. 
int GetNumFacesTotal() const 
Returns the total number of edges in all levels. 
int GetNumFaceVerticesTotal() const 
Returns the total number of face vertices in all levels. 
All supported options applying to subdivision scheme. 
void RefineUniform(UniformOptions options)
Refine the topology uniformly. 
Vtr::ConstIndexArray ConstIndexArray
An interface for accessing data in a specific level of a refined topology hierarchy. 
unsigned int orderVerticesFromFacesFirst
Sdc::Options GetSchemeOptions() const 
Returns the subdivision options. 
SchemeType
Enumerated type for all subdivision schemes supported by OpenSubdiv. 
UniformOptions GetUniformOptions() const 
Returns the options specified on refinement. 
int GetNumFVarChannels() const 
Returns the number of face-varying channels in the tables. 
unsigned int useSingleCreasePatch
unsigned int isolationLevel
Sdc::Options::FVarLinearInterpolation GetFVarLinearInterpolation(int channel=0) const 
Returns the face-varying interpolation rule set for a given channel. 
Vtr::internal::Refinement const & getRefinement(int l) const 
bool IsUniform() const 
Returns true if uniform refinement has been applied. 
Uniform refinement options. 
Vtr::internal::Level const & getLevel(int l) const 
int GetNumEdgesTotal() const 
Returns the total number of edges in all levels.