Class InputPlaybackService
Plays back input animation via the input simulation system.
Inheritance
Implements
Inherited Members
Namespace: Microsoft.MixedReality.Toolkit.Input
Assembly: cs.temp.dll.dll
Syntax
public class InputPlaybackService : BaseInputSimulationService, IMixedRealityInputPlaybackService, IMixedRealityInputDeviceManager, IMixedRealityDataProvider, IMixedRealityService, IDisposable
Constructors
InputPlaybackService(IMixedRealityServiceRegistrar, IMixedRealityInputSystem, String, UInt32, BaseMixedRealityProfile)
Constructor.
Declaration
[Obsolete("This constructor is obsolete (registrar parameter is no longer required) and will be removed in a future version of the Microsoft Mixed Reality Toolkit.")]
public InputPlaybackService(IMixedRealityServiceRegistrar registrar, IMixedRealityInputSystem inputSystem, string name = null, uint priority = 10U, BaseMixedRealityProfile profile = null)
Parameters
Type | Name | Description |
---|---|---|
IMixedRealityServiceRegistrar | registrar | The IMixedRealityServiceRegistrar instance that loaded the data provider. |
IMixedRealityInputSystem | inputSystem | The IMixedRealityInputSystem instance that receives data from this provider. |
String | name | Friendly name of the service. |
UInt32 | priority | Service priority. Used to determine order of instantiation. |
BaseMixedRealityProfile | profile | The service's configuration profile. |
InputPlaybackService(IMixedRealityInputSystem, String, UInt32, BaseMixedRealityProfile)
Constructor.
Declaration
public InputPlaybackService(IMixedRealityInputSystem inputSystem, string name = null, uint priority = 10U, BaseMixedRealityProfile profile = null)
Parameters
Type | Name | Description |
---|---|---|
IMixedRealityInputSystem | inputSystem | The IMixedRealityInputSystem instance that receives data from this provider. |
String | name | Friendly name of the service. |
UInt32 | priority | Service priority. Used to determine order of instantiation. |
BaseMixedRealityProfile | profile | The service's configuration profile. |
Properties
Animation
The animation currently being played.
Declaration
public InputAnimation Animation { get; set; }
Property Value
Type | Description |
---|---|
InputAnimation |
Duration
Duration of the played animation.
Declaration
public float Duration { get; }
Property Value
Type | Description |
---|---|
Single |
HandDataLeft
Pose data for the left hand.
Declaration
public SimulatedHandData HandDataLeft { get; }
Property Value
Type | Description |
---|---|
SimulatedHandData |
HandDataRight
Pose data for the right hand.
Declaration
public SimulatedHandData HandDataRight { get; }
Property Value
Type | Description |
---|---|
SimulatedHandData |
IsPlaying
True if the animation is currently playing.
Declaration
public bool IsPlaying { get; }
Property Value
Type | Description |
---|---|
Boolean |
LocalTime
The local time in seconds relative to the start of the animation.
Declaration
public float LocalTime { get; set; }
Property Value
Type | Description |
---|---|
Single |
Methods
CheckCapability(MixedRealityCapability)
Declaration
public bool CheckCapability(MixedRealityCapability capability)
Parameters
Type | Name | Description |
---|---|---|
MixedRealityCapability | capability |
Returns
Type | Description |
---|---|
Boolean |
LoadInputAnimation(String)
Try to load input animation data from the given file.
Declaration
public bool LoadInputAnimation(string filepath)
Parameters
Type | Name | Description |
---|---|---|
String | filepath |
Returns
Type | Description |
---|---|
Boolean | True if loading input animation from the file succeeded. |
Pause()
Pause playback and keep the current local time.
Declaration
public void Pause()
Play()
Start playing the animation.
Declaration
public void Play()
Stop()
Stop playing the animation and jump to the start.
Declaration
public void Stop()
Update()
Optional Update function to perform per-frame updates of the service.
Declaration
public override void Update()