Loading...
Searching...
No Matches
TopologyLevel Class Reference

An interface for accessing data in a specific level of a refined topology hierarchy. More...

`#include <topologyLevel.h>`

## Public Member Functions

Methods to inspect the overall inventory of components:
All three main component types are indexed locally within each level. For some topological relationships – notably face-vertices, which is often the only relationship of interest – the total number of entries is also made available.
int | GetNumVertices () const
| Return the number of vertices in this level.
int | GetNumFaces () const
| Return the number of faces in this level.
int | GetNumEdges () const
| Return the number of edges in this level.
int | GetNumFaceVertices () const
| Return the total number of face-vertices, i.e. the sum of all vertices for all faces.
Methods to inspect topological relationships for individual components:

With three main component types (vertices, faces and edges), for each of the three components the TopologyLevel stores the incident/adjacent components of the other two types. So there are six relationships available for immediate inspection. All are accessed by methods that return an array of fixed size containing the indices of the incident components.

For some of the relations, i.e. those for which the incident components are of higher order or 'contain' the component itself (e.g. a vertex has incident faces that contain it), an additional 'local index' is available that identifies the component within each of its neighbors. For example, if vertex V is the k'th vertex in some face F, then when F occurs in the set of incident vertices of V, the local index corresponding to F will be k. The ordering of local indices matches the ordering of the incident component to which it corresponds.

ConstIndexArray | GetFaceVertices (Index f) const
| Access the vertices incident a given face.
ConstIndexArray | GetFaceEdges (Index f) const
| Access the edges incident a given face.
ConstIndexArray | GetEdgeVertices (Index e) const
| Access the vertices incident a given edge.
ConstIndexArray | GetEdgeFaces (Index e) const
| Access the faces incident a given edge.
ConstIndexArray | GetVertexFaces (Index v) const
| Access the faces incident a given vertex.
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.
ConstLocalIndexArray | GetVertexEdgeLocalIndices (Index v) const
| Access the local indices of a vertex with respect to its incident edges.
ConstLocalIndexArray | GetEdgeFaceLocalIndices (Index e) const
| Access the local indices of an edge with respect to its incident faces.
Index | FindEdge (Index v0, Index v1) const
| Identify the edge matching the given vertex pair.
Methods to inspect other topological properties of individual components:
bool | IsEdgeNonManifold (Index e) const
| Return if the edge is non-manifold.
bool | IsVertexNonManifold (Index v) const
| Return if the vertex is non-manifold.
bool | IsEdgeBoundary (Index e) const
| Return if the edge is a boundary.
bool | IsVertexBoundary (Index v) const
| Return if the vertex is a boundary.
Methods to inspect feature tags for individual components:
While only a subset of components may have been tagged with features such as sharpness, all such features have a default value and so all components can be inspected.
float | GetEdgeSharpness (Index e) const
| Return the sharpness assigned a given edge.
float | GetVertexSharpness (Index v) const
| Return the sharpness assigned a given vertex.
bool | IsFaceHole (Index f) const
| Return if a given face has been tagged as a hole.
Sdc::Crease::Rule | GetVertexRule (Index v) const
| Return the subdivision rule assigned a given vertex specific to this level.
Methods to inspect face-varying data:

Face-varying data is organized into topologically independent channels, each with an integer identifier. Access to face-varying data generally requires the specification of a channel, though with a single channel being a common situation the first/only channel will be assumed if unspecified.

A face-varying channel is composed of a set of values that may be shared by faces meeting at a common vertex. Just as there are sets of vertices that are associated with faces by index (ranging from 0 to num-vertices - 1), face-varying values are also referenced by index (ranging from 0 to num-values -1).

The face-varying values associated with a face are accessed similarly to the way in which vertices associated with the face are accessed – an array of fixed size containing the indices for each corner is provided for inspection, iteration, etc.

When the face-varying topology around a vertex "matches", it has the same limit properties and so results in the same limit surface when collections of adjacent vertices match. Like other references to "topology", this includes consideration of sharpness. So it may be that face-varying values are assigned around a vertex on a boundary in a way that appears to match, but the face-varying interpolation option requires sharpening of that vertex in face-varying space – the difference in the topology of the resulting limit surfaces leading to the query returning false for the match. The edge case is simpler in that it only considers continuity across the edge, not the entire neighborhood around each end vertex.

