protected void CheckForPlanes() { if (this.PointCloud.Planes == null || !this.PointCloud.Planes.Any()) { var planeClassifier = AbstractPlaneFinder.Instantiate(AbstractPlaneFinder.CurrentType, this.PointCloud); planeClassifier.Classify(); planeClassifier.RemoveGroundPlanesAndVerticalPlanes(); PointCloud.Planes = planeClassifier.GetPlanes(); } this.Planes = this.PointCloud.Planes; }
public void FindPlanes(AbstractPlaneFinder.Type type, bool showPlanes) { PlaneBehaviour.DeletePlanesIn(this.transform); this.transform.DeleteRoofMeshes(); var planeClassifier = AbstractPlaneFinder.Instantiate(type, this.PointCloud); planeClassifier.Classify(); planeClassifier.RemoveGroundPlanesAndVerticalPlanes(); if (showPlanes) { foreach (var tuple in planeClassifier.PlanesWithScore.OrderByDescending(t => t.Value2).Take(6)) { var plane = tuple.Value1; PlaneBehaviour.DisplayPlane(plane, this); } } this.PointCloud.Planes = planeClassifier.GetPlanes(); }