void OnEnable() { if (GlobalSensorController.WasSetFromLoader) { sensorType = GlobalSensorController.StartWithSensor; } adapter = new SensorAdapter(sensorType) { OnChangedAvailabilityEventHandler = (sender, args) => { Debug.Log(args.SensorType + " is connected: " + args.IsConnected); } }; depthFilter = new DepthFilter(); model1.Initialize(); model1.AvatarRoot.SetActive(false); model1Size = Vector3.Distance(model1.Bones[(int)JointType.SpineBase].Transform.position, model1.Bones[(int)JointType.Head].Transform.position); model2.Initialize(); model2.AvatarRoot.SetActive(false); model2Size = Vector3.Distance(model2.Bones[(int)JointType.SpineBase].Transform.position, model2.Bones[(int)JointType.Head].Transform.position); }
private static IEnumerable <SitemapItem> ExpandTaxonomyRoots(NavigationFilter filter, Localization localization) { using (new Tracer(filter, localization)) { TaxonomyFactory taxonomyFactory = new TaxonomyFactory(); string[] taxonomyIds = taxonomyFactory.GetTaxonomies(localization.GetCmUri()); int depth = filter.DescendantLevels > 0 ? (filter.DescendantLevels - 1) : filter.DescendantLevels; TaxonomyFilter taxonomyFilter = new DepthFilter(depth, DepthFilter.FilterDown); IEnumerable <Keyword> taxonomyRoots = taxonomyIds.Select(id => taxonomyFactory.GetTaxonomyKeywords(id, taxonomyFilter)); return(taxonomyRoots.Select(kw => CreateTaxonomyNode(kw, depth, filter, localization))); } }
private static TaxonomyNode ExpandAncestorsForKeyword(string keywordUri, string taxonomyUri, NavigationFilter filter, Localization localization) { using (new Tracer(keywordUri, taxonomyUri, filter, localization)) { TaxonomyFactory taxonomyFactory = new TaxonomyFactory(); TaxonomyFilter taxonomyFilter = new DepthFilter(DepthFilter.UnlimitedDepth, DepthFilter.FilterUp); Keyword taxonomyRoot = taxonomyFactory.GetTaxonomyKeywords(taxonomyUri, taxonomyFilter, keywordUri); if (taxonomyRoot == null) { Log.Warn("Keyword '{0}' in Taxonomy '{1}' not found.", keywordUri, taxonomyUri); return(null); } return(CreateTaxonomyNode(taxonomyRoot, -1, filter, localization)); } }
private static IEnumerable <SitemapItem> ExpandDescendants(string keywordUri, string taxonomyUri, NavigationFilter filter, Localization localization) { using (new Tracer(keywordUri, taxonomyUri, filter, localization)) { TaxonomyFactory taxonomyFactory = new TaxonomyFactory(); TaxonomyFilter taxonomyFilter = new DepthFilter(filter.DescendantLevels, DepthFilter.FilterDown); Keyword contextKeyword = taxonomyFactory.GetTaxonomyKeywords(taxonomyUri, taxonomyFilter, keywordUri); if (contextKeyword == null) { Log.Warn("Keyword '{0}' in Taxonomy '{1}' not found.", keywordUri, taxonomyUri); return(new SitemapItem[0]); } TaxonomyNode contextTaxonomyNode = CreateTaxonomyNode(contextKeyword, filter.DescendantLevels, filter, localization); return(contextTaxonomyNode.Items); } }
protected override IEnumerable <SitemapItem> ExpandDescendants(string keywordUri, string taxonomyUri, NavigationFilter filter, ILocalization localization) { TaxonomyFactory taxonomyFactory = new TaxonomyFactory(); TaxonomyFilter taxonomyFilter = new DepthFilter(filter.DescendantLevels, DepthFilter.FilterDown); Keyword contextKeyword = taxonomyFactory.GetTaxonomyKeywords(taxonomyUri, taxonomyFilter, keywordUri); if (contextKeyword == null) { throw new TridionDocsApiException(); } TaxonomyNode contextTaxonomyNode = CreateTaxonomyNode(contextKeyword, filter.DescendantLevels, filter, localization); return(contextTaxonomyNode.Items); }
void OnEnable() { if (GlobalSensorController.WasSetFromLoader) { sensorType = GlobalSensorController.StartWithSensor; } adapter = new SensorAdapter(sensorType) { OnChangedAvailabilityEventHandler = (sender, args) => { Debug.Log(args.SensorType + " is connected: " + args.IsConnected); } }; depthFilter = new DepthFilter(); model.Initialize(); }
private bool IsFilterMatch(EarthQuakeData e) { var matchMagnitude = MagnitudeFilter.Contains(e.Magnitude); var matchDepth = DepthFilter.Contains(e.Depth); var matchLatitude = LatitudeFilter.Contains(e.Latitude); var matchLongitude = LongitudeFilter.Contains(e.Longitude); var matchRegion = SelectedRegions.Contains(e.Region); bool matchTime; //if (TimeFilter.IsCustom) //{ // matchTime = TimeFilter.Contains(e.Updated); //} //else //{ matchTime = e.Updated >= GetActualTimeMin(); //} return(matchMagnitude && matchDepth && matchTime && matchLatitude && matchLongitude && matchRegion); }
private static IEnumerable<SitemapItem> ExpandTaxonomyRoots(NavigationFilter filter, Localization localization) { using (new Tracer(filter, localization)) { TaxonomyFactory taxonomyFactory = new TaxonomyFactory(); string[] taxonomyIds = taxonomyFactory.GetTaxonomies(GetPublicationTcmUri(localization)); int depth= filter.DescendantLevels > 0 ? (filter.DescendantLevels - 1) : filter.DescendantLevels; TaxonomyFilter taxonomyFilter = new DepthFilter(depth, DepthFilter.FilterDown); IEnumerable<Keyword> taxonomyRoots = taxonomyIds.Select(id => taxonomyFactory.GetTaxonomyKeywords(id, taxonomyFilter)); return taxonomyRoots.Select(kw => CreateTaxonomyNode(kw, depth, filter, localization)); } }
private static IEnumerable<SitemapItem> ExpandDescendants(string keywordUri, string taxonomyUri, NavigationFilter filter, Localization localization) { using (new Tracer(keywordUri, taxonomyUri, filter, localization)) { TaxonomyFactory taxonomyFactory = new TaxonomyFactory(); TaxonomyFilter taxonomyFilter = new DepthFilter(filter.DescendantLevels, DepthFilter.FilterDown); Keyword contextKeyword = taxonomyFactory.GetTaxonomyKeywords(taxonomyUri, taxonomyFilter, keywordUri); if (contextKeyword == null) { Log.Warn("Keyword '{0}' in Taxonomy '{1}' not found.", keywordUri, taxonomyUri); return new SitemapItem[0]; } TaxonomyNode contextTaxonomyNode = CreateTaxonomyNode(contextKeyword, filter.DescendantLevels, filter, localization); return contextTaxonomyNode.Items; } }
private static TaxonomyNode ExpandAncestorsForKeyword(string keywordUri, string taxonomyUri, NavigationFilter filter, Localization localization) { using (new Tracer(keywordUri, taxonomyUri, filter, localization)) { TaxonomyFactory taxonomyFactory = new TaxonomyFactory(); TaxonomyFilter taxonomyFilter = new DepthFilter(DepthFilter.UnlimitedDepth, DepthFilter.FilterUp); Keyword taxonomyRoot = taxonomyFactory.GetTaxonomyKeywords(taxonomyUri, taxonomyFilter, keywordUri); if (taxonomyRoot == null) { Log.Warn("Keyword '{0}' in Taxonomy '{1}' not found.", keywordUri, taxonomyUri); return null; } return CreateTaxonomyNode(taxonomyRoot, -1, filter, localization); } }