int | GetNumFVarChannels () const
| Return the number of face-varying channels (should be same for all levels)
int | GetNumFVarValues (int channel=0) const
| Return the total number of face-varying values in a particular channel (the upper bound of a face-varying value index)
ConstIndexArray | GetFaceFVarValues (Index f, int channel=0) const
| Access the face-varying values associated with a particular face.
bool | DoesVertexFVarTopologyMatch (Index v, int channel=0) const
| Return if face-varying topology around a vertex matches.
bool | DoesEdgeFVarTopologyMatch (Index e, int channel=0) const
| Return if face-varying topology across the edge only matches.
bool | DoesFaceFVarTopologyMatch (Index f, int channel=0) const
| Return if face-varying topology around a face matches.
Methods to identify parent or child components in adjoining levels of refinement:
ConstIndexArray | GetFaceChildFaces (Index f) const
| Access the child faces (in the next level) of a given face.
ConstIndexArray | GetFaceChildEdges (Index f) const
| Access the child edges (in the next level) of a given face.
ConstIndexArray | GetEdgeChildEdges (Index e) const
| Access the child edges (in the next level) of a given edge.
Index | GetFaceChildVertex (Index f) const
| Return the child vertex (in the next level) of a given face.
Index | GetEdgeChildVertex (Index e) const
| Return the child vertex (in the next level) of a given edge.
Index | GetVertexChildVertex (Index v) const
| Return the child vertex (in the next level) of a given vertex.
Index | GetFaceParentFace (Index f) const
| Return the parent face (in the previous level) of a given face.

## Debugging aides:

class | TopologyRefiner
bool | ValidateTopology () const
void | PrintTopology (bool children=true) const
| TopologyLevel ()
| ~TopologyLevel ()

## Detailed Description

An interface for accessing data in a specific level of a refined topology hierarchy.

TopologyLevel provides an interface to data in a specific level of a topology hierarchy. Instances of TopologyLevel are created and owned by a TopologyRefiner, which will return const-references to them. Such references are only valid during the lifetime of the TopologyRefiner that created and returned them, and only for a given refinement, i.e. if the TopologyRefiner is re-refined, any references to TopoologyLevels are invalidated.

Definition at line 49 of file topologyLevel.h.

## Constructor & Destructor Documentation

## TopologyLevel()

TopologyLevel | ( |  | ) |

inline

Definition at line 263 of file topologyLevel.h.

## ~TopologyLevel()

~TopologyLevel | ( |  | ) |

inline

Definition at line 264 of file topologyLevel.h.

## Member Function Documentation

## DoesEdgeFVarTopologyMatch()

bool DoesEdgeFVarTopologyMatch | ( | Index | e,
|  | int | channel = 0 ) const

inline

Return if face-varying topology across the edge only matches.

Definition at line 210 of file topologyLevel.h.

## DoesFaceFVarTopologyMatch()

bool DoesFaceFVarTopologyMatch | ( | Index | f,
|  | int | channel = 0 ) const

inline

Return if face-varying topology around a face matches.

Definition at line 215 of file topologyLevel.h.

## DoesVertexFVarTopologyMatch()

bool DoesVertexFVarTopologyMatch | ( | Index | v,
|  | int | channel = 0 ) const

inline

Return if face-varying topology around a vertex matches.

Definition at line 205 of file topologyLevel.h.

## FindEdge()

Index FindEdge | ( | Index | v0,
|  | Index | v1 ) const

inline

Identify the edge matching the given vertex pair.

Definition at line 120 of file topologyLevel.h.

## GetEdgeChildEdges()

ConstIndexArray GetEdgeChildEdges | ( | Index | e | ) | const

inline

Access the child edges (in the next level) of a given edge.

Definition at line 231 of file topologyLevel.h.

## GetEdgeChildVertex()

Index GetEdgeChildVertex | ( | Index | e | ) | const

inline

Return the child vertex (in the next level) of a given edge.

Definition at line 237 of file topologyLevel.h.

## GetEdgeFaceLocalIndices()

ConstLocalIndexArray GetEdgeFaceLocalIndices | ( | Index | e | ) | const

inline

Access the local indices of an edge with respect to its incident faces.

Definition at line 117 of file topologyLevel.h.

## GetEdgeFaces()

ConstIndexArray GetEdgeFaces | ( | Index | e | ) | const

inline

Access the faces incident a given edge.

Definition at line 102 of file topologyLevel.h.

## GetEdgeSharpness()

float GetEdgeSharpness | ( | Index | e | ) | const

inline

Return the sharpness assigned a given edge.

Definition at line 148 of file topologyLevel.h.

## GetEdgeVertices()

ConstIndexArray GetEdgeVertices | ( | Index | e | ) | const

inline

Access the vertices incident a given edge.

Definition at line 99 of file topologyLevel.h.

## GetFaceChildEdges()

ConstIndexArray GetFaceChildEdges | ( | Index | f | ) | const

inline

Access the child edges (in the next level) of a given face.

Definition at line 228 of file topologyLevel.h.

## GetFaceChildFaces()

ConstIndexArray GetFaceChildFaces | ( | Index | f | ) | const

inline

Access the child faces (in the next level) of a given face.

Definition at line 225 of file topologyLevel.h.

## GetFaceChildVertex()

Index GetFaceChildVertex | ( | Index | f | ) | const

inline

Return the child vertex (in the next level) of a given face.

Definition at line 234 of file topologyLevel.h.

## GetFaceEdges()

