24 #ifndef OPENSUBDIV3_FAR_TOPOLOGY_LEVEL_H
25 #define OPENSUBDIV3_FAR_TOPOLOGY_LEVEL_H
27 #include "../version.h"
29 #include "../vtr/level.h"
30 #include "../vtr/refinement.h"
31 #include "../far/types.h"
36 namespace OPENSUBDIV_VERSION {
238 return _level->getFaceFVarValues(f, channel);
243 return _level->doesVertexFVarTopologyMatch(v, channel);
248 return _level->doesEdgeFVarTopologyMatch(e, channel);
253 return _level->doesFaceFVarTopologyMatch(f, channel);
287 void PrintTopology(
bool children =
true)
const { _level->print((children && _refToChild) ? _refToChild : 0); }
294 Vtr::internal::Level
const * _level;
295 Vtr::internal::Refinement
const * _refToParent;
296 Vtr::internal::Refinement
const * _refToChild;
307 using namespace OPENSUBDIV_VERSION;
void PrintTopology(bool children=true) const
ConstLocalIndexArray GetEdgeFaceLocalIndices(Index e) const
Access the local indices of an edge with respect to its incident faces.
Index GetEdgeChildVertex(Index e) const
Return the child vertex (in the next level) of a given edge.
int GetNumFaces() const
Return the number of faces in this level.
bool IsVertexValenceRegular(Index v) const
Return if the valence of the vertex is regular (must be manifold)
bool IsEdgeInfSharp(Index e) const
Return if the edge is infinitely-sharp.
bool IsVertexCorner(Index v) const
Return if the vertex is a corner (only one incident face)
bool IsFaceHole(Index f) const
Return if a given face has been tagged as a hole.
bool IsEdgeSemiSharp(Index e) const
Return if the edge is semi-sharp.
bool DoesEdgeFVarTopologyMatch(Index e, int channel=0) const
Return if face-varying topology across the edge only matches.
ConstIndexArray GetVertexFaces(Index v) const
Access the faces incident a given vertex.
bool IsEdgeNonManifold(Index e) const
Return if the edge is non-manifold.
bool DoesVertexFVarTopologyMatch(Index v, int channel=0) const
Return if face-varying topology around a vertex matches.
ConstLocalIndexArray GetVertexEdgeLocalIndices(Index v) const
Access the local indices of a vertex with respect to its incident edges.
Index GetFaceParentFace(Index f) const
Return the parent face (in the previous level) of a given face.
ConstIndexArray GetFaceEdges(Index f) const
Access the edges incident a given face.
bool ValidateTopology() const
int GetNumEdges() const
Return the number of edges in this level.
Stores topology data for a specified set of refinement options.
float GetEdgeSharpness(Index e) const
Return the sharpness assigned a given edge.
ConstIndexArray GetEdgeChildEdges(Index e) const
Access the child edges (in the next level) of a given edge.
bool IsVertexInfSharp(Index v) const
Return if the vertex is infinitely-sharp.
bool IsVertexSemiSharp(Index v) const
Return if the vertex is semi-sharp.
ConstIndexArray GetFaceVertices(Index f) const
Access the vertices incident a given face.
int GetNumVertices() const
Return the number of vertices in this level.
int GetNumFaceVertices() const
Return the total number of face-vertices, i.e. the sum of all vertices for all faces.
ConstIndexArray GetVertexEdges(Index v) const
Access the edges incident a given vertex.
ConstLocalIndexArray GetVertexFaceLocalIndices(Index v) const
Access the local indices of a vertex with respect to its incident faces.
bool IsVertexNonManifold(Index v) const
Return if the vertex is non-manifold.
Index GetFaceChildVertex(Index f) const
Return the child vertex (in the next level) of a given face.
Index FindEdge(Index v0, Index v1) const
Identify the edge matching the given vertex pair.
ConstIndexArray GetFaceChildEdges(Index f) const
Access the child edges (in the next level) of a given face.
ConstIndexArray GetFaceFVarValues(Index f, int channel=0) const
Access the face-varying values associated with a particular face.
Index GetVertexChildVertex(Index v) const
Return the child vertex (in the next level) of a given vertex.
bool DoesFaceFVarTopologyMatch(Index f, int channel=0) const
Return if face-varying topology around a face matches.
float GetVertexSharpness(Index v) const
Return the sharpness assigned a given vertex.
Sdc::Crease::Rule GetVertexRule(Index v) const
Return the subdivision rule assigned a given vertex specific to this level.
int GetNumFVarValues(int channel=0) const
Return the total number of face-varying values in a particular channel (the upper bound of a face-var...
bool IsVertexBoundary(Index v) const
Return if the vertex is on a boundary (at least one incident boundary edge)
An interface for accessing data in a specific level of a refined topology hierarchy.
ConstIndexArray GetFaceChildFaces(Index f) const
Access the child faces (in the next level) of a given face.
ConstIndexArray GetEdgeVertices(Index e) const
Access the vertices incident a given edge.
bool IsEdgeBoundary(Index e) const
Return if the edge is a boundary (only one incident face)
int GetNumFVarChannels() const
Return the number of face-varying channels (should be same for all levels)
ConstIndexArray GetEdgeFaces(Index e) const
Access the faces incident a given edge.