24 #ifndef OPENSUBDIV3_VTR_FVAR_LEVEL_H 25 #define OPENSUBDIV3_VTR_FVAR_LEVEL_H 27 #include "../version.h" 29 #include "../sdc/types.h" 30 #include "../sdc/crease.h" 31 #include "../sdc/options.h" 32 #include "../vtr/types.h" 33 #include "../vtr/level.h" 41 namespace OPENSUBDIV_VERSION {
90 void clear() { std::memset(
this, 0,
sizeof(
ETag)); }
246 Level const & _level;
252 bool _hasLinearBoundaries;
253 bool _hasDependentSharpness;
268 std::vector<Index> _faceVertValues;
271 std::vector<ETag> _edgeTags;
274 std::vector<Sibling> _vertSiblingCounts;
275 std::vector<int> _vertSiblingOffsets;
276 std::vector<Sibling> _vertFaceSiblings;
279 std::vector<Index> _vertValueIndices;
280 std::vector<ValueTag> _vertValueTags;
281 std::vector<CreaseEndPair> _vertValueCreaseEnds;
299 return IndexArray(&_faceVertValues[vOffset], vCount);
314 return SiblingArray(&_vertFaceSiblings[vOffset], vCount);
329 return IndexArray(&_vertValueIndices[vOffset], vCount);
365 if (_level.
getDepth() > 0)
return valueIndex;
368 while (_vertValueIndices[vvIndex] != valueIndex) {
389 if (this->_mismatch) {
397 if (this->isCorner()) {
402 if (this->isCrease() || this->isSemiSharp()) {
409 levelTag.
_corner = !this->_infIrregular && !this->_infSharpEdges;
426 using namespace OPENSUBDIV_VERSION;
LocalIndexArray SiblingArray
void initializeFaceValuesFromFaceVertices()
Level::VTag combineWithLevelVTag(Level::VTag) const
ConstLocalIndexArray ConstSiblingArray
ConstIndexArray getVertexValues(Index vIndex) const
int getNumVertexValues(Index v) const
FVarLevel(Level const &level)
Index getVertexValue(Index v, Sibling i=0) const
Vtr::ConstArray< ValueTag > ConstValueTagArray
void getFaceValueTags(Index faceIndex, ValueTag valueTags[]) const
bool hasCreaseEnds() const
ConstIndexArray getFaceValues(Index fIndex) const
ValueTag getFaceCompositeValueTag(Index faceIndex) const
void getVertexEdgeValues(Index vIndex, Index valuesPerEdge[]) const
ValueTagSize _nonManifold
bool hasInfSharpEdges() const
void setOptions(Sdc::Options const &options)
Sdc::Options getOptions() const
ConstSiblingArray getVertexFaceSiblings(Index vIndex) const
unsigned short LocalIndex
bool hasSmoothBoundaries() const
ValueTagSize _infIrregular
void completeTopologyFromFaceValues(int regBoundaryValence)
Index getVertexValueOffset(Index v, Sibling i=0) const
ConstValueTagArray getVertexValueTags(Index vIndex) const
ValueTag getValueTag(Index valueIndex) const
Index findVertexValueIndex(Index vertexIndex, Index valueIndex) const
Vtr::Array< ValueTag > ValueTagArray
unsigned char ValueTagSize
void buildFaceVertexSiblingsFromVertexFaceSiblings(std::vector< Sibling > &fvSiblings) const
Vtr::Array< CreaseEndPair > CreaseEndPairArray
CreaseEndPair getValueCreaseEndPair(Index valueIndex) const
ConstArray< Index > ConstIndexArray
bool hasLinearBoundaries() const
bool edgeTopologyMatches(Index eIndex) const
void resizeValues(int numValues)
int getNumVertexFaces(Index vertIndex) const
int getOffsetOfFaceVertices(Index faceIndex) const
Level const & getLevel() const
Vtr::ConstArray< CreaseEndPair > ConstCreaseEndPairArray
All supported options applying to subdivision scheme.
void getEdgeFaceValues(Index eIndex, int fIncToEdge, Index valuesPerVert[2]) const
void getVertexCreaseEndValues(Index vIndex, Sibling sibling, Index endValues[2]) const
void gatherValueSpans(Index vIndex, ValueSpan *vValueSpans) const
void initializeFaceValuesFromVertexFaceSiblings()
int getNumFaceVertices(Index faceIndex) const
ETag getEdgeTag(Index eIndex) const
bool hasInfIrregularity() const
int getNumFaceValuesTotal() const
ValueTagSize _infSharpEdges
bool valueTopologyMatches(Index valueIndex) const
Array< Index > IndexArray
Level::ETag combineWithLevelETag(Level::ETag) const
ConstCreaseEndPairArray getVertexValueCreaseEnds(Index vIndex) const
int getOffsetOfVertexFaces(Index vertIndex) const
void resizeVertexValues(int numVertexValues)
bool hasCreaseEnds() const