https://github.com/daniilgrbic/minimum-bounding-box
A program which approximates the smallest bounding box (by volume) of a given 3D object
https://github.com/daniilgrbic/minimum-bounding-box
approximation bounding-box geometric-algorithms university-project
Last synced: about 1 year ago
JSON representation
A program which approximates the smallest bounding box (by volume) of a given 3D object
- Host: GitHub
- URL: https://github.com/daniilgrbic/minimum-bounding-box
- Owner: daniilgrbic
- Created: 2021-12-05T21:17:05.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-06-11T16:21:35.000Z (almost 4 years ago)
- Last Synced: 2025-01-12T20:46:43.619Z (about 1 year ago)
- Topics: approximation, bounding-box, geometric-algorithms, university-project
- Language: C
- Homepage:
- Size: 331 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Minimum bounding box approximation
## Running the program on Linux
### Requirements
GLEW (The OpenGL Extension Wrangler Library)
* run `sudo apt-get install libglew-dev`
GLFW (Graphics Library Framework)
* run `sudo apt-get install libglfw3`
If you get a message saying any of these libraries cannot be located,
run `sudo apt-get update` to update your package lists
### Running
Navigate to the directory where you have extracted the executable
and run it with the path to an `.obj` file as the only argument, e.g.
* `./Minimum_bounding_box tertahedron.obj`
Note that the executable needs to be located in the same folder as
the shaders directory, otherwise it won't work.
## Building on Linux
### Without CMake
In addition to packages above, install `g++`, `libglfw3-dev`, and
`libglm-dev`.
Navigate to source root folder and run
* `g++ *.cpp -I ./utility/ utility/*.cpp -lGL -lGLEW -lglfw -std=c++17 -O1 -o Minimum_bounding_box`
### Using CMake
##### (works on macOS, use brew to install glew and glfw)
\
Install the `cmake` package.
Navigate to source root folder and run
* `cmake -B ./build`
This may produce errors because CMake cache doesn't exist. If this happens, run the command again.
After this, run
* `make --directory=build`
You should now see a message that the build was successful.