25#ifndef OPENSUBDIV3_BFR_REFINER_SURFACE_FACTORY_H
26#define OPENSUBDIV3_BFR_REFINER_SURFACE_FACTORY_H
28#include "../version.h"
30#include "../bfr/surfaceFactory.h"
31#include "../bfr/surfaceFactoryCache.h"
34namespace OPENSUBDIV_VERSION {
97 Index vertexIndices[])
const override;
99 FVarID fvarID,
Index fvarValueIndices[])
const override;
105 Index faceIndex,
int faceVertex,
106 Index vertexIndices[])
const override;
108 Index faceIndex,
int faceVertex,
109 FVarID fvarID,
Index fvarValueIndices[])
const override;
114 Index vertexIndices[])
const override;
118 FVarID fvarID,
Index fvarValueIndices[])
const override;
125 int getFaceVaryingChannel(
FVarID fvarID)
const;
127 int getFaceVertexPointIndices(
Index faceIndex,
int faceVertex,
128 Index indices[],
int vtxOrFVarChannel)
const;
130 int getFacePatchPointIndices(
Index faceIndex,
131 Index indices[],
int vtxOrFVarChannel)
const;
138 int _numFVarChannels;
156template <
class CACHE_TYPE = SurfaceFactoryCache>
169 CACHE_TYPE _localCache;
175using namespace OPENSUBDIV_VERSION;
Intermediate subclass of SurfaceFactory with Far::TopologyRefiner as the mesh.
int GetNumFaces() const
Return the number of faces.
int GetNumFVarChannels() const
Return the number of face-varying channels.
Far::TopologyRefiner const & GetMesh() const
Return the instance of the mesh.
~RefinerSurfaceFactoryBase() override=default
RefinerSurfaceFactoryBase(Far::TopologyRefiner const &mesh, Options const &options)
Template for concrete subclasses of RefinerSurfaceFactoryBase.
~RefinerSurfaceFactory() override=default
RefinerSurfaceFactory(Far::TopologyRefiner const &mesh, Options const &options=Options())
Base class providing initialization of a Surface for each face of a mesh.
void setInternalCache(SurfaceFactoryCache *cache)
Subclass to identify an internal cache for use by base class.
Simple set of options assigned to instances of SurfaceFactory.
virtual int getFaceVertexIncidentFaceFVarValueIndices(Index faceIndex, int faceVertex, FVarID fvarID, Index fvarValueIndices[]) const =0
Gather face-varying indices of incident faces around a face-vertex.
virtual int getFaceVertexIncidentFaceVertexIndices(Index faceIndex, int faceVertex, Index vertexIndices[]) const =0
Gather vertex indices of incident faces around a face-vertex.
virtual int getFaceSize(Index faceIndex) const =0
Returns the size of a face (number of vertices)
int Index
Integer type representing a mesh index.
virtual int populateFaceVertexDescriptor(Index faceIndex, int faceVertex, VertexDescriptor *vertexDescriptor) const =0
Describe the topology of incident faces around a face-vertex.
virtual bool getFaceNeighborhoodVertexIndicesIfRegular(Index faceIndex, Index vertexIndices[]) const
virtual bool getFaceNeighborhoodFVarValueIndicesIfRegular(Index faceIndex, FVarID fvarID, Index fvarValueIndices[]) const
virtual int getFaceFVarValueIndices(Index faceIndex, FVarID fvarID, Index fvarValueIndices[]) const =0
Gather the face-varying indices of the face's vertices.
virtual int getFaceVertexIndices(Index faceIndex, Index vertexIndices[]) const =0
Gather the indices of the face's vertices.
virtual bool isFaceHole(Index faceIndex) const =0
Returns if a face is a hole.
std::intptr_t FVarID
Type used to identify and specify face-varying primvars.
Simple class used by subclasses of SurfaceFactory to describe a vertex.
Stores topology data for a specified set of refinement options.