Skip to content

Latest commit

 

History

History
39 lines (27 loc) · 1.33 KB

File metadata and controls

39 lines (27 loc) · 1.33 KB

3D Mesh Processing

A 3D mesh data structure implemented in C++ supporting geometric queries and graph algorithms on triangle meshes.

Overview

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.

Features

  • 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

Data Structures

  • Vertex - 3D coordinates with adjacency lists (neighbours, edges, triangles)
  • Edge - Connects two vertices with precomputed Euclidean length
  • Triangle - Three vertices forming a face
  • MinHeap - 1-indexed min-heap over edges sorted by length

How to Run

g++ -o mesh main.cpp Mesh.cpp DataStructures.cpp
./mesh

Key Concepts

  • 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)

Tech Stack

Language: C++ | University: METU