61 pose = poseOrigin.Integrated(extrapMovement, dt);
62 movement = extrapMovement;
73 pose = poseOrigin.Integrated(extrapMovement, dt);
74 movement = extrapMovement;
82 foreach (var spline
in splines) {
83 if (t >= spline.minT && t <= spline.maxT) {
84 pose = spline.PoseAt(t);
85 movement = spline.MovementAt(t);
90 Debug.LogError(
"PoseSplineSequence couldn't evaluate T: " + t);
93 #region ISpline<Pose, Movement>
131 #region ISpline<Vector3, Vector3>
147 out Vector3 deltaValuePerT) {
160 public static class PoseSplineSequenceExtensions {
162 PoseSplineSequence poseSplines,
163 bool drawPoses =
true,
164 bool drawSegments =
true) {
165 for (
int i = 0; i < poseSplines.Count; i++) {
166 drawer.DrawPoseSpline(poseSplines[i],
167 drawPoses: drawPoses,
168 drawSegments: drawSegments);
dXType DerivativeAt(float t)
void ValueAndDerivativeAt(float t, out XType value, out dXType deltaValuePerT)
This easy-to-implement interface represents the ability to index into a collection of elements of typ...
Represents a spline for poses – positions and rotations – that travel from one position and rotation ...
void PoseAndMovementAt(float t, out Pose pose, out Movement movement)
Gets both the rotation and the first derivative of rotation at time t. The time is clamped within the...
void PoseAndMovementAt(float t, out Pose pose, out Movement movement)
void ValueAndDerivativeAt(float t, out Pose value, out Movement deltaValuePerSec)
PoseSplineSequence(HermitePoseSpline[] splines, bool allowExtrapolation=false)
Movement MovementAt(float t)
Movement DerivativeAt(float t)
float ISpline< Vector3, Vector3 >. maxT
float ISpline< Vector3, Vector3 >. minT
HermitePoseSpline[] splines
static readonly Movement identity
Vector3 velocity
The linear velocity of this Movement.
A position and rotation. You can multiply two poses; this acts like Matrix4x4 multiplication,...
static readonly Pose identity