Field builtinsGenerated
The builtins of kind field, as the compiler’s own table lists them.
Methods
Section titled “Methods”| Returns | Function | Requires |
|---|---|---|
T |
at (field: Rows<T>, index: Int) +4 |
field.read |
T |
at_linear (field: Rows<T>, position: Float) +2 |
field.read |
Int |
count (field: Rows<T>) +2 |
field.read |
T |
fetch (field: Rows<T>, index: Int) +4 |
field.read |
Int |
isize (field: Rows<T>) +2 |
field.read |
T |
sample (field: Rows<T>) +2 |
field.read |
Vec2 |
size (field: Grid<T>) +1 |
field.read |
Method descriptions
Section titled “Method descriptions”at(field: Rows<T>, index: Int) -> Tat(field: Grid<T>, at: Vec2) -> Tat(field: Grid<T>, at: IVec2) -> Tat(field: Volume<T>, at: Vec3) -> Tat(field: Volume<T>, at: IVec3) -> TThe element at an address: the index, or the coordinates floored, clamped into the Field (NaN as zero). A memory reads as the steps have left it, and as it was bound in a scan’s initial value.
Requires: field.read
at_linear
Section titled “at_linear”at_linear(field: Rows<T>, position: Float) -> Tat_linear(field: Grid<T>, position: Vec2) -> Tat_linear(field: Volume<T>, position: Vec3) -> TThe neighboring elements blended by the fractional position (element centers at.5), T of floats only; clamped at the edges.
Requires: field.read
count(field: Rows<T>) -> Intcount(field: Grid<T>) -> Intcount(field: Volume<T>) -> IntHow many elements the Field has.
Requires: field.read
fetch(field: Rows<T>, index: Int) -> Tfetch(field: Grid<T>, at: Vec2) -> Tfetch(field: Grid<T>, at: IVec2) -> Tfetch(field: Volume<T>, at: Vec3) -> Tfetch(field: Volume<T>, at: IVec3) -> TAnother name for at.
Requires: field.read
isize(field: Rows<T>) -> Intisize(field: Grid<T>) -> IVec2isize(field: Volume<T>) -> IVec3The Field’s extent along each axis, as integers.
Requires: field.read
sample
Section titled “sample”sample(field: Rows<T>) -> Tsample(field: Grid<T>) -> Tsample(field: Volume<T>) -> TThe input’s element at this element’s own coordinates, clamped into the input.
Requires: field.read · Callable from a Kernel body only
size(field: Grid<T>) -> Vec2size(field: Volume<T>) -> Vec3The Field’s extent along each axis.
Requires: field.read

