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)); }
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;
LocalIndexArray SiblingArray
bool hasLinearBoundaries() const
FVarLevel(Level const &level)
Vtr::ConstArray< CreaseEndPair > ConstCreaseEndPairArray
int getNumVertexValues(Index v) const
bool hasSmoothBoundaries() const
void resizeVertexValues(int numVertexValues)
void setOptions(Sdc::Options const &options)
void buildFaceVertexSiblingsFromVertexFaceSiblings(std::vector< Sibling > &fvSiblings) const
ConstArray< Index > ConstIndexArray
bool edgeTopologyMatches(Index eIndex) const
void gatherValueSpans(Index vIndex, ValueSpan *vValueSpans) const
Vtr::Array< ValueTag > ValueTagArray
void initializeFaceValuesFromVertexFaceSiblings()
Vtr::ConstArray< ValueTag > ConstValueTagArray
unsigned short LocalIndex
Sdc::Options getOptions() const
void getEdgeFaceValues(Index eIndex, int fIncToEdge, Index valuesPerVert[2]) const
void getVertexCreaseEndValues(Index vIndex, Sibling sibling, Index endValues[2]) const
void completeTopologyFromFaceValues(int regBoundaryValence)
ConstSiblingArray getVertexFaceSiblings(Index vIndex) const
Index findVertexValueIndex(Index vertexIndex, Index valueIndex) const
ConstIndexArray getVertexValues(Index vIndex) const
ValueTag getFaceCompositeValueTag(ConstIndexArray &faceValues, ConstIndexArray &faceVerts) const
unsigned char ValueTagSize
Array< Index > IndexArray
Level::ETag getFaceCompositeCombinedEdgeTag(ConstIndexArray &faceEdges, Level::ETag *fvarETags) const
All supported options applying to subdivision scheme.
bool valueTopologyMatches(Index valueIndex) const
Level const & getLevel() const
Index getVertexValue(Index v, Sibling i=0) const
ConstIndexArray getFaceValues(Index fIndex) const
void getVertexEdgeValues(Index vIndex, Index valuesPerEdge[]) const
ValueTag getValueTag(Index valueIndex) const
int getNumFaceValuesTotal() const
ETag getEdgeTag(Index eIndex) const
Level::VTag getFaceCompositeValueAndVTag(ConstIndexArray &faceValues, ConstIndexArray &faceVerts, Level::VTag *fvarVTags) const
ConstCreaseEndPairArray getVertexValueCreaseEnds(Index vIndex) const
void resizeValues(int numValues)
Index getVertexValueOffset(Index v, Sibling i=0) const
ConstLocalIndexArray ConstSiblingArray
void initializeFaceValuesFromFaceVertices()
ConstValueTagArray getVertexValueTags(Index vIndex) const
Vtr::Array< CreaseEndPair > CreaseEndPairArray