Tanoda
LeapRecording.cs
Go to the documentation of this file.
1/******************************************************************************
2 * Copyright (C) Ultraleap, Inc. 2011-2020. *
3 * *
4 * Use subject to the terms of the Apache License 2.0 available at *
5 * http://www.apache.org/licenses/LICENSE-2.0, or another agreement *
6 * between Ultraleap and you, your company or other organization. *
7 ******************************************************************************/
8
9using System.Collections.Generic;
10using UnityEngine;
11
12namespace Leap.Unity.Recording {
13
14 public abstract class LeapRecording : ScriptableObject {
15
19 public const double NS_TO_S = 1e-6;
20
24 public const double S_TO_NS = 1e6;
25
29 public abstract float length { get; }
30
40 public abstract void LoadFrames(List<Frame> frames);
41
52 public abstract bool Sample(float time, Frame toFill, bool clampTimeToValid = true);
53
54 }
55
56}
The Frame class represents a set of hand and finger tracking data detected in a single frame.
Definition: Frame.cs:24
abstract float length
Returns the length of the recording in seconds.
abstract bool Sample(float time, Frame toFill, bool clampTimeToValid=true)
Samples the recording at the given time. Caller must provide a frame object that will be filled with ...
const double NS_TO_S
Converts nanoseconds to seconds. Leap frames store timestamps in nanoseconds.
const double S_TO_NS
Converts seconds to nanoseconds. Leap frames store timestamps in nanoseconds.
abstract void LoadFrames(List< Frame > frames)
Loads this recording with data from the provided TEMPORARY list of frames. These frames reflect raw r...