vec/dict/vec3i_dict

Values

pub fn anchor_position(
  dict: dict.Dict(vec3.Vec3(Int), value),
  at position: vec3.Vec3(Int),
  then fun: fn(dict.Dict(vec3.Vec3(Int), value)) -> dict.Dict(
    vec3.Vec3(Int),
    value,
  ),
) -> dict.Dict(vec3.Vec3(Int), value)

Return the equivalent of dict |> offset(vec3i.negate(position)) |> fun() |> offset(position).

pub fn decoder(
  value: decode.Decoder(value),
) -> decode.Decoder(dict.Dict(vec3.Vec3(Int), value))

A decoder that decodes 3D int vec-dict.

pub fn mirror(
  in dict: dict.Dict(vec3.Vec3(Int), value),
  through normal: vec3.Vec3(Int),
) -> dict.Dict(vec3.Vec3(Int), value)

Returns the mirror of a vec-dict through a plane defined by the given normal vector.

pub fn new_rectangle(
  from start: vec3.Vec3(Int),
  to stop: vec3.Vec3(Int),
  with fun: fn(vec3.Vec3(Int)) -> value,
) -> dict.Dict(vec3.Vec3(Int), value)

Returns a new rectangle vec-dict from start to stop fill with values return from fun.

pub fn offset(
  in dict: dict.Dict(vec3.Vec3(Int), value),
  by vector: vec3.Vec3(Int),
) -> dict.Dict(vec3.Vec3(Int), value)

Returns a new vec-dict containing the key offset by vector.

pub fn to_list(
  dict: dict.Dict(vec3.Vec3(Int), value),
) -> List(List(List(Result(value, Nil))))

Converts the vec-dict to a list of z-axis list of y-axis list of x-axis values in a minimum rectangle boundary.

The vec-dict may not have all values for the keys, so values are wrapped in Result.

Search Document