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 55 of file tessellation.h.

## Constructor & Destructor Documentation

## ◆ Options()

Options | ( |  | ) |
| inline

Definition at line 57 of file tessellation.h.

## Member Function Documentation

## ◆ GetCoordStride()

int GetCoordStride | ( |  | ) | const
| inline

Return the stride between (u,v) pairs.

Definition at line 80 of file tessellation.h.

## ◆ GetFacetSize()

int GetFacetSize | ( |  | ) | const
| inline

Return the number of indices per facet.

Definition at line 70 of file tessellation.h.

## ◆ GetFacetStride()

int GetFacetStride | ( |  | ) | const
| inline

Return the stride between facets.

Definition at line 75 of file tessellation.h.

## ◆ PreserveQuads() [1/2]

bool PreserveQuads | ( |  | ) | const
| inline

Return if preservation of quads is set.

Definition at line 64 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 337 of file tessellation.h.

## ◆ SetCoordStride()

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

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

Definition at line 352 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 342 of file tessellation.h.

## ◆ SetFacetStride()

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

Assign the stride between facets (default is facet size).

Definition at line 347 of file tessellation.h.

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

- opensubdiv/bfr/tessellation.h