LeapRecorder.Load C# (CSharp) Method

Load() public method

public Load ( byte data ) : void
data byte
return void
  public void Load(byte[] data) {
    frame_index_ = 0;
    frames_.Clear();
    int i = 0;
    while (i < data.Length) {
      byte[] frame_size = new byte[4];
      Array.Copy(data, i, frame_size, 0, frame_size.Length);
      i += frame_size.Length;
      byte[] frame = new byte[System.BitConverter.ToUInt32(frame_size, 0)];
      Array.Copy(data, i, frame, 0, frame.Length);
      i += frame.Length;
      frames_.Add(frame);
    }
  }
}

Same methods

LeapRecorder::Load ( TextAsset text_asset ) : void

Usage Example

コード例 #1
0
    /** Initalizes the hand and tool lists and recording, if enabled.*/
    void Start()
    {
        // Initialize hand lookup tables.
        hand_graphics_ = new Dictionary <int, HandModel>();
        hand_physics_  = new Dictionary <int, HandModel>();

        tools_ = new Dictionary <int, ToolModel>();

        smoothedFixedUpdateOffset_.delay = FIXED_UPDATE_OFFSET_SMOOTHING_DELAY;

        if (leap_controller_ == null)
        {
            Debug.LogWarning(
                "Cannot connect to controller. Make sure you have Leap Motion v2.0+ installed");
        }

        if (enableRecordPlayback && recordingAsset != null)
        {
            recorder_.Load(recordingAsset);
        }

        LifecycleEventHandler handler = onStart;

        if (handler != null)
        {
            handler(this);
        }
    }
All Usage Examples Of LeapRecorder::Load