public static class ShapeGeometryWhere a point is on a primitive, and where a primitive's surface is at a point.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
Pure geometry with no dependency on anything but the maths, which is what keeps Vixen.Animation off Vixen.Physics — the one place [D0](../../../docs/plan/34-move-sets-and-pose-constraints.md) says that boundary would otherwise break.
⚠ Project and Evaluate are exact inverses of each other through the residual, and that is the property to hold on to. Projection is not always the true closest point — a tapered capsule's side is treated as a lerped-radius cone rather than as the exact tangent conic, and the caps as hemispheres of the end radii — but the residual absorbs whatever the projection missed, so an authored point round-trips to itself on the body it was authored on and lands somewhere sensible on any other. A bake that quietly moved a contact would be much worse than one that approximates the surface.
Methods (2)
public static SurfaceSample Evaluate(ShapeKind kind, in ShapeParams dimensions, in SurfacePoint point)Where the surface is at a coordinate.
public static SurfacePoint Project(ShapeKind kind, in ShapeParams dimensions, Vector3 local, out Vector3 residual)The coordinate nearest a point, and how far off the surface it was.
Used by (5)
- ConstraintProposalsVixen.Animation
- ProxyShapeTestsVixen.Animation.Tests
- SurfaceFrameVixen.Animation
- TrajectoryTestsVixen.Animation.Tests
- VariationHarnessVixen.Animation