bevy_math::curve

Module cores

Source
Available on crate feature curve only.
Expand description

Core data structures to be used internally in Curve implementations, encapsulating storage and access patterns for reuse.

The Core types here expose their fields publicly so that it is easier to manipulate and extend them, but in doing so, you must maintain the invariants of those fields yourself. The provided methods all maintain the invariants, so this is only a concern if you manually mutate the fields.

Structs§

  • The data core of a curve using uneven samples (i.e. keyframes), where each sample time yields some fixed number of values — the sampling width. This may serve as storage for curves that yield vectors or iterators, and in some cases, it may be useful for cache locality if the sample type can effectively be encoded as a fixed-length slice of values.
  • The data core of a curve derived from evenly-spaced samples. The intention is to use this in addition to explicit or inferred interpolation information in user-space in order to implement curves using domain and sample_with.
  • The data core of a curve defined by unevenly-spaced samples or keyframes. The intention is to use this in concert with implicitly or explicitly-defined interpolation in user-space in order to implement the curve interface using domain and sample_with.

Enums§

Functions§

  • Given a domain and a number of samples taken over that interval, return an InterpolationDatum that governs how samples are extracted relative to the stored data.
  • Given a list of times and a target value, get the interpolation relationship for the target value in terms of the indices of the starting list. In a sense, this encapsulates the heart of uneven/keyframe sampling.