# `QuakeServer.World.Trace`
[🔗](https://github.com/jaman/quake_server/blob/v0.1.0/lib/quake_server/world/trace.ex#L1)

What a move through the world ran into, with every field FTE's `trace_t` gives a
program.

  * `fraction` — how much of the move was made, 1.0 when nothing was hit
  * `end_pos` — where it stopped
  * `normal`, `distance` — the plane hit
  * `all_solid`, `start_solid` — the whole move, or its start, was inside something
  * `in_open`, `in_water` — whether it passed through empty or liquid space
  * `hit` — the entity hit, `nil` when none
  * `contents` — the contents bits (`QuakeServer.Contents`) of what was hit
  * `surface_id` — a studio model hitbox's group, 0 otherwise
  * `bone_id`, `brush_id`, `brush_face`, `triangle_id` — numbered from 1, 0 when unknown

`to_hull/1` gives the same move as a `Cauldron3D.Hull.Trace`.

# `t`

```elixir
@type t() :: %QuakeServer.World.Trace{
  all_solid: boolean(),
  bone_id: integer(),
  brush_face: integer(),
  brush_id: integer(),
  contents: non_neg_integer(),
  distance: float(),
  end_pos: Cauldron3D.Vec.t(),
  fraction: float(),
  hit: non_neg_integer() | nil,
  in_open: boolean(),
  in_water: boolean(),
  normal: Cauldron3D.Vec.t(),
  start_solid: boolean(),
  surface_id: integer(),
  triangle_id: integer()
}
```

# `from_hull`

```elixir
@spec from_hull(Cauldron3D.Hull.Trace.t()) :: t()
```

A `Cauldron3D.Hull.Trace` as this struct, the fields it lacks zero.

# `to_hull`

```elixir
@spec to_hull(t()) :: Cauldron3D.Hull.Trace.t()
```

The move as a `Cauldron3D.Hull.Trace`, keeping the fields that struct has.

---

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