Photon Fusion
2.1.1
Provides methods to read and write unmanaged elements with a specified stride. More...
Inherits IElementReaderWriter< T >.
Public Member Functions | |
| int | GetElementHashCode (T element) |
| Gets the hash code of the specified element. | |
| int | GetElementWordCount () |
| Gets the stride (in bytes) between elements. | |
| unsafe T | Read (byte *data, int index) |
| Reads an element from the specified data at the given index. | |
| T | Read (ReadOnlySpan< byte > data) |
| unsafe ref T | ReadRef (byte *data, int index) |
| Reads a reference to an element from the specified data at the given index. | |
| ref T | ReadRef (Span< byte > data) |
| unsafe void | Write (byte *data, int index, T element) |
| Writes an element to the specified data at the given index. | |
| void | Write (Span< byte > data, T element) |
Static Public Member Functions | |
| static IElementReaderWriter< T > | GetInstance () |
| Returns an instance of the reader/writer. | |
Provides methods to read and write unmanaged elements with a specified stride.
| T | The type of the unmanaged element. |
| TWordCount |
| T | : | unmanaged | |
| TWordCount | : | unmanaged | |
| TWordCount | : | IMetaConstant |
| int GetElementHashCode | ( | T | element | ) |
Gets the hash code of the specified element.
| element | The element for which to get the hash code. |
Implements IElementReaderWriter< T >.
| int GetElementWordCount | ( | ) |
Gets the stride (in bytes) between elements.
Implements IElementReaderWriter< T >.
| unsafe T Read | ( | byte * | data, |
| int | index ) |
Reads an element from the specified data at the given index.
| data | A pointer to the data. |
| index | The index of the element to read. |
Implements IElementReaderWriter< T >.
| unsafe ref T ReadRef | ( | byte * | data, |
| int | index ) |
Reads a reference to an element from the specified data at the given index.
| data | A pointer to the data. |
| index | The index of the element to read. |
Implements IElementReaderWriter< T >.
| unsafe void Write | ( | byte * | data, |
| int | index, | ||
| T | element ) |
Writes an element to the specified data at the given index.
| data | A pointer to the data. |
| index | The index at which to write the element. |
| element | The element to write. |
Implements IElementReaderWriter< T >.