half_edge_mesh 1.0.3

A basic implementation of the half-edge mesh data structure. It has a bunch of the functions you probably want in a half-edge mesh, but probably not all of them. I'm intending to add more methods and mutation techniques, as I need them for other projects or as I think of them. Pull requests welcome!
Documentation

Half-Edge Mesh

This is an implementation of the half-edge mesh data structure in Rust. Suggestions and pull requests welcome!

The most notable implementation detail is that links to other parts of the mesh (of which there are many) are Option<Weak<RefCell>>. This is in order to allow the references to be initialized to null, then set later during mutation methods. Since a half-edge mesh is a graph with many cycles, and some circular references, the entities require null references at some point during initialization (due to the circular references). I believe this implementation is the only way to construct this kind of structure within Rust's borrowing system, short of using raw pointers and unsafe code everywhere. I suppose that in the far future, I could refactor this project to use raw pointers for performance.

Currently, this data structure is built with mathematical primitives from cgmath. Vectors are cgmath::Vector3, and points are cgmath::Point3. This makes the API somewhat simpler, since it doesn't need to be type-parameterized for primitive types. It would be possible to refactor out this dependency at some point in the future.