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 anchor_rotation(
  dict: dict.Dict(vec3.Vec3(Int), value),
  at angles: 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 |> rotate(-angle) |> fun() |> rotate(angles).

pub fn from_list(
  list: List(dict.Dict(vec2.Vec2(Int), a)),
) -> dict.Dict(vec3.Vec3(Int), a)

Converts a list of 2D vec-dict to a 3D vec-dict start from z: 0 where the lists index is z.

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 rotate(
  in dict: dict.Dict(vec3.Vec3(Int), value),
  by angles: vec3.Vec3(Int),
) -> dict.Dict(vec3.Vec3(Int), value)

Rotate a vec-dict by an angles for each axes (in 90 degree steps).

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

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

Search Document