# spatial-motion
Generic spatial transforms and movement. Dimension-agnostic replacement for `sp2`/`sp3`.
`Transform<P, R>` = position + orientation. `Movement<V, B>` = velocity + spin.
Depends on `scalars` (Exp, Inv, One, Zero) and `vector-space` (VectorSpace, Transform, interpolate).
## Design decisions
**Transform and Movement are type-decoupled.** `Transform<P, R>` and `Movement<V, B>` have independent type parameters, linked through trait bounds (`P: AddAssign<V>`). This allows `Transform<Point, Rotor>` + `Movement<Vector, Bivector>` — position is a Point, velocity is a Vector.
**Scalar and rotation operator overloads are omitted.** `Mul<Scalar>`, `Mul<R>`, `Div<Scalar>`, `Div<R>` conflict with `Mul<Self>` in generic code. Use composition (`Mul<Self>`), movement application (`Add<Movement>`), and methods instead.
**Composition and apply only work with Vector positions.** `transform * transform` requires `P: Add<Output=P>` and `R: Transform<P>`, which is satisfied by Vectors but not Points. `Transform<Point, Rotor>` is intended as a data container updated via `+= movement`. For applying transforms to points, use `transform.position + transform.orientation.rotate(offset)` directly. This is by design — the Rotor transforms Vectors, not Points.
## TODO
- [ ] Consider re-exporting `scalars` and `vector-space` for convenience