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)); }
121 ValueTagSize _crease : 1;
122 ValueTagSize _semiSharp : 1;
123 ValueTagSize _depSharp : 1;
124 ValueTagSize _xordinary : 1;
241 Level const & _level;
247 bool _hasLinearBoundaries;
248 bool _hasDependentSharpness;
263 std::vector<Index> _faceVertValues;
266 std::vector<ETag> _edgeTags;
269 std::vector<Sibling> _vertSiblingCounts;
270 std::vector<int> _vertSiblingOffsets;
271 std::vector<Sibling> _vertFaceSiblings;
274 std::vector<Index> _vertValueIndices;
275 std::vector<ValueTag> _vertValueTags;
276 std::vector<CreaseEndPair> _vertValueCreaseEnds;
285 int vCount = _level.getNumFaceVertices(fIndex);
286 int vOffset = _level.getOffsetOfFaceVertices(fIndex);
292 int vCount = _level.getNumFaceVertices(fIndex);
293 int vOffset = _level.getOffsetOfFaceVertices(fIndex);
294 return IndexArray(&_faceVertValues[vOffset], vCount);
300 int vCount = _level.getNumVertexFaces(vIndex);
301 int vOffset = _level.getOffsetOfVertexFaces(vIndex);
307 int vCount = _level.getNumVertexFaces(vIndex);
308 int vOffset = _level.getOffsetOfVertexFaces(vIndex);
309 return SiblingArray(&_vertFaceSiblings[vOffset], vCount);
324 return IndexArray(&_vertValueIndices[vOffset], vCount);
360 if (_level.getDepth() > 0)
return valueIndex;
363 while (_vertValueIndices[vvIndex] != valueIndex) {
373 using namespace OPENSUBDIV_VERSION;
unsigned char ValueTagSize
Index findVertexValueIndex(Index vertexIndex, Index valueIndex) const
Index getVertexValueOffset(Index v, Sibling i=0) const
Array< Index > IndexArray
bool valueTopologyMatches(Index valueIndex) const
Vtr::Array< ValueTag > ValueTagArray
ConstIndexArray getFaceValues(Index fIndex) const
Vtr::ConstArray< ValueTag > ConstValueTagArray
Index getVertexValue(Index v, Sibling i=0) const
void resizeVertexValues(int numVertexValues)
void buildFaceVertexSiblingsFromVertexFaceSiblings(std::vector< Sibling > &fvSiblings) const
void gatherValueSpans(Index vIndex, ValueSpan *vValueSpans) const
int getNumVertexValues(Index v) const
ConstLocalIndexArray ConstSiblingArray
void getVertexCreaseEndValues(Index vIndex, Sibling sibling, Index endValues[2]) const
FVarLevel(Level const &level)
ConstCreaseEndPairArray getVertexValueCreaseEnds(Index vIndex) const
ValueTag getValueTag(Index valueIndex) const
void initializeFaceValuesFromVertexFaceSiblings()
Sdc::Options getOptions() const
ConstIndexArray getVertexValues(Index vIndex) const
void getVertexEdgeValues(Index vIndex, Index valuesPerEdge[]) const
All supported options applying to subdivision scheme.
int getNumFaceValuesTotal() const
unsigned short LocalIndex
bool edgeTopologyMatches(Index eIndex) const
void setOptions(Sdc::Options const &options)
void completeTopologyFromFaceValues(int regBoundaryValence)
Vtr::Array< CreaseEndPair > CreaseEndPairArray
LocalIndexArray SiblingArray
Level::ETag getFaceCompositeCombinedEdgeTag(ConstIndexArray &faceEdges, Level::ETag *fvarETags) const
ConstArray< Index > ConstIndexArray
void getEdgeFaceValues(Index eIndex, int fIncToEdge, Index valuesPerVert[2]) const
bool hasSmoothBoundaries() const
void resizeValues(int numValues)
void initializeFaceValuesFromFaceVertices()
ValueTag getFaceCompositeValueTag(ConstIndexArray &faceValues, ConstIndexArray &faceVerts) const
ConstValueTagArray getVertexValueTags(Index vIndex) const
ETag getEdgeTag(Index eIndex) const
bool hasLinearBoundaries() const
Level const & getLevel() const
ConstSiblingArray getVertexFaceSiblings(Index vIndex) const
Vtr::ConstArray< CreaseEndPair > ConstCreaseEndPairArray
Level::VTag getFaceCompositeValueAndVTag(ConstIndexArray &faceValues, ConstIndexArray &faceVerts, Level::VTag *fvarVTags) const