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

Search Results for

    Edit this page

    Method SampleTrilinear

    | Edit this page View Source

    SampleTrilinear(DistanceGrid, Vector3, bool)

    Trilinear sample of a DistanceGrid at an arbitrary world position.

    Declaration
    public static float SampleTrilinear(this DistanceGrid grid, Vector3 worldPos, bool clampToBounds = true)
    Parameters
    Type Name Description
    DistanceGrid grid

    The distance grid to sample.

    Vector3 worldPos

    The arbitrary world position to sample.

    bool clampToBounds

    If true, samples outside the grid are clamped to the outermost valid cell; if false, an ArgumentOutOfRangeException is thrown when sampling out of bounds.

    Returns
    Type Description
    float

    Distance to the nearest surface at the specified world position.