Class Trajectory
Represents a high-resolution trajectory, that is, a series of poses that happens in-between two frames.
Inherited Members
Namespace: Mechatronics.SensorSDK
Assembly: solution.dll
Syntax
[DefaultExecutionOrder(314)]
public class Trajectory : MonoBehaviour
Remarks
By default, the class use a linear interpolator to generate poses. However, it is possible to provide your own ITrajectoryGenerator instance by setting the Generator property. To create a Trajectory, use GetOrCreateOn. Inquiring poses, whether via the pose properties or the ComputeTrajectory method, must be performed after Unity Update, to ensure all objects have finished moving. It is recommended to use LateUpdate. Trajectory uses DefaultExecutionOrderAttribute to run after other components, to allow capturing their movements.
Fields
Name | Description |
---|---|
minTrajectoryCount | Minimum number of points along a trajectory: origin and destination. |
Properties
Name | Description |
---|---|
curLocalToWorldPose | The pose of the game object the trajectory component is attached to, during the current frame, in world space. |
generator | The object used to generate poses in-between the previous frame and the current frame. |
isAvailable | Indicates whether the trajectory poses are available. |
prevLocalToWorldPose | The pose of the game object the trajectory component is attached to, during the previous frame, in world space. |
suggestedTrajectoryCount | The suggested minimum number of points along the trajectory for accurate simulation. |
Methods
Name | Description |
---|---|
ComputeTrajectory(int, List<Pose>) | Creates a list of local-to-world poses of the trajectory, evaluated uniformly in time. |
GetOrCreateOn(GameObject, bool) | Retrieves the Trajectory component attached to a given game object, creating it if necessary. |