VisimBox 1.0 VisimBox 3d simulation and visualisation ToolBox

- Main Page
- Packages
- Classes
- Files

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

Public Member Functions | Properties
VisimBox.Renderer.IHWBuffer< T > Interface Template Reference

Abstract interface for HW renderer buffers (used for index and vertex buffers) More...

Inheritance diagram for VisimBox.Renderer.IHWBuffer< T >:

List of all members.

## Public Member Functions
void | ReadCache ()
| Reads content of the buffer to cache.
void | ReadCache (int start, int count)
| Reads part of the buffer to cache.
void | WriteCache ()
| Writes content of the cache to index buffer.
void | WriteCache (int start, int count)
| Writes content of the cache to the buffer.
T | ReadElement (int position)
| Directly reads one element from the buffer (might be very slow)
T[] | ReadElements (int position, int count)
| Directly reads several elements from the buffer (might be very slow)
void | ReadElements (int position, int count, ref T[] dest, int start=0)
| Directly reads several elements from the buffer (might be very slow) to specified array.
void | WriteElement (int position, ref T value)
| Directly writes element to the buffer.
void | WriteElements (int position, T[] values)
| Directly writes array of elements to the buffer)
void | WriteElements (int position, T[] values, int start, int count)
| Directly writes part of the array of elements to the buffer)
## Properties
T | this[int index]`[get, set]`
| Allows access to buffer elements array style. If caching is enabled, reads/writes from cache, otherwise uses direct (and usually slow) access.
int | Count`[get]`
| Number of elements in the buffer.
uint | InternalID`[get]`
| Internal ID for the buffer.
bool | Cached`[get, set]`
| If cached, index buffer will keep copy of the data in the system memory. All user read / write operations will be routed to cached copy. Use ReadCache / WriteCache to update buffer.

## Detailed Description

### template<T>
interface VisimBox::Renderer::IHWBuffer< T >

Abstract interface for HW renderer buffers (used for index and vertex buffers)

Template Parameters:

  T | Either uint (index buffer) or IVertex

## Member Function Documentation

template<T >

void VisimBox.Renderer.IHWBuffer< T >.ReadCache | ( |  | ) |

Reads content of the buffer to cache.

Implemented in VisimBox.Renderer.HWBuffer< T >.

template<T >

void VisimBox.Renderer.IHWBuffer< T >.ReadCache | ( | int | start,
|  | int | count
| ) |  |

Reads part of the buffer to cache.

Parameters:

  start | starting index
  count | number of elements to be read from the buffer

Implemented in VisimBox.Renderer.HWBuffer< T >, VisimRenderGL.GLIndexBuffer, and VisimRenderGL.GLVertexBuffer.

template<T >

T VisimBox.Renderer.IHWBuffer< T >.ReadElement | ( | int | position | ) |

Directly reads one element from the buffer (might be very slow)

Parameters:

  position | Index of the element to write

Returns:
  Element on the position

Implemented in VisimBox.Renderer.HWBuffer< T >, VisimRenderGL.GLIndexBuffer, and VisimRenderGL.GLVertexBuffer.

template<T >

T [] VisimBox.Renderer.IHWBuffer< T >.ReadElements | ( | int | position,
|  | int | count
| ) |  |

Directly reads several elements from the buffer (might be very slow)

Parameters:

  position | Starting position
  count | Number of elements

Returns:
  Array of elements from the buffer

Implemented in VisimBox.Renderer.HWBuffer< T >.

template<T >

void VisimBox.Renderer.IHWBuffer< T >.ReadElements | ( | int | position,
|  | int | count,
|  | ref T[] | dest,
|  | int | start = `0`
| ) |  |

Directly reads several elements from the buffer (might be very slow) to specified array.

Parameters:

  position | Starting position
  count | Number of elements
  dest | Destination array (will be created if null)
  start | Starting index in the array

Implemented in VisimBox.Renderer.HWBuffer< T >.

template<T >

void VisimBox.Renderer.IHWBuffer< T >.WriteCache | ( | int | start,
|  | int | count
| ) |  |

Writes content of the cache to the buffer.

Parameters:

  start | starting index
  count | number of elements to be written to the buffer

Implemented in VisimBox.Renderer.HWBuffer< T >, VisimRenderGL.GLIndexBuffer, and VisimRenderGL.GLVertexBuffer.

template<T >

void VisimBox.Renderer.IHWBuffer< T >.WriteCache | ( |  | ) |

Writes content of the cache to index buffer.

Implemented in VisimBox.Renderer.HWBuffer< T >, VisimRenderGL.GLIndexBuffer, and VisimRenderGL.GLVertexBuffer.

template<T >

void VisimBox.Renderer.IHWBuffer< T >.WriteElement | ( | int | position,
|  | ref T | value
| ) |  |

Directly writes element to the buffer.

Parameters:

  position | Position of element
  value | New value for buffer

Implemented in VisimBox.Renderer.HWBuffer< T >.

template<T >

void VisimBox.Renderer.IHWBuffer< T >.WriteElements | ( | int | position,
|  | T[] | values,
|  | int | start,
|  | int | count
| ) |  |

Directly writes part of the array of elements to the buffer)

Parameters:

  position | Position of element
  values | Array of elements
  count | Number of elements to write
  start | Starting position in the source array

Implemented in VisimBox.Renderer.HWBuffer< T >.

template<T >

void VisimBox.Renderer.IHWBuffer< T >.WriteElements | ( | int | position,
|  | T[] | values
| ) |  |

Directly writes array of elements to the buffer)

Parameters:

  position | Position of element
  values | Array of elements

Implemented in VisimBox.Renderer.HWBuffer< T >.

## Property Documentation

template<T >

bool VisimBox.Renderer.IHWBuffer< T >.Cached`[get, set]`

If cached, index buffer will keep copy of the data in the system memory. All user read / write operations will be routed to cached copy. Use ReadCache / WriteCache to update buffer.

Implemented in VisimBox.Renderer.HWBuffer< T >.

template<T >

int VisimBox.Renderer.IHWBuffer< T >.Count`[get]`

Number of elements in the buffer.

Implemented in VisimBox.Renderer.HWBuffer< T >.

template<T >

uint VisimBox.Renderer.IHWBuffer< T >.InternalID`[get]`

Internal ID for the buffer.

Implemented in VisimBox.Renderer.HWBuffer< T >, VisimRenderGL.GLIndexBuffer, and VisimRenderGL.GLVertexBuffer.

template<T >

T VisimBox.Renderer.IHWBuffer< T >.this[int index]`[get, set]`

Allows access to buffer elements array style. If caching is enabled, reads/writes from cache, otherwise uses direct (and usually slow) access.

Parameters:

  index | index of the element

Returns:

Implemented in VisimBox.Renderer.HWBuffer< T >.

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

- IHWbuffer.cs

All Classes Namespaces Files Functions Variables Enumerations Properties Events