| OpenSubdiv

Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
CpuPatchTable Class Reference

Cpu patch table. More...

`#include <cpuPatchTable.h>`

## Public Member Functions
| CpuPatchTable (const Far::PatchTable *patchTable)
| ~CpuPatchTable ()
const PatchArray * | GetPatchArrayBuffer () const
const int * | GetPatchIndexBuffer () const
const PatchParam * | GetPatchParamBuffer () const
size_t | GetNumPatchArrays () const
size_t | GetPatchIndexSize () const
size_t | GetPatchParamSize () const
const PatchArray * | GetVaryingPatchArrayBuffer () const
const int * | GetVaryingPatchIndexBuffer () const
size_t | GetVaryingPatchIndexSize () const
int | GetNumFVarChannels () const
const PatchArray * | GetFVarPatchArrayBuffer (int fvarChannel=0) const
const int * | GetFVarPatchIndexBuffer (int fvarChannel=0) const
size_t | GetFVarPatchIndexSize (int fvarChannel=0) const
const PatchParam * | GetFVarPatchParamBuffer (int fvarChannel=0) const
size_t | GetFVarPatchParamSize (int fvarChannel=0) const

## Static Public Member Functions
static CpuPatchTable * | Create (const Far::PatchTable *patchTable, void *deviceContext=NULL)

## Protected Attributes
PatchArrayVector | _patchArrays
std::vector< int > | _indexBuffer
PatchParamVector | _patchParamBuffer
PatchArrayVector | _varyingPatchArrays
std::vector< int > | _varyingIndexBuffer
std::vector< PatchArrayVector > | _fvarPatchArrays
std::vector< std::vector< int > > | _fvarIndexBuffers
std::vector< PatchParamVector > | _fvarParamBuffers

## Detailed Description

Cpu patch table.

XXX: We can use just Far::PatchTable for typical CpuEval use cases.

Currently this class exists because of the template resolution for the CpuEvaluator's generic interface functions (glEvalLimit example uses), and device-specific patch tables such as GLPatchTables internally use as a staging buffer to splice patcharray and interleave sharpnesses.

Ideally Far::PatchTables should have the same data representation and accessors so that we don't have to copy data unnecessarily.

Definition at line 59 of file cpuPatchTable.h.

## Constructor & Destructor Documentation

## ◆ CpuPatchTable()

CpuPatchTable | ( | const Far::PatchTable * | patchTable | ) |
| explicit

## ◆ ~CpuPatchTable()

~CpuPatchTable | ( |  | ) |
| inline

Definition at line 68 of file cpuPatchTable.h.

## Member Function Documentation

## ◆ Create()

static CpuPatchTable * Create | ( | const Far::PatchTable * | patchTable,
|  | void * | deviceContext = NULL )
| inline static

Definition at line 61 of file cpuPatchTable.h.

## ◆ GetFVarPatchArrayBuffer()

const PatchArray * GetFVarPatchArrayBuffer | ( | int | fvarChannel = 0 | ) | const
| inline

Definition at line 109 of file cpuPatchTable.h.

## ◆ GetFVarPatchIndexBuffer()

const int * GetFVarPatchIndexBuffer | ( | int | fvarChannel = 0 | ) | const
| inline

Definition at line 112 of file cpuPatchTable.h.

## ◆ GetFVarPatchIndexSize()

size_t GetFVarPatchIndexSize | ( | int | fvarChannel = 0 | ) | const
| inline

Definition at line 115 of file cpuPatchTable.h.

## ◆ GetFVarPatchParamBuffer()

const PatchParam * GetFVarPatchParamBuffer | ( | int | fvarChannel = 0 | ) | const
| inline

Definition at line 118 of file cpuPatchTable.h.

## ◆ GetFVarPatchParamSize()

size_t GetFVarPatchParamSize | ( | int | fvarChannel = 0 | ) | const
| inline

Definition at line 121 of file cpuPatchTable.h.

## ◆ GetNumFVarChannels()

int GetNumFVarChannels | ( |  | ) | const
| inline

Definition at line 106 of file cpuPatchTable.h.

## ◆ GetNumPatchArrays()

size_t GetNumPatchArrays | ( |  | ) | const
| inline

Definition at line 80 of file cpuPatchTable.h.

## ◆ GetPatchArrayBuffer()

const PatchArray * GetPatchArrayBuffer | ( |  | ) | const
| inline

Definition at line 70 of file cpuPatchTable.h.

## ◆ GetPatchIndexBuffer()

const int * GetPatchIndexBuffer | ( |  | ) | const
| inline

Definition at line 73 of file cpuPatchTable.h.

## ◆ GetPatchIndexSize()

size_t GetPatchIndexSize | ( |  | ) | const
| inline

Definition at line 83 of file cpuPatchTable.h.

## ◆ GetPatchParamBuffer()

const PatchParam * GetPatchParamBuffer | ( |  | ) | const
| inline

Definition at line 76 of file cpuPatchTable.h.

## ◆ GetPatchParamSize()

size_t GetPatchParamSize | ( |  | ) | const
| inline

Definition at line 86 of file cpuPatchTable.h.

## ◆ GetVaryingPatchArrayBuffer()

const PatchArray * GetVaryingPatchArrayBuffer | ( |  | ) | const
| inline

Definition at line 90 of file cpuPatchTable.h.

## ◆ GetVaryingPatchIndexBuffer()

const int * GetVaryingPatchIndexBuffer | ( |  | ) | const
| inline

Definition at line 96 of file cpuPatchTable.h.

## ◆ GetVaryingPatchIndexSize()

size_t GetVaryingPatchIndexSize | ( |  | ) | const
| inline

Definition at line 102 of file cpuPatchTable.h.

## Member Data Documentation

## ◆ _fvarIndexBuffers

std::vector< std::vector<int> > _fvarIndexBuffers
| protected

Definition at line 134 of file cpuPatchTable.h.

## ◆ _fvarParamBuffers

std::vector< PatchParamVector > _fvarParamBuffers
| protected

Definition at line 135 of file cpuPatchTable.h.

## ◆ _fvarPatchArrays

std::vector< PatchArrayVector > _fvarPatchArrays
| protected

Definition at line 133 of file cpuPatchTable.h.

## ◆ _indexBuffer

std::vector<int> _indexBuffer
| protected

Definition at line 127 of file cpuPatchTable.h.

## ◆ _patchArrays

PatchArrayVector _patchArrays
| protected

Definition at line 126 of file cpuPatchTable.h.

## ◆ _patchParamBuffer

PatchParamVector _patchParamBuffer
| protected

Definition at line 128 of file cpuPatchTable.h.

## ◆ _varyingIndexBuffer

std::vector<int> _varyingIndexBuffer
| protected

Definition at line 131 of file cpuPatchTable.h.

## ◆ _varyingPatchArrays

PatchArrayVector _varyingPatchArrays
| protected

Definition at line 130 of file cpuPatchTable.h.

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

- opensubdiv/osd/cpuPatchTable.h