Method ComposeTrajectory
ComposeTrajectory(Pose, Pose, float, List<Pose>)
Modifies the given ancestor trajectory by composing its own trajectory, evaluated uniformly in time.
Declaration
void ComposeTrajectory(Pose prevLocalToWorldPose, Pose curLocalToWorldPose, float lerpStep, List<Pose> trajectory)
Parameters
Type | Name | Description |
---|---|---|
Pose | prevLocalToWorldPose | The pose of the object in the previous frame, in world space. |
Pose | curLocalToWorldPose | The pose of the object in the current frame, in world space. |
float | lerpStep | The interpolation step between consecutive poses. |
List<Pose> | trajectory | The evaluated poses along the trajectory, in world space. |
Remarks
Unless isLocal is false, the generator computes its pose in local space, then composes it to its parent pose to get the trajectory in world space. lerpStep is chosen such that trajectoryIdx * lerpStep is 0 for the first pose, and 1 for the last pose. It is computed like this: lerpStep = 1 / (trajectoryCount - 1).