OpenSubdiv

Abstract interface adapting SurfaceFactory to a connected mesh representation. More...
#include <surfaceFactoryMeshAdapter.h>
Public Types  
typedef int  Index 
Integer type representing a mesh index.  
typedef std::intptr_t  FVarID 
Type used to identify and specify facevarying primvars.  
Protected Member Functions  
Methods to query simple face properties  
Methods to return simple properties associated with a face.  
virtual bool  isFaceHole (Index faceIndex) const =0 
Returns if a face is a hole.  
virtual int  getFaceSize (Index faceIndex) const =0 
Returns the size of a face (number of vertices)  
Methods to gather indices for the face's vertices  
These methods gather indices associated with the vertices of a face, e.g. the indices of the vertices themselves, or the indices of facevarying values associated with the vertices. These are used to quickly deal with linear limit surfaces without any inspection of the neighboring topology.  
virtual int  getFaceVertexIndices (Index faceIndex, Index vertexIndices[]) const =0 
Gather the indices of the face's vertices.  
virtual int  getFaceFVarValueIndices (Index faceIndex, FVarID fvarID, Index fvarValueIndices[]) const =0 
Gather the facevarying indices of the face's vertices.  
Methods to identify the neighborhood of a facevertex  
These methods identify the topology and associated indices for the complete set of incident faces surrounding a corner (or facevertex) of a face. Methods here use "FaceVertex" in the name to emphasize that they require information for a particular corner vertex of the face. The topology around the facevertex is described by populating a given instance of a simple VertexDescriptor class – which fully describes the facevertex, it incident faces and any sharpness assigned at or around the facevertex. (See the comments with the VertexDescriptor definition for more details.) Additional methods are then required to identify indices for the incident faces around a facevertex. One method gathers the indices for control vertices of the mesh assigned to the incident faces (their VertexIndices), while the other gathers indices for a particular set of facevarying values assigned to them (their FVarValueIndices). Both methods expect the incident faces to be ordered consistent with the specification in VertexDescriptor, and all indices for all incident faces are required. The order of indices assigned to each face for these methods must also be specified relative to the facevertex, rather than the way the face is defined. For example, if a quad Q is defined by the four vertices {A, B, C, D}, when gathering the indices for Q as part of facevertex C, the indices should be specified starting with C, i.e. as {C, D, A, B}. Ordering indices this way makes it much easier for the factory to identify when facevarying topology differs from the vertex topology, and both the facevarying and vertex indices are ordered this way for consistency.  
virtual int  populateFaceVertexDescriptor (Index faceIndex, int faceVertex, VertexDescriptor *vertexDescriptor) const =0 
Describe the topology of incident faces around a facevertex.  
virtual int  getFaceVertexIncidentFaceVertexIndices (Index faceIndex, int faceVertex, Index vertexIndices[]) const =0 
Gather vertex indices of incident faces around a facevertex.  
virtual int  getFaceVertexIncidentFaceFVarValueIndices (Index faceIndex, int faceVertex, FVarID fvarID, Index fvarValueIndices[]) const =0 
Gather facevarying indices of incident faces around a facevertex.  
Optional methods for purely regular topology  
Optional methods for advanced use to accelerate the case of purely regular topology around a face. For cases when a mesh can quickly determine if the neighborhood around a faces is purely regular, these methods can be used to quickly identify the control point indices for the corresponding regular patch defining its limit surface. In doing so, the more tedious topological assembly requiring information about each facevertex can be avoided. The indices returned must be ordered according to the regular patch type corresponding to the subdivision scheme of the mesh. Boundary vertices are allowed and indicated by an Index of 1. The facevarying version will only be invoked if the vertex version is purely regular, in which case, the facevarying topology is expected to be similar. Note that these methods allow the caller (the SurfaceFactory) to pass nullptr (0) for the index arrays – in which case only the return value should be provided.  
virtual bool  getFaceNeighborhoodVertexIndicesIfRegular (Index faceIndex, Index vertexIndices[]) const 
virtual bool  getFaceNeighborhoodFVarValueIndicesIfRegular (Index faceIndex, FVarID fvarID, Index fvarValueIndices[]) const 
Abstract interface adapting SurfaceFactory to a connected mesh representation.
Definition at line 65 of file surfaceFactoryMeshAdapter.h.
typedef std::intptr_t FVarID 
Type used to identify and specify facevarying primvars.
A facevarying ID is used to specify facevarying primvars for evaluation so that they can be identified by the subclass for the mesh. It can be assigned as either a positive integer ID or pointer, with the subclass determining its interpretation.
Often only one facevarying primvar is of interest, so a default can be assigned to the factory to avoid repeated specification.
Definition at line 80 of file surfaceFactoryMeshAdapter.h.
typedef int Index 
Integer type representing a mesh index.
Definition at line 68 of file surfaceFactoryMeshAdapter.h.

protectedpure virtual 
Gather the facevarying indices of the face's vertices.

inlineprotectedvirtual 
Definition at line 224 of file surfaceFactoryMeshAdapter.h.

inlineprotectedvirtual 
Definition at line 218 of file surfaceFactoryMeshAdapter.h.

protectedpure virtual 
Returns the size of a face (number of vertices)

protectedpure virtual 
Gather facevarying indices of incident faces around a facevertex.

protectedpure virtual 
Gather vertex indices of incident faces around a facevertex.

protectedpure virtual 
Gather the indices of the face's vertices.

protectedpure virtual 
Returns if a face is a hole.

protectedpure virtual 
Describe the topology of incident faces around a facevertex.