A 3D mesh data structure implemented in C++ supporting geometric queries and graph algorithms on triangle meshes.
This project loads and processes 3D mesh files in OFF format. It builds an adjacency structure of vertices, edges, and triangles, and supports various geometric and graph-based operations.
- Mesh Loading - Parses OFF files to build vertex, edge, and triangle structures
- Adjacency Queries - Neighbour detection, vertex degree calculation
- Graph Algorithms - BFS-based jump count, Dijkstra-based geodesic distance
- Heap Structure - Min-heap for efficient k-th shortest edge queries
- Mesh Updates - Vertex position updates with automatic edge length recalculation
Vertex- 3D coordinates with adjacency lists (neighbours, edges, triangles)Edge- Connects two vertices with precomputed Euclidean lengthTriangle- Three vertices forming a faceMinHeap- 1-indexed min-heap over edges sorted by length
g++ -o mesh main.cpp Mesh.cpp DataStructures.cpp
./mesh- 3D geometry and mesh representation
- BFS and Dijkstra's algorithm on mesh graphs
- Min-heap construction and maintenance
- Vector arithmetic (dot product, cross product, distance)
Language: C++ | University: METU