Module veloren_common::terrain

source ·

Re-exports§

Modules§

Structs§

Constants§

Traits§

Functions§

  • Iterate through all cells adjacent to a chunk.
  • Find the nearest point from a quadratic spline to this point (in terms of t, the “distance along the curve” by which our spline is parameterized). Note that if t < 0.0 or t >= 1.0, we probably shouldn’t be considered “on the curve”… hopefully this works out okay and gives us what we want (a river that extends outwards tangent to a quadratic curve, with width configured by distance along the line).
  • Computes the position Vec2 of a SimChunk from an index, where the index was generated by uniform_noise.
  • Computes the index of a Vec2 of a SimChunk from a position, where the index is generated by uniform_noise. NOTE: Both components of idx should be in-bounds!

Type Aliases§