Files
PointCloudWeb/PointCloudWeb.Server/Services/PointCloudService.cs
2021-07-11 10:14:43 +02:00

27 lines
698 B
C#

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);
}
}
}