Port of as3delaunay to C# for Unity
Pull request Compare This branch is 9 commits ahead, 1 commit behind jceipek:master.
Latest commit 02e0104 Oct 28, 2014 adam ADDED: new classes that give cleaner interface to the Voronoi data - …
…without throwing away key information (which AS3Delaunay original port unfortunately does). Use VoronoDiagram and friends for everything, if you can


Fork of Unity-Delaunay

This fork exists to add:

  • Issue-tracking (missing from master project)
  • More interactivity in the demo project / add missing docs to source code

I hate forking projects - big waste of time - but with no issue-tracking on upstream, I really had no choice.

Current features

Upgrades compared to upstream:

  • Demo project lets you enable/disable rendering of individual features
    • Helps you understand the definitions (undocumented in source)
    • Helps you experiment with the data structures before embedding in your own projects
  • Usage instructions!


Running the Demo

  • Open the "demo" folder in Unity as a new Project
  • Open the "Demo" scene inside Unity (otherwise nothing will happen when you run)
  • Select the "Extended demo" object
  • Click the "re-generate" button to make a new random Voronoi
  • in the Editor view you'll now see a coloured diagram of your data
  • also you now have tickboxes to show/hide various features of the output data

Including in your own game/app

  1. In the CSharpLibrary folder, there should be a subfolder: AS3DelaunayExtended/AS3DelaunayExtended/bin/Debug
  2. ...which contains the DLL: AS3DelaunayExtended.dll
  3. Drag/drop that DLL into your Unity3D project, and Unity will automatically load + add it
  4. You can now use all the classes and features in your project
    1. NB: this DLL does NOT include the Custom Editor classes (Unity requires two DLLs if you want that)
    2. NB: this means you lose the custom buttons for "Re-generate Voronoi"; you can use the function via script/code only!


Voronoi diagrams, Delaunay triangulation, minimum spanning graphs, convex hull and more. Ported to C# for use in the Unity game engine from https://github.com/nodename/as3delaunay.

Delaunay Triangulation Spanning Graph Example


MIT licensed, like the original. Check out the original project page here.