24 #ifndef VTR_REFINEMENT_H
25 #define VTR_REFINEMENT_H
27 #include "../version.h"
29 #include "../sdc/type.h"
30 #include "../sdc/options.h"
31 #include "../vtr/types.h"
32 #include "../vtr/level.h"
39 namespace OpenSubdiv {
40 namespace OPENSUBDIV_VERSION {
43 class TopologyRefiner;
44 class PatchTablesFactory;
397 #ifdef _VTR_COMPUTE_MASK_WEIGHTS_ENABLED
415 void computeMaskWeights();
417 std::vector<float> _faceVertWeights;
418 std::vector<float> _edgeVertWeights;
419 std::vector<float> _edgeFaceWeights;
420 std::vector<float> _vertVertWeights;
421 std::vector<float> _vertEdgeWeights;
422 std::vector<float> _vertFaceWeights;
467 using namespace OPENSUBDIV_VERSION;
unsigned char _incomplete
void populateEdgeTagVectors()
std::vector< ChildTag > _childVertexTag
IndexVector _faceChildVertIndex
A specialized factory for feature adaptive PatchTables.
void populateVertexTagsFromParentFaces()
Index getFirstChildVertexFromFaces() const
IndexVector _edgeChildVertIndex
void populateFaceParentVectors(ChildTag const initialChildTags[2][4])
std::vector< SparseTag > _parentEdgeTag
IndexArray _faceChildEdgeCountsAndOffsets
Array< Index > IndexArray
IndexVector _faceChildEdgeIndices
Level const & child() const
virtual void markSparseFaceChildren()=0
unsigned int _vertexEdges
int _childFaceFromFaceCount
virtual void populateVertexFaceRelation()=0
Index getFirstChildFaceFromFaces() const
Index getFirstChildVertexFromEdges() const
void populateVertexTagsFromParentEdges()
void populateEdgeParentFromParentFaces(ChildTag const initialChildTags[2][4])
void populateVertexParentFromParentFaces(ChildTag const initialChildTags[2][4])
virtual void populateFaceVertexRelation()=0
int getNumChildVerticesFromEdges() const
int getNumChildVerticesFromFaces() const
IndexVector _childEdgeParentIndex
int _firstChildVertFromEdge
void initializeSparseSelectionTags()
int getChildFaceInParentFace(Index f) const
int _childVertFromEdgeCount
IndexVector _vertChildVertIndex
Index getFirstChildEdgeFromFaces() const
void subdivideSharpnessValues()
virtual void populateEdgeFaceRelation()=0
IndexVector _faceChildFaceIndices
void populateEdgeTagsFromParentEdges()
void populateFaceTagsFromParentFaces()
Index getChildFaceParentFace(Index f) const
void refine(Options options=Options())
Index getFaceChildVertex(Index f) const
void populateVertexTagsFromParentVertices()
void printParentToChildMapping() const
Level const & parent() const
Refinement(Level const &parent, Level &child, Sdc::Options const &schemeOptions)
int getNumChildFacesFromFaces() const
std::vector< Index > IndexVector
void populateVertexTagVectors()
void populateEdgeParentFromParentEdges(ChildTag const initialChildTags[2][4])
std::vector< SparseTag > _parentVertexTag
void subdivideVertexSharpness()
Index getEdgeChildVertex(Index e) const
void populateParentToChildMapping()
IndexVector _childFaceParentIndex
int _firstChildEdgeFromFace
void populateChildToParentMapping()
unsigned int _edgeVertices
int _childEdgeFromFaceCount
void initializeChildComponentCounts()
int _childVertFromFaceCount
void populateVertexParentFromParentVertices(ChildTag const initialChildTags[2][4])
unsigned int _faceTopologyOnly
int getNumChildVerticesFromVertices() const
unsigned char _transitional
void populateEdgeParentVectors(ChildTag const initialChildTags[2][4])
void populateEdgeTagsFromParentFaces()
unsigned int _vertexFaces
IndexVector _edgeChildEdgeIndices
IndexArray _faceChildFaceCountsAndOffsets
unsigned char _indexInParent
void populateVertexParentFromParentEdges(ChildTag const initialChildTags[2][4])
Stores topology data for a specified set of refinement options.
Index getVertexChildVertex(Index v) const
void markSparseVertexChildren()
void populateVertexParentVectors(ChildTag const initialChildTags[2][4])
Index getChildVertexParentIndex(Index v) const
virtual void populateEdgeVertexRelation()=0
IndexArray const getFaceChildFaces(Index parentFace) const
int _firstChildEdgeFromEdge
int _childEdgeFromEdgeCount
int _firstChildVertFromFace
std::vector< FVarRefinement * > _fvarChannels
std::vector< SparseTag > _parentFaceTag
void populateFaceParentFromParentFaces(ChildTag const initialChildTags[2][4])
int _firstChildFaceFromFace
std::vector< ChildTag > _childEdgeTag
void markSparseChildComponentIndices()
virtual void allocateParentChildIndices()=0
Index getChildEdgeParentIndex(Index e) const
virtual void populateVertexEdgeRelation()=0
IndexArray const getEdgeChildEdges(Index parentEdge) const
void subdivideFVarChannels()
void populateFaceTagVectors()
int _childVertFromVertCount
std::vector< ChildTag > _childFaceTag
void subdivideEdgeSharpness()
void subdivideTopology(Relations const &relationsToSubdivide)
void reclassifySemisharpVertices()
virtual void populateFaceEdgeRelation()=0
Index getFirstChildVertexFromVertices() const
void propagateComponentTags()
void markSparseEdgeChildren()
int getNumChildEdgesFromEdges() const
IndexVector _childVertexParentIndex
void populateParentChildIndices()
int getNumChildEdgesFromFaces() const
unsigned char _parentType
int _firstChildVertFromVert
unsigned int _faceVertices
IndexArray const getFaceChildEdges(Index parentFace) const
Index getFirstChildEdgeFromEdges() const