OpenSubdiv: Tessellation::Options Class Reference

| OpenSubdiv

Loading...
Searching...
No Matches
Tessellation::Options Class Reference

Options configure a Tessellation to specify the nature of both its results and the structure of the coordinate and facet index arrays that its methods will populate. More...

`#include <tessellation.h>`

## Public Member Functions
| Options ()
Options & | PreserveQuads (bool on)
| Select preservation of quads for quad-based subdivision (requires 4-sided facets, default is off)
bool | PreserveQuads () const
| Return if preservation of quads is set.
Options & | SetFacetSize (int numIndices)
| Assign the number of indices per facet (must be 3 or 4, default is 3)
int | GetFacetSize () const
| Return the number of indices per facet.
Options & | SetFacetStride (int stride)
| Assign the stride between facets (default is facet size)
int | GetFacetStride () const
| Return the stride between facets.
Options & | SetCoordStride (int stride)
| Assign the stride between (u,v) pairs (default is 2)
int | GetCoordStride () const
| Return the stride between (u,v) pairs.

## Detailed Description

Options configure a Tessellation to specify the nature of both its results and the structure of the coordinate and facet index arrays that its methods will populate.

The sizes and strides of the target arrays should be specified explicitly as they are not inferred by the presence of other options.

In the case of facets, the size is constant for all facets of the output array but triangles may sometimes be generated in 4-sided facets with non-uniform tessellation rates (quad-preservation reduces but does not eliminate all triangles). Such triangles are indicated by the use of an invalid/negative index in the fourth position.

Modifiers of Options return a reference to itself to facilitate inline usage.

Definition at line 72 of file tessellation.h.

## Constructor & Destructor Documentation

## ◆ Options()

Options | ( |  | ) |
| inline

Definition at line 74 of file tessellation.h.

## Member Function Documentation

## ◆ GetCoordStride()

int GetCoordStride | ( |  | ) | const
| inline

Return the stride between (u,v) pairs.

Definition at line 97 of file tessellation.h.

## ◆ GetFacetSize()

int GetFacetSize | ( |  | ) | const
| inline

Return the number of indices per facet.

Definition at line 87 of file tessellation.h.

## ◆ GetFacetStride()

int GetFacetStride | ( |  | ) | const
| inline

Return the stride between facets.

Definition at line 92 of file tessellation.h.

## ◆ PreserveQuads() [1/2]

bool PreserveQuads | ( |  | ) | const
| inline

Return if preservation of quads is set.

Definition at line 81 of file tessellation.h.

## ◆ PreserveQuads() [2/2]

Tessellation::Options & PreserveQuads | ( | bool | on | ) |
| inline

Select preservation of quads for quad-based subdivision (requires 4-sided facets, default is off)

Definition at line 354 of file tessellation.h.

## ◆ SetCoordStride()

Tessellation::Options & SetCoordStride | ( | int | stride | ) |
| inline

Assign the stride between (u,v) pairs (default is 2)

Definition at line 369 of file tessellation.h.

## ◆ SetFacetSize()

Tessellation::Options & SetFacetSize | ( | int | numIndices | ) |
| inline

Assign the number of indices per facet (must be 3 or 4, default is 3)

Definition at line 359 of file tessellation.h.

## ◆ SetFacetStride()

Tessellation::Options & SetFacetStride | ( | int | stride | ) |
| inline

Assign the stride between facets (default is facet size)

Definition at line 364 of file tessellation.h.

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

- opensubdiv/bfr/tessellation.h