Skip to content

Iluvatar82/HalfEdge

Repository files navigation


Logo

HalfEdge

A HalfEdge Data-Structure to use in your projects!

Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Status>
  3. Getting Started
  4. Usage
  5. Roadmap
  6. License
  7. Contact
  8. Acknowledgments

About The Project

This Project aims to provide you with an easy-to-use (I am working on that one :)) Library to use in your Projects. The Feature-Set is kind of restricted at the moment, but that will change in the Future.

Benefits of using this Library:

  • You can use this in a wide range of applications - to work with a mesh.
  • I did it, so you won't have to write your own Library which does the same thing
  • I try to keep the Code clean so everything can be used easily
  • New features regarding the Mesh will follow soon:
    • Subdivision of the Mesh
    • Cutting of the Mesh with regards to a Plane (Axis-Aligned at the beginning, but general Planes will be supported in the Future)
    • Boolean Operations with multiple Meshes, like the Union and Difference

(back to top)

Status

  • Build and Test: .NET

Getting Started

After including the Library in your Project, either via adding the Code directly to your solution or by adding a Reference to the DLL-File. You can start using the Library to do your computations. Simple Conversions exist e.g. for the Vertex class to support an easy way to create your first Mesh.

Installation

Download the Source-Code and add the Project to your Solution or get on the the generated DLLs and use this in your Project.

(back to top)

Usage

To get a valid Mesh, the most convenient way is to use the MeshFactory (which is a static class) and let it generate the Half-Edge Information for you! You just provide all Vertices and the Polygon-Indices in the Vertex-List. A simple example would be:

var vertices = new List<Vertex> { new Vertex(0, 0, 0), new Vertex(2, 1, 1), new Vertex(0, 1, 1) };
var indices = new List<List<int>> { new List<int> { 0, 1, 2 } };
var mesh = MeshFactory.CreateMesh(vertices, indices);

Of course the Mesh is not restricted to only consist of triangles (this is where the TriangleMesh comes into play), so you can create Meshes with e.g. only Polygons consisting of five and six Vertices.

(back to top)

Roadmap

  • Add back to top links here
  • More convenient Way of adding/removing Polygons (without the need to add the Vertices and HalfEdges beforehand)
  • HalfEdge Subdivision(s)
    • Loop
    • Modified Butterfly
    • Catmull-Clark
  • Texture-Coordinates
  • Normals
    • Per Polygon
    • Per Vertex
  • Curvature Calculations and related:
  • Mesh Optimization (reduce Triangles where possible!)
  • Mesh-Cutoffs (via Plane)
  • Boolean Operations for two Meshes
    • Union
    • Difference
  • Demo Application
    • Add functionality to it (interactivity)

See the open Issues for a full list of proposed features (and known issues).

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Project Link: https://github.com/Iluvatar82/HalfEdge

(back to top)

Acknowledgments

Use this space to list resources you find helpful and would like to give credit to. I've included a few of my favorites to kick things off!

(back to top)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published