Struct MappedResourceView<T>
A typed view of a MappedResource. Provides by-reference structured access to individual elements in the mapped resource.
Inherited Members
Namespace: Veldrid
Assembly: cs.temp.dll.dll
Syntax
public struct MappedResourceView<T>
where T : struct
Type Parameters
| Name | Description |
|---|---|
| T | The blittable value type which mapped data is viewed as. |
Constructors
MappedResourceView(MappedResource)
Constructs a new MappedResourceView which wraps the given MappedResource.
Declaration
public MappedResourceView(MappedResource rawResource)
Parameters
| Type | Name | Description |
|---|---|---|
| MappedResource | rawResource | The raw resource which has been mapped. |
Fields
Count
The total number of structures that is contained in the resource. This is effectively the total number of bytes divided by the size of the structure type.
Declaration
public readonly int Count
Field Value
| Type | Description |
|---|---|
| System.Int32 |
MappedResource
The MappedResource that this instance views.
Declaration
public readonly MappedResource MappedResource
Field Value
| Type | Description |
|---|---|
| MappedResource |
SizeInBytes
The total size in bytes of the mapped resource.
Declaration
public readonly uint SizeInBytes
Field Value
| Type | Description |
|---|---|
| System.UInt32 |
Properties
Item[Int32]
Gets a reference to the structure value at the given index.
Declaration
public T this[int index] { get; }
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | index | The index of the value. |
Property Value
| Type | Description |
|---|---|
| T | A reference to the value at the given index. |
Item[Int32, Int32]
Gets a reference to the structure at the given 2-dimensional texture coordinates.
Declaration
public T this[int x, int y] { get; }
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | x | The X coordinate. |
| System.Int32 | y | The Y coordinate. |
Property Value
| Type | Description |
|---|---|
| T | A reference to the value at the given coordinates. |
Item[Int32, Int32, Int32]
Gets a reference to the structure at the given 3-dimensional texture coordinates.
Declaration
public T this[int x, int y, int z] { get; }
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | x | The X coordinate. |
| System.Int32 | y | The Y coordinate. |
| System.Int32 | z | The Z coordinate. |
Property Value
| Type | Description |
|---|---|
| T | A reference to the value at the given coordinates. |
Item[UInt32]
Gets a reference to the structure value at the given index.
Declaration
public T this[uint index] { get; }
Parameters
| Type | Name | Description |
|---|---|---|
| System.UInt32 | index | The index of the value. |
Property Value
| Type | Description |
|---|---|
| T | A reference to the value at the given index. |
Item[UInt32, UInt32]
Gets a reference to the structure at the given 2-dimensional texture coordinates.
Declaration
public T this[uint x, uint y] { get; }
Parameters
| Type | Name | Description |
|---|---|---|
| System.UInt32 | x | The X coordinate. |
| System.UInt32 | y | The Y coordinate. |
Property Value
| Type | Description |
|---|---|
| T | A reference to the value at the given coordinates. |
Item[UInt32, UInt32, UInt32]
Gets a reference to the structure at the given 3-dimensional texture coordinates.
Declaration
public T this[uint x, uint y, uint z] { get; }
Parameters
| Type | Name | Description |
|---|---|---|
| System.UInt32 | x | The X coordinate. |
| System.UInt32 | y | The Y coordinate. |
| System.UInt32 | z | The Z coordinate. |
Property Value
| Type | Description |
|---|---|
| T | A reference to the value at the given coordinates. |