Moving from point cloud to solid mesh

I am trying to make a complex set of points in a 3D render. I have a bunch of layers, each with multiple polygons, each polygon with a different number of points.

I played with a lot of .NET libraries (wrappers for OpenGL, DirectX, etc.) and ended up arriving at a super simple WPF 3D control using the Helix Toolkit just to render 3D point clouds renderings. My super simple code looks like this:

private void Render3D(List<Layer> layers) {
  var layerIndex = 0;
  var pts = new Point3DCollection();

  foreach (var layer in layers) {
    foreach (var shape in layer.Shapes) {
      foreach (var point in shape.Points) {
        pts.Add(new Point3D(point.Item1, point.Item2, layerIndex * .5));
      }
    }
    layerIndex++;
  }

  var vis = new PointsVisual3D() { Points = pts };
  _viewport.Children.Add(vis);
}

      

My XAML looks like this:

<Window xmlns:h="http://helix-toolkit.org/wpf">
  <h:HelixViewport3D Name="_viewport">
    <h:SunLight />
  </h:HelixViewport3D>
</Window>

      

The result of this code, along with my ordered data, looks like this:

enter image description here

This is great and I was very happy to see my data in 3D, but I would like to go ahead and start actually rendering solid shapes from my point data, like this:

enter image description here

I am using .NET and will stick with that platform if possible, but I am open to other ideas. Hopefully this is agnostic enough to get a pointed answer.

+3


source to share





All Articles