Coder Social home page Coder Social logo

daniilgrbic / minimum-bounding-box Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 1.0 339 KB

A program which approximates the smallest bounding box (by volume) of a given 3D object

CMake 0.78% C++ 35.43% GLSL 1.93% C 61.87%
approximation bounding-box geometric-algorithms university-project

minimum-bounding-box's Introduction

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.