CS::RenderManager::SVArrayHolder Class Reference (Crystal Space 2.0 Public API Reference)

| ## Public API Reference

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions
CS::RenderManager::SVArrayHolder Class Reference

Holder for SV arrays. More...

`#include <csplugincommon/rendermanager/svarrayholder.h>`

List of all members.

## Public Member Functions
size_t | GetNumLayers () const
| Get the number of layers.
size_t | GetNumSVNames () const
| Get the number of shader variables stored per layer.
void | InsertLayer (size_t after, size_t replicateFrom=0)
| Insert a layer after after, copying values from replicateFrom.
void | ReplicateLayer (size_t from, size_t to)
| Replicate a layer into some other layer.
void | ReplicateLayerZero ()
| Replicate layer zero into all other layers.
void | ReplicateSet (size_t layer, size_t from, size_t start, size_t end=(size_t)-1)
| Replicate the pointers from one set to a number or all the other sets within the layer.
void | Setup (size_t numLayers, size_t numSVNames, size_t numSets)
| Initialize storage for SVs, given a number of layers, sets and SV names, Note that additional layers can be inserted later, sets and SVs cannot.
void | SetupSVStack (csShaderVariableStack &stack, size_t layer, size_t set)
| Setup an SV stack for direct access to given layer and set within SV array.
| SVArrayHolder (size_t numLayers=1, size_t numSVNames=0, size_t numSets=0)
| Construct.

## Detailed Description

Holder for SV arrays.

Keeps a continuous array of pointers to SVs kept in three layers

- Layers, where each layer is a rendering layer
- Sets, each set corresponds normally to one rendermesh
- Names, one for each SV

The 3d array is flattened into a 1d one and indexed as: index = (layer*numSets + set)*numSVs + SV

Definition at line 43 of file svarrayholder.h.

## Constructor & Destructor Documentation

CS::RenderManager::SVArrayHolder::SVArrayHolder | ( | size_t | numLayers = `1`,
|  | size_t | numSVNames = `0`,
|  | size_t | numSets = `0`
| ) |  | `[inline]`

Construct.

Calls Setup if numLayers, numSVNames and numSets are provided.

Definition at line 50 of file svarrayholder.h.

## Member Function Documentation

size_t CS::RenderManager::SVArrayHolder::GetNumLayers | ( |  | ) | const`[inline]`

Get the number of layers.

Definition at line 217 of file svarrayholder.h.

size_t CS::RenderManager::SVArrayHolder::GetNumSVNames | ( |  | ) | const`[inline]`

Get the number of shader variables stored per layer.

Definition at line 211 of file svarrayholder.h.

void CS::RenderManager::SVArrayHolder::InsertLayer | ( | size_t | after,
|  | size_t | replicateFrom = `0`
| ) |  | `[inline]`

Insert a layer after after, copying values from replicateFrom.

Definition at line 197 of file svarrayholder.h.

void CS::RenderManager::SVArrayHolder::ReplicateLayer | ( | size_t | from,
|  | size_t | to
| ) |  | `[inline]`

Replicate a layer into some other layer.

Definition at line 187 of file svarrayholder.h.

void CS::RenderManager::SVArrayHolder::ReplicateLayerZero | ( |  | ) | `[inline]`

Replicate layer zero into all other layers.

Definition at line 171 of file svarrayholder.h.

void CS::RenderManager::SVArrayHolder::ReplicateSet | ( | size_t | layer,
|  | size_t | from,
|  | size_t | start,
|  | size_t | end = `(size_t)-1`
| ) |  | `[inline]`

Replicate the pointers from one set to a number or all the other sets within the layer.

Definition at line 148 of file svarrayholder.h.

void CS::RenderManager::SVArrayHolder::Setup | ( | size_t | numLayers,
|  | size_t | numSVNames,
|  | size_t | numSets
| ) |  | `[inline]`

Initialize storage for SVs, given a number of layers, sets and SV names, Note that additional layers can be inserted later, sets and SVs cannot.

Definition at line 102 of file svarrayholder.h.

void CS::RenderManager::SVArrayHolder::SetupSVStack | ( | csShaderVariableStack & | stack,
|  | size_t | layer,
|  | size_t | set
| ) |  | `[inline]`

Setup an SV stack for direct access to given layer and set within SV array.

Definition at line 136 of file svarrayholder.h.

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

- csplugincommon/rendermanager/svarrayholder.h