ConstIndexArray GetFaceEdges | ( | Index | f | ) | const

inline

Access the edges incident a given face.

Definition at line 96 of file topologyLevel.h.

## GetFaceFVarValues()

ConstIndexArray GetFaceFVarValues | ( | Index | f,
|  | int | channel = 0 ) const

inline

Access the face-varying values associated with a particular face.

Definition at line 200 of file topologyLevel.h.

## GetFaceParentFace()

Index GetFaceParentFace | ( | Index | f | ) | const

inline

Return the parent face (in the previous level) of a given face.

Definition at line 243 of file topologyLevel.h.

## GetFaceVertices()

ConstIndexArray GetFaceVertices | ( | Index | f | ) | const

inline

Access the vertices incident a given face.

Definition at line 93 of file topologyLevel.h.

## GetNumEdges()

int GetNumEdges | ( |  | ) | const

inline

Return the number of edges in this level.

Definition at line 68 of file topologyLevel.h.

## GetNumFaces()

int GetNumFaces | ( |  | ) | const

inline

Return the number of faces in this level.

Definition at line 65 of file topologyLevel.h.

## GetNumFaceVertices()

int GetNumFaceVertices | ( |  | ) | const

inline

Return the total number of face-vertices, i.e. the sum of all vertices for all faces.

Definition at line 71 of file topologyLevel.h.

## GetNumFVarChannels()

int GetNumFVarChannels | ( |  | ) | const

inline

Return the number of face-varying channels (should be same for all levels)

Definition at line 193 of file topologyLevel.h.

## GetNumFVarValues()

int GetNumFVarValues | ( | int | channel = 0 | ) | const

inline

Return the total number of face-varying values in a particular channel (the upper bound of a face-varying value index)

Definition at line 197 of file topologyLevel.h.

## GetNumVertices()

int GetNumVertices | ( |  | ) | const

inline

Return the number of vertices in this level.

Definition at line 62 of file topologyLevel.h.

## GetVertexChildVertex()

Index GetVertexChildVertex | ( | Index | v | ) | const

inline

Return the child vertex (in the next level) of a given vertex.

Definition at line 240 of file topologyLevel.h.

## GetVertexEdgeLocalIndices()

ConstLocalIndexArray GetVertexEdgeLocalIndices | ( | Index | v | ) | const

inline

Access the local indices of a vertex with respect to its incident edges.

Definition at line 114 of file topologyLevel.h.

## GetVertexEdges()

ConstIndexArray GetVertexEdges | ( | Index | v | ) | const

inline

Access the edges incident a given vertex.

Definition at line 108 of file topologyLevel.h.

## GetVertexFaceLocalIndices()

ConstLocalIndexArray GetVertexFaceLocalIndices | ( | Index | v | ) | const

inline

Access the local indices of a vertex with respect to its incident faces.

Definition at line 111 of file topologyLevel.h.

## GetVertexFaces()

ConstIndexArray GetVertexFaces | ( | Index | v | ) | const

inline

Access the faces incident a given vertex.

Definition at line 105 of file topologyLevel.h.

## GetVertexRule()

Sdc::Crease::Rule GetVertexRule | ( | Index | v | ) | const

inline

Return the subdivision rule assigned a given vertex specific to this level.

Definition at line 157 of file topologyLevel.h.

## GetVertexSharpness()

float GetVertexSharpness | ( | Index | v | ) | const

inline

Return the sharpness assigned a given vertex.

Definition at line 151 of file topologyLevel.h.

## IsEdgeBoundary()

bool IsEdgeBoundary | ( | Index | e | ) | const

inline

Return if the edge is a boundary.

Definition at line 134 of file topologyLevel.h.

## IsEdgeNonManifold()

bool IsEdgeNonManifold | ( | Index | e | ) | const

inline

Return if the edge is non-manifold.

Definition at line 128 of file topologyLevel.h.

## IsFaceHole()

bool IsFaceHole | ( | Index | f | ) | const

inline

Return if a given face has been tagged as a hole.

Definition at line 154 of file topologyLevel.h.

## IsVertexBoundary()

bool IsVertexBoundary | ( | Index | v | ) | const

inline

Return if the vertex is a boundary.

Definition at line 137 of file topologyLevel.h.

## IsVertexNonManifold()

bool IsVertexNonManifold | ( | Index | v | ) | const

inline

Return if the vertex is non-manifold.

Definition at line 131 of file topologyLevel.h.

## PrintTopology()

void PrintTopology | ( | bool | children = true | ) | const

inline

Definition at line 250 of file topologyLevel.h.

## ValidateTopology()

bool ValidateTopology | ( |  | ) | const

inline

Definition at line 249 of file topologyLevel.h.

## Friends And Related Symbol Documentation

## TopologyRefiner

friend class TopologyRefiner

friend

Definition at line 255 of file topologyLevel.h.

The documentation for this class was generated from the following file:

- opensubdiv/far/topologyLevel.h