Skip to content

Commit 6977af8

Browse files
committed
doc updates
1 parent bc5a8bf commit 6977af8

File tree

2 files changed

+79
-0
lines changed

2 files changed

+79
-0
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Version 2.1.0
2+
3+
This version adds
4+
5+
- Access to face data in PDAL using the `GetMeshSize` and `getAllTriangles` methods,
6+
- Updates the sample C# P/Invoke scripts to add the Mesh functions and remove depedencies on Unity. Asdded .csproj files and improved some signatures
7+
- added more examples to readme.
8+
9+
# Version 2.0.0
10+
11+
This was the first version released through conda.

README.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,74 @@ An example of the use of the API is given in the `csharp` folder which contains
4141

4242
NOTE - these scripts are provided for information only as examples and are not supported in any way!
4343

44+
## Example C# Program
45+
46+
``` c#
47+
using System;
48+
using System.Collections.Generic;
49+
using Pdal;
50+
using Newtonsoft.Json;
51+
using g3;
52+
53+
namespace pdal_mesh
54+
{
55+
class Program
56+
{
57+
static void Main(string[] args)
58+
{
59+
Console.WriteLine("Hello World!");
60+
Config pdal = new Config();
61+
Console.WriteLine(pdal.Version);
62+
63+
List<object> pipe = new List<object>();
64+
pipe.Add(".../CAPI/tests/data/las/1.2-with-color.las");
65+
pipe.Add(new
66+
{
67+
type = "filters.splitter",
68+
length = 1000
69+
});
70+
pipe.Add(new
71+
{
72+
type = "filters.delaunay"
73+
});
74+
75+
string json = JsonConvert.SerializeObject(pipe.ToArray());
76+
77+
Pipeline pl = new Pipeline(json);
78+
79+
long count = pl.Execute();
80+
81+
Console.WriteLine($"Point Count is {count}");
82+
83+
using (PointViewIterator views = pl.Views) {
84+
views.Reset();
85+
86+
while (views.HasNext())
87+
{
88+
PointView view = views.Next;
89+
if (view != null)
90+
{
91+
Console.WriteLine($"Point Count is {view.Size}");
92+
Console.WriteLine($"Triangle Count is {view.MeshSize}");
93+
94+
BpcData pc = view.GetBakedPointCloud();
95+
96+
DMesh3 mesh = view.getMesh();
97+
98+
}
99+
}
100+
}
101+
}
102+
}
103+
}
104+
```
105+
106+
This takes a LAS file, splits the file into tiles and then creates a Delaunay Triangulation (i.e. Mesh) for each one.
107+
108+
This code uses the sample bindings as-is and has a dependency on [Geometry3Sharp](https://github.com/gradientspace/geometry3Sharp) only.
109+
110+
Note that `BcpData` is a custom data structure that holds the Point Cloud in a form suitable to create a [Baked PointCloud](https://medium.com/realities-io/point-cloud-rendering-7bd83c6220c8) suitable for rendering as a VFX graph in Unity. This is an efficient way to display point cloud data in VR and I have used it successfully with point clouds of 10 million points.
111+
44112
# For Developers
45113

46114
## Build on Windows

0 commit comments

Comments
 (0)