#include <cpuSmoothNormalContext.h>
Public Member Functions | |
template<class VERTEX_BUFFER > | |
void | Bind (VERTEX_BUFFER *in, int iOfs, VERTEX_BUFFER *out, int oOfs) |
void | Unbind () |
Unbinds any previously bound vertex and varying data buffers. More... | |
const Far::PatchTables::PatchArrayVector & | GetPatchArrayVector () const |
Returns the vector of patch arrays. More... | |
const std::vector< unsigned int > & | GetControlVertices () const |
The ordered array of control vertex indices for all the patches. More... | |
float const * | GetCurrentInputVertexBuffer () const |
Returns a pointer to the data of the input buffer. More... | |
float * | GetCurrentOutputVertexBuffer () |
Returns a pointer to the data of the output buffer. More... | |
VertexBufferDescriptor const & | GetInputVertexDescriptor () const |
Returns an VertexDescriptor for the input vertex data. More... | |
VertexBufferDescriptor const & | GetOutputVertexDescriptor () const |
int | GetNumVertices () const |
Returns the number of vertices in output vertex buffer. More... | |
bool | GetResetMemory () const |
void | SetResetMemory (bool resetMemory) |
Static Public Member Functions | |
static CpuSmoothNormalContext * | Create (Far::PatchTables const *patchTables, bool resetMemory=false) |
Protected Member Functions | |
CpuSmoothNormalContext (Far::PatchTables const *patchTables, bool resetMemory) | |
Additional Inherited Members |
Definition at line 41 of file cpuSmoothNormalContext.h.
|
explicitprotected |
|
inline |
Binds a vertex and a varying data buffers to the context. Binding ensures that data buffers are properly inter-operated between Contexts and Controllers operating across multiple devices.
in | a buffer containing input vertex-interpolated primvar data |
iOfs | offset to the buffer element describing the vertex position |
out | a buffer where the smooth normals will be output |
oOfs | offset to the buffer element describing the normal position |
Definition at line 71 of file cpuSmoothNormalContext.h.
|
static |
Creates an CpuComputeContext instance
patchTables | The Far::PatchTables used for this Context. |
resetMemory | Set to true if the target vertex buffer needs its memory reset before accumulating the averaged normals. If the SmoothNormal Controller runs after a Computer Controller, then the vertex buffer will already have been reset and this step can be skipped to save time. |
|
inline |
The ordered array of control vertex indices for all the patches.
Definition at line 102 of file cpuSmoothNormalContext.h.
|
inline |
Returns a pointer to the data of the input buffer.
Definition at line 107 of file cpuSmoothNormalContext.h.
|
inline |
Returns a pointer to the data of the output buffer.
Definition at line 112 of file cpuSmoothNormalContext.h.
|
inline |
Returns an VertexDescriptor for the input vertex data.
Definition at line 117 of file cpuSmoothNormalContext.h.
|
inline |
Returns the number of vertices in output vertex buffer.
Definition at line 128 of file cpuSmoothNormalContext.h.
|
inline |
Returns an VertexDescriptor for the buffer where the normals data will be stored
Definition at line 123 of file cpuSmoothNormalContext.h.
|
inline |
Returns the vector of patch arrays.
Definition at line 97 of file cpuSmoothNormalContext.h.
|
inline |
Returns whether the controller needs to reset the vertex buffer before accumulating smooth normals
Definition at line 134 of file cpuSmoothNormalContext.h.
|
inline |
Set to true if the controller needs to reset the vertex buffer before accumulating smooth normals
Definition at line 140 of file cpuSmoothNormalContext.h.
|
inline |
Unbinds any previously bound vertex and varying data buffers.
Definition at line 88 of file cpuSmoothNormalContext.h.