24 #ifndef OPENSUBDIV3_VTR_COMPONENT_INTERFACES_H 25 #define OPENSUBDIV3_VTR_COMPONENT_INTERFACES_H 27 #include "../version.h" 29 #include "../sdc/types.h" 30 #include "../sdc/crease.h" 31 #include "../vtr/types.h" 32 #include "../vtr/stackBuffer.h" 38 namespace OPENSUBDIV_VERSION {
79 void SetIndex(
int edgeIndex) { _eIndex = edgeIndex; }
82 int GetNumFaces()
const {
return _level->getEdgeFaces(_eIndex).size(); }
83 float GetSharpness()
const {
return _level->getEdgeSharpness(_eIndex); }
87 s[0] = s[1] = GetSharpness() - 1.0f;
92 for (
int i = 0; i < eFaces.
size(); ++i) {
93 vertsPerFace[i] = _level->getFaceVertices(eFaces[i]).
size();
114 _pIndex = parentIndex;
115 _cIndex = childIndex;
116 _eCount = _parent->getVertexEdges(_pIndex).size();
117 _fCount = _parent->getVertexFaces(_pIndex).size();
124 float GetSharpness()
const {
return _parent->getVertexSharpness(_pIndex); }
127 for (
int i = 0; i < _eCount; ++i) {
128 pSharpness[i] = _parent->getEdgeSharpness(pEdges[i]);
136 GetSharpnessPerEdge(pSharpness);
142 const Level* _parent;
155 using namespace OPENSUBDIV_VERSION;
float * GetSharpnessPerEdge(float pSharpness[]) const
void GetChildSharpnesses(Sdc::Crease const &, float s[2]) const
float GetChildSharpness(Sdc::Crease const &) const
float * GetChildSharpnessPerEdge(Sdc::Crease const &crease, float cSharpness[]) const
float GetSharpness() const
FaceInterface(int vertCount)
void SetIndex(int parentIndex, int childIndex)
Types, constants and utilities related to semi-sharp creasing – whose implementation is independent ...
void SetIndex(int edgeIndex)
EdgeInterface(Level const &level)
void SubdivideEdgeSharpnessesAroundVertex(int incidentEdgeCountAtVertex, float const *incidentEdgeSharpnessAroundVertex, float *childEdgesSharpnessAroundVertex) const
float GetSharpness() const
int GetNumVertices() const
VertexInterface(Level const &parent, Level const &child)
void GetNumVerticesPerFace(int vertsPerFace[]) const