ZLab.Discrete ZLab.Discrete
ZLab.Discrete ZLab.Discrete
Developed by Zeke Zhang

Search Results for

    Edit this page

    Method SetValue

    | Edit this page View Source

    SetValue((int x, int y, int z), T)

    Sets the value at the specified 3D index in the grid.

    Declaration
    public void SetValue((int x, int y, int z) index, T value)
    Parameters
    Type Name Description
    (int x, int y, int z) index

    The 3D index (x, y, z) of the voxel to set. The index should be within the bounds defined by the grid metadata.

    T value

    The value of type T to be stored at the specified index in the grid.

    Implements
    IGrid<T>.SetValue((int x, int y, int z), T)
    | Edit this page View Source

    SetValue(ReadOnlySpan<T>)

    Updates the entire grid's values using a read-only span.

    Declaration
    public void SetValue(ReadOnlySpan<T> values)
    Parameters
    Type Name Description
    ReadOnlySpan<T> values

    A read-only span containing the new values for the grid.

    Implements
    IGrid<T>.SetValue(ReadOnlySpan<T>)
    Exceptions
    Type Condition
    ArgumentException

    If the length of the provided values does not match the expected size based on the grid metadata.