| OpenSubdiv

Loading...
Searching...
No Matches
PatchTableFactory Class Reference

Factory for constructing a PatchTable from a TopologyRefiner. More...

`#include <patchTableFactory.h>`

## Classes
struct | Options
| Public options for the PatchTable factory. More...
struct | PatchFaceTag
| Obsolete internal struct not intended for public use – due to be deprecated. More...

## Public Types
typedef std::vector< PatchFaceTag > | PatchTagVector

## Static Public Member Functions
static PatchTable * | Create (TopologyRefiner const &refiner, Options options=Options(), ConstIndexArray selectedFaces=ConstIndexArray())
| Instantiates a PatchTable from a client-provided TopologyRefiner.

## Detailed Description

Factory for constructing a PatchTable from a TopologyRefiner.

Definition at line 40 of file patchTableFactory.h.

## Member Typedef Documentation

## ◆ PatchTagVector

typedef std::vector<PatchFaceTag> PatchTagVector

Definition at line 208 of file patchTableFactory.h.

## Member Function Documentation

## ◆ Create()

PatchTable * Create | ( | TopologyRefiner const & | refiner,
|  | Options | options = Options(),
|  | ConstIndexArray | selectedFaces = ConstIndexArray() )
| static

Instantiates a PatchTable from a client-provided TopologyRefiner.

A PatchTable can be constructed from a TopologyRefiner that has been either adaptively or uniformly refined. In both cases, the resulting patches reference vertices in the various refined levels by index, and those indices accumulate with the levels in different ways.

For adaptively refined patches, patches are defined at different levels, including the base level, so the indices of patch vertices include vertices from all levels. A sparse set of patches can be created by restricting the patches generated to those descending from a given set of faces at the base level. This sparse set of base faces is expected to be a subset of the faces that were adaptively refined in the given TopologyRefiner, otherwise results are undefined.

For uniformly refined patches, all patches are completely defined within the last level. There is often no use for intermediate levels and they can usually be ignored. Indices of patch vertices might therefore be expected to be defined solely within the last level. While this is true for face-varying patches, for historical reasons it is not the case for vertex and varying patches. Indices for vertex and varying patches include the base level in addition to the last level while indices for face-varying patches include only the last level.

Parameters

  refiner | TopologyRefiner from which to generate patches
  options | Options controlling the creation of the table
  selectedFaces | Only create patches for the given set of base faces.

Returns
  A new instance of PatchTable

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

- opensubdiv/far/patchTableFactory.h