public void InitializeActiveBanks() { m_GPIOInputServiceConnectorConfig.Clear(); m_ActiveGPIOInOutBanks = m_GPIOInOutBanks.GPIOOActiveInOutBanks(m_GPIOInputServiceConnectorConfig); // m_ActiveGPIOInOutBanks = await GPIOOInOutBanks.GPIOOInOutBanksAsync(m_GPIOInputServiceConnectorConfig); m_ActiveInputs = m_ActiveGPIOInOutBanks.InOutBanks[0]; m_ActiveOutPuts = m_ActiveGPIOInOutBanks.InOutBanks[1]; }
private void UpdateConfiguration() { m_configurationPropertySet.Clear(); if (CurrentStaticEditor != null) { m_configurationPropertySet.Add(new KeyValuePair <string, object>("Effect", CurrentStaticEditor.Effect)); } else { var effectList = new EffectList(Effects.Select(evm => evm.Effect).Distinct()); m_configurationPropertySet.Add(new KeyValuePair <string, object>("Effect", effectList)); } }
void UpdatePropertySet() { #if UNITY_EDITOR _propertySet.Clear(); if (_material != null) { var shader = _material.shader; var count = ShaderUtil.GetPropertyCount(shader); for (var i = 0; i < count; ++i) { var name = ShaderUtil.GetPropertyName(shader, i); if (!_ignoreProperties.Contains(name)) { var type = ShaderUtil.GetPropertyType(shader, i); switch (type) { case ShaderUtil.ShaderPropertyType.Color: _propertySet.colors.Add(name); break; case ShaderUtil.ShaderPropertyType.Vector: _propertySet.vectors.Add(name); break; case ShaderUtil.ShaderPropertyType.Float: _propertySet.floats.Add(name); break; case ShaderUtil.ShaderPropertyType.Range: { var rangeData = new PropertySet.RangeData() { name = name, min = ShaderUtil.GetRangeLimits(shader, i, 1), max = ShaderUtil.GetRangeLimits(shader, i, 2), }; _propertySet.ranges.Add(rangeData); } break; case ShaderUtil.ShaderPropertyType.TexEnv: { if (!_ignoreTexEnv && _material.GetTexture(name) != null) { _propertySet.texEnvs.Add(name); } } break; } } } } #endif }
/// <summary> /// Clears the collection of properties. /// </summary> public void ClearProperties() { properties.Clear(); }
private void FillEffectPropertySet(SessionCollection sessions) { ValuePairs.Clear(); var enc = _video.GetVideoEncodingProperties(); var pitch = new List <int>(); var yaw = new List <int>(); var fov = new List <int>(); if (_forceFovFlag) { GetForcedFov(); } List <Heatmap.Coord []> test = new List <Heatmap.Coord[]>(); foreach (Session s in sessions.sessions) { test.Add(InterpolateSession(s, enc.FrameRate.Numerator, enc.FrameRate.Denominator, _video.OriginalDuration)); } long framesCount = enc.FrameRate.Numerator * _video.OriginalDuration.Ticks / TimeSpan.TicksPerSecond / enc.FrameRate.Denominator; //tu dodać try/catch for (int i = 0; i < framesCount; i++) { for (int j = 0; j < sessions.sessions.Count; j++) { try { pitch.Add(test[j][i].pitch); yaw.Add(test[j][i].yaw); fov.Add(test[j][i].fov); } catch (ArgumentOutOfRangeException) { pitch.Add(0); yaw.Add(0); fov.Add(0); } catch (Exception) { ; } //fov.Insert } } float dotsRadius = (float)mediaPlayerElement.ActualWidth / 4096 * 20; ValuePairs.Add("grayscaleVideoFlag", _grayscaleVideoFlag); ValuePairs.Add("backgroundColor", videoBackgroundPicker.Color); ValuePairs.Add("backgroundOpacity", (float)(1 - videoOpacity.Value / 100)); ValuePairs.Add("dotsRadius", dotsRadius); ValuePairs.Add("count", sessions.sessions.Count); ValuePairs.Add("pitch", pitch); ValuePairs.Add("yaw", yaw); ValuePairs.Add("fov", fov); ValuePairs.Add("generateDots", _dotsFlag); ValuePairs.Add("heatmapOpacity", (float)(heatmapOpacity.Value / 100)); ValuePairs.Add("height", enc.Height); ValuePairs.Add("width", enc.Width); }