Code Monkey home page Code Monkey logo

meshviewer's Introduction

Mesh Viewer

Project Screenshot

A 3d mesh viewer for models with .off extension, developed with OpenGL on C++.

Environment Setup

  • Solution is created with Visual Studio 2017.

  • It's assumed that OpenGL, FreeGLUT and Windows SDK 8.1 is already installed correctly on the system. This guide can be followed to get your dev. environment ready: http://www.cs.uky.edu/~cheng/cs633/OpenGLInstallGuideWindows.pdf

  • Project must be compiled on x86 mode. (Release mode is preferred for performance)

  • Source folder with shader files inside should be on same directory with exe file.

Running The Program

Run the command on cmd:

MeshViewer.exe seashell.off dragon.off

Information

  • GL_CULL_FACE is enabled for improving performance (Can be disabled from source code, if your models does not generated with taking face culling into account, and if it has missing faces when program is executed)

  • There is only one global light source and it's fixed on the scene.

  • For parsing .off files, the whole .off file is mapped into memory and then read from there.

  • Camera only can be rotated on y axis. Adding another axis causes gimbal lock problems, this will be solved with future commits.

  • .off files should be in same path with builded .exe file

Controls

  • n -> Load next model

  • p -> Load previous model

  • Left Arrow -> Rotate object by -2 degrees

  • Right Arrow -> Rotate object by 2 degrees

  • x -> Move mesh on x axis (Press capsclock for change direction of movement)

  • y -> Move mesh on y axis (Press capsclock for change direction of movement)

  • z -> Move mesh on z axis (Press capsclock for change direction of movement)

  • f -> Face drawing mode

  • v -> Vertex drawing mode

  • e -> Edge drawing mode

  • Vertical Mouse Movement -> Rotate camera on y axis

  • Mouse Wheel -> Zoom in/zoom out the camera

Licence

Copyright (C) 2018 Doğa Can YANIKOĞLU

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/

Contributing

Contributors are encouraged to fork this repository and issue pull requests.

meshviewer's People

Contributors

dyanikoglu avatar evereseetest avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

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.