This project implements and compares different polygon mesh representation schemes in Unity. It focuses on alternatives to the traditional Half-Edge data structure, particularly using a vertex-based approach inspired by Rotation Systems.
The project is organized into several modules, each implementing a different mesh representations or environment extensions:
- Multiple mesh representations: Half-edge and Rotation Systems
- Face operations: Select and split faces
- Edge operations: Navigate mesh topology through edges
- Visualization: Debug gizmos for vertices, edges, and faces
- Performance metrics: Timing information for mesh operations
Located in Assets/Scripts/Half-edge This folder contains the implementation of a Half-Edge mesh.
HalfEdgeCore.cs
- Core data structures:HEVertex
- Represents a vertex in 3D spaceHEHalfEdge
- Represents a directed half-edgeHEFace
- Represents a mesh face
HalfEdgeMesh.cs
- Main mesh class with operationsHalfEdgeTester.cs
- MonoBehaviour for testing in Unity
Located in Assets/Scripts/Rotation System v2 This folder contains the implementation of a Rotation System mesh with a face definition.
RotationSystem2Core.cs
- Core data structures:RSVertex
- Represents a vertex in 3D spaceRSEdge
- Represents an edge between two verticesRSFace
- Represents a mesh face
RotationSystem2Mesh.cs
- Main mesh class with operationsRotationSystem2Tester.cs
- MonoBehaviour for testing in Unity
Located in Assets/Editor
HalfEdgeTesterEditor.cs
- Custom inspector for Half-Edge testingRotationSystem2TesterEditor.cs
- Custom inspector for Rotation System v2RotationSystemTesterEditor.cs
- Custom inspector for original Rotation System
- Open the Unity scene
Assets/Scenes/MeshSchemes.unity
- Select one of the tester objects in the hierarchy:
HEMeshTester
for half-edge representationRS2MeshTester
for rotation system with face implementationRSMeshTester
for the simple, yet uncompletede, rotation system with out face implementation
- Use the Inspector buttons to create and manipulate meshes
Some parts of the project didn't work out either because of time constraints or prioritisation of other elements.
Located in Assets/Scripts/Rotation System This folder contains the original Rotation System implementation. Meaning the implementation with a definition of faces. This mesh does work to some extend and the Face Split algorithm works. It shows how it is possible to work on meshes with implicit faces, but does not mimic a fair real-world mesh since no data for the faces such as colors, normals and so on can be stored.
RotationSystemCore.cs
- Core data structuresRotationSystemMesh.cs
- Main mesh class with operationsRotationSystemTester.cs
- MonoBehaviour for testing in Unity
Located in Assets/Scripts/PLY(outdated)/
An attempt to import PLY files without luck. For a better attempt look at the branch RsPly. This branch does however only import PLY files into the Rotation System v2
mesh.
PlyImporter.cs
- Utilities for importing PLY filesPlyViewer.cs
- MonoBehaviour for viewing PLY files