# spatial-motion
Generic spatial transforms and movement for Rust, built on geometric algebra traits.
Dimension-agnostic: works with any vector, rotor, and bivector types that implement the right traits from the `scalars` and `vector-space` ecosystem.
## Types
- `Transform<V, R>` — position (`V`) + orientation (`R`), with composition via `*`
- `Movement<V, B>` — velocity (`V`) + spin (`B`), applied to transforms via `+=`
## Operations
- Transform composition: `transform * transform`
- Inverse: `transform.inv()`
- Apply movement: `transform += movement`
- Apply to point: `transform.apply(point)` or `Transform::apply_point(&self, point)`
- Interpolation: `transform.lerp(&other, ratio)`
## Example
```rust
use ga2::{Bivector, Vector, Rotor};
use spatial_motion::{Transform, Movement};
use scalars::One;
let mut transform: Transform<Vector<f32>, Rotor<f32>> = Transform::one();
let movement = Movement {
velocity: Vector::new(1.0, 0.0),
spin: Bivector::new(0.1),
};
transform += movement;
```
## AI-assisted development
This crate is designed for use with AI coding assistants. Fully generic over vector/rotor/bivector types, minimal trait bounds per method, and no implicit behavior. The `Exp` trait from `scalars` connects bivectors to rotors, and `vector_space::Transform` connects rotors to vectors.