Add ScanData Controller

This commit is contained in:
Tim Wundenberg
2021-07-11 10:14:43 +02:00
parent 0cf75695b4
commit f8e2e08886
8 changed files with 260 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using PointCloudWeb.Server.Models;
namespace PointCloudWeb.Server.Services
{
public class PointCloudService
{
private readonly PointCloudCollection _pointClouds;
public PointCloudService()
{
_pointClouds = new PointCloudCollection();
}
public void AddPoints(Guid id, IList<Point> points)
{
if (!_pointClouds.Contains(id))
throw new ArgumentOutOfRangeException("The Id {0} was not found!", id.ToString());
var pc = _pointClouds.GetById(id);
foreach (var point in points)
pc.Points.Add(point);
}
}
}