Skip to content

SpicyCactuar/half-edge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Half Edge

half-edge

Qt application that displays triangle meshes backed by the half-edge data structure. The program supports triangle soup (.tri) and custom half-edge (.halfedge) files, with samples being provided. In addition, the mesh can be subdivided using the loop subdivision technique.

Project Structure

half-edge/
├── src/                   # Source code
├── assets/                # Static assets
    ├── tri                # .tri files
    ├── halfedge           # .halfedge files
├── half-edge.pro          # QMake project
└── README.md              # Project README

Build

qmake
make

Run

bin/half-edge <.tri or .halfedge file>

Example .tri:

bin/half-edge assets/tri/cube.tri

Example .halfedge:

bin/half-edge assets/halfedge/cube.halfedge

Controls

Key(s) Action
(X, Y, Z) Sliders Adjust the camera position
Model ArcBall Rotate mesh
Light ArcBall Rotate directional light
Flat Normals Checkbox Toggle per vertex/per face normals
Show Vertices Checkbox Render spheres around vertices
Vertex Size Slider Control size of vertex spheres
Subdivisions [0, 8] Control current subdivision level

Technologies

  • C++: >= C++17
  • Qt: 5.12.x
  • OpenGL: >= 4.0

Newer versions of Qt might work correctly, if no breaking changes that affect the application were introduced.

Subdivisions are computed lazily, but the computation occurs on the main thread. If the mesh is sufficiently large, the program stalls.

TODOs

  • Parallelize subdivision computation

About

Triangle mesh rendered backed by a half-edge data structure

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published