# `Cauldron3D.Formats.Mdl`
[🔗](https://github.com/jaman/cauldron/blob/v0.2.2/cauldron_3d_formats/lib/cauldron_3d/formats/mdl.ex#L1)

A Quake model, `.mdl`, read into a `Cauldron3D.Mesh` and what the game needs besides.

    {:ok, model} = Cauldron3D.Formats.Mdl.parse(bytes)
    model.mesh
    Cauldron3D.Formats.Mdl.pose(model, frame, time)

`frames` is a tuple with one entry per frame number the game uses: `{:single, pose}`
or `{:group, [{pose, until}]}`, a group cycling through its poses, each shown until
`until` seconds into the cycle. `flags` are the model's effect flags (rocket trail,
grenade smoke, gib blood, rotation and so on), `mins` and `maxs` its box.

# `t`

```elixir
@type t() :: %Cauldron3D.Formats.Mdl{
  flags: term(),
  frames: term(),
  maxs: term(),
  mesh: term(),
  mins: term()
}
```

# `parse`

```elixir
@spec parse(binary()) :: {:ok, t()} | {:error, :not_a_model}
```

The model in `data`.

# `pose`

```elixir
@spec pose(t(), integer(), number()) :: non_neg_integer()
```

The mesh pose for frame number `frame` at `time` seconds; an unknown frame is the first.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
