public override void receivePosition2DList(SimplePosition2DList position2dList) { lock (thisLock) { m_data = UbiMeasurementUtils.ubitrackToUnity(position2dList); } }
internal static Measurement <List <Vector2> > ubitrackToUnity(SimplePosition2DList position2dList) { List <Vector2> data = new List <Vector2>(); foreach (SimplePosition2DValue entry in position2dList.values) { data.Add(new Vector2((float)entry.x, (float)entry.y)); } return(new Measurement <List <Vector2> >(data, position2dList.timestamp)); }
internal static Measurement<List<Vector2>> ubitrackToUnity(SimplePosition2DList position2dList) { List<Vector2> data = new List<Vector2>(); foreach (SimplePosition2DValue entry in position2dList.values) data.Add(new Vector2((float)entry.x, (float)entry.y)); return new Measurement<List<Vector2>>(data, position2dList.timestamp); }