/mesh-viewer

Mesh viewer

Primary LanguageC++

mesh-viewer

OPenGL applications for viewing meshes

How to build

Windows

Open git bash to the directory containing this repository.

mesh-viewer $ mkdir build
mesh-viewer $ cd build
mesh-viewer/build $ cmake -G "Visual Studio 16 2019" ..
mesh-viewer/build $ start CS312-MeshViewer.sln

Your solution file should contain multiple projects, such as mesh-viewer. To run from the git bash command shell,

mesh-viewer/build $ ../bin/Debug/mesh-viewer

macOS

Open terminal to the directory containing this repository.

mesh-viewer $ mkdir build
mesh-viewer $ cd build
mesh-viewer/build $ cmake ..
mesh-viewer/build $ make

To run each program from build, you would type

mesh-viewer/build $ ../bin/mesh-viewer

Simple Mesh

  1. Pyramid using Triangles

Screen Shot 2021-05-27 at 9 54 40 PM

  1. Adding zoom in and out Ferature and Rotation Feature

Formula used:

x = Dist * sin(Azimuth) * cos(Elevation)
y = Dist * sin(Elevation)
z = Dist * cos(Azimuth) * cos(Elevation)

ZOOM IN and ZOOM OUT

Screen.Recording.2021-05-27.at.9.36.53.PM.mov

ROTATION

Screen.Recording.2021-05-27.at.9.38.15.PM.mov

Mesh Viewer

  1. **Per - Vertex shader: Zoom in and out and rotation for one mesh object **
Screen.Recording.2021-05-27.at.9.43.14.PM.mov
  1. Per - Vertex shader:changing models
Screen.Recording.2021-05-27.at.9.50.50.PM.mov

Unique feature: Per-Pixel shader

Demo

Screen.Recording.2021-05-27.at.9.49.30.PM.mov