public void Push(WitFrame witFrame, DataSelection dataSelection) { var delta = (witFrame.Clock - _startTime).TotalMilliseconds; if (dataSelection == DataSelection.GroupByX) { LinearAcceleration.Points.Add(new DataPoint(delta, witFrame.LinearAcceleration.X)); AngularVelocity.Points.Add(new DataPoint(delta, witFrame.AngularVelocity.X)); Angle.Points.Add(new DataPoint(delta, witFrame.Angle.X)); } else if (dataSelection == DataSelection.GroupByY) { LinearAcceleration.Points.Add(new DataPoint(delta, witFrame.LinearAcceleration.Y)); AngularVelocity.Points.Add(new DataPoint(delta, witFrame.AngularVelocity.Y)); Angle.Points.Add(new DataPoint(delta, witFrame.Angle.Y)); } else if (dataSelection == DataSelection.GroupByZ) { LinearAcceleration.Points.Add(new DataPoint(delta, witFrame.LinearAcceleration.Z)); AngularVelocity.Points.Add(new DataPoint(delta, witFrame.AngularVelocity.Z)); Angle.Points.Add(new DataPoint(delta, witFrame.Angle.Z)); } ClipLeft(LinearAcceleration.Points, _clipMax); ClipLeft(AngularVelocity.Points, _clipMax); ClipLeft(Angle.Points, _clipMax); }
//Select all Roles public DataTable selectAllRoles() { //Create DataSelection object DataSelection dataSelection = new DataSelection(); return(dataSelection.selectData("prcRole_Select")); }
//-------------------------------------------------- //-------------------------------------------------- public void SelectSurfaceViewed() //-------------------------------------------------- { DataSelection currentSelection = m_dataSelections[(int)DataSelector.SURFACES_VIEWED]; currentSelection.selected = !currentSelection.selected; currentSelection.selector.enabled = currentSelection.selected; SimulationManager.singleton.EnableMap( MapsManager.MapType.SURFACES, currentSelection.selected); }
//-------------------------------------------------- #endregion MONOBEHAVIOUR #region PUBLIC METHODS //-------------------------------------------------- public void SelectTunnelModel() //-------------------------------------------------- { DataSelection currentSelection = m_dataSelections[(int)DataSelector.TUNNEL_MODEL]; currentSelection.selected = !currentSelection.selected; currentSelection.selector.enabled = currentSelection.selected; SimulationManager.singleton.EnableMap( MapsManager.MapType.MODEL, currentSelection.selected); }
//-------------------------------------------------- //-------------------------------------------------- public void SelectDataOverlay() //-------------------------------------------------- { DataSelection currentSelection = m_dataSelections[(int)DataSelector.DATA_OVERLAY]; currentSelection.selected = !currentSelection.selected; currentSelection.selector.enabled = currentSelection.selected; SimulationManager.singleton.EnableMap( MapsManager.MapType.DATA, currentSelection.selected); }
//-------------------------------------------------- //-------------------------------------------------- private void HandleTeleportToCommandCenter() //-------------------------------------------------- { //Debug.Log("HandleTeleportToCommandCenter"); DataSelection dataOverlayOption = m_dataSelections[(int)DataSelector.DATA_OVERLAY]; dataOverlayOption.selected = m_dataOverlayState; dataOverlayOption.selector.enabled = m_dataOverlayState; SimulationManager.singleton.EnableMap( MapsManager.MapType.DATA, m_dataOverlayState); }
//-------------------------------------------------- #endregion PUBLIC METHODS #region PRIVATE METHODS //-------------------------------------------------- private void HandleTeleportToTunnel() //-------------------------------------------------- { //Debug.Log("HandleTeleportToTunnel"); DataSelection dataOverlayOption = m_dataSelections[(int)DataSelector.DATA_OVERLAY]; m_dataOverlayState = dataOverlayOption.selected; dataOverlayOption.selected = false; dataOverlayOption.selector.enabled = false; SimulationManager.singleton.EnableMap( MapsManager.MapType.DATA, false); }
//-------------------------------------------------- #endregion PUBLIC AND PRIVATE VARIABLES #region MONOBEHAVIOUR //-------------------------------------------------- private void Awake() //-------------------------------------------------- { for (int i = 0; i < m_dataSelections.Length; i++) { m_dataSelections[i].selector.enabled = true; m_dataSelections[i].selected = true; m_dataOverlayState = true; } DataSelection currentSelection = m_dataSelections[(int)DataSelector.DATA_OVERLAY]; currentSelection.selected = !currentSelection.selected; currentSelection.selector.enabled = currentSelection.selected; EventsManager.OnTeleportToTunnel += HandleTeleportToTunnel; EventsManager.OnTeleportToCommandCenter += HandleTeleportToCommandCenter; }
// Start is called before the first frame update void Start() { data = new DataSelection(); pools = data.GetPools(); }
// Start is called before the first frame update void Start() { DataSelection data = new DataSelection(); materials = data.GetMaterials(); }
public void SetUp() { Meets = new List<MeetInstance> { SampleData.LCInvite10, SampleData.PluInvite10, SampleData.NwcChampionships10 }; CurrentMeet = new DataSelection<MeetInstance>(); }